1 Introduction

Network Virtualization (NV) is a key technology that has allowed the construction and operation of multiple logical networks independently over the same physical network infrastructure. In this context, Virtual Network Embedding (VNE) is the process by which physical resources like CPU, memory, and bandwidth are allocated to support the Virtual Networks (VNs). While mapping the virtual elements to the physical ones, the VNE process must consider both, the requirements of the VNs to operate with guarantees and the availability of the substrate resources. Online VNE refers to mapping VNs once each VN request (VNR) is received, i.e., evaluating the current state of substrate resources at the time of the VNR and selecting the resources that would support its resource requirements. The arrival time, resource requirements, and lifetime of the VNRs are unknown, and as such online VNE is a difficult problem. Offline embedding relies on prior knowledge of all VN arrivals, therefore it is easier to find solutions for a batch of VN arrivals. The vast majority of practical applications of the VNE problem require online approaches [15] so this paper falls within the scope of online VNE.

The VNE problem has been extensively studied for more than a decade. The versatility of the problem has motivated the research community to develop VNE solutions in cutting-edge research areas that include among others, SDN-enabled networks [35] and distributed clouds [6], virtual embeddings for IoT environments [37, 52], VNE for wireless networks [17, 29] and 5 G network slicing [21], VNE in non-terrestrial networks [27, 34, 38], VNE to harness energy efficiency [23, 25, 39] and AI-biased virtual network embedding [18, 53]. When the nodes and links constraints are taken into account, the VNE problem is considered NP-hard [2]. Despite its importance for developing new technologies and solutions, the VNE problem is still an open research issue.

The methods to address the VNE problem can roughly be classified into exact, heuristic, metaheuristic, and more recently machine learning approaches according to their optimization strategies [9, 15, 18, 53]. The time-consuming constraints make exact algorithms prohibitive in practical scenarios of medium to large network sizes. Heuristic-based approaches can find solutions to practical instances with reasonable execution times however, during the search for optimal solutions they usually get stuck in local optima, hence failing to find better solutions. Metaheuristic approaches [5] have been successful in finding closer solutions to the optimum to combinatorial problems for large instances as they incorporate mechanisms to avoid local optimum solutions within larger search spaces and keep acceptable execution times. For this reason, the research community has been attracted to address the VNE problem based on metaheuristic algorithms [9, 15]. Recently, the research community has been exploring the use of machine learning algorithms to support online VNE [13, 18, 32, 53]; however, these solutions require previous training stages before they become useful and efficient. Following on with this, metaheuristics can be enhanced with intelligent mechanisms to produce more efficient VNE results. An analysis of all the possible algorithmic solutions to address the VNE problem and the several relaxation methods to address the VNE complexity like approximation algorithms, randomized algorithms, and probabilistic-based algorithms, is out of the scope of the paper. The interested reader can find in references [8, 9, 15, 24] detailed information about algorithms, classifications, taxonomies, and characteristics of VNE approaches in the literature. This paper focuses on metaheuristic-based online VNE.

Metaheuristics are usually iterative algorithms that share the first algorithmic step namely, the initialization. This first step has a critical impact on the performance of the metaheuristic because all the solutions generated thereafter depend, to a certain extent, on their preceding solutions and, eventually on the initial solution or on the initial population of solutions [41]. In the field of metaheuristic-based VNE, the aspects involving the initialization step have been almost unexplored despite its importance for the performance of the quality and time of the embeddings. The only notable exception is the work by [51] in which the authors propose the Local Selection Strategy for Position Initialization (L2S2) function whose implementation with the Particle Swarm Optimization (PSO) metaheuristic outperformed the standard PSO-based VNE implementation, specifically in convergence time.

This paper takes a step forward to enhance the performance of metaheuristic-based online VNE through three novel initialization functions. The first initialization approach has been designed to reduce the possibility of generating solutions that do not meet the nodes’ constraints. The second function exploits the potential fragmentation of the substrate network resources to drive the initialization step and finally, the third approach reutilizes previous VNE solutions in favor of the initialization step. The paper presents and evaluates the initialization functions comparing their performance. We demonstrate that it is possible to enhance the performance of VNE algorithms based on metaheuristics in terms of the acceptance rate, revenue, and revenue-to-cost, with the use of appropriate initialization functions.

The remainder of this paper is organized as follows. Section 2 discusses the related work in the area. The background on VNE and metaheuristic optimization are described in Sect. 3. The novel initialization functions are presented in Sect. 4. Section 5 describes the evaluation setup. In Sect. 6 we analyze the performance of the approaches proposed through an extensive evaluation campaign. Finally, Sect. 7 highlights the most relevant outcomes of our work.

2 Related Work

The VNE problem has been extensively studied for more than a decade. In this Section we present the most representative related work.

The work by [15] was one of the first surveys of the virtual network embedding problem. The authors classify the metrics for VNE and develop a taxonomy that considers aspects like the type of optimization method, the coordination between node and link embedding processes, the operation (distributed or centralized), redundancy, dynamicity, and other specific aspects of the 72 surveyed approaches. The survey by [9] categorizes the VNE approaches into two categories: i) the fundamental category includes VNE approaches driven by node and link ranking methods, the mathematical optimization approaches, and others that do not belong to any of the former two; ii) the complex category includes VNE approaches of one substrate networks, multiple substrate networks, and other scenario differences.

Other application-specific VNE surveys have been presented in the literature. Work by [8] present a survey of heuristic and metaheuristic solutions for the VNE problem based on six variants namely, static or dynamic (S/D), centralized or distributed (C/D), and concise or redundant (C/R), resulting in eight categories of VNE algorithms: S/C/C, D/C/C, D/D/C, D/D/R, S/C/R, S/D/C, S/D/R, and D/C/R, for which the authors survey the mapping phases the node-link constraints, the optimization goals and the peculiarities of the VNE approaches surveyed.

