Heuristic Strategy of Service Function Chain Deployment Based on N-Base Continuous Digital Coding in Network Function Virtualization Environment

: As a novel network architecture, network function virtualization (NFV) greatly improves the ﬂexibility and scalability of service provision. Deploying the service function chain (SFC) in an NFV environment needs to coordinate the instantiation of the virtual network function descriptor, network function embedding, and trafﬁc steering, which also improves the complexity of the problem. Although heuristic algorithms are widely used to optimize this problem, due to the lack of complete SFC deployment solution space and digital coding scheme, the time complexity of the algorithm is difﬁcult to meet the requirements. Therefore, this paper studies the digital coding scheme of the heuristic SFC deployment to improve time efﬁciency without reducing performance. Firstly, we model the SFC deployment as a 0–1 integer linear programming, considering the above factors, and then design a continuous digital solution space construction scheme based on N-Base coding (NBACO-SS) to optimize the above problems. NBACO-SS uses integer size and carry to map the complex SFC deployment to simple digital coding, evaluates the continuity of solution space through the Manhattan distance, and optimizes the continuity through the ant colony algorithm. Based on NBACO-SS, we reconstruct two heuristic algorithms to solve the SFC deployment problem. Experimental results demonstrate that NBACO-SS can improve the time efﬁciency by 20% without reducing the total network service trafﬁc.


Introduction
Network function virtualization (NFV) [1] is a novel network architecture, which decouples software and hardware, and realizes the network functions originally realized by expensive special hardware with virtualization technology on the commercial server (such as the firewall, WAN accelerator, and traffic Monitor), which is called virtual network function (VNF). This new network architecture makes the deployment of network services more flexible and scalable and greatly reduces the capital expenditure and operative costs of network operators. Although NFV provides great flexibility for service deployment, network operators face some new challenges in deploying and managing user services. Generally, user service traffic needs to pass through a set of network functions in an orderly way and is defined as a service function chain (SFC) [2]. SFC deployment in the NFV environment needs to coordinate the resource allocation of instantiated VNF (selecting appropriate the virtual network function descriptor), network function embedding, and traffic routing between VNFs. How to realize fast, scalable, and flexible SFC deployment is a new challenge; this problem has proved to be an NP-hard problem [3].

1.
We make an in-depth analysis on the problems of instantiation VNFD selection, network function embedding, and traffic steering in SFC deployment, and establish a 0-1 integer linear programming (ILP) model considering the above factors. The goal of the model is to maximize the total network service traffic. The problem is proved to be an NP-hard problem by reducing it to a knapsack loading problem.

2.
We analyze the solution space of the SFC deployment problem in detail and design a continuous digital solution space construction scheme based on N-Base coding (NBACO-SS). By using integer size and carry, the complex SFC deployment is abstracted and mapped to a simple digital domain coding, and the continuity of solution space is evaluated by Manhattan distance. The problem is compared with the traveling salesman problem (TSP), and an ant colony algorithm is used to optimize the continuity of solution space and make it close to the theoretical optimum. We also reconstruct an affinity-based simulated annealing deployment algorithm and a tabu search deployment algorithm, based on NBACO-SS. 3.
Through extensive experiments, we prove that NBACO-SS can effectively improve the continuity of solution space and approach the theoretical optimization when the solution space is small. At the same time, the reconstructed heuristic SFC deployment strategies can improve the time efficiency by about 20% without reducing the total network service traffic. We also obtain the optimal number of service traffic steering paths in distributed network architecture.
The rest of this paper is structured as follows. Section 2 reviews the related work. Then, Section 3 formulates the mathematical model of SFC deployment. Section 4 describes the proposed NBACO-SS method and two reconstructed heuristic algorithms, and Section 5 discusses the test scenarios and evaluation of the proposed algorithm. Finally, the paper is summarized in Section 6.

Related Work
The related work falls into the following two categories: (1) SFC deployment mathematical model and (2) heuristic algorithm for SFC deployment optimization.

