Routing optimization method based on graph neural network and deep reinforcement learning

Through the routing optimization method that combines graph neural network and deep reinforcement learning, it can perceive network topology changes in real time and make intelligent routing decisions, solving the problems of dynamic resource allocation and equipment changes in the existing technology, and realizing fast and efficient routing optimization and optimization of communication networks. Service quality improved.

CN118784547AActive Publication Date: 2024-10-15BEIJING UNIV OF POSTS & TELECOMM

Patent Information

Application Number
CN202410769362.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-14
Publication Date
2024-10-15
Estimated Expiration
2044-06-14

AI Technical Summary

Technical Problem

Existing communication network routing technology is difficult to achieve fast and reliable transmission when faced with diversified network structures and changes in traffic requirements, and fails to fully consider the challenges brought by dynamic resource allocation and dynamic changes in equipment.

Method used

A route optimization method based on graph neural network and deep reinforcement learning is adopted. The graph neural network is used to perceive network topology changes in real time, and deep reinforcement learning is combined to make intelligent routing decisions. It dynamically adjusts network resource allocation and routing paths to adapt to traffic fluctuations and equipment changes.

Benefits of technology

It achieves improved transmission efficiency and service quality under limited network resources, adapts to fast and efficient routing optimization of large-scale networks, and improves network stability and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118784547A_ABST
    Figure CN118784547A_ABST
Patent Text Reader

Abstract

The invention discloses a routing optimization method based on a graph neural network and deep reinforcement learning, which is used for improving routing optimization from two aspects of network topology perception and intelligent decision by starting from the actual demand of a modern communication network and combining GNN and DRL technologies. Under the condition that the network stability and the user experience are guaranteed, the algorithm is remarkably improved in the aspects of network resource allocation, routing path calculation and network congestion control, and the communication network is promoted to develop towards a more intelligent and greener direction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer network communication technology, and in particular to a routing optimization method based on graph neural network (GNN) and deep reinforcement learning (DRL). Background Art

[0002] In the information age, communication networks are becoming increasingly important as the infrastructure for global information transmission. The rapid development of technologies such as the Internet, the Internet of Things, mobile communications, and cloud computing has led to the continuous expansion of the scale of communication networks and the increasing complexity of network structures. Modern communication networks require more efficient, flexible, and intelligent routing strategies to meet the growing network needs. However, existing routing technologies are insufficient in terms of fast and reliable transmission when faced with the diversification of network structures and changes in traffic demand, and further research is urgently needed to adapt to the needs of modern communication networks.

[0003] In the existing communication network routing strategy:

[0004] Technical Solution 1 (Publication No. CN115333947A) proposes a guidance-based routing optimization method. This method obtains system requirements, divides the network domain, sets the nodes of the network domain, generates an incomplete graph, calculates the weight between each node, and uses the shortest path as the optimized route corresponding to the network domain. This method classifies nodes and generates an incomplete graph, which can make routing optimization more controllable.

[0005] Technical Solution 2 (Publication No. CN114423061A) proposes a wireless routing optimization method based on attention mechanism and deep reinforcement learning. The method includes obtaining the latest decision model parameters from the server when each node enters the network, listening to the neighbor node information and building a candidate parent node set based on it, and selecting the information of the parent node with the largest energy to model it as a graph vector as input, using a CNN-based attention mechanism to extract graph vector features, and using deep reinforcement learning to select the optimal parent node as the relay node for its data transmission.

[0006] Technical Solution 1 optimizes routing by classifying nodes and generating incomplete graphs when designing routing solutions, but does not fully consider the dynamic allocation of network resources and the challenges brought by the dynamic changes of network devices. Technical Solution 2 uses a routing optimization method based on attention mechanism and deep reinforcement learning. Although it has high scalability and can be applied to scenarios where nodes in the network change dynamically, it has not yet discussed in detail the volatility of network traffic and how to achieve fast and efficient routing optimization for large-scale networks. Summary of the invention

[0007] In order to solve the problems of dynamic resource allocation, dynamic equipment changes and traffic fluctuations in modern communication networks, the present invention proposes a routing optimization method based on graph neural networks and deep reinforcement learning. The purpose is to find a highly reliable and efficient routing path between the source node and the destination node of the communication network, so as to meet more business needs under the premise of limited network resources and improve the transmission efficiency and service quality of the network.

[0008] In order to achieve the above object, the present invention provides the following technical solutions:

[0009] A routing optimization method based on graph neural network and deep reinforcement learning, wherein a main network, an experience replay buffer and a target network are introduced into a DQN model, wherein the main network continuously generates training experience by interacting with the environment, receives the current network state s as input, and outputs an estimated Q value of each possible action a; the experience replay buffer is used to update and store training experience in real time, and randomly extracts some samples for training; the target network is used to regularly copy parameters from the main network and update them, calculate the target Q value, and enhance the algorithm convergence speed through gradient training; the routing optimization method comprises the following steps:

[0010] S1. Input the network status information and service flow requirements of each link and all its neighboring links, and use the graph neural network to integrate the network status and service flow requirements to generate messages integrated by node and present them in a graph structure.

[0011] S2, running an iterative message passing algorithm between the hidden states of the link nodes in the graph, and after multiple rounds of iterations, using an aggregation function to aggregate the updated node representations to obtain a global hidden state;

[0012] S3. Based on the global hidden state of step S2, use the graph neural network to calculate the action estimate Q value Q(s,a) under the input state;