Work by [54] describes VNE in multi-domain heterogeneous converged optical networks, their performance metrics, and a VNE algorithm taxonomy considering the node and link embedding methods, objectives, and network architecture. Work by [46] surveys VNE approaches in cloud computing centers involving aspects like migration, energy consumption, load fluctuation, and path splitting. The survey compares the performance of the algorithms surveyed considering the complexity of the VNE approaches. Work by [11] presents a survey of sixty-six works dealing with virtual network embedding with the special characteristics of the physical optical network infrastructures like routing and wavelength allocation, routing and spectrum allocation. The work presents exact, heuristic and metaheuristic approaches addressing aspects like resilience, reconfiguration, multicasting, multi-domain, and energy saving.

The recent survey by [21] presents a systematic review of metaheuristics organized by application, development, and problem-solving approaches to VNE, motivated by the fact that metaheuristic approaches are a suitable way to solve the VNE problems because of their capacity to escape from the local optimum as well as to adapt the solution search to complex networks, emphasizing that these abilities are essential in 5 G network scenarios. It is worth mentioning that all metaheuristic optimization algorithms require some initialization which can significantly influence the performance of such algorithms [31]. Despite its importance for the performance of VNE solutions, the study of initialization functions for metaheuristic-based VNE has been severely disregarded in the literature. The only notable exception is the work by [51] where the authors propose an initialization function called L2S2 (Large to Large, Small to Small) designed to increase the probability of virtual elements being mapped onto the substrate elements with higher availability of resources. The authors demonstrated the effectiveness of the L2S2 function with the UEPSO (Unified Enhanced Particle Swarm Optimization-based), which is based on the Particle Swarm Optimization (PSO) metaheuristic. The authors demonstrated that the L2S2-based UEPSO solution outperforms other PSO proposed versions, specifically in convergence time.

While extensive work has been made to develop metaheuristic-based VNE solutions, the study of initialization functions and their impact on VNE performance in key metrics like acceptance rate, cost, revenue, and revenue-to-cost metrics has been almost unexplored. This paper takes a step forward by proposing three initialization functions to enhance the performance of VNE algorithms based on metaheuristics. The three initialization functions are VNE-problem specific and they are compared and evaluated with state-of-the-art evaluation methods.

3 Background on VNE and Metaheuristic Optimization

3.1 VNE Model and Problem Formulation

Table 1 Notation used throughout this paper

We consider the VNE model proposed in [51] applicable to unsplittable flows (Table 1). This model is briefly described hereafter. The superscript letters (S, V) represent a set or a variable related to physical or virtual resources, respectively. A substrate network is modeled as a weighted undirected graph denoted by \(G^s=(N^{s},L^{s},A_{n}^{s},A_{l}^{s})\), where \(N^s\) and \(L^s\) represent a set of substrate nodes and a set of substrate links, respectively. The notations \(A_n^s\), \(A_l^s\) represent the capacity attributes of the nodes and links, respectively. A substrate network has a set of physical paths \(P^s\). Attributes for the physical nodes can be CPU, storage, location, and memory capacities of the node. Link attributes may include bandwidth (BW) capacity and edge delay.

A virtual network is modeled as a weighted undirected graph denoted by \(G^v=(N^v,L^v,R_n^v,R_l^v)\), where \(N^v\) and \(L^v\) represent a set of virtual nodes and a set of virtual links, respectively. The notations \(R_n^v\), \(R_l^v\) represent the capacity requirements of the virtual nodes and links, respectively. Requirements for the virtual nodes can be CPU, storage, desired location, and memory requirements of the node. Virtual link attributes include BW capacity and maximum edge delay requirements.

Online VNE refers to mapping VNs once each VN request (VNR) is received. Every VNR is represented by \(VNR^{(i)}=(G^v,t^a,t^l)\), where \(t^a\), \(t^l\) represent the arrival time and lifetime of the i-th request of the set \(i={1,...,n}\), and n represents the total number of requests. The lifetime indicates for how long the resources of the substrate will be used.

Given a virtual network \(G^v=(N^v,L^v,R_n^v,R_l^v)\) and a physical substrate network \(G^s=(N^s,L^s,A_n^s,A_l^s)\), embedding a VN represents the mapping of \(G^v\) onto a sub-set of \(G^s\), such that every virtual node is assigned to only one substrate node, and every virtual link is assigned to a non-cycle path p in the physical substrate \(p\in P^s\), where \(P^s\) represent the set of all physical paths on \(G^s\). Formally, network embedding is a pair of injective functions \(M_{nl} =\left( M_n, M_l\right)\). Where \(M_n: N^v\rightarrow N^{s}\) is a node embedding, \(M_l: L^v\rightarrow P^{s}\) is a link embedding. \(M_{nl}\) is valid if and only if all constraints are satisfied and for every link \(l^v=(s^v,t^v )\in L^v\) there does exist a path \(p={s^s,...,t^s }\in P^s\) such that the source virtual node \(s^v\) and the destination node \(t^v\) of the virtual link \(l^v\) are assigned to the source and destination \((s^s,t^s )\) of path p.

To guarantee the correct mapping of the virtual nodes and the virtual links, and also to assure the conservation law on the capacities of the physical nodes and physical links, a set of constraints is defined.