SFC Deployment Mathematical Model
SFC is an important use case of the NFV scenario [35], and its deployment is also one of the major challenges in the research of NFV [36]. Many scholars have studied the deployment of SFC and established mathematical models. Aiming at minimizing the consumption of network bandwidth resources and improving bandwidth utilization, a mathematical model is established for the placement of VNF and traffic steering of SFC in [4,5]. In the model, the constraints of node calculation, memory resources, link bandwidth capacity, and SFC traffic traversal sequence are considered. In [6], aiming at maximizing the total service traffic, the virtual network function placement and routing path selection of SFC were studied, and the SFC deployment model was established considering the resource constraints, such as link, VNF, and VM, etc., and it was proved to be an NP-hard problem by reducing the model to a EDP problem. However, the above model simplifies the VNF, does not consider the scalability of VNF for traffic processing, and ignores the user service delay limit [7]. Considering the transmission delay between data centers and minimizing the total delay of SFC, a mixed-integer linear programming (MILP) model is established, and it is transformed into a linear programming model by the restriction of decision variables. In [8], aiming at minimizing the total delay of SFC, the similarity between SFC and the shortest path tour problem is studied, and two novel ILP models are established for the service path and function placement based on the proposed augmented network. The author of [9] studied the SFC deployment problem in the environment of time-varying workloads and basic resource consumption of VNF instantiation, and established the ILP model to minimize the number of physical machines used. The author of [10] studied the differentiated routing and load balancing of SFC requests with different types of traffic. Aiming at minimizing the resource consumption cost of SFC requests, a binary linear programming model considering the constraints of bandwidth, flow table, CPU and delay was established. The above models assume that the network functions of SFC can only be deployed on one VNF. Considering the multi-instance deployment problem of SFC, the mixed-integer programming model and linear programming model are established respectively in [11,12] for the selection and mapping of VNFs and the traffic steering between upstream and downstream. In [13], the scheduling of VNF was studied, and a MILP model was established which includes three stages: network function mapping, traffic routing, and service schedule; a linear programming lower bound and an ILP upper bound of the MILP model are given by the column generation method.
The above model does not consider the differences of the underlying resource requirements of instantiating different VNFD templates of the same type of VNF; however, in the real NFV environment, VNF instantiation has such resource constraints that the integrity of the model is defective.

Heuristic Algorithm for SFC Deployment Optimization
The SFC deployment problem is an NP-hard problem. Heuristic algorithms are usually used to obtain a near-optimal solution in an acceptable time. Many scholars have designed heuristic optimization schemes for this problem.
In terms of individual-based heuristic algorithm design, [14], firstly, compares the advantages and disadvantages of the heuristic algorithm and greedy algorithm in the online mapping and scheduling of VNF, and the performance of three greedy algorithms and a tabu search algorithm is analyzed. In [15], an affinity-based simulated annealing algorithm (ABSA) is proposed to minimize the delay of SFC by deploying network functions on the same underlying node as much as possible and finding the optimal solution through the simulated annealing algorithm. The authors of [16,17] also used the tabu search algorithm to optimize the VNF management and migration in the large-scale distributed NFV environment and designed a variety of basic neighborhood operations, and they achieved effective performance improvement. The simulated annealing heuristic algorithm is used to optimize the delay and bandwidth consumption of SFC deployment in [18], and two neighborhood update strategies of randomly selecting or exchanging the deployment location of Middlebox are designed. Compared with the benchmark algorithm, the end-toend delay and bandwidth consumption are reduced by 22% and 38%. The authors of [19] aimed at the embedding problem of SFC and used the tabu search algorithm to optimize the bandwidth occupation of the network resources. The algorithm obtains the neighborhood by randomly changing the deployment location of VNF, which improves the acceptance rate of service requests. The above heuristic deployment algorithms do not consider the digital coding mapping strategy.
The population-based heuristic algorithm is also widely used in SFC deployment. The authors of [20] aimed at the problem of content caching and service provision in the fog network in order to optimize the function mapping and virtual content placement; an ant colony-based heuristic algorithm is proposed to reduce the time complexity of this NP-hard problem. The authors of [21] proposed a multi-objective service path construction algorithm based on discrete particle swarm optimization (MOPSO); a particle position initialization and update strategy (PIFC) is proposed based on the further study of the evaluation criteria of candidate nodes and paths, which accelerated the convergence speed of the program. The algorithm optimizes the quality of service paths and improves the success rate of service path construction and long-term average revenue. To solve the problem of VNF placement in a network function virtualization environment, in [22], an integer-coding gray wolf optimizer algorithm was designed considering the constraints of computing, storage, IO, and bandwidth resources of the underlying network. By assigning integer numbers to the underlying nodes, the deployment positions of service functions on the underlying nodes are coded as the gray wolf positions, and a new location update strategy of the wolf group was proposed. The scheme minimizes the end-to-end delay of SFC deployment and achieves better fitness than other heuristic algorithms. The author of [23] decomposes the dynamic VNF deployment problem into SFC scheduling and mapping sub-problems, establishes a dynamic scheduling model of second-order queue, and proposes a dynamic VNF placement algorithm consisting of two genetic algorithms to optimize the above problems. In the algorithm, the gene position of the chromosome is encoded as the number of VNF for each type. The above heuristic algorithms use some simple digital mapping strategies, but ignore the continuity and size of solution space and simplify the routing of traffic.
In addition to the above general heuristic algorithms, there are other heuristic algorithms to optimize the deployment of SFC. A heuristic algorithm is proposed to coordinate the composition and embedding of SFC (CoordVNF) in [24,25]. CoordVNF adopts the concept of backtracking to recursively find an effective embedding scheme [5]. Aiming at the problem of SFC deployment and path selection, a heuristic scheme based on the longest function allocation sequence is proposed to optimize the VNF reuse and bandwidth resource saving. This scheme can reduce the number of deployed VNFs and link bandwidth requirements, and serve more requests than other algorithms. The author of [26], aiming at the problem of cross-domain SFC partition and service sub-chain mapping, proposed a Viterbi heuristic algorithm, which can dynamically change the emission probability to obtain the near-optimal solution of minimizing the end-to-end delay of SFC deployment in large-scale networks. In [27], a Viterbi heuristic strategy is also proposed to reduce the complexity of VNF migration, determine the best migration strategy, and reduce energy consumption. The above algorithm also does not consider the digital domain operation of heuristic service function chain deployment.
Heuristic algorithms are widely used in the research of SFC deployment to simplify the complexity of the problem. The heuristic strategy in the above design lacks a complete solution space and digital coding scheme for the SFC deployment problem, which makes the algorithm design complicated and the time complexity difficult to meet the requirements.

