Routing optimization method and system based on attention mechanism and time sequence diagram convolutional network
Through the routing optimization method based on attention mechanism and timing chart convolution network, the link status of the data center network is predicted and intelligent path selection is performed, which solves the problem of inefficiency of traditional routing optimization methods when dealing with high dynamic data traffic, and realizes the More efficient data transmission and resource utilization.
Patent Information
- Application Number
- CN202411123071.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-08-15
AI Technical Summary
When existing data center networks handle high dynamic data traffic, traditional routing optimization methods are difficult to effectively deal with traffic characteristics, resulting in resource conflicts and inefficiency, especially under the transmission requirements of small and large streams.
The routing optimization method based on attention mechanism and timing graph convolution network is adopted to predict the congestion state of the entire network through neural networks, and the improved butterfly optimization routing algorithm and Digestella algorithm are used to perform intelligent paths for different traffic types. Select to optimize link resource configuration.
It improves network state perception capabilities, significantly reduces network congestion, improves data transmission throughput and overall efficiency, and meets traffic specific scheduling needs with high latency sensitivity and bandwidth requirements.
Smart Images

Figure CN119155230A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication network technology, and specifically to a routing optimization method and system based on an attention mechanism and a temporal graph convolutional network. Background Art
[0002] With the rapid development of Internet technology, data centers, as the core infrastructure for information processing and storage, have a direct impact on the quality of cloud computing, big data analysis, online transaction processing and other services. One of the main challenges facing data center networks (DCNs) is to handle the growing and highly dynamic data traffic, especially in ensuring the efficiency and stability of data transmission. The characteristics of traffic usually include uneven distribution and high burstiness, which puts high demands on the network's routing optimization strategy. At present, routing optimization technology mainly faces challenges from two types of traffic: small flows (rat flows) and large flows (elephant flows). Small flows require fast transmission and are extremely sensitive to delays; while large flows have high bandwidth requirements due to their large data volume and long duration. Traditional routing optimization methods, such as the equal cost multi-path (ECMP) strategy, implement traffic distribution by hashing the five-tuple (source IP address, destination IP address, source port number, destination port number and protocol type) in the data packet, but this method does not optimize the specific characteristics of the traffic and is prone to resource conflicts and inefficiency.
[0003] In response to these problems, the concept of software-defined networking (SDN) was proposed and gradually applied to the design and optimization of data center networks. SDN achieves flexible management and efficient configuration of network resources by separating the network control layer (control plane) and the data forwarding layer (data plane). The centralized management of the control layer allows the network to dynamically adjust policies to adapt to different application requirements, such as traffic analysis, routing optimization, and security management. However, although SDN provides the possibility of improving network management, there are still some limitations in actual deployment. For example, the centralized control of SDN may become a performance bottleneck or a source of security risks. In addition, SDN usually relies on real-time monitoring and data analysis of network status, which requires efficient and scalable technical support to ensure timely adjustment and optimization of network policies.
[0004] In this context, in-depth research on the characteristics of data center networks and the development of new routing optimization algorithms have become particularly important. For example, some studies have introduced more fine-grained control units (such as flowlet or packet-level control) to improve the adaptability and resource utilization of the network. Although these methods can improve network performance in theory, they still need to overcome problems such as packet disorder, inaccurate traffic prediction, and complexity of scheduling algorithms in practical applications. Summary of the invention
[0005] In view of the problems existing in the prior art, the present invention provides a routing optimization method and system based on attention mechanism and temporal graph convolutional network, which predicts the congestion status of the entire network link through neural network and realizes traffic routing optimization for different traffic types.
[0006] The present invention is achieved through the following technical solutions:
[0007] A routing optimization method based on attention mechanism and temporal graph convolutional network includes the following steps:
[0008] Obtain the network delay and bandwidth of each link formed between switches in the network topology at each moment;
[0009] The network delay and bandwidth at each moment are used as network status information to construct a training data set and train the A3T-GCN model. The trained A3T-GCN model obtains global temporal and spatial correlations through the attention mechanism and predicts the network status information of the link at the future moment.
[0010] When the network traffic is rat flow, the trained A3T-GCN model is used to predict the network status of each link, and the improved butterfly optimization routing algorithm is used to optimize the link. The delay and volatility of each link are determined according to the network status. The genetic algorithm is used to exchange the links to achieve link update. After iterative optimization, the global optimal solution is obtained, that is, the link with the smallest delay and delay volatility. The rat flow is routed along the link corresponding to the optimal solution.
[0011] When the network traffic is an object flow, the shortest hop link set is determined, and then the A3T-GCN model is used to predict the average residual bandwidth of each link in the shortest hop link set in the next w cycles, and the link object flow with the largest average residual bandwidth is used for routing.
[0012] Preferably, the acquisition of the network delay of each link includes:
[0013] Get the one-way delay T1 of data from the controller to each switch;
[0014] Get the one-way delay T2 of data from each switch to the controller;
[0015] The total delay of obtaining data from the controller to each switch and then to the controller;
[0016] The network delay of the link is determined based on the one-way delay T1, one-way delay T2 and total delay.
[0017] Preferably, the delay matrix X is constructed according to the link delays between adjacent switches, and the network delay of the link is determined according to the delay matrix;
[0018] The expression of the delay matrix is as follows:
[0019]
[0020] Where n is the number of switch nodes, and the element X of the delay matrix i,j represents the link delay d between adjacent switches (i, j) (i,j) .
[0021] Preferably, the acquisition of the network bandwidth of each link includes:
[0022] Determine the total number of bytes received by the controller per cycle rx bytes Total number of bytes sent tx bytes , and based on the time interval of the data collection in the previous cycle, determine the network bandwidth used by the current link, and subtract the current network bandwidth used from the total network of the link to obtain the network bandwidth of the link.
[0023] Preferably, the A3T-GCN model includes a graph convolutional network GCN and a gated recurrent network GRU, and the prediction method of the network state information of the A3T-GCN model is as follows:
[0024] A graph convolutional network (GCN) is used to obtain a hidden state with spatial characteristics in the network state information and input it into a gated recurrent network (GRU). The gated recurrent network (GRU) obtains a hidden state with spatial and temporal characteristics in the network state information, and a scoring function is used to determine the weight of the hidden state with spatial and temporal characteristics.
[0025] The context vector of the global network state change information of the attention function is adopted, and the network state information of the link at the future moment is predicted using the weight of the hidden state and the context vector.
[0026] Preferably, a pre-trained DNN model is used to classify the traffic in the network and determine whether the network traffic is rat traffic or elephant traffic;
[0027] The training method of the DNN model is as follows:
[0028] Obtain the traffic characteristics of network traffic and construct a training data set based on the traffic characteristics;
[0029] The traffic characteristics include source and target IP, source and target port, flow duration and flow rate;
[0030] Construct a DNN model, introduce the dropout mechanism into the DNN model, use the training dataset to train the DNN model, use BCEWithLogitsLoss as the loss value function of the DNN model, and use the trained DNN model to classify the traffic in the network and divide the traffic into elephant flow and rat flow.
[0031] Preferably, the method for determining the link delay and its volatility is as follows:
[0032] The A3T-GCN model predicts the delay of each link at w moments in the future, thereby determining the average delay of each link in the network topology at w moments in the future. The delays of the links that the data packet passes through at w moments in the future are accumulated to obtain the total link delay of the current link at w moments in the future. The delay volatility on each link is determined based on the total link delay.
[0033] Preferably, the iteration of the global optimal solution includes:
[0034] Determine the distance of the link to the positive ideal solution and the negative ideal solution based on the total delay and volatility. The positive ideal solution is the best performance value that is expected to be achieved in the decision-making, and the negative ideal solution is the worst performance value that is expected to be avoided in the decision-making;
[0035] The distance to the positive ideal solution:
[0036]
[0037] in, and They are the path with the smallest delay and the path with the smallest delay volatility respectively;
[0038] Distance to negative ideal solution:
[0039]
[0040] in, and is the path with the maximum delay and the path with the maximum delay volatility;
[0041] According to the ratio of the distances from the link to the positive ideal solution and the negative ideal solution, the comprehensive score of each link is calculated, and the link with the highest comprehensive score is selected as the optimal solution.
[0042] Preferably, the Dijkstra algorithm is used to determine the shortest hop link set.
[0043] A routing optimization system based on attention mechanism and temporal graph convolutional network, comprising:
[0044] The acquisition module is used to obtain the network delay and bandwidth of each link formed between switches in the network topology at each moment;
[0045] The prediction module is used to construct a training data set using the network delay and bandwidth at each moment as network status information to train the A3T-GCN model. The trained A3T-GCN model obtains global temporal dynamics and spatial correlations through the attention mechanism and predicts the network status information of the link at the future moment.
[0046] Route optimization module,
[0047] When the network traffic is rat flow, the trained A3T-GCN model is used to predict the network status of each link, and the improved butterfly optimization routing algorithm is used to optimize the link. The delay and volatility of each link are determined according to the network status. The genetic algorithm is used to exchange the links to achieve link update. After iterative optimization, the global optimal solution is obtained, that is, the link with the smallest delay and delay volatility, and the rat flow is routed along the link corresponding to the optimal solution;
[0048] When the network traffic is an object flow, it is used to determine the shortest hop link set, and then the A3T-GCN model is used to predict the average residual bandwidth of each link in the shortest hop link set in the next w cycles, and the link object flow with the largest average residual bandwidth is used for routing.
[0049] Compared with the prior art, the present invention has the following beneficial technical effects:
[0050] The present invention provides a routing optimization method based on an attention mechanism and a temporal graph convolutional network. The method adopts a temporal graph convolutional neural network (A3T-GCN) based on an attention mechanism. Compared with the traditional routing optimization scheme that relies on the prediction of a single time period, the method can predict the network status of multiple time periods in the future, thereby improving the perception of the network status; secondly, the A3T-GCN is used to predict the network status of multiple time periods in the future, and the butterfly optimization algorithm and the Dijkstra algorithm are combined to perform intelligent path selection for the traffic. For delay-sensitive traffic, routes with high path stability are preferred; for traffic with high bandwidth requirements, paths with sufficient bandwidth are selected. This strategy significantly reduces network congestion and improves the throughput of data transmission. The method effectively improves the overall efficiency and throughput of the network by optimizing the allocation and utilization of network resources.
[0051] Furthermore, the present invention uses a deep neural network (DNN) to optimize traffic classification. By deeply learning and analyzing the characteristics of different traffic, the DNN model of the present invention can directly and accurately identify various types of traffic, effectively meet the specific scheduling requirements of delay-sensitive and bandwidth-demanding traffic, thereby improving the responsiveness and service quality of the network. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 This is a framework diagram of the adaptive routing optimization system of the present invention;
[0053] Figure 2 This is a flow chart of the adaptive routing optimization method of the present invention;
[0054] Figure 3 This is a diagram of a network status acquisition module of the present invention;
[0055] Figure 4This is the T-GCN model diagram of the present invention. DETAILED DESCRIPTION
[0056] The present invention will be further described in detail below in conjunction with the accompanying drawings, which are intended to explain the present invention rather than to limit it.
[0057] See also Figure 2-4 , a routing optimization method based on attention mechanism and temporal graph convolutional network, comprising the following steps:
[0058] Step 1, introduce the dropout mechanism into the DNN model, and use the DNN model to classify the traffic in the network into rat flow and elephant flow.
[0059] S1.1. Using the traffic features obtained in the SDN environment: six key features such as source and target IP, source and target port, flow duration, and flow rate, a training data set is constructed based on the traffic features.
[0060] In the SDN (Software-Defined Networking) environment, due to the architectural characteristics of SDN, such as separation of control and forwarding, network virtualization, and open programmability, the characteristics of network traffic are easier to capture and analyze.
[0061] S1.2. Build a DNN model, introduce the dropout mechanism into the DNN model, use the training data set to train the DNN model, use the trained DNN model to classify the traffic in the network, divide the network traffic into elephant flow and mouse flow, use the DNN model to identify elephant flow earlier, implement reasonable routing strategies, and promote load balancing.
[0062] DNN includes an input layer, multiple hidden layers, and an output layer. As the number of network layers increases, it can model and learn complex tasks more finely, thereby improving the generalization ability of the model. In particular, in order to enhance the generalization ability of the model and prevent overfitting, a dropout mechanism is introduced between hidden layers. This strategy randomly discards some neurons during the training process, forcing the network to learn more robust feature representations, thereby enhancing the model's ability to predict new and unseen data.
[0063] In a DNN network, to calculate the output of the hidden layer h1, it is necessary to determine the output value of the previous layer connected to h1 and the weights between the two layers. The previous layer of h1 is the input layer of the model, and the feature vector of the input layer is denoted as h0. The calculation formula of h0 is as follows: h1 = f(b1 + w1h0).
[0064] Among them, f represents the activation function, here we use relu as the planning function, and b1 represents the bias term of the hidden layer h1.
[0065] By analogy, the DNN model uses the output of this layer as the input of the next layer to realize the forward propagation of the signal until the predicted value of the output model is output. In order to determine the gap between the predicted value of the model and the true value, the loss function is used for corresponding definition, and BCEWithLogitsLoss is used as the loss value function:
[0066]
[0067] in, Represents the model output, y represents the true value, which is 0 or 1, N is the number of samples in the batch, and σ represents the sigmoid function.
[0068] Step 2: Obtain the network delay of each link formed between switches in the network topology at each moment.
[0069] S2.1. Obtain the one-way delay from the controller to each switch.
[0070] In this embodiment, two switches are taken as an example for description.
[0071] The controller will periodically send echo_request to switches A and B in each cycle. When each switch receives the echo_request, it will immediately record the current time and fill the time into the echo_reply message to obtain the one-way delay of each switch.
[0072] S2.2. Obtain the one-way delay from each switch to the controller.
[0073] When the switch receives the echo_request, it immediately sends an echo_reply message to the controller. When the controller receives the echo_reply, it subtracts the timestamp in the message from the current time to obtain the round-trip time t from switches A and B to the controller. A and t B , that is, the one-way delay from each switch to the controller is obtained.
[0074] S2.3. Obtain the delay of controller-switch A-switch B-controller.
[0075] Measurements are made using LLDP (Link Layer Discovery Protocol), during which the controller periodically sends a message with the source address and a timestamp t sendWhen the controller sends an LLDP packet to switch A, switch A will flood the LLDP packet to the adjacent switches. When the adjacent switch receives the LLDP packet, it will send a packet-in message to the controller because there is no corresponding flow table rule to forward it. The message contains the header of the LLDP packet. When the controller receives the packet-in message, it can obtain the sending source address and sending timestamp t receive By subtracting the timestamp in the message from the current time, the total delay t of controller-switch A-switch B-controller can be calculated. lldp =t receive -t send .
[0076] S2.4. Calculate the delay between switch A and switch B.
[0077] The delay between switches A and B can be calculated from the various delays calculated in the first three steps. (A,B) =t lldp -(t A +t B )÷2.
[0078] On the controller, a delay matrix of size n×n can be established;
[0079]
[0080] Where n is the number of switch nodes. The elements of the delay matrix X i,j represents the link delay d between adjacent switches (i, j) (i,j) Note that the delay from the switch to itself is 0, so the diagonal elements X i,i By calculating the link delays between adjacent switches, we can construct the delay matrix X, where X i,j represents the link delay from switch i to switch j.
[0081] Step 3: Collect the network bandwidth of each link;
[0082] 3a) In the software-defined network (SDN) architecture, the OpenFlow protocol gives network switches the ability to maintain flow entries, including specific counters for collecting key information about flow entries or ports (such as the number of bytes received, the duration of existence, etc.). With the help of these counters, the change in the number of bytes matched by flow entries per unit time can be tracked, thereby accurately calculating the real-time transmission bandwidth of the data flow;
[0083] 3b) The controller periodically sends a port status request PortStats to all switches. After receiving the request, the switch will return an event response EventOFPPortStatsReply containing all port statuses to the controller. The controller calculates the total number of bytes received by comparing the data collected this time with the last time. bytes Total number of bytes sent tx bytes Based on the interval of the last data collection, the network bandwidth used by the current link is calculated:
[0084]
[0085] 3c) Calculate the available network bandwidth B for each link available , that is, the total network bandwidth B of the link total Subtract the currently used network bandwidth B available =B total -B useage .
[0086] Step 4: Use the network delay of each link formed by the switch at each moment obtained in step 2 and the network bandwidth of each link collected in step 3 as training data to train the A3T-GCN model. The trained A3T-GCN model predicts the network status of each link in the future time period, that is, the delay and bandwidth of the link.
[0087] See also Figure 4 The A3T-GCN model structure combines the characteristics of GCN and GRU, and uses the Attention mechanism to obtain global network state information for effective processing and prediction of network state information. The training method of the A3T-GCN model is as follows:
[0088] S4.1. Abstract the entire data center network topology into an unweighted graph data structure G = (V, E). Each link is considered as a node, where V represents the set of nodes V = (v1, v2, ..., v N ), N is the number of link nodes. E represents the set of variables. Then, the adjacency matrix A is used to represent the connection relationship between links A∈R N×N . The adjacency matrix only contains elements 0 and 1. If two links are not adjacent, the element is 0; if they are adjacent, the element is 1;
[0089] S4.2. The delay on the link in the topology is used as the characteristic attribute of the node, represented as X∈R N×P .
[0090] Among them, P represents the number of node attribute features, that is, the length of the historical time series. t ∈R N×trepresents the delay on each link at time t. Therefore, when the network topology G and the characteristic matrix X are determined, the network status of the next w cycles can be predicted. This problem can be abstracted into an abstract function f, [X t+1 ,X t+2 ,…,X t+w ] = f(G; (X t-q ,…,X t-1 ,X t )), wherein the link delay in the future t+w is predicted through the time series data of length q;
[0091] S4.3. Use a 2-layer GCN model to obtain spatial dependencies as follows:
[0092]
[0093] in, represents an adjacency matrix with self-connectivity, where I is the identity matrix. represents the preprocessing stage, W0∈R P×H Represents the weight matrix input to the hidden layer, P is the length of the feature matrix, H is the number of hidden units, W1∈R H Represents the weight matrix from the hidden layer to the output layer. ReLU() represents the activation function Rectified LinearUnit, σ(·) represents the activation function sigmoid;
[0094] S4.4. Use the soft attention model to learn the importance of network state information in each time period. On this basis, calculate the context vector that can express the global change trend of the network state for future network state prediction tasks, that is, the delay and bandwidth of each link in the future time period.
[0095] Assume there is a time series X of network status information i (i=1,2,…,n), n is the length of the time series.
[0096] The first step is to obtain the hidden state at each moment, output the hidden state with spatial features through GCN, and input it into GRU to obtain the hidden state h with spatial and temporal features. i , expressed as H = (h1,h2,…,h n ).
[0097] In the second step, the scoring function is used to calculate the weight of each hidden state.
[0098] The third step is to use the attention function to calculate the context vector C that can represent the information of the global network state change. t .
[0099] The fourth step is to use the hidden state weights and the context vector to obtain the final output result.
[0100] In this paper, multilayer perception is used as the scoring function. The hidden state h at each moment i Input, calculate the weight of each hidden state. In the model, two hidden layers are set to obtain the corresponding output. Each α i It is normalized by the Softmax function, where w1 and w2 represent the weights of the first and second layers, and b1 and b2 represent the deviations of the first and second layers.
[0101] e i =w2(w1H+b1)+b2,
[0102] Finally, the context vector calculation process calculated in the attention function is:
[0103] S4.5, A3T-GCN model, the data input obtains spatial dependency through the GCN model, and then inputs it into the GRU model to obtain temporal dependency. At the same time, the attention mechanism is introduced to weight the impact of historical network state information, thereby capturing the global changes in network state.
[0104] The T-GCN model is constructed by combining GCN and GRU. First, the historical network state information is input into T-GCN to obtain n hidden states h = {h t-n ,…,h t-1 ,h t}.
[0105] Step 5: Classify the traffic in the network according to the DNN model;
[0106] When the network traffic is rat flow, the A3T-GCN model trained in step 4 is used to predict the network status of each link, and the genetic algorithm is introduced into the butterfly optimization routing algorithm to improve it. The improved butterfly optimization routing algorithm is used to perform local and global optimization on the link, and the fitness function of the link is determined according to the network status. According to the fitness function including the delay and volatility of each link, the genetic algorithm is used to exchange the links to achieve link update. After iterative optimization, the global optimal solution is obtained, that is, the link with the smallest delay and delay volatility, and the rat flow is routed along the link corresponding to the optimal solution.
[0107] The improved butterfly optimization routing algorithm is used to efficiently find the network link with the minimum delay and delay volatility. The improved butterfly optimization routing algorithm regards each available link in the network as a butterfly, takes the predicted network state of each link as the fitness value, and uses the fitness value as the "fragrance" to symbolize the quality of the path, and performs local and global searches on all links.
[0108] The butterfly moves randomly around its current position, simulating a local search to find the local optimal solution; the butterfly moves toward the area with the strongest fragrance, simulating a global search to find the global optimal solution.
[0109] The core element of the improved butterfly optimization routing algorithm is the stimulus intensity, which is determined by the fitness function of the link. The fitness function of the link is determined according to the predicted network status, and the delay and volatility of the link are comprehensively considered. The Topsis algorithm is used to evaluate the delay and volatility of the link.
[0110] The execution of the improved butterfly optimization routing algorithm is divided into three stages: initialization stage, iteration stage and obtaining the optimal solution (termination stage).
[0111] In the initialization phase, multiple links are constructed between the source node and the destination node to form an initial population. The generation of links is achieved by randomly selecting the next hop node on each node. In the iteration phase, the butterfly decides whether to perform a global search or a local search based on a random number. In order to prevent falling into a local optimal solution, the crossover operator in the genetic algorithm is used to imitate the mating and recombination process in natural selection, and the path update is achieved by exchanging between links (chromosomes). This exchange mechanism effectively eliminates links with low fitness while retaining valid paths. After reaching the predetermined number of iterations, the algorithm terminates and the global optimal solution is obtained, and the mouse flow is routed along the link corresponding to the optimal solution. During the entire iteration process, the butterfly optimization algorithm effectively balances global and local searches by imitating the information propagation between butterflies and the evolutionary mechanism of the genetic algorithm. This balance enables the algorithm to adapt to the complexity and unpredictability of the network environment, thereby showing high efficiency in routing selection and optimization.
[0112] The method of optimizing the link by using the improved butterfly optimization routing algorithm to obtain the link with the minimum delay and delay volatility is as follows:
[0113] A1) In nature, butterflies search for food through both global and local searches, so the butterfly algorithm also simulates this process. Because there are many unpredictable factors in nature, including rain, wind, etc., the butterfly algorithm uses a constant p to determine whether the butterfly is doing a global search or a local search. For each iteration of the butterfly population, each butterfly will randomly generate a random number. If the current random number is greater than p, the current butterfly will perform a global search, otherwise it will perform a local search. In the global search, the butterfly will head towards the butterfly with the largest scent value g. * To move, represents the solution vector, which indicates the solution corresponding to the i-th butterfly in the t-th iteration. * Represents the best solution in the current iteration. i represents the fragrance emitted by the i-th butterfly, and r is a random number between 0 and 1. Local Search and is the solution corresponding to the jth and kth butterflies in the tth iteration. r has the same function as global search;
[0114] A2) In order to avoid falling into the local optimal solution, the crossover operator in the genetic algorithm is used to update the butterfly population. The crossover operator in the genetic algorithm is generated by imitating the mating and recombination link in the natural evolution process of organisms. In this scheme, each butterfly, that is, each link, corresponds to a chromosome in the genetic algorithm, and each switch node on this link represents the gene on the chromosome. Any switch node on the chromosome corresponds to a path with its previous and next nodes in the network topology. Therefore, in order to ensure the connectivity of the routing, the single-point crossover method is selected. In addition, it is required that the two selected chromosomes have at least one common node in addition to the source node and the destination node, but they do not need to be located in the same position. In the global update part, the role of the crossover is to exchange part of the links of the two selected chromosomes (one path with the highest score, representing the global optimal, and the other is the current link), so that the fitness of the two new links is compared with the original two original links, and the two paths with smaller fitness values are eliminated to achieve greedy evolution to ensure that the path is updated in a better direction. Similarly, in the local update part, the role of crossover is to randomly exchange three chromosomes (one current path and two random paths), so that there are three new chromosomes and the original three, eliminating the three with smaller fitness and retaining the original three;
[0115] A3) In order to measure the distance from the optimal solution during the optimization search process, the latency and latency volatility in the network state in the data center network are used as the fitness function. The A3T-GCN model is used to predict the latency of each link in the future w moments, thereby determining the average latency of each link in the network topology in the future w moments:
[0116]
[0117] where x ij Table 1 shows the delay on the link between switch i and switch j.
[0118] Therefore, to find the total delay on the path in the future w moments, we only need to accumulate the delays of the links that the data packet passes through in the future w moments, and we can get the total link delay of the current link in the future w moments. The volatility of the delay is represented by the entropy on each link. The entropy on each link is determined according to the total link delay. Entropy represents the degree of uncertainty of a system, or the degree of chaos of a system. The larger the entropy value, the greater the degree of chaos, that is, the greater the data fluctuation. In the fat-tree symmetric topology, there are multiple paths from the source to the destination node to transmit data packets. If we can choose a path with a relatively stable path delay for a longer period of time and a smaller total path delay, we can avoid always choosing the optimal path, which will cause a large amount of traffic to flow into the originally idle optimal path, causing the optimal path to become congested and frequent rerouting, resulting in drastic fluctuations in the path congestion state;
[0119] A4) Collect and calculate the future average delay x of the path delay and the delay fluctuation of the path x entropy As we all know, the lower the total delay of a path, the shorter the time it takes for a data packet to be transmitted on the path. The lower the delay volatility of a path, the less problems of packet disorder and congestion encountered when transmitting data packets on the path. Therefore, the Topsis algorithm is considered as the fitness function.
[0120] The first step is to denormalize these two indicators to map their values to the range of [0, 1] so that the paths with smaller values are closer to 1 after normalization.
[0121] The total delay of the path is:
[0122]
[0123] For the volatility of the path:
[0124]
[0125] In this process, the path to the minimum value will have a normalized value of 1, while the path to the maximum value will have a normalized value of 0.
[0126] Step 2: Determine the positive ideal solution of the Topsis algorithm and negative ideal solution
[0127] Among them, the positive ideal solution is the best performance value that we hope to achieve in decision making. Negative ideal solution is the worst performance value that you want to avoid in your decision.
[0128] For path i, the distance to the positive ideal solution is Calculated as:
[0129]
[0130] in, and is the ideal case of the best performance of delay and delay volatility indicators, which are the path with the smallest delay and the path with the smallest delay volatility. Similarly, calculate the path i to the negative ideal solution D i - Distance:
[0131]
[0132] in, and It is the ideal case of the best performance of the delay and delay volatility indicators, which are the path with the maximum delay and the path with the maximum delay volatility, respectively.
[0133] Step 3: Calculate the comprehensive score of each path based on the ratio of the distance from the path to the positive ideal solution and the negative ideal solution:
[0134]
[0135] The higher the score, the more preferred the path. The paths are ranked according to the comprehensive score, and the highest-ranked path is selected as the best choice. In this way, a path with low total delay and small path fluctuation can be selected.
[0136] When the network traffic is elephant flow, the Dijkstra algorithm is first used to calculate all possible shortest hop link sets, and then the A3T-GCN model is used to predict the average residual bandwidth of each link in the shortest hop link set in the next w cycles. Among these links, the path with the largest average residual bandwidth is selected for routing, that is, the elephant flow is routed to the link with the largest residual bandwidth to ensure the optimal transmission of the traffic.
[0137] B1) First, use the Dijkstra algorithm to calculate the path set P with the shortest hop count = (p1, p2, ..., p N ), where p i represents the i-th path, and we calculate the average remaining bandwidth of the path set P in the future t+w cycles and B = (B1, B2, ..., B N ),in In the average remaining bandwidth set of B in the future t+w cycles, select the largest average remaining bandwidth B i The path p i Perform routing.
[0138] See also Figure 1 Another method of the present invention also provides a routing optimization system based on attention mechanism and temporal graph convolutional network, including an acquisition module, a routing module and an execution module.
[0139] The acquisition module is used to collect and analyze network status information for understanding and abstract processing, and provide optimization-based control decision support for the routing module. This plane integrates key components such as database, pre-trained A3T-GCN and DNN model. Among them, the database is responsible for storing the bandwidth, latency information, network topology and traffic status information of each link in the data plane for use in model prediction. The A3T-GCN model is dedicated to predicting network status and providing a basis for network traffic routing. The DNN model is used to classify traffic (i.e., mouse-elephant flow);
[0140] Routing module: The control plane is in the middle layer of the SDN architecture. Its main responsibility is to collect and analyze network information and perform traffic routing based on the current network status to ensure that data packets can reach the intended destination efficiently. The controller collects link bandwidth, latency, and flow status information in the data plane through the network status acquisition module, and transmits these key data to the control plane to provide the required parameters for model training and prediction. In addition, in the network traffic classification module, when the packet_in message is received, the control plane will classify the traffic according to the data packet information, and then adopt the corresponding routing strategy according to the classification results;
[0141] Execution module: The data plane is the basic layer in the SDN architecture. Its task is to receive data packets from the host and forward them to the correct routing port through the flow table inside the switch. In addition, the data plane is also responsible for further processing of data packets according to requirements. The switch will be configured according to the flow table sent by the control plane and collect network status information by forwarding detection packets.
[0142] The present invention has the following beneficial effects:
[0143] 1. This invention adopts the time-series graph convolutional neural network (A3T-GCN) based on the attention mechanism. Compared with the traditional routing optimization scheme that relies on single time period prediction, it can predict the network status of multiple time periods in the future, thereby improving the perception of network status. This technology reduces the root mean square error (RMSE) and mean absolute error (MAE) by 10.27% and 13.12% respectively compared with the traditional time-series graph convolutional neural network (T-GCN), significantly improving the performance and efficiency of routing optimization.
[0144] 2. Optimization of refined traffic classification and scheduling strategy: In view of the problem of insufficient classification of traffic features in traditional solutions, the present invention uses deep neural networks (DNN) to optimize traffic classification. By deeply learning and analyzing the characteristics of different traffic, the DNN model of the present invention can directly and accurately identify various types of traffic, effectively meet the specific scheduling requirements of delay-sensitive and bandwidth-intensive traffic, thereby improving the responsiveness and service quality of the network.
[0145] 3. Improved path selection and network resource management: This paper proposes an innovative scheduling strategy, which uses A3T-GCN to predict the network status of multiple time periods in the future, and combines the butterfly optimization algorithm and the Dijkstra algorithm to perform intelligent path selection for traffic. For delay-sensitive traffic, routes with high path stability are preferred; for traffic with high bandwidth requirements, paths with sufficient bandwidth are selected. This strategy significantly reduces network congestion and improves data transmission throughput.
[0146] 4. Improve network efficiency and throughput: The present invention effectively improves the overall efficiency and throughput of the network by optimizing the allocation and utilization of network resources. This is an important technological advancement for data center networks that need to process high-density data flows.
[0147] The above contents are only for explaining the technical idea of the present invention and cannot be used to limit the protection scope of the present invention. Any changes made on the basis of the technical solution in accordance with the technical idea proposed by the present invention shall fall within the protection scope of the claims of the present invention.
Claims
1. A routing optimization method based on attention mechanism and temporal graph convolutional network, characterized in that: The following steps are involved: Obtain the network delay and bandwidth of each link formed between switches in the network topology at each moment; The network delay and bandwidth at each moment are used as network status information to construct a training data set and train the A3T-GCN model. The trained A3T-GCN model obtains global temporal and spatial correlations through the attention mechanism and predicts the network status information of the link at the future moment. When the network traffic is rat flow, the trained A3T-GCN model is used to predict the network status of each link, and the improved butterfly optimization routing algorithm is used to optimize the link. The delay and volatility of each link are determined according to the network status. The genetic algorithm is used to exchange the links to achieve link update. After iterative optimization, the global optimal solution is obtained, that is, the link with the smallest delay and delay volatility. The rat flow is routed along the link corresponding to the optimal solution. When the network traffic is an object flow, the shortest hop link set is determined, and then the A3T-GCN model is used to predict the average residual bandwidth of each link in the shortest hop link set in the next w cycles, and the link object flow with the largest average residual bandwidth is used for routing.
2. According to claim 1, a routing optimization method based on attention mechanism and temporal graph convolutional network is characterized in that: The acquisition of the network delay of each link includes: Get the one-way delay T1 of data from the controller to each switch; Get the one-way delay T2 of data from each switch to the controller; The total delay of obtaining data from the controller to each switch and then to the controller; The network delay of the link is determined based on the one-way delay T1, one-way delay T2 and total delay.
3. According to claim 2, a routing optimization method based on attention mechanism and temporal graph convolutional network is characterized in that: The delay matrix X is constructed based on the link delays between adjacent switches, and the network delay of the link is determined based on the delay matrix; The expression of the delay matrix is as follows: Where n is the number of switch nodes, and the element X of the delay matrix i,j represents the link delay d between adjacent switches (i, j) (i,j) .
4. According to claim 1, a routing optimization method based on attention mechanism and temporal graph convolutional network is characterized in that: The acquisition of the network bandwidth of each link includes: Determine the total number of bytes received by the controller per cycle rx bytes Total number of bytes sent tx bytes , and based on the time interval of the data collection in the previous cycle, determine the network bandwidth used by the current link, and subtract the current network bandwidth used from the total network of the link to obtain the network bandwidth of the link.
5. According to claim 1, a routing optimization method based on attention mechanism and temporal graph convolutional network is characterized in that: The A3T-GCN model includes a graph convolutional network GCN and a gated recurrent network GRU. The prediction method of the network state information of the A3T-GCN model is as follows: A graph convolutional network (GCN) is used to obtain a hidden state with spatial characteristics in the network state information and input it into a gated recurrent network (GRU). The gated recurrent network (GRU) obtains a hidden state with spatial and temporal characteristics in the network state information, and a scoring function is used to determine the weight of the hidden state with spatial and temporal characteristics. The context vector of the global network state change information of the attention function is adopted, and the network state information of the link at the future moment is predicted using the weight of the hidden state and the context vector.
6. According to claim 1, a routing optimization method based on attention mechanism and temporal graph convolutional network is characterized in that: Use the pre-trained DNN model to classify the traffic in the network and determine whether the network traffic is rat flow or elephant flow; The training method of the DNN model is as follows: Obtain the traffic characteristics of network traffic and construct a training data set based on the traffic characteristics; The traffic characteristics include source and target IP, source and target port, flow duration and flow rate; Construct a DNN model, introduce the dropout mechanism into the DNN model, use the training dataset to train the DNN model, use BCEWithLogitsLoss as the loss value function of the DNN model, and use the trained DNN model to classify the traffic in the network and divide the traffic into elephant flow and rat flow.
7. According to claim 1, a routing optimization method based on attention mechanism and temporal graph convolutional network is characterized in that: The method for determining the link delay and its volatility is as follows: The A3T-GCN model predicts the delay of each link at w moments in the future, thereby determining the average delay of each link in the network topology at w moments in the future. The delays of the links that the data packet passes through at w moments in the future are accumulated to obtain the total link delay of the current link at w moments in the future. The delay volatility on each link is determined based on the total link delay.
8. According to claim 1, a routing optimization method based on attention mechanism and temporal graph convolutional network is characterized in that: The iteration of the global optimal solution includes: Determine the distance of the link to the positive ideal solution and the negative ideal solution based on the total delay and volatility. The positive ideal solution is the best performance value that is expected to be achieved in the decision-making, and the negative ideal solution is the worst performance value that is expected to be avoided in the decision-making; The distance to the positive ideal solution: in, and They are the path with the smallest delay and the path with the smallest delay volatility respectively; Distance to negative ideal solution: in, and is the path with the maximum delay and the path with the maximum delay volatility; According to the ratio of the distances from the link to the positive ideal solution and the negative ideal solution, the comprehensive score of each link is calculated, and the link with the highest comprehensive score is selected as the optimal solution.
9. The routing optimization method based on attention mechanism and temporal graph convolutional network according to claim 1, characterized in that: The Dijkstra algorithm is used to determine the set of links with the shortest hop count.
10. A routing optimization system based on attention mechanism and temporal graph convolutional network, characterized in that: include: The acquisition module is used to obtain the network delay and bandwidth of each link formed between switches in the network topology at each moment; The prediction module is used to construct a training data set using the network delay and bandwidth at each moment as network status information to train the A3T-GCN model. The trained A3T-GCN model obtains global temporal dynamics and spatial correlations through the attention mechanism and predicts the network status information of the link at the future moment. Route optimization module, When the network traffic is rat flow, the trained A3T-GCN model is used to predict the network status of each link, and the improved butterfly optimization routing algorithm is used to optimize the link. The delay and volatility of each link are determined according to the network status. The genetic algorithm is used to exchange the links to achieve link update. After iterative optimization, the global optimal solution is obtained, that is, the link with the smallest delay and delay volatility, and the rat flow is routed along the link corresponding to the optimal solution; When the network traffic is an object flow, it is used to determine the shortest hop link set, and then the A3T-GCN model is used to predict the average residual bandwidth of each link in the shortest hop link set in the next w cycles, and the link object flow with the largest average residual bandwidth is used for routing.
Citation Information
Patent Citations
An SDN-based data center network dynamic load balancing method
CN109787913A
Self-adaptive routing method, system and equipment oriented to high-dynamic network topology
CN114124823A
Load balancing method and device based on deep learning and cross-domain cooperation
CN114567598A
SDN network flow prediction method based on graph convolutional network
CN114826948A
SDN (Software Defined Network) routing optimization method based on link traffic prediction
CN115865804A
Cited By
Intelligent control method for data one-way transmission system based on LSTM predictive analysis
CN119363676A
Intelligent control method for data unidirectional transmission system based on LSTM prediction analysis
CN119363676B
Multi-path standby multi-cloud interconnection method and device based on deterministic network, and medium
CN119697091A
Dynamic optimization method and device for central Mesh network and medium
CN119865433A
A Dynamic Optimization Method, Device, and Medium for a Centralized Mesh Network
CN119865433B