$$\begin{aligned} {g_0:}&\forall (m\in { N }^{ v });\sum _{ i\in { N }^{ s } }{x_{i}^{m}=1} \end{aligned}$$
(1)
$$\begin{aligned} {g_1:}&\forall (i\in { N }^{ s });\sum _{ m\in { N }^{ v } }{x_{i}^{m}\le 1}\end{aligned}$$
(2)
$$\begin{aligned} {g_2:}&\forall (m\in { N }^{ v }), \forall (i\in { N }^{ s });\nonumber \\&CPU(m)\times { x }_{ i }^{ m }\le CPU_{Avl}(i)\end{aligned}$$
(3)
$$\begin{aligned} {g_3:}&\forall (l^{ mn }\in { L }^{ v }), \forall (l^{ ij }\in { L }^{ s });\nonumber \\&BW({ l }^{ mn })\times { f }_{ { l }^{ ij } }^{ { l }^{ mn } }\le BW_{Avl}({ l }^{ ij })\end{aligned}$$
(4)
$$\begin{aligned} {g_4:}&\forall (i\in { N }^{ s }), \forall (l^{ mn }\in { L }^{ v });\nonumber \\&\sum _{ l^{ ij }\in { L }^{ s } }^{}{{ f }_{ { l }^{ ij } }^{ { l }^{ mn } }} -\sum _{ l^{ ji }\in { L }^{ s } }^{}{{ f }_{ { l }^{ ij } }^{ { l }^{ mn } } } = \left\{ \begin{matrix} 1, \text {if } x_i^m=1\\ -1,\text {if } x_i^n=-1\\ 0, \text {otherwise} \end{matrix}\right. \end{aligned}$$
(5)

where \({ f }_{ { l }^{ ij } }^{ { l }^{ mn } }\) is a binary variable that equals 1 when virtual link \({ l }^{ mn }\) is currently mapped to substrate link \({ l }^{ ij }\), otherwise it equals 0; \(x_{i}^{m}\) is a binary variable that equals 1 when the virtual node m is currently mapped to the substrate node i, otherwise it equals 0. \(CPU_{Avl}(i)\) represents the available CPU of the physical node at the time of the embedding; this value is calculated by the following expression: \(CPU_{Avl}(i)= CPU(i) - \sum _{ i=k }^{ n-1 }{ \sum _{ { (m }\in { N }^{ v })\in { VNR }^{ (k) } }^{ }{ CPU(m)\times { x }_{ i }^{ m } } }\); where \(BW_{Avl}(l^s)\) represents the available BW of the physical link at the time of the embedding, this value is calculated as follows: \(BW_{Avl}({ l }^{ ij })=BW({ l }^{ ij }) - \sum _{ k=1 }^{ n-1 }{ \sum _{ { ({ l }^{ mn } }\in { L }^{ v })\in { VNR }^{ (k) } }^{ }{ BW({ l }^{ mn })\times { f }_{ { l }^{ ij } }^{ { l }^{ mn } }} }\). It is important to mention that for calculating the available resources, only the virtual networks currently mapped on the physical network should be considered.

Each VN is mapped to the substrate network meeting the constraints. If the substrate network does not have enough resources, the VNR is rejected. The substrate resources allocated to host the virtual networks are released when the VN lifetime expires. Constraint \(g_0\) in expression (1) ensures that each virtual node will be mapped to only one substrate node of a particular VN. Constraint \(g_1\) in expression (2) ensures that each substrate node is mapping at most only one virtual node from a particular VN. Constraint \(g_2\) in expression (3) ensures that the substrate nodes satisfy the QoS requirements (CPU in this case) of the virtual node of a particular VN. Constraint \(g_3\) in expression (4) ensures that the substrate links satisfy the BW requirements of the virtual link of a particular VN. Finally, the connectivity constraint in Constraint g4 in expression (5) is a flow conservation constraint, this means that if the virtual nodes m and n are embedded onto the substrate nodes i and j, the virtual links (mn) are embedded to the substrate link \(P\in P^s (i j)\). If i is the source node, m is embedded onto i and \({x}^{m}_{i} = 1\). The inflow of the source node is 0 and the outflow is 1. If i is the destination node, n is embedded onto i and \({x}^{n}_{i} = 1\). The inflow and the outflow of the destination node are 1 and 0, respectively. For other nodes, the inflow and outflow are both 0.

The online VNE performance is evaluated with the following metrics. VN acceptance ratio indicates the number of VNs effectively embedded out of the total number of VNRs. VN revenue is the sum of the number of virtual resources that have been embedded. The embedding cost indicates the amount of CPU and BW resources that have been preserved in the substrate network to embed the VNs. \(Revenue-to-cost\) ratio measures the efficiency of the use of substrate resources.

3.2 Metaheuristic Optimization and Initialization

For our study, the online VNE problem is formalized with the alternative function based on the degree of the nodes (AFBD) [1] presented in expression 6.

$$\begin{aligned} \text {Min } \left[ \begin{aligned} \left( \sum _{ { l }^{ mn }\in { L }^{ v } }^{ }{ \sum _{ { l }^{ ij }\in { L }^{ s } }^{ }{ BW({ l }^{ mn })\times { f }_{ { l }^{ ij } }^{ { l }^{ mn } } } } \right) + \\ \left( \sum _{m\in {N}^{v}}\sum _{i\in {N}^{s}} \left( deg(i)-deg(m)\right) \times x_{i}^{m}\right) \end{aligned}\right] \end{aligned}$$
(6)

The above objective function addresses the drawbacks of the classical evaluation function based on embedding cost and enhances the performance of metaheuristic-based VNE [1]. The degree of a node n, denoted as deg(n) is referred to as the number of links that are incident to the node n [22]. The AFBD function considers the degree of the nodes of the VNRs (\(deg(n^v)\)) as well as one of the substrate nodes \(deg(n^s)\). The objective function AFBD aims to provide more fine-grained discrimination among potential solutions, which allows metaheuristic algorithms to make the most appropriate choice at each iteration of the optimization process. The interested reader can find in reference [1] a detailed analysis of the compatibility of the AFBD with the classical online VNE objective function based on embedding cost and how the AFBD drives the online VNE algorithm to embed the virtual networks in a more efficient way namely, enhancing the embedding performance in both, the acceptance rate metric and the revenue to cost metric, which means the AFDB-based VNE algorithm accepts more virtual networks at lower embedding cost.

Optimization is searching and comparing feasible solutions until no better solution can be found [12] while reaching the best value for a given objective function or a set of objective functions. Metaheuristics encompass a set of optimization techniques that are effective in locating solutions close to the global optimum in several problems. Optimization metaheuristics generate new solutions by applying variation operators to previously generated solutions [44]. A selection process between the former and the generated solutions is performed to keep moving solutions toward the optimum.

To date, there are over a hundred metaheuristic optimizers and variants in the literature [36] so that an exhaustive description of the metaheuristics applied to the VNE problem is unfeasible for a single paper. Central to our study, our previous work [40] evaluated the VNE performance of four of the most popular metaheuristics namely, Genetic Algorithm (GA), Particle Swarm Optimization (PSO), Harmony Search (HS) and Firefly Algorithm (FA), under extensive evaluation conditions that include, medium- to large-scale networks, different network topologies, and statistical significance tests of the embedding results. From the above, the HS metaheuristic has been proven to be the most efficient metaheuristic optimizer out of the evaluation set [40]. The HS-based VNE algorithm is described below.

Harmony Search (HS) is a metaheuristic search technique for combinatorial optimization problems [14] that is inspired by the improvisation process that musicians do to find the optimum harmony [19]. Each candidate solution is represented as an n-dimensional harmony. The initial harmonies, usually randomly fed, are stored in a harmony memory (HM). A harmony is composed of musical notes which, in turn, represent the variables of the problem to solve (in our case, the assignments of the virtual nodes).

The HM has a fixed size hms and it stores the harmonies ordered according to the evaluation function values. A new harmony can be generated using a certain probability (hmcr) from either the elements in the HM or by a tone adjustment (par) of a harmony in HM, which consists of the incorporation of a distinct musical note. The new solution obtained is compared with the worst harmony in HM, if the new solution improves the value of the evaluation function (f(x)), the new solution replaces the worst in HM. Otherwise, there are no changes in HM. In the end, the best harmony is returned. Algorithm 1 shows the HS-VNE algorithm pseudocode.

Algorithm 1
figure a

Pseudocode of harmony search (HS) VNE

All metaheuristic optimization algorithms require initialization. The HS-VNE algorithm described above, for example, uses a random initialization (see Step 1 in Algorithm 1). Nevertheless, researchers have started to realize the importance of initialization and have started to explore other possibilities to increase the diversity of the initial population [31]. Ideally, the final optimal solutions found by the metaheuristic optimizers should be independent of the initial solutions although this is a challenging issue in most practical problems. Based on the principle of covering the search space as uniformly as possible, recent efforts have explored ideas of initialization options like quasi-random initialization, chaotic systems, anti-symmetric learning methods, Latin hypercube sampling (uniform spreading in the search space), and other initialization methods specific to the application domain [31]. Despite its importance for the performance of the VNE process, initialization has been severely dismissed in the VNE application domain, with the notable exception of the L2S2 initialization function proposed by [51].

The L2S2 function is a local selection strategy for initialization that assigns large virtual nodes to large substrate nodes and small ones to small ones (L2S2 Large to Large, Small to Small). The main principle of the L2S2 local selection strategy is that the virtual node with larger resource requirements has a higher probability of being mapped to the substrate node with larger available resources. The authors propose the expression 7 to calculate the required resources and available resources, where \(l \left( {n}^{u} \right)\) represents the set of links adjacent to the node \({n}^{u}\). The Algorithm 2 presents the L2S2 pseudocode. This strategy increases the probability of satisfying virtual nodes’ and virtual links’ requirements since the initialization of the search process, thus accelerating the convergence, and balancing the physical network’s workload.

$$\begin{aligned} NR\left( {n}^{u} \right) =CPU\left( {n}^{u} \right) \sum _{ l\in l\left( {n}^{u} \right) }^{ }{ BW\left( l \right) } \end{aligned}$$
(7)
Algorithm 2
figure b

Pseudocode of L2S2 initialization function [51].

4 Novel Initialization Functions

This Section describes the online VNE initialization functions proposed in this paper.

4.1 Initialization Based on Node Selection

Constraints are an essential part of the VNE problem because they define the borders of the solution space, i.e., solutions are feasible only if all requirements by all virtual elements (nodes and links) are satisfied with the substrate elements. The most typical are the node and link resources’ constraints. A substrate resource is a scarce property of a network node or a link that is consumed by virtual network elements. Substrate resources are allocated (and used) when a VNR is embedded and they can not be reused for another VNR until these resources have been released.

In online VNE, the VNRs are not known in advance, they arrive at the system dynamically and can stay in the substrate network for an arbitrary time. Over time, the constant reservation and release of resources produced by the arrival and departure of VNRs can produce the congestion of certain nodes and links. The nodes’ congestion can lead to solutions that do not satisfy the virtual nodes’ requirements (nodes’ capacity constraint), increasing the VNRs’ rejection probabilities. The Fig. 1a) shows an example of this aspect. Two congested nodes (4 and 5) are without enough resources to satisfy none of the virtual nodes’ requirements. Solutions that contain these nodes will not be feasible and a good strategy for reducing the search effort of the VNE algorithms is to avoid these kinds of nodes.