System Model and Problem Description
The SFC deployment model in the NFV scenario is shown in Figure 1, which is divided into three layers: network function virtualization infrastructure (NFVI), virtual network function, and user service. Three factors are considered in the model: the selection of instantiation VNFD on NFVI, the mapping of the user network function, and the selection of the traffic steering path.

Network Function Virtualization Infrastructure (NFVI)
The NFVI is modeled as an undirected graph  [37,38]. It is assumed that the internal bandwidt same node is large enough to support the internal business requirements of t without considering the internal delay of the node [6].

Virtual Network Function (VNF)
VNFs are defined as a software entity that implements different traffic pro functions on NFVI. VNF can be instantiated in the form of a virtual machine fo resource independence or as a container virtualization for greater flexibility [39] which will occupy NFVI node resources. F represents a collection of VNF typ i f F ∈ represents a specific type of VNF, which can provide a specific traffic pro service (such as a firewall). Considering the difference in resource consumption packets processed by different types of VNFs, we assume a linear relationship b traffic and required resources [7] and use the resource demand coefficient coeff

Network Function Virtualization Infrastructure (NFVI)
The NFVI is modeled as an undirected graph G S = (N S , E S ), where N S represents the set of physical nodes and E S represents the set of physical links. For the consistent network architectures of multi-access edge computing (MEC) and distributed data centers, each node, n s i ∈ N S , has the same type and contains switching and forwarding capabilities. R represents the resources set contained by physical nodes, such as CPU, MEMORY, and STORAGE. For any resource, r ∈ R and cap r n s i represent the number of resources of type r contained by node n s i . e s ij ∈ E S represents a physical link between the adjacent nodes n s i , n s j , and bw(e s ij ); delay(e s ij ) represents the bandwidth and transmission delay of link e s ij [37,38]. It is assumed that the internal bandwidth of the same node is large enough to support the internal business requirements of the node without considering the internal delay of the node [6].

Virtual Network Function (VNF)
VNFs are defined as a software entity that implements different traffic processing functions on NFVI. VNF can be instantiated in the form of a virtual machine for higher resource independence or as a container virtualization for greater flexibility [39], both of which will occupy NFVI node resources. F represents a collection of VNF types, and f i ∈ F represents a specific type of VNF, which can provide a specific traffic processing service (such as a firewall). Considering the difference in resource consumption of data packets processed by different types of VNFs, we assume a linear relationship between traffic and required resources [7] and use the resource demand coefficient coe f f r ( f i ) to represent Electronics 2022, 11, 331 6 of 20 the resource consumption capacity of different VNFs, that is, for any size of traffic t in , the required resource c r of type r and of VNF f i , is demonstrated in (1). (1) Number of resources of type r needed to instantiate the VNFD User Service User service requirements and a specific user service SFC j The source, network function set, and destination node of SFC j.
Another representation of source node and target node of SFC j The virtual link connecting network function n v ji and n v Traffic requirements and delay limits of an SFC The number of network functional requirements in an SFC

Γ
The path set of all nodes in the network The path set between nodes n s p and n s q , l-th path in the set and z-th node on the path