[0013] S4, select the optimal action according to the Q value of step S3, and then execute this routing decision action in the environment; if the action is successfully executed, that is, the remaining bandwidth in each link of the selected path is sufficient to meet the traffic demand of this business, then return a normalized reward value and update the network state s'; if the action cannot be completed, then end the training;

[0014] S5. After multiple trainings, the model parameters are continuously updated according to the network state s, action a, and reward value r, and the training experience (s, a, r, s') generated by the main network is stored in the experience playback buffer;

[0015] S6. Every M iterations, randomly extract a small batch of samples from the buffer and copy them to the target network to calculate the target Q value;

[0016] S7. Continuously update the network parameters of the target network and send the updated model parameters to each node in the main network. When the main network receives the updated parameters, each node will update its routing planning model parameters. Repeat step S7 until convergence.

[0017] Furthermore, in step S1, the network status information includes link characteristics and network topology.

[0018] Furthermore, in step S2, in each iteration step of the message passing algorithm, the node receives the current state from the adjacent node and uses the update function to update its own hidden state.

[0019] Furthermore, in step S2, the message passing algorithm network includes three layers, namely, the Message layer, the Update layer, and the Readout layer. In the Message layer and the Update layer, a total of T information passing processes need to be performed. The specific process is as follows:

[0020] For a specific node v, firstly, formula (1) is executed so that node v receives messages from the state of node v itself and the states of all surrounding nodes, and then the messages are aggregated by element-by-element summation.

[0021]

[0022] In formula (1), m v t+1 is the message received by node v at time step t+1, N(v) represents the neighbor nodes of v, h v t is the feature vector of node v at time step t, m(·) is the message function, w is the target node, and W is an adjacency matrix containing all neighbor nodes of the target node;

[0023] The aggregated message is then sent to a neural network implemented by a gated recursive unit, which continuously updates the hidden state of the link in a recursive iterative manner. The new hidden state of the node is calculated as shown in formula (2):

[0024]

[0025] U t is the update function, which transforms the original node state h v t and information v t+1 As input, we get the new node state h v t+1 ;

[0026] After T iterations, the final hidden state of each link is aggregated again and enters the Readout layer. The read function R is used to calculate the node state based on the global hidden state graph, as shown in formula (3):

[0027]

[0028] Where G is the network topology.

[0029] Furthermore, in step S4, the reward value r is calculated as shown in formula (4):

[0030] r=bw / maxbw (4)

[0031] Where bw is the business traffic demand.

[0032] Furthermore, in step S3, the estimated Q value returned after executing action a in accordance with strategy π in state s is calculated as shown in formula (5):

[0033]

[0034] Among them, the policy function π(a|s): S×A→[0,1] is the conditional probability distribution when selecting action a in state s. The goal of the policy at time τ is to maximize the reward r accumulated in historical experience. τ , γ∈(0,1) is the discount factor that weighs historical and current reward data, k is a certain time interval, E π To find the expected value when adopting the π strategy.

[0035] Furthermore, in step S6, the target Q value is the sum of the reward value r at the current time step and the maximum estimated Q value at the next state after attenuation, and is calculated as shown in formula (6):

[0036] Q target (s,a,w)=r+γmax a' Q(s',a',w) (6)

[0037] Among them, w represents the neural network parameters, γ∈(0,1) is the discount coefficient that weighs the historical and current reward data, s' is the next state, a' is the action selected in the next state, and w is the target node.

[0038] Furthermore, the mean square error between the estimated Q value and the target Q value is used to calculate the loss value for calibrating the neural network parameters, as shown in formula (7):

[0039] L(w)=E[(Q target (s,a,w)-Q(s,a,w)) 2 ] (7)

[0040] Among them, E is the expected value.

[0041] Furthermore, the gradient decreasing method is used to continuously train the model so that the model loss value is continuously reduced. The gradient calculation method is shown in formula (8):

[0042]

[0043] Here, α is the learning rate.

[0044] Furthermore, the network parameters of the target network are continuously updated using formula (9):

[0045]

[0046] Where α is the learning rate, v k Calculated from the discounted reward value, it is used as a weighting factor for the gradient update value.

[0047] Compared with the prior art, the present invention has the following beneficial effects:

[0048] The routing optimization method based on graph neural network and deep reinforcement learning provided by the present invention focuses on the problem of communication network routing optimization. The core lies in the application of graph neural network (GNN) and deep reinforcement learning (DRL) technology to cope with the challenges brought by the expansion of network scale and complexity of structure. Under the premise of ensuring information transmission efficiency and network stability, the present invention aims to achieve dynamic routing optimization of communication networks.

[0049] First, the present invention designs a network topology dynamic perception algorithm based on graph neural network. The algorithm takes the dynamic changes of the communication network as the demand constraint, uses GNN to learn the characteristics of nodes and edges in the network topology, and realizes real-time perception of the network status. Through the dynamic update capability of GNN, the algorithm can capture the continuous changes of the network topology structure and provide accurate network representation for routing decisions.

[0050] Secondly, the present invention proposes an intelligent routing decision method driven by deep reinforcement learning. This method uses DRL technology to learn the mapping relationship between network status and action, and realizes the dynamic allocation of network resources and intelligent adjustment of routing paths. The autonomous learning and decision-making capabilities of DRL enable the algorithm to adapt to the volatility of network traffic and the dynamic changes of network devices, and optimize the use of network resources.

[0051] Furthermore, the present invention combines GNN with DRL to form a new communication network routing optimization algorithm. The algorithm makes full use of the feature information extracted by GNN to guide the DRL model to make routing decisions more accurately. Through this combination, the algorithm can achieve fast and efficient routing optimization for large-scale networks and improve the transmission efficiency and service quality of the network.

[0052] Finally, based on the actual needs of modern communication networks, this paper combines GNN and DRL technologies to improve routing optimization from the perspectives of network topology perception and intelligent decision-making. Under the condition of ensuring network stability and user experience, the algorithm has been significantly improved in terms of network resource allocation, routing path calculation, and network congestion control, promoting the development of communication networks in a smarter and greener direction. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0054] Figure 1 The model architecture of the routing optimization method based on graph neural network and deep reinforcement learning provided in the embodiment of the present invention.