Fig. 1
figure 1

Example of congested nodes and IFNS initialization

Since the solutions’ encoding of the VNE algorithms based on metaheuristics is closely related to the nodes of the substrate network, avoiding the use of congested nodes has an important impact on the search space size. For example, the search space’s size for embedding a VN with 3 nodes in a substrate network with 50 nodes is \(|{S}|= \frac{| 50 |!}{(| 50 | - | 3 |)!}=117,600\). If such substrate network had 10 congested nodes, i.e., nodes that would not meet the minimum requirements of virtual nodes, the number of feasible solutions (from the node embedding viewpoint) would be \(|{S}|= \frac{| 40 |!}{(| 40 | - | 3 |)!}=59,280\), that is, there would be a decrease in the search space of almost 50% in the number of feasible solutions. Therefore, it is worth highlighting that, the more congested nodes in the substrate network, the fewer the number of feasible solutions in the search space.

Based on the aforementioned concepts, the Initialization Function based on Node Selection (IFNS) is proposed. The IFNS approach initializes the VNE solutions considering only the substrate nodes that meet the capacity requirement of each virtual node, increasing the acceptance probabilities of the virtual network. For this, IFNS builds a list for each virtual node \({n}^{v}\in {N}^{v}\), where each list contains the substrate nodes that meet the capacity requirements of the virtual node \({n}^{v}\) as shown in Fig. 1b). On the lack of substrate nodes that can meet the requirement of any node in the virtual network, the request is immediately rejected since there is no feasible solution available. For a virtual network request, the IFNS initialization function for VNE solutions is presented in Algorithm 3.