Binary decision variable Φ
The total deployment traffic z 1 z 2 · · · z M M-Bit N-Base number Z = {Z 1 , Z 2 , · · · , Z i , · · · } All deployment schemes of an SFC in a single routing link D(Z) The sum of Manhattan distances between digital coding schemes Considering the packet processing methods of different VNF, such as the adding and deleting of headers, compression of redundant data, and discarding part of data packets, these will change the size of traffic [40]. ratio( f i ) is defined as the traffic scaling factor of VNF f i ; the traffic size after the f i processing is shown in (2).
Considering the limitation of computer hardware resource architecture, VNF can only be instantiated with specific resources (for example, 2 CPU cores and 4G memory; 2.1 CPU and 4.1G memory are usually not allowed). The VNFD regulates the occupation limit of VNF to the underlying resources. Through VNFD, a VNF with a specific size can be instantiated on the underlying node. For effective management, the number of VNFD types provided by the data center is also limited. f k j is the k-th VNFD of VNF type f j , and res r ( f k j ) is the number of resources of type r needed to instantiate the template. It is assumed that there is at most one VNF of the same type on a physical node and the remaining resources in the VNF instance can be shared by different users with the same type of service function requirements [24,27], but the total service demand resources cannot exceed the total VNF resources to ensure service QoS and resource security.

User Service
User service requirements can be represented by a set of SFCs G V , where G V j ∈ G V represents the j-th SFC, which includes source, target nodes, and a group of ordered network functions, and can be represented by a directed graph, , · · · , n v ji , · · · , D j represents the source, network function set, and destination node of SFC j. For convenience, n v j0 , n v j(|N V j |−1) are used to represent the source and destination node. E V j represents the virtual link set connecting the network function. In node set N V j , n v ji (1 ≤ i < N V j − 1) means that traffic needs to pass through the i-th network function, and it needs to be mapped to only one VNF of type f (n v ji ) ∈ F, and µ l ji means whether n v ji needs a VNF of is the virtual link connecting the network function n v ji and n v j(i+1) . For any SFC G V j , F(G V j ) and D(G V j ) represent the traffic requirements and delay limits. Therefore, according to the type of network functions and the size of traffic required by the SFC, the formula for the bandwidth demand of the virtual link, e v ji , is as follows: Therefore, we can also get the demands of the network function, n v ji , for r(r ∈ R) types of resources, as follows:

Traffic Steer
The shortest path algorithm is most commonly used for the traffic steering of SFC. Although the shortest path can reduce service delay and save the network bandwidth, it has certain limitations. This paper models the traffic routing problem and considers multiple routing paths in the network. Γ = (τ 11 , τ 12 , · · · , τ pq , · · · ) is defined as the path set of all nodes in the network, τ pq represents the path set between the nodes n s p and n s q , which are arranged in a positive delay order, τ pql is the l-th (1 ≤ l ≤ τ pq ) path in the set, and τ z pql is the z-th node on the path. Note that τ pql is composed of a series of end-to-end adjacent paths. For the convenience of calculation, the binary variable σ ij pql is defined to indicate whether τ pql contains the adjacent path e s ij . For the traffic steering problem of SFC, all the above routing paths will be considered comprehensively. The delay formula of the routing path is referred to (5).

Decision Model and Optimization Objective
The SFC deployment problem can be regarded as the mapping of the SFC-directed graph set, G V , on the undirected graph of the underlying network G S and the selection of the VNFD instantiation on the nodes under the requirements of service delay and traffic. Instantiating appropriate VNFD templates on nodes can meet the needs of user services and reduce resource fragmentation. The mapping of user services on the underlying network should not only consider the resource constraints of the underlying network but also coordinate the resource competition between SFCs. To sum up, this problem needs to consider the selection of instantiated VNFD, user service function mapping and traffic steering, and the resource competition among different SFCs. The above operations are usually realized by the NFV management and orchestration module (MANO); therefore, the implementation of the fast and flexible SFC deployment strategy can provide support for an efficient orchestrator. We establish the above problem as a 0-1 integer linear programming (0-1 ILP) model and define the Boolean decision variables η jk i , χ p ji , and γ pql ji .
η jk i indicates whether VNF with type and descriptor f k j is instantiated on the physical node n s i , χ p ji indicates whether the j-th network function requirement n v ji of SFC G V j is mapped on the underlying node n s p , and γ pql ji indicates whether the virtual link e v ji of SFC G V j is routed through the link τ pql . The optimization objective is to maximize the deployment traffic of user service under the condition of limited underlying network resources, so as to maximize the interests of service providers. Considering that the number of network functions required by the user SFC is different, and the traffic-scaling coefficient of different network functions is different, the total network traffic is defined as the total bandwidth of the virtual link, and the calculation formula is referred to in (9).
The above optimization objectives not only consider the user service traffic requirements, but also consider the number and type of network function required, which effectively prevents the service requirements containing less network functions from being preferentially deployed. Therefore, the optimization objective of the SFC deployment problem is to maximize the total deployment traffic without violating the user service requirements and the underlying resource constraints: Subject to: (1) Each network function of SFC needs to be deployed on a physical node; (2) Each virtual link of SFC needs to be mapped on a routing link; (3) At most one VNF of the same type can be instantiated on each node; (5) Bandwidth limitation of NFVI links; (6) Resource limitation of VNFs; (8) SFC deployment restriction; both ends of the virtual link mapping routing path must be the deployment location of the corresponding virtual node.
The above SFC deployment model, considering the selection of instantiated VNFD, user service function mapping, and traffic routing, is a 0-1 ILP problem. By reducing it to a knapsack loading problem (KLP), it can be proved that this problem is an NP-hard problem (Theorem 1). Since it is very difficult to solve the above NP-hard problem, in the next section, a solution space composition scheme based on N-Base continuous digital coding is designed, and the SFC heuristic deployment algorithm is combined to solve the above problem.
Proof of Theorem 1. The above SFC deployment problem is reduced to KLP to prove its NP-hard property.
Each SFC G V j in the service set is simplified to only need to go through a network function n v j1 , and the type is f 1 ∈ F. Meanwhile, the adjacent node bandwidth bw(e s ij ) of NFVI is set to infinity and the link delay delay(e s ij ) = 0. In this case, there is no need to consider the link bandwidth and delay constraints, and the only limiting factor is node resources. The above problem is simplified as loading G V boxes with the limit of res r (n v j1 ) on the NFVI node N S to obtain the maximum traffic. The problem is simplified as a typical knapsack loading problem.