[0055] Figure 2 The node status update process provided in the embodiment of the present invention takes node 5 as an example.

[0056] Figure 3 The present invention provides a process for transmitting messages using the MPNN structure used by the GNN-DRL model.

[0057] Figure 4 This is the implementation process of the DQN algorithm in the GNN-DRL model provided in the embodiment of the present invention.

[0058] Figure 5 Four typical topologies in the SNDLib dataset used by the GNN-DRL model provided in the embodiment of the present invention. Figure 5 In the figure, a is Geant2, b is Small Top, c is Gbn, and d is Nsfnet.

[0059] Figure 6 The embodiment of the present invention provides a trend of changes in the average loss value of each batch during the training process of the optimal routing planning model of four topological graphs. Figure 6 In the figure, a is Geant2, b is Small Top, c is Gbn, and d is Nsfnet.

[0060] Figure 7 The average scores of the models of the four topologies during the training process provided by the embodiment of the present invention. Figure 7 In the figure, a is Geant2, b is Small Top, c is Gbn, and d is Nsfnet.

[0061] Figure 8The variation trends of the Epsilon values ​​of the four topologies provided in the embodiments of the present invention are shown. Figure 8 In the figure, a is Geant2, b is Small Top, c is Gbn, and d is Nsfnet.

[0062] Fig. 9 The routing planning result of the GNN-DRL model provided in the embodiment of the present invention on the Geant2 topology structure.

[0063] Fig.10 The following are performance comparison results of the three methods provided in the embodiments of the present invention on four different topologies. Fig.10 In the figure, a is Geant2, b is Small Top, c is Gbn, and d is Nsfnet. DETAILED DESCRIPTION

[0064] Based on the deep reinforcement learning algorithm (DRL) and graph neural network (GNN), this paper proposes a new network routing optimization method for the routing optimization problem of modern communication networks. This method fully considers the complex relationship between dynamic network topology, routing configuration and traffic information to achieve efficient allocation of network resources.

[0065] Through simulation experiments, the present invention verifies the effectiveness and applicability of the proposed model in different network scenarios; and under the condition of limited network resources, it can give play to the advantages in resource allocation and meet more business needs.

[0066] In order to better understand the technical solution, the method of the present invention is described in detail below with reference to the accompanying drawings.

[0067] The present invention proposes a routing optimization method based on graph neural network and deep reinforcement learning (hereinafter referred to as GNN-DRL model), the model architecture is as follows Figure 1 As shown. The model uses the Deep Q-Network (based on deep q-learning, DQN) algorithm as the main implementation framework of DRL, and uses GNN to vectorize the attributes of nodes and edges in the network topology. GNN uses the iterative message passing algorithm and the dependencies of the network topology to update the vectorized representation of nodes and edges in real time, so that the algorithm can effectively adapt to different network topologies and structural changes, provide optimized routing solutions for various network traffic requirements, and maximize the utilization of routing resources.

[0068] like Figure 1 As shown, the method of the present invention mainly consists of the following two operation processes:

[0069] In the first step, during the execution of the present invention, the network state information (s), such as link characteristics, network topology, etc., and business traffic requirements are first received as the input of the model. Then, the GNN model can integrate this information and present it in a graph structure. By running an iterative message passing algorithm between the hidden states of the link, the global hidden state can be aggregated after multiple rounds of iterations. Finally, the GNN can calculate through these states and output the Q value Q(s,a) corresponding to a set of specific routing actions that need to be evaluated, that is, the next operation predicted by the model.