Algorithm 3
figure c

Pseudocode of the IFNS initialization function

4.2 Initialization Function Based on Community Detection

Many real-world systems take the form of complex networks,Footnote 1 in which a group of nodes (vertices) has connections between them (edges) [26]. Examples of these are social networks, collaboration networks, technological networks such as the Internet, neural networks, etc. One key characteristic of complex networks is that they have community structures, i.e., subsets of nodes that are well-connected inside each community but sparsely connected to nodes of other communities.

As mentioned earlier, the constant reservation and release of resources produced by the arrival and departure of VNRs can produce the congestion of certain nodes and links. Link congestion can produce fragmentation of the substrate network, i.e., the substrate network can be divided into different groups or partitions (communities); this can be attributed to the fact that under certain congestion conditions of the substrate network links, these can run out of available capacity (i.e. bandwidth), causing the substrate nodes’ isolation (see Fig. 2). When this happens, two connected nodes of a VNR can be assigned in different partitions, increasing the rejection probability of the VNR due to the lack of physical connectivity between the source and destination nodes, affecting the long-term acceptance rate of the VNE algorithms [15, 33].

Fig. 2
figure 2

States of the substrate network resources: Nodes and links in dark green represent resources with higher resource availability (initial state), whereas nodes and links in light red represent resources with lower resources’ availability (after several embeddings)

A potential proposal to solve this problem is to promptly identify possible groups or partitions of the substrate network so that all the nodes of a VNR are assigned within the same partition, thus increasing the request’s acceptance probability. The procedure of identifying groups of interacting vertices in a complex network depending upon their structural properties is known as community detection [26, 49].

A simple way to identify communities in a graph is to detect the edges that connect vertices of different communities and remove them so that the clusters or communities get disconnected from each other. In the community detection context, algorithms that follow this philosophy are commonly known as divisive algorithms. The most popular algorithm within this category was proposed by [20] and its pseudocode is presented in Algorithm 4.

Algorithm 4
figure d

Pseudocode of the community detection algorithm.

The betweenness of an edge is defined as the number of the shortest paths that go through an edge in a graph or network. [20] exploited the betweenness to select the edges that should be removed during the community detection process. Each edge in the network can be associated with an edge betweenness centrality value. An edge with a high betweenness value represents a bridge-like connector between two communities of a network. The removal of it may affect the communication between many pairs of nodes through the shortest paths between them. Figure 3 shows an example of a network with eight nodes. The red edge between the two red nodes has a high betweenness value, and the elimination of this edge will result in a fragmentation of the network into two densely connected subnetworks.

Fig. 3
figure 3

Example of Betweenness value

When a network contains communities or groups connected by a few intergroup edges, then all the shortest paths between different communities must traverse these few edges. The edges that connect the communities will have a high betweenness value. When these edges are removed, the groups are separated from each other and the underlying community structure of the graph is revealed.

The initialization function based on community detection (IFCD) exploits the community detection approach described earlier to detect potential fragmentation of the substrate network due to the lack of links’ physical resources. The pseudocode of the IFCD function is presented in Algorithm 5.

During the community detection process, the bandwidth of the substrate links is considered to calculate the betweenness value, thus edges with fewer resources will have a high intermediation value, so it is more likely that the community detection algorithm will eliminate them. Once the communities are detected, these are passed to the IFCD function. The procedure to initialize the solutions consists of selecting the communities with the same number of nodes as the ones in a VNR. When communities of the same size are not available, communities of similar sizes are selected. After selecting the communities, the solutions are initialized, taking into account the substrate nodes of each community, to increase the possibilities of satisfying the links’ constraints.

Algorithm 5
figure e

Pseudocode of the IFCD initialization function.

4.3 Initialization Function Based on Previous Solutions

The online VNE problem is a dynamic optimization problem due to the dynamic arrival of requests and the substrate network’s changing conditions caused by the allocation and release of resources. In areas like evolutionary algorithms (EAs), several authors have addressed complex dynamic optimization problems by transferring information obtained in the past to newly changed environments [7].

Authors have enhanced their EAs with a memory that might allow them to store good (possibly partial) solutions and reuse them later as necessary. The idea behind memory usage is based on the following principle. When the optimum appears at a given location, a memory could remember that location (by a solution stored) and instantaneously move the population to a potentially new optimum location. A solution stored in the memory could also help maintain diversity and guide the search process to promising areas.

The Initialization Function based on Previous Solutions (IFPS) exploits an explicit memory to store good solutions of previous embeddings that guide the VNE algorithm to promising areas and allow it to improve the acceptance rate metric in the VNE problem. The elements of the IFPS are depicted in Fig. 4, for which a description is given hereafter.

Fig. 4
figure 4

Proposed approach based on explicit memory

When a new VNR arrives during the online VNE process, a selection process is carried out to identify the memory solution with the potential to be reintroduced to the initial solution set (see Fig. 4). This selection process executes the following steps. First, the process identifies the size and the main characteristics of the request (Smetrics respectively). After that, the process defines a subset of memory solutions of size s that were embedded in the Substrate Network. From there, the process selects the memory solution whose main characteristics (metrics) are the most similar to the request’s metrics. When there does not exist a memory solution of size S, the solution set is randomly initialized. On the other hand, when the VNE algorithm finds the best solution for a certain virtual network request, this solution is stored in the memory to be used for future requests.