Heuristic SFC Deployment Algorithm Based on N-Base Continuous Digital Coding
Heuristic algorithms are one of the most effective methods to solve optimization problems, especially for large-scale scenes. Because of its strong search ability and the strategy of preventing local optimization, it can often get an acceptable solution in a relatively fast time. Based on the detailed study of the SFC deployment model and heuristic algorithm, this paper proposes a heuristic SFC deployment scheme based on N-Base continuous digital coding. In this scheme, the solution space of the SFC deployment problem is mapped to a group of N-Base codes in the digital domain, and the continuity of solution space is further improved through ant colony optimization. The solution realizes the deployment operation of SFC at the digital level, which can effectively improve the simplicity and speed of heuristic algorithms.
that is, the number of network functional requirements in the SFC, and N l = τ pql is defined as the number of physical nodes passing through the l-th path from the source node to the target node. Then the M-Bit N-Base number z 1 z 2 · · · z M (0 ≤ z 1 ≤ z 2 · · · ≤ z M ≤ N l−1 ) represents a deployment scheme of G V j on τ pql , and the corresponding decision relationship is as follows: After all the SFCs deployment codes are determined, the decision variable η jk i can be determined by choosing to instantiate the VNFD f k j , whose resources are larger than and closest to the needs on the node n s i . By coding the natural number from 0 to N M − 1 according to the M-Bit N-Base number, we can get the set of all deployment schemes of SFC in a single routing link τ pql , and record it as Z = {Z 1 , Z 2 , · · · , Z i , · · · }, where Z i is the i-th deployment scheme of SFC. Algorithm 1 shows the calculation method of the N-Base coding solution space (NB-SS). Figure 2 shows the solution space of M = 2 and N = 3. All deployment schemes Z 1 ∼ Z 6 can be obtained by counting from 0 to 8. We can see that carrying from low bit to high bit leads to certain discontinuity. For example, two network functions are moved in Z 3 → Z 4 , and this discontinuity will affect the selection of neighbors. We use D(Z) to represent the continuity of the deployment scheme set, and its value is the sum of Manhattan distances between digital coding schemes. The formula is as follows: The upper limit of the theoretical value of the above continuity can be deduced as Equation (21), and the corresponding physical meaning is that only one NF deployment position is moved to the adjacent node in each step. The upper limit of the theoretical value of the above continuity can be deduced as Equation (21), and the corresponding physical meaning is that only one NF deployment position is moved to the adjacent node in each step.

