Dynamic load balancing method and system for network routing
By performing periodic sampling and feature extraction of network nodes and link loads, combining multi-level load thresholds and spatial correlation analysis, high-load source nodes and low-load target nodes are identified, task migration and path optimization are carried out, and load partition clustering and routing strategy allocation is realized, which solves the problem of lack of real-time perception and dynamic adjustment of network routing decisions in the existing technology, and significantly improves network performance and resource utilization efficiency.
Patent Information
- Application Number
- CN202510179191.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2025-04-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing network routing decisions rely on static rules and lack real-time perception and dynamic adjustment of network state, resulting in long-term high loads of some nodes and idle resources, affecting network performance and resource utilization efficiency.
By periodically sampling and feature extraction of network nodes and link loads, a load balancing decision matrix is built, combined with multi-level load thresholds and spatial correlation analysis, high-load source nodes and low-load target nodes are identified, task migration and path optimization are carried out, and load partition clustering and routing strategy allocation are realized.
It significantly reduces network delay, improves resource utilization, realizes dynamic load balancing, and improves the accuracy, real-time and adaptability of load balancing.
Smart Images

Figure CN119854301A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of network routing load balancing, and in particular to a method and system for dynamic load balancing of network routing. Background Art
[0002] Routing decisions in current networks mainly rely on pre-configured static rules and lack the ability to perceive and dynamically adjust network status in real time, resulting in some network nodes being in a high-load state for a long time while other node resources are idle, seriously affecting the overall performance of the network and resource utilization efficiency.
[0003] Although some load-aware dynamic routing methods have been proposed, these methods often only consider a single load indicator, such as bandwidth utilization or processing delay, and ignore the multi-dimensional characteristics of network load. At the same time, most existing load balancing algorithms use simple threshold judgment and polling strategies, which cannot accurately capture the temporal and spatial distribution characteristics of network load, and are difficult to cope with the challenges brought by burst traffic and load fluctuations. Summary of the invention
[0004] The present invention provides a dynamic load balancing method and system for network routing, which are used to reduce network delay, improve resource utilization and realize dynamic load balancing.
[0005] In a first aspect, the present invention provides a dynamic load balancing method for network routing, the dynamic load balancing method for network routing comprising: Perform periodic sampling and feature extraction on the processing load of network nodes and the transmission load of network links to obtain the load state vector and network load degree; Constructing a load balancing decision matrix according to the load state vector and the network load degree, and performing a comparison operation on the load balancing decision matrix and a multi-level load threshold to obtain a load optimization instruction sequence; Based on the load optimization instruction sequence, a set of high-load source nodes and a set of low-load target nodes are identified, and load prediction modeling is performed to obtain a task migration plan; Performing path optimization of reinforcement learning based on the task migration scheme to obtain a set of multiple routing paths; Load partition clustering and routing strategy allocation are performed on the multiple routing path sets to obtain a regional routing mapping table.
[0006] In a second aspect, the present invention provides a dynamic load balancing system for network routing, the dynamic load balancing system for network routing comprising: The sampling module is used to periodically sample and extract features of the processing load of the network nodes and the transmission load of the network links to obtain the load state vector and the network load degree; A comparison module, used for constructing a load balancing decision matrix according to the load state vector and the network load degree, and performing a comparison operation on the load balancing decision matrix and a multi-level load threshold to obtain a load optimization instruction sequence; A modeling module, used to identify a set of high-load source nodes and a set of low-load target nodes based on the load optimization instruction sequence, and perform load prediction modeling to obtain a task migration plan; An optimization module, used for performing path optimization of reinforcement learning based on the task migration scheme to obtain a set of multiple routing paths; The allocation module is used to perform load partition clustering and routing strategy allocation on the multiple routing path sets to obtain a regional routing mapping table.
[0007] The third aspect of the present invention provides a dynamic load balancing device for network routing, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the dynamic load balancing device for network routing executes the above-mentioned dynamic load balancing method for network routing.
[0008] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the above-mentioned dynamic load balancing method for network routing.
[0009] In the technical solution provided by the present invention, multi-dimensional feature extraction of network nodes and link loads is realized through a lightweight deep learning feature extraction network, and the Ghost module and attention mechanism are combined to greatly reduce the computational complexity of feature extraction; multi-level load thresholds and spatial correlation analysis are used for load balancing decisions, which improves the accuracy of load balancing; intelligent decision-making of task migration and path optimization is realized based on LSTM prediction network and reinforcement learning, which significantly improves the real-time and adaptability of load balancing; differentiated management of network resources is realized through partition clustering and hierarchical routing strategies, which effectively reduces the probability of network congestion; finally, dynamic optimization of routing parameters is realized through a performance evaluation neural network model, which ensures the continuous optimization of network performance. The present invention has achieved remarkable results in reducing network latency, improving resource utilization and realizing dynamic load balancing.
[0010] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0011] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 A schematic diagram of an embodiment of a dynamic load balancing method for network routing in an embodiment of the present invention; Figure 2 A schematic diagram of an embodiment of a dynamic load balancing system for network routing in an embodiment of the present invention; Figure 3 The figure is a schematic diagram of an embodiment of a dynamic load balancing device for network routing in an embodiment of the present invention. DETAILED DESCRIPTION
[0013] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0014] The terms "including" and "having" and any variations thereof mentioned in the embodiments of the present invention are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device end including a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or device ends.
[0015] To facilitate understanding of this embodiment, a dynamic load balancing method for network routing disclosed in an embodiment of the present invention is first described in detail. Figure 1 As shown, the method comprises the following steps: 101. Periodically sample and extract features of the processing load of the network node and the transmission load of the network link to obtain a load state vector and a network load degree; It is understandable that the execution subject of the present invention may be a dynamic load balancing system of network routing, or a terminal or a server, which is not limited here. The embodiment of the present invention is described by taking a server as the execution subject as an example.
[0016] Specifically, the CPU occupancy rate and memory occupancy rate of network nodes are periodically sampled, and the queue length and message delay of network links are periodically sampled. Through periodic sampling operations, the dynamic state of network nodes and links is captured, and the original load data obtained reflects the operation of the system at different times. The original load data is reconstructed according to the time series to obtain the load data matrix. This matrix not only reflects the load conditions of nodes at different times, but also provides the trend information of load changes over time. The reconstructed load data matrix is input into the lightweight deep learning feature extraction network to achieve effective feature extraction of the original data. The lightweight deep learning feature extraction network mainly includes feature extraction layer, Ghost module layer and feature fusion layer. These network layers each have specific functions and work together in the feature extraction process. The feature extraction layer is used to extract the initial feature map from the load data matrix. This layer contains 3 group convolution units, each of which includes 4 parallel convolution branches, and the convolution kernel sizes are 3×3, 5×5, 7×7 and 9×9, respectively, and the convolution step size is set to 1. The multi-scale convolution design enables the feature extraction layer to capture information from different receptive fields, effectively enhancing the feature perception of load data. The BatchNormalization layer and the ReLU activation function are connected to each convolution branch. BatchNormalization is used to normalize the output of the convolution operation to improve the training stability of the model, while the ReLU activation function introduces nonlinear features to enhance the network's ability to fit complex load patterns. The initial feature map is input to the Ghost module layer for processing. The Ghost module layer reduces redundant features through effective calculation methods to improve the efficiency of feature extraction. The Ghost module layer consists of a trunk branch and a parallel branch. The trunk branch uses 1×1 convolution to reduce the feature dimension to reduce the amount of calculation, and the parallel branch uses 3×3 depth-separable convolution for feature transformation. Depth-separable convolution significantly reduces the computational complexity of the convolution operation. The outputs of the trunk branch and the parallel branch are combined by channel splicing to obtain a more streamlined Ghost feature map, thereby reducing the computational overhead of the network while maintaining sufficient feature representation capabilities. The feature fusion layer uses an attention mechanism to process the Ghost feature map to increase the focus on important features. The attention mechanism includes channel attention unit and spatial attention unit. The channel attention unit extracts channel weights through global average pooling and maximum pooling operations to measure the importance of each feature channel. The spatial attention unit extracts spatial weights through the convolution layer to identify the importance of each position in the feature map. These weights are multiplied with the Ghost feature map to obtain the fused feature matrix. By combining the channel and spatial attention mechanisms, the feature fusion layer can effectively highlight the important load features in the network, ignore unimportant noise information, and improve the quality of feature representation.The parameter estimation network is used to estimate the parameters of the fusion feature matrix. The parameter estimation network contains three fully connected layers, with 512, 256, and 128 neurons in each layer. Each layer uses the LeakyReLU activation function, which can maintain a certain output when the input is less than zero to alleviate the problem of neuron "death" and improve the learning ability of the network. At the same time, Dropout regularization is added to the fully connected layer to prevent overfitting and enhance the generalization ability of the network. The final output layer uses the Sigmoid function to limit the output value between 0 and 1 to obtain the final load state vector. Based on the load state vector, the CPU occupancy variance, memory occupancy variance, queue length variance, and message delay variance are combined by weighted summation to calculate the overall load of the network. These variance values reflect the load fluctuations of different parts of the network. The weighted summation allows the load characteristics of various aspects to be considered comprehensively to obtain a comprehensive load measurement indicator.
[0017] 102. Construct a load balancing decision matrix according to the load state vector and the network load degree, and compare the load balancing decision matrix with the multi-level load threshold to obtain a load optimization instruction sequence; Specifically, the load state vector is reconstructed into a matrix to form a structured description, which comprehensively presents multiple state indicators of the network node, such as CPU, memory, and queue. The network load degree is normalized to ensure that all load degree data are in the same scale range, avoid the result deviation caused by data of different dimensions in the load degree, ensure fair comparison between data, and generate an initial matrix, which contains multiple load information of network nodes and links. The different load information in the initial matrix is refined, and the CPU occupancy data is thresholded to generate a CPU load level matrix. By setting different thresholds, the CPU occupancy is divided into multiple levels, such as low load, medium load, and high load, to form a CPU load level matrix. Similarly, the memory occupancy data is thresholded to generate a memory load level matrix. The memory load level matrix clarifies the memory load status of each node by grading the memory occupancy of different nodes. The queue length data in the initial matrix is thresholded to generate a queue load level matrix. The queue length reflects the congestion status of the network link. By grading the queue length, the pressure status of network transmission can be understood. The CPU load level matrix, memory load level matrix, and queue load level matrix are weighted and combined to obtain a comprehensive load level matrix. Weights are assigned according to the importance of different load indicators. The selection of weights needs to consider the specific application scenarios and goals of the network. For example, in scenarios with high real-time requirements, CPU occupancy has a higher weight, while in scenarios with large-scale data transmission, the importance of queue length is more prominent. Through weighted combination, the comprehensive load level matrix provides a unified view of the overall network load situation, helping to identify the parts that need to be prioritized in the overall load balancing. Spatial correlation analysis is performed on the comprehensive load level matrix to determine the load distribution between nodes in the network. The load imbalance in the network is evaluated by calculating the load difference between adjacent nodes. The calculation of load difference reflects the load changes between each pair of adjacent nodes. If the load difference between two adjacent nodes exceeds a preset target value, it is considered that the load distribution between them is unbalanced and load optimization is required. Nodes with load difference greater than the preset target value are marked as objects to be optimized to obtain a load balancing decision matrix. The constructed load balancing decision matrix is compared with the multi-level load threshold, and the nodes that need to be optimized are marked. The tag information includes the node number and optimization priority, where the node number is used to uniquely identify the node in the network, and the optimization priority is used to determine the execution order of the optimization operation. By comparing the load of each node with the multi-level load threshold, it is clear which nodes need to be processed first and generate an optimized node set. Based on the optimized node set, a load optimization instruction sequence is generated, which describes how to perform load balancing operations on each node in the network, including the target node and migration order of load migration.
[0018] 103. Based on the load optimization instruction sequence, a set of high-load source nodes and a set of low-load target nodes are identified, and load prediction modeling is performed to obtain a task migration plan; Specifically, according to the node number and optimization priority in the load optimization instruction sequence, the nodes to be optimized in the optimization node set are grouped to obtain the preliminary grouping results of the source nodes and the target nodes. The node grouping results are subjected to load timing analysis and node screening to identify the true candidate node set. The purpose of load timing analysis is to analyze the load change trend of the nodes in different time periods to ensure the accuracy of node grouping. The candidate node set is sorted according to the load level and optimization priority to ensure the efficiency and rationality of the optimization. The top 30% nodes with the highest load level are selected as the source node set. The load of these nodes is relatively high, and task migration needs to be prioritized to reduce their pressure. At the same time, the top 30% nodes with the lowest load level are selected as the target node set. The resource utilization of these nodes is low and they undertake the task migration requirements from the source nodes. The load data of the source node set is processed by sliding window to obtain the load sequence of the source node. The load data of the source node is smoothed to capture the short-term fluctuation trend of the load. For the target node set, its resource data is analyzed for capacity to obtain the capacity matrix of the target node. The capacity matrix of the target node reflects the remaining resources of each target node, including the availability of key resources such as CPU and memory, and provides constraints for the planning of task migration. The source node load sequence and the target node capacity matrix are input into the LSTM (Long Short-Term Memory Network) prediction model. The LSTM prediction network contains two LSTM hidden layers and a fully connected output layer. The two hidden layers can capture the long-term dependencies in the load data, thereby effectively predicting future load trends. The design of the LSTM network can make full use of the temporal characteristics of the source node load sequence, and make a comprehensive prediction based on the capacity of the target node to output the load prediction results. Based on the load prediction results of LSTM, a task migration matrix is constructed, in which each element of the matrix represents the task allocation ratio from the source node to the target node. The task allocation ratio is calculated based on the remaining capacity of the target node and the predicted load value to ensure that the target node will not have a bottleneck problem due to excessive load when migrating tasks. The task migration matrix reflects the proportion of tasks migrated from each source node to different target nodes, ensuring that the task migration scheme achieves the optimal load balancing globally. The migration allocation scheme is timed to ensure network stability during the migration process. The task migration process is divided into multiple execution time slices, and the migration amount in each time slice does not exceed 50% of the remaining capacity of the target node. This effectively avoids the overload of the target node when receiving a large number of tasks, thereby ensuring the smooth progress of the task migration process. At the same time, the migration process is divided into multiple execution time slices, and the task migration operation is dispersed into multiple time periods, which reduces the instantaneous pressure on the network and improves the overall stability and load balancing effect of the network.
[0019] 104. Path optimization of reinforcement learning is performed based on the task migration scheme to obtain a set of multiple routing paths; Specifically, the state of each node in the network is encoded based on the task migration scheme. The remaining CPU capacity, memory capacity and queue capacity of each node are encoded to obtain node state data reflecting the resource utilization of each node. Through this encoding method, the resource availability of the node is effectively quantified. The migration cost is calculated for the migration allocation scheme to evaluate the path consumption from the source node to the target node, including indicators such as bandwidth consumption, routing delay and link load. By combining these indicators, path cost data is obtained, which is used to reflect the comprehensive consumption of each candidate path. The calculation of migration cost not only involves the occupancy of network bandwidth, but also needs to consider the link delay, which is particularly important for task migration with high real-time requirements. In addition, link load is also a factor that needs to be considered in path cost, because link load directly determines the stability and transmission efficiency of the network. The node state data and path cost data are mapped into state space to construct the state characteristics of the route. The resource status of the node and the path cost are combined to fully describe the load and link conditions in the current network, and obtain the routing state characteristics. The action space is constructed for the routing state features, and the link connection relationship in the network is encoded into an action set, where each action represents an optional routing forwarding path, and the routing action features are obtained. In this action set, different paths represent different transmission modes from the source node to the target node. The constructed routing state features and routing action features are input into the deep reinforcement learning network for processing. The deep reinforcement learning network uses the state features and action features, and obtains the routing decision value after multi-layer processing of the neural network. The routing decision value is used to measure the feasibility and superiority of each path under the current network state. In this way, the deep reinforcement learning network can adaptively learn the best choice from a large number of possible paths to achieve network load balancing and resource optimization. During the training process, the reinforcement learning network continuously receives environmental feedback and adjusts the strategy to maximize the cumulative reward, so that the network can continuously optimize the routing selection in a dynamic environment. After obtaining the routing decision value, the path is explored and utilized through the ε-greedy strategy. The ε-greedy strategy is a strategy balancing method. By selecting a random path (exploration) or selecting the current optimal path (utilization) with a certain probability, a balance is achieved between exploring new paths and utilizing known optimal paths to ensure diversity and optimality in the learning process. By sorting the routing decision values, the top three paths with the highest decision values are selected to obtain the final multi-routing path set. The purpose of selecting multiple high-priority paths is to increase the fault tolerance and load sharing capabilities of the network, thereby effectively improving the robustness and transmission efficiency of the network. Through the above steps, a multi-routing path set based on the reinforcement learning path optimization of the task migration scheme is obtained.
[0020] 105. Perform load partition clustering and routing policy allocation on the multiple routing path sets to obtain a regional routing mapping table.
[0021] Specifically, the bandwidth load, node load and delay parameters of the paths involved in the multi-routing path set are feature extracted to construct a path feature matrix. The path feature matrix is partitioned and clustered to group paths with similar features. Paths with similar loads and performance are clustered together to facilitate the unified allocation and management of subsequent strategies. In the clustering process, appropriate clustering algorithms, such as K-means, are used to ensure the rationality and consistency of path partitioning. Through the clustering operation, multiple path partition sets are obtained, each of which represents a group of paths with similarities in specific features. The formation of path partition sets helps to hierarchically process paths of different load types and achieve load balancing more effectively. The load level of the path partition set is calculated to obtain the regional load data of each partition. The regional load data is a comprehensive representation of all path load parameters in the path partition, and the overall load level of each partition is obtained by calculation. These load levels are used to classify different partitions. According to the preset threshold, the partition with a load index less than 0.4 is classified as a lightly loaded area, the partition with a load index between 0.4 and 0.7 is classified as a medium-loaded area, and the partition with a load index greater than 0.7 is classified as a heavily loaded area. Through the classification, a hierarchical area group is formed, and each area group reflects different load conditions. Different routing strategies are adopted according to different load levels to ensure the rational use of network resources and minimize network congestion and node overload. After completing the hierarchical classification of the area, appropriate routing strategies are assigned to different areas in the hierarchical area group. For the lightly loaded area, due to the light load, the shortest path forwarding strategy based on the number of hops is used. The goal of this strategy is to select the path with the least number of hops, thereby reducing transmission delay and resource consumption. For the medium-load area, due to the moderate load, the weighted path forwarding strategy based on the link load is adopted. By assigning weights to different paths, the selected path can balance the load of the link and avoid overloading some links and affecting the overall performance. For overloaded areas, a multi-path forwarding strategy based on load balancing is adopted. Through multi-path diversion, the load is evenly distributed to multiple paths, thereby reducing the pressure on a single path and improving the robustness and reliability of the entire network. Through policy allocation, a regional policy table is formed to clearly specify the routing policies that should be adopted in different load areas. The forwarding policies in the regional policy table are mapped to specific routing rule sets. The routing rule set contains the implementation details of the routing policy in each area, such as how to select a path and how to control forwarding. Based on these rule sets, routing is allocated to nodes in each area. The primary and backup path tags, forwarding ports, and next hop information are written into the routing table entries of each node so that data can be forwarded according to the set rules during the actual routing process. The primary and backup path tags are used to distinguish between the primary path and the backup path to ensure that the backup path can be quickly switched to when the primary path fails, ensuring high availability of the network.The forwarding port and next hop information are used to specify the specific forwarding direction of the data packet, thereby realizing the reasonable scheduling and transmission of the data flow in the network. Through the above steps, a regional routing mapping table is formed. The mapping table describes the routing rules and forwarding strategies of the nodes in each region. Through the load partitioning clustering and routing strategy allocation of multiple routing path sets, the refined management of different load areas is realized, ensuring that the routing strategy in each area can be dynamically adjusted according to its load situation.
[0022] The regional routing mapping table is divided into light-loaded areas, medium-loaded areas, and heavy-loaded areas to obtain three partition performance data sets with different load levels. Each partition performance data set contains key routing indicators related to the regional load, such as bandwidth utilization, node latency, and load balancing. These partition performance data sets are used as input for the construction and training of the subsequent performance evaluation neural network model, so that network performance can be dynamically evaluated and routing configuration can be optimized. In the performance evaluation neural network model, the partition performance data set is mapped to a 512-dimensional feature vector through the input layer to ensure that the input data has a unified representation dimension when entering the network. This mapping effectively improves the efficiency of subsequent feature extraction and the generalization ability of the model. The feature extraction layer is used to further extract features from the input 512-dimensional feature vector. The feature extraction layer contains 3 feature extraction units, each of which contains 2 convolutional layers and 1 pooling layer. The convolution kernel size of the convolution layer is set to 3×3 to capture local features in the data. The convolution operation can effectively extract feature patterns through a sliding window. Each convolution layer is connected to a ReLU activation function to introduce nonlinear features, thereby enhancing the expression ability of the model. The pooling size of the pooling layer is 2×2, which is used to reduce the spatial size of the feature, reduce the computational complexity, and retain important feature information. After being processed by three feature extraction units, the output feature mapping vectors are obtained. These vectors represent the deep features that have been preliminarily processed and have the ability to characterize the network load balancing and performance. The feature mapping vectors are input to the performance evaluation layer for more in-depth feature analysis. The performance evaluation layer contains two parallel branches, which are used to evaluate different performance indicators in the network. The first branch is a 4-layer fully connected network with 256, 128, 64 and 32 neurons respectively. The main function of this branch is to evaluate the network's latency and bandwidth indicators. The fully connected network converts the input feature mapping vector into a more abstract performance indicator evaluation result through multi-level feature transformation. The second branch is a structure containing 4 layers of residual networks, each residual block consists of two convolutional layers, which is used to evaluate the load balancing degree. The advantage of the residual network structure is that it can effectively avoid the gradient vanishing problem in the deep network, thereby maintaining the stable training of the model. Through this parallel structure, the performance evaluation layer can extract and evaluate the network's latency, bandwidth utilization, and load balancing from multiple perspectives to obtain accurate performance evaluation results. The routing configuration parameters are optimized to ensure that the network performance can always remain in the optimal state under different load conditions. The performance evaluation neural network model contains a parameter optimization layer, which uses the particle swarm optimization algorithm (PSO) to generate an optimized sequence of routing parameters. The particle swarm optimization algorithm is an optimization algorithm based on swarm intelligence. It gradually approaches the optimal solution by simulating the movement of each individual (particle) in the swarm.PSO is used to search for the optimal routing configuration parameters. By continuously adjusting the speed and position of particles, the optimal combination of routing parameters is found to ensure that the network's bandwidth utilization, latency, and load balancing can all reach the best state. The generated routing parameter optimization sequence is integrated with the original routing configuration parameters to generate the optimal routing configuration parameters. The optimal configuration parameters are applied to the network to dynamically adjust routing rules and path selection, so that the network can be adaptively adjusted according to the current load status during actual operation to achieve dynamic load balancing.
[0023] In the embodiment of the present invention, multi-dimensional feature extraction of network nodes and link loads is realized through a lightweight deep learning feature extraction network, and the Ghost module and attention mechanism are combined to greatly reduce the computational complexity of feature extraction; multi-level load thresholds and spatial correlation analysis are used for load balancing decisions, which improves the accuracy of load balancing; intelligent decision-making of task migration and path optimization is realized based on LSTM prediction network and reinforcement learning, which significantly improves the real-time and adaptability of load balancing; differentiated management of network resources is realized through partition clustering and hierarchical routing strategies, which effectively reduces the probability of network congestion; finally, dynamic optimization of routing parameters is realized through a performance evaluation neural network model, which ensures the continuous optimization of network performance. The present invention has achieved remarkable results in reducing network latency, improving resource utilization and realizing dynamic load balancing.
[0024] In a specific embodiment, the process of executing step 101 may specifically include the following steps: The CPU occupancy rate and memory occupancy rate of the network nodes are sampled periodically. At the same time, the queue length and message delay of the network link are sampled periodically to obtain the original load data. Reconstruct the original load data according to the time series to obtain a load data matrix, and input the load data matrix into a lightweight deep learning feature extraction network. The lightweight deep learning feature extraction network includes a feature extraction layer, a Ghost module layer, and a feature fusion layer; The feature extraction layer extracts features from the load data matrix to obtain the initial feature map. The feature extraction layer contains three group convolution units, each of which includes four parallel convolution branches. The convolution kernel sizes are 3×3, 5×5, 7×7, and 9×9, respectively, with a step size of 1. Each convolution branch is connected to a BatchNormalization layer and a ReLU activation function. The initial feature map is processed through the Ghost module layer to obtain the Ghost feature map. The Ghost module layer includes a trunk branch and a parallel branch. The trunk branch uses 1×1 convolution to reduce the feature dimension, and the parallel branch uses 3×3 depth-separable convolution for feature transformation. The outputs of the two branches are spliced through channels. The feature fusion layer adopts the attention mechanism, including channel attention unit and spatial attention unit. The channel attention unit uses global average pooling and maximum pooling to extract channel weights, and the spatial attention unit uses a convolutional layer to extract spatial weights. The channel weights and spatial weights are multiplied with the Ghost feature map respectively to obtain a fused feature matrix. Parameter estimation is performed on the fusion feature matrix, and a parameter estimation network is constructed, including three fully connected layers with 512, 256, and 128 neurons respectively. Each layer uses the LeakyReLU activation function and Dropout regularization, and the output layer uses the Sigmoid function to obtain the load state vector. Based on the load state vector, the network load degree is calculated by combining the CPU usage variance, memory usage variance, queue length variance, and packet delay variance in a weighted summation manner.
[0025] Specifically, the CPU usage of network nodes , memory usage , and the queue length of the link and message delay Periodic sampling is performed to obtain the raw load data that changes over time. These data are expressed in a matrix form, where each row represents a different type of load (CPU occupancy, memory occupancy, queue length, message delay), and each column represents the sampling value at a certain moment, forming a load data matrix. ,in is the number of load types, is the number of sampling time points. Input into the lightweight deep learning feature extraction network. The network includes a feature extraction layer, a Ghost module layer, and a feature fusion layer. The feature extraction layer extracts features from the load data matrix. This layer contains three group convolution units, each of which has four convolution branches, and the convolution kernel sizes are , , , , with a step size of 1. The output of each branch passes through BatchNormalization and ReLU activation functions to obtain the initial feature map: ; The initial feature map contains features of various receptive fields, so that it can capture the changes of load data at various scales. The initial feature map is input into the Ghost module layer. This layer includes the main branch and parallel branches. The main branch is connected through Convolution Reduce the feature dimension, while the parallel branch adopts Depth-wise separable convolution performs feature transformation. By concatenating the outputs of the two branches, we get the Ghost feature map: ; This design effectively reduces computational complexity while retaining sufficient feature expression capabilities. The next layer is the feature fusion layer, which uses the attention mechanism to enhance the effect of key feature representation. The channel attention unit extracts channel weights through global average pooling and maximum pooling. , while the spatial attention unit uses convolution to extract spatial weights The fused feature matrix is obtained by the following formula: The purpose of feature fusion is to enhance the expression of important features and suppress irrelevant information. Perform parameter estimation and build a parameter estimation network. The parameter estimation network contains three fully connected layers, with 512, 256, and 128 neurons respectively. Each layer uses the LeakyReLU activation function to implement nonlinear mapping, and the load state vector is obtained through the Sigmoid function: ; The load state vector represents the load of each node and link in the network and is used to calculate the overall network load. Based on the load state vector, the variance of each load is combined by weighted summation to obtain the final network load . Assume that the variance of CPU usage is , the variance of memory usage is , the variance of the queue length is , the variance of the message delay is , the calculation formula of load degree is: ; in, It is the weight of each load indicator, reflecting the importance of different network indicators in load calculation.
[0026] In a specific embodiment, the process of executing step 102 may specifically include the following steps: Reconstruct the load state vector into a matrix and normalize the network load to generate an initial matrix; The CPU occupancy data in the initial matrix is divided by thresholds to obtain a CPU load level matrix; the memory occupancy data in the initial matrix is divided by thresholds to obtain a memory load level matrix; the queue length data in the initial matrix is divided by thresholds to obtain a queue load level matrix; The CPU load level matrix, the memory load level matrix and the queue load level matrix are weighted and combined to obtain a comprehensive load level matrix; Perform spatial correlation analysis on the comprehensive load level matrix, calculate the load difference between adjacent nodes, mark the node pairs with load difference greater than the preset target value as objects to be optimized, and obtain the load balancing decision matrix; The load balancing decision matrix is compared with the multi-level load threshold and the node optimization is marked, wherein the marking information includes the node number and the optimization priority, to obtain the optimized node set, and generate the load optimization instruction sequence according to the optimized node set.
[0027] Specifically, the load state vector is processed and converted into a matrix form that is easy to analyze. Assume that a load state vector is obtained , which contains various load status information collected from network nodes, such as CPU occupancy, memory occupancy, queue length, etc. The load state vector is reconstructed into the initial matrix ,in and is the number of rows and columns of the matrix. The reconstruction operation aims to rearrange the original data into a form suitable for subsequent processing and analysis. The network load degree is normalized to ensure that data of different dimensions are on the same scale, thereby eliminating the dimensional differences between load states and making different indicators comparable in subsequent calculations. The initial matrix It contains a variety of load information, such as CPU usage, memory usage, and queue length. Different types of load data are divided into thresholds and each load state is classified. For the CPU usage data in the initial matrix, several thresholds are set , these thresholds are used to divide the CPU load into different levels, generating a CPU load level matrix , whose elements Indicates that at the node and time point Similarly, the memory usage data is divided into thresholds and several memory thresholds are set. , get the memory load level matrix , the matrix elements Indicates the memory load level. Similarly, the queue length data is also divided into thresholds, and the corresponding queue length thresholds are set to obtain the queue load level matrix . CPU Load Level Matrix , Memory Load Level Matrix and queue load level matrix Perform weighted combination to obtain the comprehensive load level matrix Each element of the comprehensive load level matrix is expressed as: ; in, are the weights of CPU, memory, and queue length, respectively. These weights reflect the importance of various load indicators in the overall load balancing. For example, if the network is more sensitive to the occupancy of computing resources, is set to a higher value so that the CPU load accounts for a larger proportion of the overall load. Perform spatial correlation analysis to understand the load relationship between different nodes in the network. Calculate the load difference between adjacent nodes to determine which pairs of nodes have significant load differences and thus need to be optimized. and nodes Adjacent, load difference It is expressed as: ; in, and Respectively represent nodes and nodes If the load difference Greater than the preset target value , then the node pair The nodes are marked as objects to be optimized. Through analysis, the node pairs with unbalanced load in the network are identified, so as to determine the parts that need to adjust the load. After the node pairs to be optimized are identified, the load balancing decision matrix is constructed. , which is used to mark the node pairs that need to be optimized in the network and their optimization priorities. Each element in the load balancing decision matrix Represents a node pair Optimization state, if the node pair needs to be optimized, then the corresponding optimization priority is assigned. For example, the greater the load difference, the higher the priority. After determining the optimized node pair and its priority, the load balancing decision matrix is compared with the multi-level load threshold to screen out the node set that needs to be prioritized, and obtain the final optimized node set. Based on the optimized node set, a load optimization instruction sequence is generated. The optimization instruction sequence includes the node number and the corresponding optimization priority. For example: the load difference between node 1 and node 2 is significant and the optimization priority is the highest, then the optimization instruction includes the node 1 and node 2 numbers and the priority processing mark. In this way, it is ensured that the unbalanced load part of the network is optimized first, thereby improving the load balancing effect and resource utilization efficiency of the entire network.
[0028] In a specific embodiment, the process of executing step 103 may specifically include the following steps: Based on the node number and optimization priority in the load optimization instruction sequence, the nodes to be optimized in the optimization node set are grouped into source nodes and target nodes to obtain the node grouping result, and the load timing analysis and node screening are performed on the node grouping result to obtain the candidate node set; Sort the candidate node set according to load level and optimization priority, select the first 30% nodes with the highest load level as the source node set, and select the first 30% nodes with the lowest load level as the target node set; Perform sliding window processing on the load data of the source node set to obtain the source node load sequence, and perform capacity analysis on the resource data of the target node set to obtain the target node capacity matrix; The source node load sequence and the target node capacity matrix are input into the LSTM prediction network, which contains two LSTM hidden layers and a fully connected output layer, to obtain the load prediction result. A task migration matrix is constructed based on the load prediction results. The matrix elements represent the task allocation ratio from the source node to the target node. The task allocation ratio is calculated based on the remaining capacity and predicted load value of the target node to obtain the migration allocation plan. The migration allocation plan is scheduled in time, and the task migration process is divided into multiple execution time slices. The migration amount of each time slice does not exceed 50% of the remaining capacity of the target node, and the task migration plan is obtained.
[0029] Specifically, based on the node number and optimization priority in the load optimization instruction sequence, the nodes to be optimized in the optimization node set are grouped as source nodes and target nodes. Assume that the load optimization instruction sequence contains information of several nodes, and the node numbers and corresponding optimization priorities are recorded respectively. For example, the node number set is , where each node has an optimization priority , which indicates the priority of the node in the load balancing process. Based on this information, the nodes to be optimized in the optimization node set are preliminarily grouped to obtain the grouping results of the source nodes and the target nodes. The grouping results are subjected to load timing analysis to analyze the load changes of the nodes at different times to identify the volatility of the node load in the time dimension. Assuming that the node In time The load level is , the load of each node is expressed as a time series ,in Indicates the length of time. By analyzing the load sequence, we filter out nodes with large load fluctuations and need to be processed first, and obtain a set of candidate nodes. We sort the candidate node set according to load level and optimization priority. For each node, we calculate the average value of its load. : ; Based on the average load level and optimization priority of each node, the nodes are sorted, and nodes with higher load levels and higher optimization priorities are processed first. After the sorting is completed, the top 30% of the nodes with the highest load levels are selected as the source node set, denoted as , these nodes have the problem of overload and need to be migrated first. At the same time, the top 30% of nodes with the lowest load level are selected as the target node set, denoted as , these nodes have lower loads and serve as the receivers of load migration. The load data of the source node is processed by sliding window to obtain the source node load sequence. The purpose of sliding window processing is to smooth the node load data to capture the load change trend of the node in a short period of time. Assume that the sliding window size is , for the source node , the load sequence after sliding window processing is: ; The resulting load sequence It can more accurately reflect the load trend of the node and reduce the impact of instantaneous noise on the prediction results. The resource data is used for capacity analysis to obtain the capacity matrix of the target node. . Each element in the capacity matrix Indicates the target node The remaining capacity at a certain moment, including the availability of resources such as CPU and memory. , the remaining capacity is expressed as: ; in, Representation Node The total capacity of Representation Node In time The source node load sequence and the target node capacity matrix are used as input to an LSTM (Long Short-Term Memory) prediction network. The LSTM prediction network contains two LSTM hidden layers and a fully connected output layer. It predicts future load changes by performing time series modeling on the source node load data. The recursive relationship of the LSTM layer is expressed as: ; in, Indicates Layer in time The hidden state of Represents the input sequence at time After two layers of LSTM, the hidden state is input into the fully connected layer to obtain the load prediction result. . Based on the load prediction results, build the task migration matrix , each element of the matrix From the source node To the target node The task allocation ratio is calculated based on the remaining capacity of the target node. and predicted load values : ; This formula represents the target node The amount of tasks received should be proportional to its remaining capacity, so as to ensure that during the load migration process, the target node will not be overloaded due to taking on too many tasks. After the task migration matrix is determined, the migration process is scheduled and the task migration is divided into multiple execution time slices. Let each time slice be , in each time slice, from the source node To the target node Migration tasks It should not exceed 50% of the target node's remaining capacity: ; By dividing the task migration process into multiple execution time slices, the migration amount of each time slice can be effectively controlled, reducing the instantaneous pressure on the target node and avoiding instability of the target node due to a sudden increase in load.
[0030] In a specific embodiment, the process of executing step 104 may specifically include the following steps: Based on the task migration plan, the remaining CPU capacity, memory capacity and queue capacity of each node are encoded to obtain the node status data, and the migration cost of the migration allocation plan is calculated. The bandwidth consumption, routing delay and link load from the source node to the target node are combined into the path cost data; The node state data and path cost data are mapped into state space to obtain routing state features, and the routing state features are constructed into action space. The link connection relationship in the network is encoded into an action set. Each action represents an optional routing forwarding path to obtain routing action features. The routing state features and routing action features are input into the deep reinforcement learning network for processing to obtain the routing decision value. According to the routing decision value, the ε-greedy strategy is used to explore and utilize the paths, and the top three paths with the highest decision values are selected to obtain a set of multiple routing paths.
[0031] Specifically, the key resource status of each network node is encoded to obtain node status data. The CPU remaining capacity, memory remaining capacity, and queue remaining capacity of each node are quantified and encoded. Assume that at time When the node The remaining CPU capacity is , the remaining memory capacity is , the remaining capacity of the queue is , the node state data is represented as a state vector: ; in, Represents the remaining status of CPU, memory and queue resources, node status data It is the basic information describing the current load status and available resources of the node. The migration cost is calculated based on the task migration plan. The migration cost reflects the resource consumption and network overhead from the source node to the target node. For each task migration path, the bandwidth consumption, routing delay, and link load costs are calculated. Assume that To the target node During the migration process, the bandwidth consumption is , the routing delay is , the link load is , the path cost is expressed as a path cost vector: ; In order to calculate the overall path cost, the total path cost value is obtained by weighted summing up each cost index : ; in, is the weight of bandwidth, delay and link load. The weight reflects the importance of each cost in different application scenarios. For example, in a scenario with high bandwidth demand, Set to a higher value. Perform state space mapping on node state data and path cost data to obtain routing state features used to describe network status. Routing state features are used to fully describe the resource status of each node in the current network and its path performance. Assume that the current network consists of nodes, the state space mapping is expressed as: ; in, Represents the node status set of the entire network, which is used to characterize the overall resource distribution of the network. At the same time, the path cost data is combined with the node status through the path cost mapping to form a complete network routing status feature: ; in, It represents the path cost between each node pair, which comprehensively reflects the communication overhead and transmission performance in the network. After obtaining the routing state characteristics, the action space is constructed for the routing state characteristics. The action space describes all the operations that can be performed in the current network state. The link connection relationship in the network is encoded as an action set, and each action corresponds to the route selection from one node to another. Assume that the link connection relationship in the network is , each link connection relationship represents a link between a pair of nodes, and the action set is expressed as: ; in, Represents a slave node To Node In this way, each action in the action set represents a selected routing path, and the resulting action feature set is: ; Routing state characteristics and routing action features The input is processed into a deep reinforcement learning network. The deep reinforcement learning network uses a neural network to approximate the value function and assign a decision value to each possible action in order to select the optimal path. Assume that the deep reinforcement learning network contains several hidden layers, and its input is the routing state feature and action features , the output of the network is the routing decision value corresponding to each action ,in: ; in, Represents the parameters of a deep neural network, function The input features are mapped through the neural network structure, and the value of each action is output. In this way, the network learns the value of different paths in the current network state, thus providing a basis for path selection. In order to balance exploration and utilization in the reinforcement learning process, - Greedy strategy for path selection. -The greedy strategy uses probability in each round of decision making. Randomly select an action (to explore), with probability Select the action with the highest current decision value (to be used) to prevent the model from falling into the local optimum. Assume that the current decision value set is , then the top three paths with the highest decision values are selected by sorting to obtain a multi-routing path set: ; By selecting multiple paths, the fault tolerance of the network is increased, avoiding the impact of congestion on a single path on the overall communication performance.
[0032] In a specific embodiment, the process of executing step 105 may specifically include the following steps: Extract the features of bandwidth load, node load and delay parameters corresponding to the multi-routing path set to obtain a path feature matrix, and perform partition clustering on the path feature matrix to obtain a path partition set; The load level of the path partition set is calculated to obtain regional load data, and the partitions are graded based on the regional load data. The load index less than 0.4 is divided into light-loaded areas, the load index between 0.4 and 0.7 is divided into medium-loaded areas, and the load index greater than 0.7 is divided into heavy-loaded areas, thus obtaining graded area groups; Assign the shortest path forwarding strategy based on the number of hops to the lightly loaded area in the hierarchical area group, assign the weighted path forwarding strategy based on the link load to the medium loaded area, and assign the multi-path forwarding strategy based on load balancing to the heavy loaded area, thereby obtaining an area strategy table; The forwarding strategy in the regional policy table is mapped to a routing rule set, and routes are allocated to nodes in each area based on the routing rule set. The primary and backup path tags, forwarding ports and next hop information are written into the routing table entries to obtain a regional routing mapping table.
[0033] Specifically, the bandwidth load, node load and delay parameters involved in the multi-routing path set are extracted to construct a path feature matrix. Assume that there are several multi-routing paths in the network, and the bandwidth load involved in each path is , the node load is , the delay is ,in Represent the starting node and the ending node of the path respectively. By extracting the bandwidth load, node load and delay parameters of these paths, the path feature matrix is constructed. , where each row represents the characteristics of a path, including bandwidth load, node load and delay parameters, specifically expressed as: ; Path feature matrix By quantitatively describing the characteristics of the path, it is convenient to analyze and optimize in the subsequent load balancing process. The path feature matrix is partitioned and clustered, and paths with similar load characteristics are grouped together to facilitate the application of different optimization strategies to different types of paths. Set the number of clusters to ,use -means or other clustering algorithms on the path feature matrix Perform clustering to obtain a set of path partitions , where each partition contains a set of paths with similar load characteristics. By minimizing the variance of path characteristics within each partition, the paths in the same partition have relatively similar performance characteristics, so that the same optimization strategy can be applied. , calculate the load level and obtain the regional load data. The load level is calculated based on the weighted average of the path bandwidth load, node load and delay. In the partition The bandwidth load, node load and delay in are , load level The calculation formula is: ; in, are the weights of bandwidth load, node load and delay respectively, Represents a partition The load level of each partition is calculated by weighted average to obtain the regional load data. , this set of data reflects the comprehensive load of the paths in each partition. Based on the regional load data, each partition is divided into levels. The partitions with load levels less than 0.4 are classified as light-load areas, the partitions with load levels between 0.4 and 0.7 are classified as medium-load areas, and the partitions with load levels greater than 0.7 are classified as heavy-load areas. ,in Indicates the light load area, Indicates the medium load area, Denotes a heavily loaded area. Differentiate the paths according to different load levels to achieve optimal resource utilization and improve network performance. Based on the hierarchical area groups, a suitable forwarding strategy is assigned to each area. For lightly loaded areas, a shortest path forwarding strategy based on hop count is adopted, with the goal of reducing transmission delay and resource consumption by selecting the path with the least hop count. Suppose the path set in the lightly loaded area is , for each path , the number of hops is recorded as Then the shortest path forwarding strategy selects the path with the smallest number of hops: ; For the medium-load area, a weighted path forwarding strategy based on link load is adopted. The path load in the medium-load area is relatively moderate, so the link load needs to be balanced when selecting the path. Assume that the path set is , the link load of each path is , then select the path with smaller link load to avoid overloading of local links: ; For overloaded areas, a multi-path forwarding strategy based on load balancing is adopted to reduce the load pressure of a single path by selecting multiple paths for diversion. Assume that the path set in the overloaded area is , load balancing is achieved by selecting multiple appropriate paths: ; in, The threshold of the load is used to ensure that the load level of the selected path is within an acceptable range. By assigning corresponding forwarding strategies to different areas, the regional strategy table is obtained. , where each strategy Path forwarding rules corresponding to light-load, medium-load, and heavy-load areas. The forwarding strategies in these regional policy tables are mapped to specific routing rule sets. Each routing rule set contains routing instructions for each node, such as primary and backup path tags, forwarding ports, and next-hop information. Based on the routing rule set, routes are allocated to nodes in each area. For each node , determine its routing table entry, which contains the tags of the primary and backup paths , forward ports and next hop node The routing table entry is represented as: ; By mapping the policies in the regional policy table to the routing table items of each node, the regional routing mapping table is finally obtained. , where each element is a routing table entry of a node, describing the specific forwarding rules and path selection strategy of the node in the network load balancing process.
[0034] In a specific embodiment, the process of executing step 106 may specifically include the following steps: The regional routing mapping table is divided into light-loaded areas, medium-loaded areas, and heavy-loaded areas to obtain partition performance data sets, and a performance evaluation neural network model is constructed, including an input layer, a feature extraction layer, a performance evaluation layer, and a parameter optimization layer; the input layer maps the partition performance data set into a 512-dimensional feature vector; The feature extraction layer contains 3 feature extraction units, each of which includes 2 convolutional layers and 1 pooling layer. The convolution kernel size is 3×3, the pooling size is 2×2, and each layer is connected to the ReLU activation function to output the feature mapping vector. The performance evaluation layer consists of two parallel branches. The first branch is a 4-layer fully connected network with 256, 128, 64 and 32 neurons respectively, which is used to evaluate latency and bandwidth indicators. The second branch is a 4-layer residual network, each residual block contains 2 convolutional layers, which is used to evaluate load balancing indicators. The feature mapping vector is input into the performance evaluation layer to perform deep feature extraction on network delay, bandwidth utilization and load balancing to obtain performance evaluation results. The parameter optimization layer uses the particle swarm optimization algorithm to generate the routing parameter optimization sequence. The routing parameter optimization sequence is integrated with the original routing configuration parameters to generate the optimal routing configuration parameters.
[0035] Specifically, the regional route mapping table is divided into light-loaded area, medium-loaded area and heavy-loaded area to obtain the partition performance data set. Assume that the route mapping table contains performance indicator data of multiple paths and nodes, which are divided into three categories according to the load conditions: light-loaded area data set , medium load regional dataset and reload the region dataset Each data set contains performance indicators of different paths and nodes, such as bandwidth utilization, latency, and load balancing. Through data partitioning, the routing performance is carefully analyzed and optimized for different load conditions. A performance evaluation neural network model is constructed, which consists of an input layer, a feature extraction layer, a performance evaluation layer, and a parameter optimization layer. The input layer maps the partitioned performance data set into a feature vector of fixed dimension for subsequent processing. Assume that the input data set is ,in Indicates the amount of data at different paths or nodes, Represents the dimension of the performance indicator. The input layer maps the input data into a 512-dimensional feature vector through a linear transformation : ; in, is the weight matrix of the input layer, is the bias term. The mapped eigenvector Better express the potential features of the input data, thereby improving the learning ability of the neural network. The feature extraction layer is used to extract deep information from the input features. The feature extraction layer contains 3 feature extraction units, each of which contains 2 convolutional layers and 1 pooling layer. Suppose the input feature vector is , in the first feature extraction unit, the convolution kernel size is used The convolution layer performs convolution operation on the input features to obtain the first layer feature map : ; in, Represents the convolution operation, and the convolution kernel size is is the bias term, is the ReLU activation function, which introduces nonlinearity to improve the expressiveness of the model. The second convolutional layer convolves the output of the previous layer again to obtain the second layer feature map: ; Use size The pooling layer downsamples the features to obtain the pooled feature map : ; The purpose of the pooling operation is to reduce the size of the feature, reduce the computational complexity, and retain the main feature information. After passing through the three feature extraction units, the output feature map vector is obtained. , which contains the deep features of the input data. The performance evaluation layer is used to perform a detailed evaluation of the extracted features to obtain the performance indicators of the network. The performance evaluation layer contains two parallel branches. The first branch is a 4-layer fully connected network, which is used to evaluate the network's latency and bandwidth utilization. The input of the layer is , the output of the fully connected layer is: ; in, For the The weight matrix of the layer, is the bias term, is the ReLU activation function. The number of neurons in the fully connected layer is 256, 128, 64, and 32, respectively. These hierarchical structures are used to gradually extract and aggregate the features of latency and bandwidth utilization. The second branch is a 4-layer residual network. The design of the residual network can effectively avoid the gradient vanishing problem and maintain the stability of the deep network. Each residual block contains 2 convolutional layers. Assuming the input is , then the output of the residual block is: ; At the same time, a shortcut connection is introduced in the residual block to directly add the input to the output to obtain the final residual output: ; This design helps to maintain the information transmission of input features and accelerate the convergence of the network. The residual network is used to evaluate the load balance of the network to ensure that the load can be reasonably distributed among different nodes. After the two branches of the performance evaluation layer are processed, the evaluation results of network latency, bandwidth utilization and load balance are obtained. The evaluation results are input to the parameter optimization layer, which uses the particle swarm optimization (PSO) algorithm to generate an optimization sequence of routing parameters. Particle swarm optimization is an optimization algorithm based on swarm intelligence that simulates the behavior of flocks of birds or schools of fish when looking for food to find the optimal solution to the problem. Assume that the position of the particle is represented by , the speed is , then the particle position update formula is: ; The speed update formula is: ; in, is the inertia weight, is the learning factor, is a random number, Represents particles The best historical position, Represents the global optimal position. By continuously iteratively updating the position and speed of particles, PSO can find the optimal routing parameter configuration. The routing parameter optimization sequence is integrated with the original routing configuration parameters to generate the optimal routing configuration parameters. These optimal parameters are used to adjust the path selection and forwarding rules in the routing table to ensure that the network always maintains an efficient operating state under different load conditions. The optimal routing configuration parameters are expressed as: ; in, Configure parameters for the original route. is the optimization increment obtained by particle swarm optimization.
[0036] The above describes the dynamic load balancing method for network routing in the embodiment of the present invention. The following describes the dynamic load balancing system for network routing in the embodiment of the present invention. Figure 2 , an embodiment of a dynamic load balancing system for network routing in an embodiment of the present invention includes: The sampling module 201 is used to periodically sample and extract features of the processing load of the network nodes and the transmission load of the network links to obtain a load state vector and a network load degree; The comparison module 202 is used to construct a load balancing decision matrix according to the load state vector and the network load degree, and compare the load balancing decision matrix with the multi-level load threshold to obtain a load optimization instruction sequence; A modeling module 203 is used to identify a set of high-load source nodes and a set of low-load target nodes based on a load optimization instruction sequence, and perform load prediction modeling to obtain a task migration plan; An optimization module 204 is used to perform path optimization of reinforcement learning based on the task migration scheme to obtain a set of multiple routing paths; The allocation module 205 is used to perform load partition clustering and routing policy allocation on the multiple routing path sets to obtain a regional routing mapping table.
[0037] Through the collaborative cooperation of the above-mentioned components, multi-dimensional feature extraction of network nodes and link loads is realized through a lightweight deep learning feature extraction network. Combined with the Ghost module and the attention mechanism, the computational complexity of feature extraction is greatly reduced; multi-level load thresholds and spatial correlation analysis are used for load balancing decisions, which improves the accuracy of load balancing; based on LSTM prediction network and reinforcement learning, intelligent decision-making for task migration and path optimization is realized, which significantly improves the real-time and adaptability of load balancing; differentiated management of network resources is realized through partition clustering and hierarchical routing strategies, which effectively reduces the probability of network congestion; finally, dynamic optimization of routing parameters is realized through a performance evaluation neural network model, which ensures the continuous optimization of network performance. The present invention has achieved remarkable results in reducing network latency, improving resource utilization and realizing dynamic load balancing.
[0038] above Figure 2 The dynamic load balancing system for network routing in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The dynamic load balancing device for network routing in the embodiment of the present invention is described in detail from the perspective of hardware processing.
[0039] Figure 3 : This is a structural diagram of a dynamic load balancing device for network routing provided by an embodiment of the present invention. The dynamic load balancing device 300 for network routing may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 310 (for example, one or more processors) and a memory 320, and one or more storage media 330 (for example, one or more mass storage device terminals) storing application programs 333 or data 332. Among them, the memory 320 and the storage medium 330 can be short-term storage or permanent storage. The program stored in the storage medium 330 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the dynamic load balancing device 300 for network routing. Furthermore, the processor 310 may be configured to communicate with the storage medium 330, and execute a series of instruction operations in the storage medium 330 on the dynamic load balancing device 300 for network routing to implement the steps of the above-mentioned dynamic load balancing method for network routing.
[0040] The network routing dynamic load balancing device 300 may also include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input and output interfaces 360, and / or one or more operating systems 331, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will appreciate that Figure 3 The structure of the dynamic load balancing device for network routing shown does not constitute a limitation on the dynamic load balancing device for network routing provided by the present invention, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.
[0041] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the dynamic load balancing method for network routing.
[0042] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0043] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0044] As described above, 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, those 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, these 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 dynamic load balancing method for network routing, characterized in that: The method comprises: Perform periodic sampling and feature extraction on the processing load of network nodes and the transmission load of network links to obtain the load state vector and network load degree; Constructing a load balancing decision matrix according to the load state vector and the network load degree, and performing a comparison operation on the load balancing decision matrix and a multi-level load threshold to obtain a load optimization instruction sequence; Based on the load optimization instruction sequence, a set of high-load source nodes and a set of low-load target nodes are identified, and load prediction modeling is performed to obtain a task migration plan; Performing path optimization of reinforcement learning based on the task migration scheme to obtain a set of multiple routing paths; Load partition clustering and routing strategy allocation are performed on the multiple routing path sets to obtain a regional routing mapping table.
2. The dynamic load balancing method for network routing according to claim 1, characterized in that: The processing load of the network node and the transmission load of the network link are periodically sampled and feature extracted to obtain a load state vector and a network load degree, including: The CPU occupancy rate and memory occupancy rate of the network node are periodically sampled, and at the same time, the queue length and message delay of the network link are periodically sampled to obtain the original load data; Reconstructing the original load data according to the time series to obtain a load data matrix, and inputting the load data matrix into a lightweight deep learning feature extraction network, wherein the lightweight deep learning feature extraction network includes a feature extraction layer, a Ghost module layer, and a feature fusion layer; The feature extraction layer extracts features from the load data matrix to obtain an initial feature map, wherein the feature extraction layer includes three group convolution units, each group convolution unit includes four parallel convolution branches, and the convolution kernel sizes are 3×3, 5×5, 7×7 and 9×9 respectively, with a step size of 1, and each convolution branch is connected to a BatchNormalization layer and a ReLU activation function; The initial feature map is processed by the Ghost module layer to obtain a Ghost feature map, wherein the Ghost module layer includes a trunk branch and a parallel branch, the trunk branch uses a 1×1 convolution to reduce the feature dimension, and the parallel branch uses a 3×3 depth-separable convolution to perform feature transformation, and the outputs of the two branches are spliced through channels; The feature fusion layer adopts an attention mechanism, including a channel attention unit and a spatial attention unit. The channel attention unit uses global average pooling and maximum pooling to extract channel weights, and the spatial attention unit uses a convolutional layer to extract spatial weights. The channel weights and the spatial weights are respectively multiplied with the Ghost feature map to obtain a fusion feature matrix; Parameter estimation is performed on the fusion feature matrix to construct a parameter estimation network, including three fully connected layers with 512, 256 and 128 neurons respectively. LeakyReLU activation function and Dropout regularization are used in each layer, and Sigmoid function is used in the output layer to obtain a load state vector. Based on the load state vector, the CPU occupancy variance, the memory occupancy variance, the queue length variance and the message delay variance are combined in a weighted summation manner to calculate the network load degree.
3. The dynamic load balancing method for network routing according to claim 2, characterized in that: The step of constructing a load balancing decision matrix according to the load state vector and the network load degree, and performing a comparison operation on the load balancing decision matrix and a multi-level load threshold to obtain a load optimization instruction sequence includes: Reconstructing the load state vector into a matrix and normalizing the network load degree to generate an initial matrix; Threshold division is performed on the CPU occupancy data in the initial matrix to obtain a CPU load level matrix; threshold division is performed on the memory occupancy data in the initial matrix to obtain a memory load level matrix; threshold division is performed on the queue length data in the initial matrix to obtain a queue load level matrix; Performing weighted combination on the CPU load level matrix, the memory load level matrix and the queue load level matrix to obtain a comprehensive load level matrix; Performing spatial correlation analysis on the comprehensive load level matrix, calculating the load difference between adjacent nodes, marking the node pairs whose load difference is greater than a preset target value as objects to be optimized, and obtaining a load balancing decision matrix; The load balancing decision matrix is compared with the multi-level load threshold and the nodes are optimized and marked, wherein the marking information includes the node number and the optimization priority, to obtain an optimized node set, and a load optimization instruction sequence is generated according to the optimized node set.
4. The dynamic load balancing method for network routing according to claim 3, characterized in that: The method of identifying a high-load source node set and a low-load target node set based on the load optimization instruction sequence, and performing load prediction modeling to obtain a task migration plan includes: Based on the node numbers and optimization priorities in the load optimization instruction sequence, the nodes to be optimized in the optimization node set are grouped into source nodes and target nodes to obtain node grouping results, and load timing analysis and node screening are performed on the node grouping results to obtain a candidate node set; Sort the candidate node set according to load level and optimization priority, select the first 30% nodes with the highest load level as the source node set, and select the first 30% nodes with the lowest load level as the target node set; Performing sliding window processing on the load data of the source node set to obtain a source node load sequence, and performing capacity analysis on the resource data of the target node set to obtain a target node capacity matrix; Inputting the source node load sequence and the target node capacity matrix into an LSTM prediction network, wherein the LSTM prediction network comprises two LSTM hidden layers and a fully connected output layer, to obtain a load prediction result; A task migration matrix is constructed according to the load prediction result, wherein the matrix elements represent the task allocation ratio from the source node to the target node, and the task allocation ratio is calculated based on the remaining capacity and the predicted load value of the target node to obtain a migration allocation plan; The migration allocation plan is time-sequenced, and the task migration process is divided into multiple execution time slices. The migration amount of each time slice does not exceed 50% of the remaining capacity of the target node, and the task migration plan is obtained.
5. The method for dynamic load balancing of network routing according to claim 4, characterized in that: The path optimization based on the task migration scheme is performed on reinforcement learning to obtain a set of multiple routing paths, including: Based on the task migration scheme, the remaining CPU capacity, remaining memory capacity and remaining queue capacity of each node are encoded to obtain node status data, and the migration cost of the migration allocation scheme is calculated, and the bandwidth consumption, routing delay and link load from the source node to the target node are combined into path cost data; Performing state space mapping on the node state data and the path cost data to obtain routing state features, and constructing action space on the routing state features, encoding the link connection relationship in the network into an action set, each action representing an optional routing forwarding path, to obtain routing action features; The routing state features and the routing action features are input into a deep reinforcement learning network for processing to obtain a routing decision value, and according to the routing decision value, the path exploration and utilization are performed through an ε-greedy strategy, and the top three paths with the highest decision values are selected to obtain a multi-routing path set.
6. The method for dynamic load balancing of network routing according to claim 5, characterized in that: The load partitioning clustering and routing policy allocation for the multiple routing path sets to obtain a regional routing mapping table includes: Extracting features of bandwidth load, node load and delay parameters corresponding to the multi-routing path set to obtain a path feature matrix, and performing partition clustering on the path feature matrix to obtain a path partition set; Calculating the load level of the path partition set to obtain regional load data, and classifying the partitions based on the regional load data, classifying the partitions with a load index less than 0.4 as a light-loaded area, the partitions with a load index between 0.4 and 0.7 as a medium-loaded area, and the partitions with a load index greater than 0.7 as a heavy-loaded area, to obtain a graded area group; Allocate a shortest path forwarding strategy based on the number of hops to the lightly loaded area in the hierarchical area group, allocate a weighted path forwarding strategy based on the link load to the medium loaded area, and allocate a multi-path forwarding strategy based on load balancing to the heavy loaded area, to obtain an area strategy table; The forwarding strategy in the regional strategy table is mapped to a routing rule set, and based on the routing rule set, routing is assigned to nodes in each region, and primary and backup path tags, forwarding ports and next hop information are written into routing table entries to obtain a regional routing mapping table.
7. The method for dynamic load balancing of network routing according to claim 6, characterized in that: The dynamic load balancing method for network routing also includes: The regional routing mapping table is divided into data according to light-loaded areas, medium-loaded areas and heavy-loaded areas to obtain a partition performance data set, and a performance evaluation neural network model is constructed, including an input layer, a feature extraction layer, a performance evaluation layer and a parameter optimization layer; the input layer maps the partition performance data set into a 512-dimensional feature vector; The feature extraction layer includes 3 feature extraction units, each of which includes 2 convolutional layers and 1 pooling layer, the convolution kernel size is 3×3, the pooling size is 2×2, and a ReLU activation function is connected after each layer to output a feature mapping vector; The performance evaluation layer includes two parallel branches. The first branch is a 4-layer fully connected network with 256, 128, 64 and 32 neurons respectively, which is used to evaluate the delay and bandwidth indicators; the second branch is a 4-layer residual network, each residual block includes 2 convolutional layers, which is used to evaluate the load balancing indicator; The feature mapping vector is input into the performance evaluation layer, and deep feature extraction is performed on network delay, bandwidth utilization and load balancing to obtain performance evaluation results; the parameter optimization layer adopts a particle swarm optimization algorithm to generate a routing parameter optimization sequence; The routing parameter optimization sequence is integrated with the original routing configuration parameters to generate optimal routing configuration parameters.
8. A dynamic load balancing system for network routing, characterized in that: A method for performing dynamic load balancing of network routing according to any one of claims 1 to 7, the system comprising: The sampling module is used to periodically sample and extract features of the processing load of the network nodes and the transmission load of the network links to obtain the load state vector and the network load degree; A comparison module, used for constructing a load balancing decision matrix according to the load state vector and the network load degree, and performing a comparison operation on the load balancing decision matrix and a multi-level load threshold to obtain a load optimization instruction sequence; A modeling module, used to identify a set of high-load source nodes and a set of low-load target nodes based on the load optimization instruction sequence, and perform load prediction modeling to obtain a task migration plan; An optimization module, used for performing path optimization of reinforcement learning based on the task migration scheme to obtain a set of multiple routing paths; The allocation module is used to perform load partition clustering and routing strategy allocation on the multiple routing path sets to obtain a regional routing mapping table.
9. A dynamic load balancing device for network routing, characterized in that: The dynamic load balancing device for network routing includes: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instruction in the memory to enable the dynamic load balancing device for network routing to execute the dynamic load balancing method for network routing as described in any one of claims 1-7.
10. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the dynamic load balancing method for network routing according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Financial big data distributed machine learning acceleration method based on dynamic time delay compensation
CN120494050A
A financial big data distributed machine learning acceleration method based on dynamic delay compensation
CN120494050B
Multi-agent cooperation method and device, electronic equipment and storage medium
CN120540820A
Hardware performance collaborative evaluation method supporting distributed architecture
CN120729748A
Space-based service load migration method and system based on thermodynamic diagram dynamic region division
CN120751443A