Metrics for the VNR are pivotal to determining the similarity of VNRs based on their resource demand, connectivity, topology, etc. To address this issue, we analyze the 21 metrics presented in Table 2, which have been extensively used in the literature for graph classification [4, 30]. In the context of our IFPS initialization function, these metrics are used to characterize the topological aspects and the main attributes of VNRs to determine their similarities. Unfortunately, selecting a definitive set of metrics is hampered by the existence of a wide variety of redundant metrics that unintentionally explain the same aspects of a virtual network. For this purpose, hereafter we determine the most important metrics that determine the similarity of VNRs through an example.

In our example, a stream of VNRs was generated with parameters similar to those presented in references [1, 10, 40, 51] to evaluate online VNE approaches, which rely on time units and distribution models for the arrival and duration of VNRs. The generation of VNRs runs for a period of 25,000 time units, with the VNR arrival rate set to 4 per 100-time units following a Poisson distribution. The lifetime of VNs follows an exponential distribution with a mean of 500 time units. We generated 1000 VNRs for each execution run. For the VNs, we generated three sets, each set with a specific topology namely, Erdös-Rényi, Waxman, and Barabási-Albert. The connection probability of the Erdös-Rényi topologies was set to 0.5. The alpha and beta parameters of the Waxman topologies were set to 0.15 and 0.2 respectively, and the number of neighborhood nodes for the Barabási-Albert network topologies was set to 2. Each VN has between 2 and 10 nodes (uniformly distributed). Virtual nodes require between 1 and 20 units of CPU distributed uniformly. Virtual link bandwidth is uniformly distributed between 1 and 50 units.

The value of each metric was calculated for the entire stream of VNRs in our example. For each network topology, we have obtained the correlation patterns between the 21 metrics. Therefore, for each network topology, we obtained a correlation matrix. Figure 5 shows the heat map of the correlation matrix corresponding to the metrics for the Erdös-Renyi virtual topology set (the metric number of links (NLinks) does not vary in this topology so it is not included in the matrix). The rows and columns of the heat map were permuted by using a hierarchical clustering algorithm in such a way that the most correlated metrics (redundant) were placed close together. Note that the set shows four clusters of highly correlated metrics namely, the Average eccentricity of network nodes (AvgEccentricity), Minimum value of the closeness coefficient of network nodes (MinCloseness), Average degree of network nodes (AvgDegree), and Standard deviation of the degree of network nodes (StdDevDegree).

Table 2 Metrics used to represent virtual networks in each topology (x.- Apply)
Fig. 5
figure 5

Correlation patterns of the metrics

The metrics that do not correlate with others \((C < 0.8)\) are identified as representative metrics (non-redundant). These metrics appear as isolated elements (outside the clusters) in Fig. 5. For each set of virtual topologies, a sub-set of non-redundant metrics was obtained with the following procedure. First, all representative metrics in Fig. 5 were selected. Then, the metric with the less complexity is selected, or the one that has already been calculated jointly with another metric of the uncorrelated ones. This procedure was repeated for each virtual topology set. As a result of this procedure, a set of 11 metrics were selected to represent VNRs with Erdös-Renyi and Waxman topology namely, metric IDs 2, 3, 4, 5, 6, 7, 10, 11, 12, 14, and 21 (see Table 2). Similarly, 12 metrics for the Barabasi topology were selected, the metric IDs 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 16, and 17 (see Table 2). These metrics are marked with an "x" in Table 2.

After representing the VNRs through the metric-based process described above, it is necessary to identify the similarity between two or more requests. This is important for the IFPS initialization function to recover the most similar solution to the VNR under evaluation that the VNE algorithm has solved previously. The similarity is a fundamental issue in classification and clustering tasks. For this purpose, cosine similarity is a metric commonly used in the literature [43, 45, 48], which measures similarity as the angle between two vectors, as formally defined in expression 8.

$$\begin{aligned} dist\_ cos(a,b)=1-\frac{ \sum _{ i }^{ n }{ { a }_{ i }{ b }_{ i } } }{ \sqrt{ \sum _{ i }^{ n }{ { a }_{ i }^{ 2 } } } \sqrt{ \sum _{ i }^{ n }{ b_{ i }^{ 2 } } } } \end{aligned}$$
(8)

Two vectors ab with the same orientation would have a cosine similarity of 1, two vectors oriented at 90\(^{\circ }\) to each other would have a cosine similarity of 0, and two diametrically opposite vectors would have a cosine similarity of -1. The IFPS function initializes the solution set taking into account the nodes of the most similar previous solution of S nodes, considering the cosine similarity. When there are no previous solutions with S nodes stored in the explicit memory, the solutions are initialized randomly. It is worth mentioning that only the feasible solution with the lowest embedding cost of each virtual network request is stored in explicit memory. The pseudocode of the initialization function based on previous solutions (IFPS) is presented in Algorithm 6.

Algorithm 6
figure f

Pseudocode of the IFPS initialization function

5 Evaluation Setup

This section describes the evaluation setup employed to evaluate the performance of the proposed initialization functions.

5.1 Simulation Settings

We evaluated the performance of the online VNE algorithms (described later) with an event simulator based on Python 2.7 using simulation parameters similar to those presented in references [1, 10, 40, 51] to evaluate online VNE approaches. We consider three topologies in the VNRs namely, Erdös-Rényi and Waxman topologies generated with the GT-ITM toolkit [50] and Barabási-Albert topologies produced with the Brite toolkit [47]. For the substrate network, we use a real-world network topology obtained from the Internet Topology Zoo [28], which is a collection of networks, derived from publicly available records, stripped down to a labeled graph form and stored with all of its associated metadata.

The online VNE parameters of our simulation setup are as follows. Each experiment runs for a period of 25,000 time units. We set the VNR arrival rate to 4 per 100-time units following a Poisson distribution. The lifetime of VNs is assigned following an exponential distribution with a mean of 500 time units. We generated 1,000 VNRs for each execution run in our evaluation. Each VN has between 2 and 10 nodes (uniformly distributed). Virtual nodes require between 1 and 20 units of CPU. Virtual link bandwidth is uniformly distributed between 1 and 50 units. Both parameters follow a uniform distribution. The physical network in our simulations has 49 nodes and 84 links. The CPU and bandwidth resources of the substrate nodes and links are integer numbers uniformly distributed between 50 and 100. A summary of the parameters of our simulation setup is shown in Table 3.