Solution Space Continuity Optimization Based on Ant Colony Optimization Algorithm
To alleviate the discontinuity of solution space caused by carrying in N-Base coding, the coding sequence of solution space can be rearranged. As shown in Figure 3, the sum of the Manhattan distances of the two arrangements is 12 and 10, respectively (M = 3, N = 3). When the number of M and N is relatively large (such as M = N = 5, there will be 126 deployment schemes), it is difficult to find the optimal continuity scheme. Inspired by TSP, we take each deployed coding scheme as a city and use the Manhattan distance between deployment coding schemes as the distance between cities. We can model the above continuity optimization problem as an acyclic TSP, and take Equation (20) as the optimization objective, and optimize the problem through the ACO algorithm to obtain the near-optimal continuity [41]. The N-Base coding solution space construction based on the ant colony optimization algorithm (NBACO-SS) is shown in Algorithm 2.   if dis < best_distance /* Update optimal solution */ The NBACO-SS algorithm abstracts the SFC deployment problem as an integer coding calculation problem, so an NBACO-SS library can be established in advance after determining the scale of NFVI and the length range of SFCs to reduce the coding and ACO time. for ant in ants /* traverse ant colony */ 4: citys ← Z 0 , out ← Ø 5: while citys != Ø 6: city ← Select_city(ant, citys) /* select the next city */ 7: Move (

Heuristic SFC Deployment Algorithm Based on N-Base Continuous Digital Coding
In this paper, we combine the continuous digital coding strategy with the existing heuristic algorithm and reconstruct the tabu search embedding algorithm and affinity-based simulated annealing algorithm based on NBACO-SS.

Affinity-Based Simulated Annealing Algorithm on N-Base Continuous Digital
Coding Solution Space (NB-ABSA) NB-ABSA algorithm is based on an affinity-based simulated annealing embedding algorithm (ABSA) proposed in [15], and NBACO-SS is used to build a complete SFC deployment solution space and deployment coding scheme. For any group of SFC G V = {G V 1 , G V 2 , · · · , G V j , its deployment scheme in NBACO-SS solution space is X = {x 1 , x 2 , · · · , x j , where x j = (l, j) represents its deployment scheme on the l-th path τ pql of path set τ pq (p, q = ∑ In the affinity-based deployment scheme, the network functions of the same SFC are deployed on the same node as much as possible to reduce the occupation of traffic bandwidth. This affinity can be measured by the mode function Mode Z j . The larger its value is, the more network functions of the same SFC are deployed on the same node. The pseudo-code of the NB-ABSA algorithm is shown in Algorithm 3. Lines 1-5 use the affinity-based approach [15] to generate a deployment scheme for each SFC and find its corresponding code in the NBACO-SS space. Lines 8-16 perform neighborhood update operations. The affinity-based approach is used to generate the neighborhood set for each SFC that has been successfully deployed in G V , and tries to deploy unsuccessful SFC with the affinity-based approach, and the maximum fitness and corresponding neighborhood are calculated. Lines 17-21 update the optimal solution according to the metropolis criterion. Line 22 is the cooling function.

Performance Evaluation
This chapter compares the performance of our proposed heuristic SFC deployment algorithm based on N-Base continuous digital coding with the heuristic algorithm without digital coding proposed in paper [15] and paper [19]. The ABSA algorithm proposed in paper [15] considers the affinity of network functions of SFC, and deploys the network function with the traffic relation on the same node as possible, and uses a simulated annealing algorithm to find the optimal solution. The ETS algorithm proposed in the paper [19] is a completely random tabu search deployment algorithm. In this paper, the NBACO-SS is used to reconstruct the two algorithms in the unified digital solution space, which effectively reduces the complexity of the algorithm and improves the efficiency of operation. We first describe the simulation environment, then give the simulation results of the algorithm and make a comparative analysis.

Simulation Environment and Design
The simulation environment used is SFCSim [42], an open-source NFV resource allocation simulation software, which is based on the NetworkX network simulation library and can realize complex network simulations. Two real network topologies, NSFNET and CERNNET2, are used in the simulation. The NSFNET network contains 14 nodes and 17 links and there are a lot of loops in the network for traffic routing decisions. The CERNNET2 network contains 21 nodes and 23 links, which has a larger network scale but fewer loops compared with the NSFNET network. The number of core resources of NFVI nodes conform to the uniform distribution U(10, 30), the importance of nodes in the network topology is evaluated according to the degree of nodes, and the resources are allocated according to the degree in turn. The link bandwidth resource is fixed at 10 Gbps, and the link delay conforms to the uniform distribution U(0.5 ms, 1.5 ms).
Network services provide 8 types of VNF. The traffic-scaling factor of VNF conforms to a uniform distribution U(0.5, 1.5), and the resource coefficient of processing per Gbps traffic conforms to a uniform distribution U(1, 2). According to the configuration of the cloud server by cloud infrastructure (such as Alibaba Cloud and HUAWEI Cloud, etc.), each VNF contains five VNFD, and the node core resources occupied by instantiating each template are 2, 4, 8, 16, and 24, respectively. In addition, the user services contain 100 SFCs, and the source and destination nodes are randomly generated in the network topology. The traffic demand conforms to the uniform distribution U(2 Gbps, 4 Gbps), and the delayed demand conforms to the uniform distribution U(5 ms, 10 ms). The types of virtual network functions that the traffic needs to pass through are between 1 and 5.
In this paper, we will compare the simulation iteration time and the maximum service traffic of the four heuristic algorithms in the above simulation environment. Figure 4 shows that the Manhattan distance continuity of the digital solution space constructed by the NBACO-SS algorithm varies with the length of the user SFC and compares it with the theoretical boundary value calculated by Equation (21) and the NB-SS algorithm without ACO. Note that most of the theoretical boundary values are unreachable according to the Euler Path Theorem, but they can be used as the reference value for algorithm performance evaluation. It can be observed from Figure 4 that the Manhattan distance D(z) increases rapidly with the increase of SFC length and the number of nodes on the routing path. This is because the total number of codes, N M , is a power function and an exponential function with N and M, respectively. Therefore, the solution space composed of qualified codes will also increase rapidly, and Manhattan distance D(Z) will increase accordingly. ACO can greatly improve the continuity of solution space based on NB-SS strategy, especially when the number of NF is less than five and the number of routing nodes is less than six; when the solution space scale is small, and the ant colony algorithm can converge in a faster time, it can approach the theoretical boundary value. fixed at 10 Gbps, and the link delay conforms to the uniform distribution (0.5ms,1.5ms) U . Network services provide 8 types of VNF. The traffic-scaling factor of VNF conforms to a uniform distribution (0.5,1.5) U , and the resource coefficient of processing per Gbps traffic conforms to a uniform distribution (1, 2) U . According to the configuration of the cloud server by cloud infrastructure (such as Alibaba Cloud and HUAWEI Cloud, etc.), each VNF contains five VNFD, and the node core resources occupied by instantiating each template are 2, 4, 8, 16, and 24, respectively. In addition, the user services contain 100 SFCs, and the source and destination nodes are randomly generated in the network topology. The traffic demand conforms to the uniform distribution (2Gbps, 4Gbps) U , and the delayed demand conforms to the uniform distribution (5ms,10ms) U . The types of virtual network functions that the traffic needs to pass through are between 1 and 5.

Continuity Evaluation of NBACO-SS
In this paper, we will compare the simulation iteration time and the maximum service traffic of the four heuristic algorithms in the above simulation environment. Figure 4 shows that the Manhattan distance continuity of the digital solution space constructed by the NBACO-SS algorithm varies with the length of the user SFC and compares it with the theoretical boundary value calculated by Equation (21) and the NB-SS algorithm without ACO. Note that most of the theoretical boundary values are unreachable according to the Euler Path Theorem, but they can be used as the reference value for algorithm performance evaluation. It can be observed from Figure 4 that the Manhattan distance D(z) increases rapidly with the increase of SFC length and the number of nodes on the routing path. This is because the total number of codes, M N , is a power function and an exponential function with N and M , respectively. Therefore, the solution space composed of qualified codes will also increase rapidly, and Manhattan distance ( ) D Z will increase accordingly. ACO can greatly improve the continuity of solution space based on NB-SS strategy, especially when the number of NF is less than five and the number of routing nodes is less than six; when the solution space scale is small, and the ant colony algorithm can converge in a faster time, it can approach the theoretical boundary value.   Figure 5 shows the time performance of the heuristic deployment scheme based on NBACO-SS, which is defined as the search time of the algorithm under different iterations. To obtain accurate experimental data, we conducted five experiments at each experimental point and obtained the average results within 80% confidence. The parameter controlling the NB-ABSA algorithm is the cooling rate α. The smaller the α, the slower the temperature reduction and the greater the number of iterations. Figure 5a,b are the simulation results of the NB-ETS algorithm and NB-SBSA algorithm, respectively. We can see that with the deepening of algorithm search time, the proposed NBACO-SS strategy can effectively reduce the simulation time of SFC deployment algorithms. This is because a complete solution space can reduce the repeated search operation, and the coding based on the digital domain can effectively reduce the time efficiency of memory storage, comparison, and search operations of heuristic SFC deployment algorithms. Figure 6 quantifies the time efficiency improvement of our proposed strategy (time efficiency is defined as the ratio of search time improved by the new algorithm to the original algorithm). For two completely different heuristic algorithms, simulated annealing and tabu search, the heuristic deployment scheme based on NBACO-SS can improve the time efficiency by about 20%.

Performance Evaluation of Heuristic Deployment Scheme Based on NBACO-SS
simulation results of the NB-ETS algorithm and NB-SBSA algorithm, respectively. We can see that with the deepening of algorithm search time, the proposed NBACO-SS strategy can effectively reduce the simulation time of SFC deployment algorithms. This is because a complete solution space can reduce the repeated search operation, and the coding based on the digital domain can effectively reduce the time efficiency of memory storage, comparison, and search operations of heuristic SFC deployment algorithms. Figure 6 quantifies the time efficiency improvement of our proposed strategy (time efficiency is defined as the ratio of search time improved by the new algorithm to the original algorithm). For two completely different heuristic algorithms, simulated annealing and tabu search, the heuristic deployment scheme based on NBACO-SS can improve the time efficiency by about 20%.   simulation results of the NB-ETS algorithm and NB-SBSA algorithm, respectively. We can see that with the deepening of algorithm search time, the proposed NBACO-SS strategy can effectively reduce the simulation time of SFC deployment algorithms. This is because a complete solution space can reduce the repeated search operation, and the coding based on the digital domain can effectively reduce the time efficiency of memory storage, comparison, and search operations of heuristic SFC deployment algorithms. Figure 6 quantifies the time efficiency improvement of our proposed strategy (time efficiency is defined as the ratio of search time improved by the new algorithm to the original algorithm). For two completely different heuristic algorithms, simulated annealing and tabu search, the heuristic deployment scheme based on NBACO-SS can improve the time efficiency by about 20%.
(a) (b)    Table 2 shows the simulation results of the total service traffic of the four algorithms in two network topologies varying with the number of routing paths. It can be observed from the table that the heuristic deployment scheme based on NBACO-SS achieves almost the same total service traffic as the original deployment scheme, but NBACO-SS can effectively improve the execution speed of the algorithm, and the algorithm can get the optimal solution faster. Finally, we simulate the change of total network service traffic and algorithm convergence time with the number of routing paths. From Figure 7a, we can observe that selecting the routing path other than the shortest path can slightly improve the service traffic, but when considering too many paths, the total service traffic will decrease. This is because the more routing paths considered, the lower the quality of the path and the more bandwidth resources consumed; it will also enlarge the solution space and improve the probability of getting into the suboptimal solution and the search time. Figure 7b demonstrates that with the increase of the number of routing paths, the convergence time of the algorithm increases rapidly, and this increasing trend slows down with the increase of paths. This is because the overall quality of routing paths decreases, and the heuristic algorithm will automatically exclude some poor search space. Therefore, it is more appropriate to choose 2-3 of the shortest routing paths when considering traffic routing paths. most the same total service traffic as the original deployment scheme, but NBACO-SS can effectively improve the execution speed of the algorithm, and the algorithm can get the optimal solution faster. Finally, we simulate the change of total network service traffic and algorithm convergence time with the number of routing paths. From Figure 7a, we can observe that selecting the routing path other than the shortest path can slightly improve the service traffic, but when considering too many paths, the total service traffic will decrease. This is because the more routing paths considered, the lower the quality of the path and the more bandwidth resources consumed; it will also enlarge the solution space and improve the probability of getting into the suboptimal solution and the search time. Figure 7b demonstrates that with the increase of the number of routing paths, the convergence time of the algorithm increases rapidly, and this increasing trend slows down with the increase of paths. This is because the overall quality of routing paths decreases, and the heuristic algorithm will automatically exclude some poor search space. Therefore, it is more appropriate to choose 2-3 of the shortest routing paths when considering traffic routing paths.

Conclusions and Future Work
In this paper, we propose a new continuous digital coding strategy for heuristic SFC deployment algorithms. We model the deployment of SFC into a 0-1 ILP model. For the first time, the instantiated VNFD selection, network function embedding, and traffic

Conclusions and Future Work
In this paper, we propose a new continuous digital coding strategy for heuristic SFC deployment algorithms. We model the deployment of SFC into a 0-1 ILP model. For the first time, the instantiated VNFD selection, network function embedding, and traffic steering are considered in the model, and the problem is reduced to a KLP to prove that it is an NP-hard problem. Based on the model, we conduct a detailed analysis of the solution space of the SFC deployment problem and propose a concise and complete solution space composition strategy based on N-Base continuous digital coding. NBACO-SS maps the complex SFC deployment problem to a simple digital domain-coding problem by using integer size and carry and evaluates the continuity of solution space through Manhattan distance. Finally, the solution space continuity is improved by TSP and ACO.
Based on NBACO-SS, a simulated annealing algorithm (NB-ABSA) and a tabu search algorithm (NB-ETS) are reconstructed to solve the above SFC deployment problem. The simulation results demonstrate that compared with the original algorithm, the heuristic SFC deployment algorithm based on NBACO-SS can improve the time efficiency by about 20% without reducing the total network service traffic. At the same time, choosing the traffic steering path beyond the shortest path can slightly improve the service traffic, but it will also increase the size of the solution space, in order to improve the probability of falling into the suboptimal solution and the search time; therefore, it is more appropriate to choose 2-3 of the shortest paths, as the traffic steering paths in distributed network architectures, such as MEC and distributed micro-data centers. As future work, we plan to use the established model to compare and analyze the SFC deployment in two different VNFD resource granularity architectures, the container and virtual machine, and design an SFC deployment scheme that can effectively reduce resource fragmentation based on NBACO-SS and heuristics.