A virtual network function forwarding graph extension method based on deep reinforcement learning
By optimizing the VNF-FG extension using deep reinforcement learning algorithms, the efficiency and optimization issues of VNF and virtual link deployment in dynamic networks are solved, achieving efficient resource scheduling and load equalization in dynamic networks and reducing deployment costs.
Patent Information
- Application Number
- CN202311790641.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-25
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2043-12-25
AI Technical Summary
Existing technologies struggle to guarantee the efficiency and quality of optimal solutions for VNF-FG extensions in dynamic networks, especially when infrastructure network topology and resource status change dynamically, making it difficult to effectively optimize the deployment of VNFs and virtual links.
We employ a VNF-FG extended algorithm based on deep reinforcement learning, combining Markov decision processes, graph attention networks, and Transformer models. We optimize VNF deployment and resource allocation using the Soft Actor-Critic algorithm to ensure optimal deployment in dynamic networks.
While ensuring the underlying resource requirements are met, the total cost for service providers is optimized, and efficient deployment of VNFs and virtual links and even distribution of resource load are achieved, thereby improving the exploratory nature and robustness of deployment strategies.
Smart Images

Figure CN117768906B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of virtual network function technology, and more specifically to a method for expanding network function forwarding graphs based on deep reinforcement learning. Background Technology
[0002] With the development of 5G networks, Network Functions Virtualization (NFV) has become increasingly important, making network services simpler and more efficient. NFV decouples hardware and software, breaking down traditional network tools into general-purpose hardware (such as switches or servers) and individual software components, also called Virtual Network Functions (VNFs), which can be flexibly configured based on cloud technology. Within the service-oriented framework of 5G, NFV and Software-Defined Networking (SDN) are driving the transformation of 5G networks, especially NFV-based network slicing technology, which has fostered rapid growth across multiple industries.
[0003] As business types change and traffic increases, service providers not only need to maintain their original services and application functions, but also need to expand their already deployed Virtual Network Functions Forwarding Graph (VNF-FG) instances through additional forwarding graphs (adding new forwarding paths, new VNFs, and new service chains, etc.) to upgrade services and applications. VNF-FG expansion consists of two phases: the first phase is the expansion of the initial VNF-FG, i.e., adding new VNFs and virtual links; the second phase is the deployment of the expanded VNFs and virtual links on NFVI to update network services and applications.
[0004] However, existing methods employ static computation, assuming that the topology and resource status of the infrastructure network remain unchanged. This makes it difficult to guarantee the efficiency and quality of the optimal solution in dynamic networks. For future dynamic and complex cloud network scenarios, the VNF-FG extension problem studied in this invention not only needs to extend the initial VNF-FG at the application layer to add new VNFs and virtual links, but also needs to achieve optimal deployment of the extended VNFs at the infrastructure layer. Summary of the Invention
[0005] In view of this, the purpose of this invention is to provide a VNF-FG extension algorithm based on deep reinforcement learning. Applying this scheme can jointly optimize the total cost of service providers while ensuring the CPU resources and physical link bandwidth resources of the underlying server.
[0006] To achieve the above objectives, the present invention provides the following technical solution: This invention designs a network function forwarding graph (SFC) expansion algorithm based on deep reinforcement learning for dynamic scenarios. Its key features include: an underlying physical network and SFC request feature extraction; and the use of Markov decision processes (MDPs) with sequential decision-making characteristics to simulate stochastic policies and rewards in environments where the system state exhibits Markov properties.
[0007] S1: In the context of network function virtualization, design an integer linear programming model for expanding the virtual network function forwarding graph; S2: Use Graph Attention Network (GAT) to extract the node capacity and link capacity of the underlying physical network based on the characteristics of neighboring nodes and links; S3: Using Transformer to process SFC request feature information and underlying network information processed by GAT, which guarantees the order requirements of SFC and can effectively capture the context information in the SFC sequence; S4: Based on Markov decision-making, a Soft Actor-Critic algorithm is established. Based on the maximum entropy reinforcement learning framework, the exploratory nature and robustness of the agent are improved. The attention mechanism is used to selectively extract information, and the credit allocation is achieved by combining the advantage function.
[0008] Furthermore, in step S1, the network function virtualization scenario comprises four components: the physical infrastructure layer, the virtualization management layer, the network application layer, and the service operation support system. The physical layer is the underlying bearer network containing general-purpose servers, providing the physical resources for the instantiation of VNFs. The virtualization layer implements load analysis and resource allocation strategies for the physical network. The application layer is primarily responsible for creating SFCs and chaining based on service requirements. The service operation support system performs real-time monitoring of network status, etc. Furthermore, in step S1, it is necessary to ensure that the already deployed VNFs and links are not affected: ; ; Where u f This indicates the initial deployment location of VNF f. When VNF f is deployed to node u, , This represents the set of Virtual Network Functions (VNFs) in the deployed Virtual Network Functions forwarding graph. When VNFf is deployed to node u and VNFg is deployed to node v, then deploying a link between physical nodes u and v is... .
[0009] It must be ensured that each extended VNF request is deployed to a single node: ; in This represents the set of VNFs that need to be expanded for deployment.
[0010] The resource requirements of each deployed VNF cannot exceed the node's resource capacity: ; The mapping of virtual links needs to be discussed in two cases depending on the connection situation. One case is when one end of the virtual link is the initial VNF and the other end is the extended VNF. Based on the different source and destination nodes of the virtual link, this can be divided into two constraints: ; ; Another scenario involves extending the virtual link to two newly extended VNFs, which is equivalent to deploying a new virtual link. The deployment of a new virtual link must ensure the continuity of the underlying link routing and must not create loops. ; ; The remaining available bandwidth of a physical link must satisfy the sum of the bandwidth requirements of the virtual links mapped to it: ; The optimization objective is: ; Furthermore, step S2 includes the following steps: S21: This invention transforms the SFC deployment problem into an MDP model, represented by a quadruple M = {S, A, R, P}, where S represents the state space, A represents the action space, R is the reward function, and P is the state transition probability.
[0011] First, define the action space, which includes the current physical network state and the state of the arriving SFC request. Define: .
[0012] in, A represents the adjacency matrix of the underlying physical network, X represents the feature matrix of the physical nodes, and I represents the number of VNFs in the SFC request. The number of rows in X is equal to the number of nodes, and each row of X includes the total capacity and remaining capacity of the physical nodes. This is the SFC feature matrix, where each row includes the node resources required for the currently placed VNF, the traffic size, and the number of VNFs to be placed.
[0013] Establish an action space A = {1, 2, 3, ..., |N|}, with dimension N equal to the number of nodes. An action in the action space... Defined as selecting a node from the set of nodes to place the current VNF.
[0014] The optimization objective of this paper is to minimize deployment cost, so the reward is defined as: .
[0015] Network in time slot t Next, take action After that, it will move to the state of the next time slot. The state transition probability of this process is defined as follows: .
[0016] S22: Physical Network Feature Extraction. When deploying a VNF, each server node in the physical network is affected by characteristics such as the resource capacity and link capacity of its neighboring nodes. Considering that the physical network topology is non-Euclidean, we first extract the current physical network state... Input a GAT layer and learn a new representation matrix. As shown below: A self-attention mechanism is implemented for each node, with an attention coefficient of: ; The above formula is used to represent the importance of node i to node j. a() is a predefined function.
[0017] Next, softmax is introduced to normalize all neighboring nodes: ; Utilizing the attention coefficients between different nodes Output new node features
[0018] ; Where σ represents a nonlinear activation function. This represents the domain consisting of all nodes adjacent to node i. The eigenvectors of node j are represented, and finally a new representation matrix is obtained. .
[0019] ; Furthermore, in step S3, a Transformer is used to process the SFC request feature information, ensuring the order requirement of SFCs and effectively capturing the context information in the SFC sequence.
[0020] Queries in attention mechanism networks ,key Sum The following can be calculated: ; in, , , It is a learnable weight parameter matrix.
[0021] Calculate the attention score: ; in K represents i transpose, As a scaling factor, Represents the number of dimensions, divided by It can improve the stability of the gradient.
[0022] The "multi-head" in the multi-head attention module is similar to the multi-channel mode in traditional convolutional neural networks. It generates multiple sets of Q, K, and V from the input sequence elements, maps them to multiple subspaces, calculates the correlation between elements in parallel, obtains the attention results for each set, and then concatenates them to obtain the multi-head attention calculation result. ; ; Among them W O The weight matrix is a learnable matrix, and the outputs of all attention mechanisms are fused together.
[0023] Further, in step S4, the Soft Actor-Critic (SAC) deep reinforcement learning algorithm is used to obtain the probability distribution of candidate actions. After extracting features from the physical network and SFC request through a Transformer network, the vector is passed through three fully connected layers. The final output vector dimension is the number of physical network nodes that can accommodate VNFs, i.e., the dimension of the action. The k-shortest path algorithm is used to find k shortest paths connecting the physical nodes that accommodate two adjacent VNFs in the physical network. It is then checked whether the virtual link bandwidth requirement is met. If it is, the SFC request is successfully deployed. Otherwise, the deployment fails and the previously occupied physical resources are released.
[0024] The beneficial effects of this invention are as follows: reasonable scheduling is carried out under the constraints of computing and bandwidth resources of physical facilities, so as to minimize deployment costs while evenly distributing the load on server resources; the local maximum entropy strategy enhances the exploratory nature of VNF deployment and resource allocation strategies; and the attention mechanism enables the agent to effectively pay attention to external contributions. Attached Figure Description
[0025] To make the objectives, technical solutions, and advantages of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein: Figure 1 This is a flow diagram of the present invention; Figure 2 This is an extended diagram of the virtual network function forwarding graph. Detailed Implementation
[0026] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0027] The accompanying drawings are for illustrative purposes only and are schematic diagrams, not actual pictures. They should not be construed as limiting the invention. To better illustrate the embodiments of the invention, some parts in the drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions. It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.
[0028] In the accompanying drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components. In the description of the present invention, it should be understood that if terms such as "upper," "lower," "left," "right," "front," and "rear" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, the terms used to describe positional relationships in the drawings are only for illustrative purposes and should not be construed as limiting the present invention. For those skilled in the art, the specific meaning of the above terms can be understood according to the specific circumstances.
[0029] The physical network, consisting of numerous nodes and links, is modeled as an undirected graph Gp = (N, L). N represents the set of physical nodes, i.e., servers, and L represents the set of links connecting these nodes. Servers provide the CPU resources for their instantiation of VNFs, and each underlying server can instantiate multiple VNFs. Each server contains multiple CPUs, where represents the CPU resource capacity of the v-th server. uv represents the physical link connecting u and v, and its limited bandwidth resource is represented as... See also Figure 2 The solid lines and arrows represent the already deployed virtual network function forwarding diagrams and links, while the dashed lines represent the VNFs and links that need to be expanded.
[0030] An SFC request can be represented as... Represents the set of different VNFs on the SFC. This represents the set of virtual links on the SFC. For VNF f, it means that server u is allocated C amount of CPU resources. f u and v represent the links connecting the u-th and v-th adjacent VNFs on the SFC. This indicates the amount of bandwidth resources allocated to the physical link uv.
[0031] The complete process of this invention is as follows: S1: In the context of network function virtualization, design an integer linear programming model for expanding the virtual network function forwarding graph; S2: Use Graph Attention Network (GAT) to extract the node capacity and link capacity of the underlying physical network based on the characteristics of neighboring nodes and links; S3: Using Transformer to process SFC request feature information and underlying network information processed by GAT, which guarantees the order requirements of SFC and can effectively capture the context information in the SFC sequence; S4: Based on Markov decision-making, a Soft Actor-Critic algorithm is established. Based on the maximum entropy reinforcement learning framework, the exploratory nature and robustness of the agent are improved. The attention mechanism is used to selectively extract information, and the credit allocation is achieved by combining the advantage function.
[0032] Furthermore, in step S1, it is necessary to ensure that the already deployed VNFs and links are not affected: ; ; Where u f This indicates the initial deployment location of VNF f. When VNF f is deployed to node u, ; This represents the set of Virtual Network Functions (VNFs) in the deployed Virtual Network Functions forwarding graph. When VNFf is deployed to node u and VNF g is deployed to node u, then deploying a link between physical nodes u and v will... .
[0033] It must be ensured that each extended VNF request is deployed to a single node: ; in This represents the set of VNFs that need to be expanded for deployment.
[0034] The resource requirements of each deployed VNF cannot exceed the node's resource capacity: ; The mapping of virtual links needs to be discussed in two cases depending on the connection situation. One case is when one end of the virtual link is the initial VNF and the other end is the extended VNF. Based on the different source and destination nodes of the virtual link, this can be divided into two constraints: ; ; Another scenario involves extending the virtual link to two newly extended VNFs, which is equivalent to deploying a new virtual link. The deployment of a new virtual link must ensure the continuity of the underlying link routing and must not create loops. ; The remaining available bandwidth of a physical link must satisfy the sum of the bandwidth requirements of the virtual links mapped to it: ; The optimization objective is: ; Furthermore, in step S2, GAT is used to extract the underlying physical network features, aggregate the neighbor node information, and transform it into a feature matrix. ; Furthermore, in step S3, a Transformer is used to process the SFC request feature information. The SFC information is input into the encoder and into the decoder. SFC information is embedded into a word vector, which is then processed by six parallel encoders, each containing an attention network and a feedforward network. Attention results are obtained from each of the six encoders, and then concatenated to obtain the multi-head attention calculation result. , = concat(h1, h2, ... h) n )× .
[0035] Furthermore, in the encoder, we obtain The value is then input into the multi-head attention mechanism in the decoder, serving as the key in the attention mechanism network. Sum ,and After passing through a masked attention network, it becomes a query. Then, their multi-head attention values are calculated, and finally, a deployment strategy is generated.
[0036] Furthermore, in step S4: the specific steps of the SAC algorithm are as follows: Step 1: Initialize the state and various parameters; Step Two: Select Action Place VNFs and allocate node and bandwidth resources to earn rewards. Next state ; Step 3: If the constraints are satisfied, when an empirical rule is observed... Add it to experience pool R; Step 4: Once enough data has been stored in the experience pool, a set of data is randomly selected from the experience pool and its value is calculated using the target network. Step 5: Calculate the critic network loss. In the SAC algorithm, this is the loss of two action value functions Q (with parameters respectively). and The model is based on a policy function π (with parameter θ). Based on the Double DQN concept, SAC uses two Q-networks, selecting the network with the smaller Q-value each time to mitigate the problem of overestimation of Q-values; the loss function for any one of the Q-networks is: ; Here, R represents the data collected in the past for the policy, since SAC is an offline policy algorithm. To make training more stable, a target Q-network is used here. Similarly, there are two target Q-networks, each corresponding one-to-one with a Q-network. The update method for the target Q-network in SAC is the same as that in DDPG. It is the estimated value of the action. It is the target value, represented as: ; α, as a flexible temperature parameter, can effectively measure the importance of SFC deployment reward and maximum entropy. ω and θ are the parameters of the critic network and actor network, respectively.
[0037] Step Six: Calculate the policy network loss function as follows: ; Step 7: Update the target network parameters: .
[0038] Those skilled in the art will recognize that the embodiments described herein are intended to help the reader understand the principles of the invention, and should be understood that the scope of protection of the invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific modifications and combinations based on the technical teachings disclosed in this invention without departing from the spirit of the invention, and these modifications and combinations are still within the scope of protection of this invention.
Claims
1. A method for expanding a virtual network function forwarding graph based on deep reinforcement learning, characterized in that: The method includes the following steps: S1: In the context of network function virtualization, design an integer linear programming model for expanding the virtual network function forwarding graph; S2: Using Graph Attention Network (GAT), the node capacity and link capacity of the underlying physical network are extracted based on the characteristics of neighboring nodes and links; S3: Using Transformer to process SFC request feature information and underlying network information processed by GAT, which ensures the order requirements of SFC and effectively captures the context information in the SFC sequence; S4: Based on Markov decision-making, a Soft Actor-Critic algorithm is established. Based on the maximum entropy reinforcement learning framework, the exploratory nature and robustness of the agent are improved. The attention mechanism is used to selectively extract information, and the advantage function is combined to realize credit allocation. In S1, the network function virtualization scenario includes four parts: physical infrastructure layer, virtualization management layer, network application layer, and business operation support system. The physical layer is the underlying bearer network containing general-purpose servers, which provides physical resources for the instantiation of VNFs. The virtualization layer realizes the load analysis of the physical network and the execution of resource allocation strategies. The application layer is responsible for creating SFCs according to business needs. The business operation support system completes real-time monitoring of network status.
2. The virtual network function forwarding graph expansion method based on deep reinforcement learning according to claim 1, characterized in that: In step S2, the SFC deployment problem is first transformed into an MDP model, represented by a quadruple M = {S, A, R, P}; the reward function is: , Represents the set of virtual links on the SFC. This indicates the amount of bandwidth resources allocated to the physical link uv.
3. The virtual network function forwarding graph expansion method based on deep reinforcement learning according to claim 1, characterized in that: In step S3, a Transformer is used to process the SFC request feature information. The SFC information is input into the encoder section, and Z is input into the decoder section. i SFC information is embedded into a word vector, which is then processed by six parallel encoders, each containing an attention network and a feedforward network. Attention results are obtained from each of the six encoders, and then concatenated to obtain the multi-head attention calculation result. , = concat(h1, h2, ... h) n )× , This represents the learnable weight matrix; the MH(Q′, K′, V′) values are obtained in the encoder and then input into the multi-head attention mechanism in the decoder as keys in the attention mechanism network. Sum , and the characteristic matrix After passing through a masked attention network, it becomes a query. Then, their multi-head attention values are calculated, and finally, a deployment strategy is generated.
4. The virtual network function forwarding graph expansion method based on deep reinforcement learning according to claim 1, characterized in that: S4 includes the following steps: Step 1: Initialize the state and various parameters; Step Two: Select Action Place VNFs and allocate node and bandwidth resources to earn rewards. Next state ; Step 3: If the constraints are satisfied, when an empirical rule is observed... Add it to experience pool R; Step 4: Once enough data has been stored in the experience pool, a set of data is randomly selected from the experience pool and its value is calculated using the target network. Step 5: Calculate the critic network loss. In the SAC algorithm, two action-value functions Q and one policy function π are modeled, where the parameters of Q are ω1 and ω2, and the parameter of π is θ. Based on the idea of DoubleDQN, SAC uses two Q-networks, selecting the network with the smaller Q value each time. The loss function for any one of the functions is: ; Here, R represents the data collected in the past for the policy, since SAC is an offline policy algorithm; to make training more stable, a target Q-network is used here. Both SAC and DDPG use two target Q-networks, each corresponding to a different Q-network. The update method for the target Q-network in SAC is the same as that in DDPG. It is the estimated value of the action. It is the target value, represented as: ; α, as a flexible temperature parameter, can effectively measure the importance of SFC deployment rewards and maximum entropy. and These are the parameters for the critic network and the actor network, respectively. Step Six: Calculate the policy network loss function as follows: ; Step 7: Update the target network parameters: 。