Table 3 VNE parameters of simulation setup

5.2 VNE Algorithms

We implemented algorithmic solutions to the optimization problem formulated in Sect. 3.1. To guarantee fair performance comparisons between the initialization functions proposed in Sect. 4, throughout our evaluations we consider the same metaheuristic baseline namely, the harmony search (HS) metaheuristic described in Sect. 3.2 so that different HS versions were implemented with the initialization functions proposed in Sect. 4. In addition, we consider the L2S2 initialization function [51], which is the only initialization function produced so far in the literature. For completeness, we also consider the implementation of the penalty function (PF) for handling non-feasible solutions proposed by [40] to enhance the search process of the metaheuristics during the online VNE evaluation process after the initialization. From the above, we have implemented eleven online VNE metaheuristic algorithms based on HS metaheuristic as described below.

Basic (B).- The basic VNE algorithm uses a random initialization function to feed the initial population and a death penalty function (i.e. standard penalty function) for handling non-feasible solutions.

Basic + (a function).- The basic VNE algorithm with the incorporation of a certain function, resulting in the following versions:

  • Basic with penalty function (B+PF).- This version uses a random initialization function to feed the initial population and the penalty function for handling non-feasible solutions [40].

  • Basic with L2S2 initialization function (B + L2S2).- Basic algorithm with L2S2 initialization function [51] to feed the initial population and the death penalty strategy for handling non-feasible solutions.

  • Basic with initialization function based on previous solutions (B + IFPS).- Basic algorithm with IFPS initialization function to feed the initial population and the death penalty strategy for handling non-feasible solutions.

  • Basic with initialization function based on community detection (B + IFCD).- Basic algorithm with IFCD initialization function to feed the initial population and the death penalty strategy for handling non-feasible solutions.

  • Basic with initialization function based on node selection (B + IFNS).- Basic algorithm with IFNS initialization function to feed the initial population and the death penalty strategy for handling non-feasible solutions.

Basic + penalty function + (an initialization function). This category contains all the versions of the base algorithm with two functions: the penalty function for handling non-feasible solutions [40] and a specific initialization function to feed the initial population. The above results in the following VNE algorithm versions: B + PF + L2S2, B + PF + IFPS, B + PF + IFCD, and B + PF + IFNS.

Basic +all functions.-. This version of the VNE algorithm uses the penalty function to handle non-feasible solutions and feed the initial population taking into account all the initialization functions; namely, we divide the initial population in four equal parts and we initialize each part considering one of the four available initialization functions.

Finally, the parameters of the HS metaheuristic used for the VNE algorithms are the probabilities of selecting a note in HM (hmcr) and selecting a neighbor tone (par) to 0.828 and 0.12, respectively. To make a fair comparison, we set the stop criterion in 4916 evaluations of the evaluation function and the HM size to 26 for all algorithms.

6 Results and Statistical Significance Analysis

This section analyzes the quality of embeddings assessed with our initialization functions. To ensure that the values calculated by the metrics are representative, the algorithms were run 32 times with each function with different random seeds. Table 4 shows the average results of the 32 executions of the VNE algorithms in each metric.

Table 4 Average results of 32 executions of the VNE algorithms in the metrics: acceptance rate (AR), revenue (R), revenue-to-cost (RC), and optimal embedding costs (O)

We initially present a formal analysis to identify statistically significant differences in the algorithms’ performance. For this purpose, two hypotheses are formulated: the null hypothesis (\(H_0\)) and the alternative hypothesis (\(H_a\)). The null hypothesis (\(H_0\)) suggests that the embedding results obtained by the VNE algorithms remain similar, regardless of the initialization function. Alternatively, if the embedding results obtained by the algorithms have different performances in each function, the alternate hypothesis (\(H_a\)) holds, meaning that there is a statistically significant difference between the performance of the algorithms in each initialization function.

The statistical analysis of the different versions of the VNE algorithms was carried out using a confidence level \(\alpha =0.05\). We initially applied the Shapiro-Wilk normality test [42] to each result of the simulation runs to determine the type of significance test required to analyze the results. The normality test results show that the VNE embedding results come from asymmetric distributions.

Next, we applied the Friedman test [16] to determine whether there is a significant statistical difference between the results for each metric. For this purpose, the \(\chi ^2\) critical value is defined for quartile \(\left( 1-\alpha \right)\) with \(k-1\) degrees of freedom. Since the significance level is 0.5 and 11 algorithms are compared (k=11), the values to find the \(\chi ^2\) critical value would be the tuple [0.95,10] in the \(\chi ^2\) distribution tables, which results in a value of 18.31.

Table 5 Statistical analysis comparing the VNE algorithms’ performance concerning the algorithm with the best performance for each metric (marked in bold and underlined)

The \(\chi ^2\) values and average ranks in each metric are shown in Table 5. The \(\chi ^2\) values obtained by Friedman’s test in each metric exceed the quartile value so the null hypothesis is rejected and the alternative hypothesis is accepted. The Friedman test proved that there is a significant statistical difference in the results of the VNE algorithms. Next, a posthoc analysis is performed using the Wilcoxon test with Bonferroni adjustment [3] to determine the algorithms that report such a difference.

The algorithm with the best average position (marked in bold and underlined in Table 5) is compared with the remaining 10 so the new significance value is \(\alpha =\frac{0.05}{10}=0.005\). From the Wilcoxon test, we formed two groups of algorithms. Group A includes algorithms whose results do not show a significant statistical difference, and Group B includes the algorithms that certainly do. Group A includes algorithms whose average results are identified by red color in Table 5 and the remaining algorithms form Group B.