[0070] In the second step, the optimal action (a) is selected based on this Q value, and then this routing decision action is attempted in the environment. If the action is successfully executed, that is, the remaining bandwidth in each link of the selected path is sufficient to meet the traffic demand of this business, a reward value r calculated after reasonable normalization is returned, and the network state (s') is updated at the same time. If the action cannot be completed, the training is terminated, so no reward is given for this operation. During multiple training processes, the model parameters are continuously updated according to the state, action, and reward value, so that the optimal model with the highest score is finally learned. This model can maximize the completion of more business needs under limited network resources.

[0071] The objective of the present invention is to take actions that can maximize the reward value for route planning based on the current dynamically changing network state information, so as to select the best route configuration and optimize network resource allocation. Among them, in order to enhance the effect of model training faster and more stably, the present invention introduces a main network, an experience replay buffer and a target network in the DQN framework. The main network continuously generates training experience (s, a, r, s') by interacting with the environment. It can receive the current network state as input and output the estimated Q value of each possible action. The experience replay buffer is not only used to update and store training samples in real time, but also to randomly extract some samples for training, reduce the correlation between samples, and improve the model learning efficiency. The target network has the same architecture as the main network, but it is relatively stable because it only regularly copies parameters from the main network and updates them, which can provide a relatively stable target Q value, and further enhance the algorithm convergence speed through gradient training. Through this method of combining GNN and DRL, the method of the present invention can achieve efficient route optimization in a complex network environment, adapt to the dynamic changes of the network, and improve network transmission efficiency and service quality.

[0072] The present invention uses the message passing network (MPNN) commonly used in GNN to capture the relationship and local structure between nodes in the topological graph. In a specific implementation, MPNN needs to perform a total of T = 8 message iterations in order to integrate enough topological graph link information for path planning. In each iteration step, the node receives the current state from the adjacent node and uses the update function to update its own hidden state. In this way, each node will contain state information from the surrounding nodes. Subsequently, the aggregation function aggregates the updated node representations to generate a new global hidden state representation.

[0073] Specifically, the MPNN used in the present invention includes three layers, namely, a "Message" layer, an "Update" layer and a "Readout" layer.

[0074] In the "Message" layer and the "Update" layer, a total of T information transmission processes need to be performed. For a specific node v, firstly, formula (1) is executed so that node v receives messages from the state of node v itself and the states of all surrounding nodes, and the messages are integrated by summing.

[0075]

[0076] In formula (1), m v t+1 is the message received by node v at time step t+1. N(v) represents the neighbor nodes of v, h v t is the feature vector of node v at time step t. m(·) is the message function.

[0077] Then use formula (2) to calculate the new hidden state of the node.

[0078]

[0079] U t is the update function, which transforms the original node state h v t and information v t+1 As input, we get the new node state h v t+1 . Figure 2 The node status update process is shown using node 5 as an example.

[0080] After T iterations, the node collects a sufficiently large range of state information and enters the "Readout" layer. The read function R is used to calculate the node state based on the entire graph, as shown in formula (3).

[0081]

[0082] Among them, h v T is, G is the network topology.

[0083] Figure 3 The process of message transmission using the MPNN structure used in the present invention is demonstrated. First, the state of each link and all its neighboring links is input into the model. Then, a fully connected neural network is used to combine these hidden states together to generate information (message) integrated by nodes. Then, each node and its neighboring node messages are aggregated (Aggr) using the element-by-element summation method. And these new messages are sent to a neural network implemented by a gated recurrent unit (GRU), which continuously updates the hidden state of the link in a recursive iterative manner. In this process, the scope of the collected link information is gradually expanded with each node as the center. After T iterations, the final hidden state of each link is aggregated again. Finally, the output (readout) is performed, and the action estimate Q value under the input state is calculated again using the fully connected neural network.

[0084] In the GNN-DRL model designed by the present invention, I use the DQN algorithm commonly used in DRL to achieve route optimization. This enables the model to interact with the real-time state of the environment to update the neural network parameters. And select actions to execute based on the Q value calculated by GNN, so as to maximize the reward value and plan the optimal route with the maximum overall network resource utilization.

[0085] The implementation process of the DQN algorithm in the GNN-DRL model is as follows Figure 4 As shown. The routing selection process of DQN consists of three parts: environment, model and reward. First, the topological environment is initialized, that is, the link capacity is set to the maximum value and there is no currently occupied traffic. At the same time, the link betweenness is calculated and saved in the network as a link feature. Then, a set of source nodes (src) and destination nodes (dst) are randomly selected from the topology as the services for this path planning, and form a tuple {src, dst, bw} with the randomly injected traffic demand (bw). At this time, no business demand has been completed, so the initial reward value is 0.

[0086] The present invention interacts with the network simulation environment to achieve real-time decision-making in combination with the current state (s) of the node. During the execution process, the optional paths from the source node to the destination node are first sorted from the fewest to the most according to the link relationship of the topology graph. In order to occupy less computing resources under the routing condition of finding the best resource allocation, I only retain k = 4 shortest paths as candidate paths for routing planning. Then, the Q value of each path is fitted using a deep neural network, which represents the probability of the model selecting this path, helping to evaluate the quality of the action of selecting this path. The set of these Q values ​​is called the Q value of the corresponding action in the current state. After the epsilon-greedy strategy is used to select the routing action to be executed according to the Q value, the corresponding path in the environment can be found according to the action. The model attempts to inject traffic demand into the path and checks each link along the path in turn whether it can complete the business, that is, check whether the remaining capacity of the link is greater than the traffic demand. If the path is feasible, the reward value is increased and the environment state s' is updated. Then continue to extract other business tuples {src', dst', bw'} for routing planning until it is found that the selected path cannot meet the demand and stops this round of operation.

[0087] The reward function represents the different immediate rewards brought by different routing choices. The goal of the model is to maximize the completion of demand and improve the utilization of network resources in the long run. The reward function r is determined as shown in formula (4), where bw is the traffic demand and maxbw is the set maximum traffic demand. This normalization method is used to improve the gradient explosion problem and improve the learning ability:

[0088] r=bw / maxbw (4)

[0089] The policy function π(a|s): S×A→[0,1] is the conditional probability distribution when the model selects action a in state s. The goal of the policy at time τ is to maximize the reward r accumulated from historical experience. τ γ∈(0,1) is the discount factor that weighs the historical and current reward data of the model. According to the Bellman equation, the GNN-DRL model returns the estimated Q value after following the strategy π to perform action a in state s. The calculation method is shown in formula (5):

[0090]

[0091] DQN solves the instability problem of function approximation by introducing experience replay and target network. The training experiences (s, a, r, s') generated by the main network are first stored in the experience replay buffer. Every M iterations, a small batch of samples are randomly extracted from the buffer and copied to the target network for calculating the target Q value. This strategy not only allows the target network to effectively sample from rich experience, reducing the correlation between samples, but also does not require real-time interaction with the environment, enhancing the stability of the calculated target Q value, thereby enhancing the learning ability of the model. The target Q value is the evaluation value of the network state after the routing strategy is implemented, that is, the sum of the reward value r at the current time step and the maximum estimated Q value in the next state after attenuation. The specific calculation method is shown in formula (6):

[0092] Q target (s,a,w)=r+γmax a' Q(s',a',w) (6)

[0093] Where w represents the neural network parameters. Then the mean square error between the estimated Q value and the target Q value is used to calculate the loss value, which is used to calibrate the neural network parameters, as shown in formula (7).

[0094] L(w)=E[(Q target (s,a,w)-Q(s,a,w)) 2 ] (7)

[0095] Then, the gradient decreasing method is used to continuously train the model so that the model loss value continues to decrease. The gradient calculation method is shown in formula (8):

[0096]

[0097] At the same time, the network parameters are continuously updated using formula (9), making the Q-value function fitting effect better and better.

[0098]

[0099] Where α is the learning rate, which controls the speed of parameter update. vk is calculated from the discounted reward value and is used as a weighting factor for the gradient update value. After the parameters of the target network are updated at each stage, the updated model parameters are sent to each node in the main network. When the main network receives the updated parameters, each node updates its routing planning model parameters. This process is repeated until convergence, that is, the predefined criteria are met.

[0100] The computer hardware used in the specific embodiment of the present invention is configured as Intel Xeon Gold 6226RCPU (2.90GHz), and the operating system version used is Ubuntu 18.04.6. At the same time, the embodiment implements the GNN-DRL model algorithm based on the TensorFlow and OpenAIGym frameworks, and builds a learning environment in pthon3.7 through Keras2.7.0+Tensorflow2.7.0.

[0101] The present invention uses four different topologies in SDNLib to conduct experiments based on the GNN-DRL model, namely Geant2, Small Top, Gbn and Nsfnet. Figure 5 Clearly show the structure of each topology and the connection relationship between nodes. Training on these network topologies of different scales helps evaluate the performance of GNN-DRL models at various complexities and scales.

[0102] When resetting the environment, all link features will be initialized, including the following five: edgeId, betweenness, numsp, capacity, and bw_allocated. Recalculation is required before each resource allocation. Among them, edgeId represents the encoding of each edge, betweenness represents the link betweenness, that is, the proportion of the shortest paths passing through the link in all shortest paths, which is used to measure the importance of this link in the topology. numsp records the number of shortest paths that need to use the link. Capacity represents the total capacity of the link. In the experiment, the maximum capacity of all links is set to 200Mbps. bw_allocated represents the bandwidth of the link that has been occupied by other services.

[0103] Three types of business demands (demand) are defined in the form of custom arrays, namely 8, 32, and 64, that is, listofDemand = [8, 32, 64]. Among them, demand can be regarded as the comprehensive demand for resources (such as bandwidth). listofDemand is an array containing all custom business demands, and max_demand is the largest demand among the custom business demands. Each number in the array represents a different demand level, and the higher the value, the greater the demand for resources. If the state of the path selected by the current GNN-DRL model can meet the business demand, this action can obtain a reward value. In order to avoid the cumulative reward value being too large, a normalized method is adopted, that is, the business demand completed this time / the maximum demand set by the experiment is used to calculate the reward value. For example, a business demand is demand = 32, max_demand = 64. If the remaining capacity of each link in the path selected by the model is greater than 32, it is considered that this business can be completed. The reward value for this business corresponding to the path is 32 / 64 = 0.5.

[0104] In order to make the GNN-DRL model have strong learning and decision-making capabilities, appropriate model parameters are set, including the gradient optimization algorithm parameters of the graph neural network and the hyperparameter values ​​of deep reinforcement learning. In this model, a graph neural network is defined to perceive the network state and predict the Q value of the action. The hidden state of the link is set to contain link_state_dim=20 dimensions, that is, each link contains up to 20 feature vectors. The more complex the topology, the more capacity is required to store enough encoded information. In each forward propagation of the message, a batch of samples is used to perform T=8 rounds of message passing. The sample capacity of each batch is set to batch_size=32. The final output value can be up to readout_units=35 units.

[0105] In the GNN-DRL model, actions can be selected based on the GNN output Q value. The epsilon-greedy strategy is used to help train a model that can select the global optimal solution. Set the initial value of epsilon to 1.0, epsilon_start_decay=70 iterations, and then reduce the epsilon value to the previous round of epsilon_decay=0.995 each iteration until it reaches the minimum value epsilon_min=0.01. In order to stabilize the parameter learning process, the target network is introduced to calculate the target Q value. Therefore, the experience replay buffer with a capacity of MAX_QUEUE_SIZE=4000 is set to temporarily store samples. Once it is full, the old experience will be deleted. Each time, MULTI_FACTOR_BATCH=6 batches of samples (each batch has batch_size=32 samples) in the experience replay buffer are randomly extracted and put into the target network. Using the gradient descent method, the model fitting can be enhanced in combination with the loss value. Therefore, the current loss value and gradient value are calculated and stored every store_loss=3 batches. The target network parameters are updated every 50 iterations of copy_weights_interval. The learning rate is set to learning_rate = 0.0001 to control the parameter update speed of the model, that is, the parameter update amount is the gradient value * 0.0001. At the same time, the sample has a probability of dropout_rate = 0.01 to be discarded to prevent overfitting of the model.

[0106] During the GNN-DRL model iterations of ITERATIONS = 10000, the first iteration inputs FIRST_WORK_TRAIN_EPISODE = 60 training sets, and each subsequent iteration inputs TRAINING_EPISODES = 20 training sets. Because there is no training experience in the model at the first iteration, more samples are needed to help update the model parameters. During the training process, reset() is used at the beginning of each training iteration to reset the environment state and extract a new set of traffic demands, source nodes, and target nodes. In the current state, the model first selects k = 4 shortest paths as candidate paths. Then, by calling agent.act(), the GNN-DRL model interacts with the environment to select the optimal action. According to the selected action, try to use the make_step() method to execute in the environment, that is, check in turn whether the remaining capacity of all links of the path is greater than the traffic demand of this business. If it can be executed successfully, the network state and reward value are updated. Then, the sample information (including state, action, reward, next state, etc.) in the state transition process is saved to the experience playback buffer of the model using agent.add_sample(). Then, the business requirements, source node, and target node information are re-extracted to continue this round of training until the remaining capacity of the link of the selected path cannot meet the business traffic requirements, then stop this iteration. After each training iteration, call the model's experience playback agent.reply() to copy some samples of the experience playback buffer to the target network for stable updating of network parameters to improve the decision-making performance of the model in the environment. The entire training process is repeated multiple times, so that the model can gradually learn and optimize its strategy to achieve better performance.

[0107] After each evaluation_interval = 20 iterations, input

[0108] EVALUATION_EPISODES=40 data sets are used to evaluate the current model. At the beginning of each evaluation round, the environment state is reset and the relevant parameters are initialized. Then, actions are selected according to the current network state, executed, and the feedback from the environment is observed. Each time a business requirement is completed, the reward value rewardAddTest is accumulated and calculated. Then a new set of services is extracted and the above steps are repeated for route planning. If a link resource is exhausted and the current requirement cannot be completed, the next round of evaluation is started. After all evaluation rounds, the average reward value (Average Score) of the current model is calculated. This indicator can be regarded as the performance of the model during the evaluation test. If the average reward value of the current model is greater than the historical maximum reward value, the maximum reward value is updated and the current optimal model ID is recorded. At the same time, the trained model parameters are saved so that the model can be loaded and used when needed. Through multiple iterations, the learning process score of each routing planning model and the serial number of the optimal model with the highest score can be obtained. Finally, the maximum reward value and the corresponding model ID are written to the log file, and the model counter is updated at the same time. When using the model, you only need to use the serial number to match the detailed parameters and settings of the model in the log file.

[0109] During the model training process, three parameters, loss value, score, and epsilon value, are used to evaluate the excellence of the GNN-DRL model:

[0110] During the experiment, loss is used to measure the difference between the model's estimated Q value and the target Q value. It is used to evaluate the accuracy of the model's prediction and serves as a feedback signal to assist in updating the model parameters. By minimizing the loss function, the model can fit the training data more accurately, thereby improving the model's prediction performance and generalization ability. In the experiment, the mean square error (MSE) was chosen as the loss function, that is, the average of the squared difference between the model's predicted value and the target value. At the same time, L2 regularization is used to reduce the model complexity. The calculation method is to multiply the regularization parameter L2=0.1 by the square root of the sum of the squares of all weights. The final stored loss value is obtained by adding the loss value to the regularization value. Among them, the estimated Q value is the action Q value calculated by passing the current state into the main network and forward propagating it. The target Q value is based on the next state of the network. According to the Bellman equation, the target Q value is calculated as current reward + discount factor (gamma) * maximum Q value of the next state. In this experiment, gamma=0.95. Then, the gradient is calculated based on the loss function and gradient clipping is performed to avoid the problem of gradient explosion. Finally, the gradient descent method is used to update the model parameters according to the clipped gradient, so that the loss gradually decreases. During the training process of the optimal routing planning model of the four topological graphs, the loss value changes as follows Figure 6 As shown in the figure. The dark blue line represents the average loss value of each batch. It can be observed that the average loss value gradually decreases to 10-1 and finally converges, which indicates that the Q value estimated by the final model can well meet the goal, that is, the current model has good network status prediction and strategy selection capabilities.

[0111] In ITERATIONS = 10000 training iterations, a total of 500 model evaluations were performed, and each evaluation input EVALUATION_EPISODES = 40 data sets. In each evaluation round, the average reward value (Average Score) of the current model in these 40 rounds was calculated based on the completed demand. If the average reward value of the current model is greater than the historical maximum reward value, the maximum reward value is updated and the current model is marked as the new best model. Figure 7 The average scores of the models of the four topologies during the training process are shown. It can be observed that the scores gradually increase from 0 and finally converge smoothly. This shows that as the model training continues to deepen, after multiple iterations of selecting the optimal model, the effect of the model selection path becomes better and better, that is, more business needs can be met in the case of limited network resources.

[0112] During the training process, if the model only uses the best strategy that has been learned, it may cause the strategy to fall into the local optimal solution and miss a better strategy. By introducing the epsilon-greedy strategy, the model has a certain probability of choosing random actions, thereby avoiding over-reliance on the knowledge that has been learned, jumping out of the local optimal solution, and looking for a better strategy. When epsilon is small, the model is more inclined to use existing knowledge, but there is still a certain probability of exploration; when epsilon is large, the model is more inclined to random exploration. As training progresses, gradually reducing the value of epsilon can make the DQN model more dependent on exploration in the early stages of learning, and gradually transition to using existing experience to make decisions, thereby more robustly selecting the optimal action. The changing trends of the Epsilon values ​​of the four topologies are shown below. Figure 8 As shown in the figure, it can be observed that it gradually decreases from 1 and eventually tends to 0.1. This shows that the model relies more on random exploration in the initial stage of training. However, as the training experience increases on a large scale, the model becomes more mature and its parameters become more stable. At this time, the routing decision can rely more on the choice of the model, so as to perform path planning based on the optimal solution of the whole set and maximize the utilization of network resources.

[0113] Through the above training and routing planning process, I obtained the optimal routing configuration of the GNN-DRL model, thereby achieving the goal of optimal allocation of network resources. I presented the results of the GNN-DRL model's path selection in the form of a network topology diagram. In the figure, unused nodes and links are displayed in gray, while the source nodes, target nodes, and the paths planned by the GNN-DRL model are marked in yellow. Taking the GEANT2 topology in the SNDLib dataset as an example, Fig. 9 The routing planning results of some GNN-DRL models are shown in Figure 1, which clearly demonstrates the optimization planning of network paths.

[0114] This paper compares the performance of the proposed GNN-DRL model with other traditional models on a series of topologies and data. Figure 5 The specific topological structure of each data set is shown. In the experiment of the present invention, the source node and the destination node are randomly selected in the topology, and the capacity of each link in the topology is set according to the real data in the data set, aiming to simulate the real network environment more realistically. The task of the GNN-DRL model is to reasonably allocate the demand between the source node and the destination node to ensure that the communication demand is met. According to the definition of the reward function, the more demands the model realizes (that is, the larger the sum is after normalization), the higher the reward for the actions taken by the model.

[0115] The GNN-based DRL method (called the GNN-DRL model) uses a deep neural network to estimate the Q value of each state-action pair and selects actions by maximizing the Q value. In addition, in order to improve the stability and effect of learning, this method also introduces technologies such as experience replay and target network. Experience replay enables the agent to learn from historical experience, while the target network is used to reduce Q value fluctuations during training, thereby improving the stability of training. In order to verify that this method has good performance when running on different topologies, I compared its running Score with two baseline solutions.

[0116] The SAP (Shortest Available Path) model is a path-based demand allocation model. First, the model obtains all possible paths from the source node to the destination node and checks each path in turn to see if it can meet the current communication demand. Once a path is found to meet the demand, the model will immediately allocate resources and return the selected path for routing.

[0117] The RAND (Random) model is a strategy model based on randomly selecting paths. It does not consider environmental status or other information and is a completely random strategy. The RAND model traverses all possible paths and performs capacity checks on each path to determine whether the path is available. A path is randomly selected from all paths that can meet the demand for routing.

[0118] The present invention inputs 50 data sets into the optimal model trained by GNN-DRL, and calculates the cumulative reward of each data set to evaluate the performance of the model. According to the definition of the reward function, the cumulative reward is normalized to Score to represent the overall performance level of the model in allocating network resources. The more total demand is realized, the higher the score is obtained. At the same time, these data sets are also input into the SAP and RAND algorithms to calculate the Score for comparison.

[0119] Fig.10 The performance comparison of the three model methods under different topological structures is shown, where the dotted line represents the average score of various methods. In Geant2, the GNN-DRL model (red line) has an average score of 13.9, while the SAP and RAND models are only 13.2 and 11.7 respectively. In Small Top, the GNN-DRL model has an average score of 18.1, while the SAP and RAND models are only 17.6 and 13.9 respectively. In Gbn and Nsfnet, the GNN-DRL model has an average score of 12.6 and 14.8 respectively, while the RAND model has an average score of only 11.1 and 11.5. It can be clearly seen from the figure that compared with the baseline SAP model and RAND model, the GNN-DRL model performs better under various topological structures. This shows that the GNN-DRL model has better performance when processing network resources regardless of the topological structure.

[0120] In summary, the present invention has the ability to perceive and respond to network status in real time and find the optimal transmission path for data streams, which can promote the development of communication networks in a smarter and greener direction.

[0121] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A routing optimization method based on graph neural network and deep reinforcement learning, characterized in that: The DQN model introduces a main network, an experience replay buffer, and a target network. The main network continuously generates training experience by interacting with the environment, receives the current network state s as input, and outputs the estimated Q value of each possible action a. The experience replay buffer is used to update and store training experience in real time, and randomly extract some samples for training. The target network is used to regularly copy parameters from the main network and update them, calculate the target Q value, and enhance the convergence speed of the algorithm through gradient training. The routing optimization method comprises the following steps: S1. Input the network status information and service flow requirements of each link and all its neighboring links, and use the graph neural network to integrate the network status and service flow requirements to generate messages integrated by node and present them in a graph structure. S2, running an iterative message passing algorithm between the hidden states of the link nodes in the graph, and after multiple rounds of iterations, using an aggregation function to aggregate the updated node representations to obtain a global hidden state; S3. Based on the global hidden state of step S2, use the graph neural network to calculate the action estimate Q value Q(s,a) under the input state; S4, select the optimal action according to the Q value of step S3, and then execute this routing decision action in the environment; if the action is successfully executed, that is, the remaining bandwidth in each link of the selected path is sufficient to meet the traffic demand of this business, then return a normalized reward value and update the network state s'; if the action cannot be completed, then end the training; S5. After multiple trainings, the model parameters are continuously updated according to the network state s, action a, and reward value r, and the training experience (s, a, r, s') generated by the main network is stored in the experience playback buffer; S6. Every M iterations, randomly extract a small batch of samples from the buffer and copy them to the target network to calculate the target Q value; S7. Continuously update the network parameters of the target network and send the updated model parameters to each node in the main network. When the main network receives the updated parameters, each node will update its routing planning model parameters. Repeat step S7 until convergence.

2. The routing optimization method based on graph neural network and deep reinforcement learning according to claim 1, characterized in that: In step S1, the network status information includes link characteristics and network topology.

3. The routing optimization method based on graph neural network and deep reinforcement learning according to claim 1, characterized in that: In step S2, in each iteration step of the message passing algorithm, the node receives the current state from the neighboring nodes and uses the update function to update its own hidden state.

4. The routing optimization method based on graph neural network and deep reinforcement learning according to claim 1, characterized in that: In step S2, the message passing algorithm network includes three layers, namely, the Message layer, the Update layer, and the Readout layer. In the Message layer and the Update layer, a total of T information passing processes need to be performed. The specific process is as follows: For a specific node v, firstly, formula (1) is executed so that node v receives messages from the state of node v itself and the states of all surrounding nodes, and then the messages are aggregated by element-by-element summation. In formula (1), m v t+1 is the message received by node v at time step t+1, N(v) represents the neighbor nodes of v, h v t is the feature vector of node v at time step t, m(·) is the message function, w is the target node, and W is an adjacency matrix containing all neighbor nodes of the target node; The aggregated message is then sent to a neural network implemented by a gated recursive unit, which continuously updates the hidden state of the link in a recursive iterative manner. The new hidden state of the node is calculated as shown in formula (2): U t is the update function, which transforms the original node state h v t and information v t+1 As input, we get the new node state h v t+1 ; After T iterations, the final hidden state of each link is aggregated again and enters the Readout layer. The read function R is used to calculate the node state based on the global hidden state graph, as shown in formula (3): Where G is the network topology.

5. The routing optimization method based on graph neural network and deep reinforcement learning according to claim 1, characterized in that: In step S4, the reward value r is calculated as shown in formula (4): r=bw / maxbw (4) Where bw is the business traffic demand.

6. The routing optimization method based on graph neural network and deep reinforcement learning according to claim 1, characterized in that: In step S3, the estimated Q value returned after executing action a according to strategy π in state s is calculated as shown in formula (5): Among them, the policy function π(a|s): S×A→[0,1] is the conditional probability distribution when selecting action a in state s. The goal of the policy at time τ is to maximize the reward r accumulated in historical experience. τ , γ∈(0,1) is the discount factor that weighs historical and current reward data, k is a certain time interval, E π To find the expected value when adopting the π strategy.

7. The routing optimization method based on graph neural network and deep reinforcement learning according to claim 1, characterized in that: In step S6, the target Q value is the sum of the reward value r at the current time step and the maximum estimated Q value in the next state after attenuation, and is calculated as shown in formula (6): Q target (s,a,w)=r+γmax a' Q(s',a',w) (6) Among them, w represents the neural network parameters, γ∈(0,1) is the discount coefficient that weighs the historical and current reward data, s' is the next state, a' is the action selected in the next state, and w is the target node.

8. The routing optimization method based on graph neural network and deep reinforcement learning according to claim 7, characterized in that: The mean square error between the estimated Q value and the target Q value is used to calculate the loss value, which is used to calibrate the neural network parameters, as shown in formula (7): Among them, E is the expected value.

9. The routing optimization method based on graph neural network and deep reinforcement learning according to claim 7, characterized in that: The gradient decreasing method is used to continuously train the model so that the model loss value is continuously reduced. The gradient calculation method is shown in formula (8): Here, α is the learning rate.

10. The routing optimization method based on graph neural network and deep reinforcement learning according to claim 7, characterized in that: Use formula (9) to continuously update the network parameters of the target network: Where α is the learning rate, v k Calculated from the discounted reward value, it is used as a weighting factor for the gradient update value.

Citation Information

Patent Citations

  • Routing optimization method and system based on graph neural network and deep reinforcement learning

    CN113194034A

  • Power communication network routing optimization method based on knowledge and deep reinforcement learning

    CN116886587A

  • Deep reinforcement learning SDN intelligent routing optimization method based on graph neural network

    CN116938810A

Cited By

  • Resource cooperative scheduling method based on graph neural network in computing power network

    CN119025291A

  • Cloud edge computing power network routing optimization method

    CN119094425A

  • Distributed test network topology optimization method based on deep reinforcement learning

    CN119603161A

  • Graph attention network reinforcement learning anti-interference routing optimization method and device

    CN119789179A

  • Enterprise ESG index determination method and system based on artificial intelligence

    CN120106636A