From the results and the statistical significance analysis, the best performance in most metrics was obtained by the algorithm with the penalty function and the initialization function based on community detection (B+PF+IFCD). In this particular case of the B+PF+IFCD algorithm, it differs statistically from the B version and the B+PF version. This demonstrates that the enhancement of the B+PF+IFCD version can be attributed certainly to the IFCD initialization function.

The initialization functions are designed to provide a good set of initial solutions to reduce search efforts and increase the probability of finding global optimality. Next, we analyze the quality of the initial solutions provided by the initialization functions. Figure 6 shows the average results of 1,000 initializations with each function regarding the percentage of feasible and infeasible solutions and embedding cost. The L2S2 initialization function produces solution sets with a larger number of feasible solutions; this can be attributed to its strategy of assigning nodes with larger resource requirements to nodes with more available resources, which helps to satisfy the resource constraints. Instead, the IFCD initialization function produces solution sets with a larger number of nonfeasible solutions however, the solution sets produced by the IFCD function present on average the lowest embedding cost for the general set and for the best solution. This means that the VNE algorithm starts with better solutions than the other functions, accelerating the convergence of the VNE algorithm.

Fig. 6
figure 6

Average results of 1000 initialization with each initialization function in terms of feasible solutions, infeasible solutions, and embedding cost

The remainder of this section analyzes the differences in the VNE performance of the initialization functions. Figure 7 shows the relative enhancements for all the VNE algorithm versions concerning the basic algorithm in each metric. In general, there does exist a clear pattern of improvement in the VNE acceptance ratio, revenue, and revenue-to-cost metrics of all initialization functions proposed in this paper concerning the standard initialization, i.e. random initialization. In this regard, the largest enhancement is assessed with the IFNS approach with which the VNE acceptance ratio is enhanced 9%, 12%, and 13.5%, the revenue is enhanced 20%, 23%, and 23.8%, and the revenue-to-cost is enhanced 4%, 6.5%, 8.8%, when the VNRs have Erdös, Waxman and Barabasi network topologies, respectively. Under the same conditions, the IFNS outperforms the L2S2 state-of-the-art initialization function in acceptance ratio, revenue, and revenue-to-cost metrics in the three topologies considered in our evaluation. This can be attributed to the fact that the L2S2 function accepts more virtual networks than the basic version at higher costs.

Fig. 7
figure 7

Relative enhancements for all the versions concerning the basic algorithm in the metrics: acceptance rate (AR), revenue (R), revenue-to-cost (RC)

The enhancements assessed with our initialization functions are compatible with other enhancements unrelated to initialization, like the penalty function (PF) [40]. When our initialization functions are implemented with the PF, there does exist a clear pattern of improvement in the VNE acceptance ratio, revenue, and revenue-to-cost metrics concerning the basic VNE approach, in the three topologies considered.

The benefit of combining the PF and the initialization functions is twofold: the approach helps to satisfy the resource requirement of the current VNR and consequently to accelerate the convergence of the VNE algorithm. We have demonstrated that it is possible to enhance the performance of VNE algorithms through appropriate initializations. This is an important achievement considering that this approach not only enhances the acceptance rate of the VNE algorithm but also enhances the revenue and revenue-to-cost metrics, which means that the VNE algorithm with appropriate initialization can accept more virtual networks at a lower embedding cost. From a holistic viewpoint, the most sensible enhancement is assessed with both, the penalty function (PF) [40] and the initialization function based on community detection (IFCD) proposed in this paper. Our IFCD advances the state of the art and together with the PF in [40], it manages to achieve the highest enhancement reported in the literature. The relative enhancement of B+PF+IFCD to the basic standard VNE version is summarized as follows: acceptance rate 18%, 26%, and 24.5% for Erdös, Waxman, and Barabasi topologies respectively; revenue 48%, 56%, and 45% for Erdös, Waxman and Barabasi topologies respectively; and revenue-to-cost 6%, 13% and 15.5% for Erdös, Waxman and Barabas topologies respectively. These represent the best enhancements to metaheuristic-based online VNE reported so far.

Finally, the computational resources required to produce the inputs for the initialization functions of the VNE algorithm do not add any computational overhead to the standard versions of the VNE algorithm.

7 Concluding Remarks

Metaheuristic-based online VNE has been widely studied in the past however, the vast majority of approaches use the standard random initialization. We have proposed three VNE initialization functions namely, Initialization Based on Node Selection (IFNS), Initialization Function Based on Community Detection (IFCD), and Initialization Function Based on Previous Solutions (IFPS) to enhance the performance of VNE algorithms based on metaheuristics. We conclude that the three initialization functions proposed in this paper enhance the performance of online VNE concerning the standard initialization, i.e. random initialization. In this regard, the largest enhancement is assessed with the IFNS approach with which the VNE acceptance ratio is enhanced 9%, 12%, and 13.5%, the revenue is enhanced 20%, 23%, and 23.8%, and the revenue-to-cost is enhanced 4%, 6.5%, 8.8%, when the VNRs have Erdös, Waxman and Barabasi network topologies, respectively. The enhancements produced by the initialization functions are compatible with other enhancements unrelated to initialization, like the penalty function (PF) proposed in [40]. We also conclude that the VNE algorithm with PF function and initialization function based on community detection (B+PF+IFCD) proposed in this paper outperforms the rest of the initialization functions, including the L2S2 function [51] in terms of the acceptance rate, revenue, and revenue-to-cost metric, managing to achieve highest enhancements reported in the literature so far. The enhancements assessed in this paper have been proven to be statistically significant through formal analysis. Finally, it is worth mentioning that all metaheuristic optimization algorithms require initialization. The computational overhead that is used for the initialization function (IF) only applies at the moment to create the initial population that is, before the search algorithm (SA). The complexity of the initialization functions is added to the complexity of the search algorithm \(O(IF+SA)\) instead of multiplying the complexity of the search algorithm \(O(IF\times SA)\). In this regard, the implementation of the initialization functions presented in this paper does not add any computational overhead to the classical VNE approaches.