Network adjustment methods, devices, electronic equipment and storage media
By acquiring network performance information of routing ports and using a network congestion assessment model to calculate real-time congestion levels and weights, and dynamically adjusting traffic allocation, the problem of time-consuming and error-prone network adjustments in existing technologies is solved, thereby achieving network performance optimization and efficient resource utilization.
Patent Information
- Application Number
- CN202411514206.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2044-10-28
AI Technical Summary
In existing technologies, network adjustments require manual observation and configuration, which is time-consuming, error-prone, and makes it difficult to quickly adapt to dynamic changes in network traffic.
By acquiring network performance information from routing ports, calculating real-time network congestion levels and weights using a network congestion assessment model, dynamically adjusting traffic allocation, and optimizing network performance by combining reset cycles and weight initialization mechanisms.
It achieves efficient and dynamic adjustment of network traffic, avoids congestion, and optimizes network performance and resource utilization.
Smart Images

Figure CN119544605B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a network adjustment method, apparatus, electronic device, and storage medium. Background Technology
[0002] With the continuous development of digital technology, the data traffic from users is constantly increasing, and network congestion problems are becoming increasingly prominent.
[0003] In related technologies, network allocation schemes with multiple routing ports typically require network administrators to manually observe, analyze, and adjust them. This manual configuration process is not only time-consuming and error-prone, but also struggles to quickly adapt to dynamic changes in network traffic. Therefore, how to perform network adjustments more efficiently has become a pressing issue for the industry. Summary of the Invention
[0004] This invention provides a network adjustment method, apparatus, electronic device, and storage medium to address the shortcomings of existing technologies in how to perform network adjustment more efficiently.
[0005] This invention provides a network adjustment method, comprising:
[0006] Obtain network performance information for each routing port at the current moment; wherein, the network performance information includes priority flow control message information of the routing port;
[0007] The network performance information of each routing port is input into the network congestion assessment model, and the first real-time network congestion level information of each routing port is output.
[0008] Based on the first real-time network congestion information of each of the routing ports, network weight information of each of the routing ports is calculated, so as to allocate and adjust the port traffic of each routing port according to the network weight information.
[0009] According to a network adjustment method provided by the present invention, after the step of calculating network weight information of each routing port based on the first real-time network congestion information of each routing port, and adjusting the port traffic of each routing port according to the network weight information, the method further includes:
[0010] The reset period is determined based on the first real-time network congestion level target information; wherein, the first real-time network congestion level target information is the maximum value among all the first real-time network congestion level information.
[0011] After allocating and adjusting the port traffic of each routing port, and after the reset cycle, the network weight information of each routing port is reset and initialized.
[0012] Based on the network performance information of each routing port at the current moment, recalculate the second real-time network congestion information of each routing port;
[0013] Based on the second real-time network congestion information, the network weight information of each routing port is recalculated, so as to adjust the port traffic of each routing port according to the recalculated network weight information.
[0014] According to a network adjustment method provided by the present invention, after the step of recalculating the second real-time network congestion level information of each routing port based on the network performance information of each routing port at the current time, the method further includes: lengthening the reset period when the first real-time network congestion level target information is less than the second real-time network congestion level target information;
[0015] If the first real-time network congestion target information is equal to the second real-time network congestion target information, the reset period is maintained;
[0016] If the first real-time network congestion target information is greater than the second real-time network congestion target information, the reset cycle is shortened.
[0017] According to a network adjustment method provided by the present invention, the step of inputting the network performance information of each routing port into a network congestion assessment model and outputting the first real-time network congestion level information of each routing port includes:
[0018] The network performance information of each routing port is transmitted from the input layer of the network congestion assessment model to the hidden layer of the network congestion assessment model, and the hidden layer feature vector is output. The network performance information also includes: routing port traffic rate information, routing port latency information, routing port bandwidth utilization, routing port error rate, routing port packet loss rate, and routing port connection count.
[0019] The hidden layer feature vector is input into the output layer of the network congestion assessment model to output the first real-time network congestion level information of each routing port.
[0020] According to a network adjustment method provided by the present invention, before the step of inputting the network performance information of each routing port into a network congestion assessment model and outputting the first real-time network congestion level information of each routing port, the method further includes:
[0021] Obtain multiple sets of network performance information samples, and the network congestion level label corresponding to each set of network performance information samples;
[0022] Each group of network performance information samples and the corresponding network congestion level label are used as a training sample to obtain multiple training samples.
[0023] For any training sample, the training sample is input into a preset neural network model, and the network congestion information corresponding to the training sample is output.
[0024] Using a preset loss function, the loss value is calculated based on the network congestion information corresponding to the training sample and the network congestion label in the training sample;
[0025] If the loss value is less than a preset threshold, the training of the preset neural network model is completed, and the network performance information is input into the network congestion assessment model.
[0026] According to a network adjustment method provided by the present invention, the method for calculating the network weight information of the routing port specifically includes:
[0027] Obtain the first real-time network congestion margin for each routing port; wherein the first real-time network congestion margin is determined based on the first real-time network congestion level of each routing port;
[0028] The network weight information of each routing port is determined based on the ratio of the first real-time network congestion margin of each routing port to the sum of the first real-time network congestion margins of all routing ports.
[0029] According to a network adjustment method provided by the present invention, the port traffic of each routing port is allocated and adjusted according to the network weight information, including:
[0030] Based on the network weight information of each routing port, determine the traffic allocation ratio of each routing port;
[0031] Based on the traffic allocation ratio of each routing port, the port traffic of each routing port is allocated and adjusted.
[0032] The present invention also provides a network adjustment device, comprising:
[0033] The acquisition module is used to acquire network performance information of each routing port at the current moment; wherein, the network performance information includes priority flow control message information.
[0034] The input module is used to input the network performance information of each routing port into the network congestion assessment model and output the first real-time network congestion level information of each routing port.
[0035] The adjustment module is used to calculate the network weight information of each of the routing ports based on the first real-time network congestion information of each of the routing ports, so as to adjust the port traffic of each routing port according to the network weight information.
[0036] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement any of the network adjustment methods described above.
[0037] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the network adjustment method as described above.
[0038] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements any of the network adjustment methods described above.
[0039] The network adjustment method, apparatus, electronic device, and storage medium provided by this invention effectively predict real-time network congestion levels by inputting priority flow control message information that can effectively reflect the severe congestion faced by certain links or nodes in the network, along with other network performance information, into a pre-trained network congestion assessment model. This allows for the calculation of network weights for each port based on the congestion level information. Ports with higher weights will handle more traffic, while ports with lower weights will handle less traffic. In this way, the network can dynamically adjust traffic allocation to avoid congestion and optimize network performance. Attached Figure Description
[0040] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0041] Figure 1 This is a schematic diagram of the network adjustment method provided by the present invention;
[0042] Figure 2 This is a schematic diagram of the network adjustment device structure provided in an embodiment of this application;
[0043] Figure 3 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0044] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0045] Figure 1 This is a schematic diagram of the network adjustment method provided by the present invention, such as... Figure 1 As shown, the method includes:
[0046] Step 110: Obtain the network performance information of each routing port at the current moment; wherein, the network performance information includes the priority flow control message information of the routing port;
[0047] In this embodiment of the application, the system collects network performance information from each routing port of a network device (such as a router or switch) in a multi-routing environment.
[0048] Priority Flow Control Messages (PFC) are a flow control mechanism used in data center networks. They prevent network congestion by pausing traffic of a specific priority. The priority flow control message information described in this embodiment can refer to the number of priority flow control messages or the number of times the messages are transmitted.
[0049] In an optional embodiment, the network performance information may further include: routing port traffic rate information, routing port latency information, routing port bandwidth utilization, routing port error rate, routing port packet loss rate, and routing port connection count.
[0050] Routing port traffic rate information specifically refers to the amount of data passing through a network node or link per unit of time. It is one of the basic indicators for measuring network load. By monitoring the traffic rate, we can understand the current network load and identify potential congestion points. Congestion may occur when the traffic rate approaches or exceeds the maximum processing capacity of network devices.
[0051] Routing port latency specifically refers to the time it takes for a data packet to travel from the source node to the destination node. High latency is often a direct indicator of network congestion because delays increase significantly when data packets in the network are queued for processing. By monitoring network latency, bottlenecks in the network can be identified, and measures can be taken to alleviate congestion.
[0052] Router port bandwidth utilization refers to the proportion of bandwidth actually used relative to the total available bandwidth. High bandwidth utilization indicates that network resources are nearing saturation, which can easily lead to congestion. Monitoring bandwidth utilization can help network administrators adjust network resource allocation in a timely manner to prevent congestion.
[0053] Routing port error rate refers to the proportion of data packets that encounter errors during network transmission. A high error rate may lead to packet retransmission, increasing network load and exacerbating congestion. By monitoring the error rate, faults in network devices or links can be identified and repaired promptly, ensuring the reliability of data transmission.
[0054] Packet loss rate at a routing port refers to the proportion of data packets lost during network transmission. Packet loss is often a significant indicator of network congestion because network devices drop some packets when they cannot handle a large volume of data packets. By monitoring the packet loss rate, the health of the network can be assessed, and measures can be taken to reduce packet loss and optimize network performance.
[0055] Router port connection count refers to the number of connections that exist simultaneously in a network. A large number of connections can lead to contention for network resources, causing congestion. By monitoring the connection count, high-load areas in the network can be identified, and appropriate resource management and load balancing can be implemented to prevent network congestion.
[0056] Step 120: Input the network performance information of each routing port into the network congestion assessment model, and output the first real-time network congestion level information of each routing port;
[0057] In this application embodiment, the network congestion assessment model can specifically be a model used to analyze input network performance information and assess the degree of network congestion accordingly.
[0058] In this embodiment of the application, inputting network performance information into the network congestion assessment model will output the first real-time network congestion level information of the corresponding routing port.
[0059] In the embodiments of this application, the first real-time network congestion information is used to characterize the real-time network congestion information of each routing port. This is usually a quantitative indicator, such as congestion level or congestion score.
[0060] Congestion levels: for example, low, medium, and high congestion levels.
[0061] Congestion score: A specific numerical value that indicates the severity of congestion.
[0062] In an optional embodiment, the real-time network congestion information metric ranges from [0.0, 1.0], where:
[0063] "C=0" indicates that there is no network congestion, meaning the network is in a completely uncongested state.
[0064] "C=1.0" indicates the most severe network congestion, meaning the network is experiencing the greatest degree of blockage or performance degradation.
[0065] Step 130: Based on the first real-time network congestion information of each of the routing ports, calculate the network weight information of each of the routing ports, so as to allocate and adjust the port traffic of each routing port according to the network weight information.
[0066] In this embodiment, network weight information is a relative metric that represents the priority or importance of each routing port in traffic allocation decisions. Ports with higher congestion levels may have their weight reduced to decrease traffic passing through them.
[0067] In this embodiment of the application, weight calculation is used to determine the congestion level of each route. Dynamically adjust route weights To optimize network traffic distribution
[0068] The method for calculating the network weight information of the routing port specifically includes:
[0069] Obtain the first real-time network congestion margin for each routing port; wherein the first real-time network congestion margin is determined based on the first real-time network congestion level of each routing port;
[0070] The network weight information of each routing port is determined based on the ratio of the first real-time network congestion margin of each routing port to the sum of the first real-time network congestion margins of all routing ports.
[0071] More specifically, it may include:
[0072] ;
[0073] in, For the first Network weight information for each routing port For the first Real-time network congestion information for each routing port. This represents the margin for the first real-time network congestion level. For all Real-time network congestion information for all routing ports j. This is the sum of the initial real-time network congestion margins for each routing port.
[0074] In this embodiment, after calculating the network weights, traffic allocation can be further adjusted based on these weights, prioritizing routing paths with higher weights. Ports with lower weights are subject to traffic limiting or delay. Traffic is balanced across multiple ports to maximize network resource utilization.
[0075] In this embodiment, priority flow control messages that effectively reflect severe congestion faced by certain links or nodes in the network, along with other network performance information, are input into a pre-trained network congestion assessment model. This model effectively predicts real-time network congestion levels that reflect the congestion status of each routing port. Then, based on the congestion level information, the network weight of each port is calculated. Ports with higher weights will handle more traffic, while ports with lower weights will handle less traffic. In this way, the network can dynamically adjust traffic allocation to avoid congestion and optimize network performance.
[0076] Optionally, after the step of calculating network weight information for each routing port based on the first real-time network congestion information of each routing port, and adjusting the port traffic allocation of each routing port according to the network weight information, the method further includes:
[0077] The reset period is determined based on the first real-time network congestion level target information; wherein, the first real-time network congestion level target information is the maximum value among all the first real-time network congestion level information.
[0078] After allocating and adjusting the port traffic of each routing port, and after the reset cycle, the network weight information of each routing port is reset and initialized.
[0079] Based on the network performance information of each routing port at the current moment, recalculate the second real-time network congestion information of each routing port;
[0080] Based on the second real-time network congestion information, the network weight information of each routing port is recalculated, so as to adjust the port traffic of each routing port according to the recalculated network weight information.
[0081] In this embodiment, the reset period is determined to periodically reset the network weight information in order to avoid inaccurate allocation caused by the long-term accumulation of weight information.
[0082] In an optional embodiment, the reset period is determined based on the magnitude of the first real-time network congestion target information. The larger the first real-time network congestion target information, the longer the reset period; conversely, the smaller the first real-time network congestion target information, the shorter the reset period.
[0083] For example, the first real-time network congestion level target information is mild congestion (0.1 to 0.3): the reset cycle time is set to 20 seconds.
[0084] The first real-time network congestion level target information is moderate congestion (0.3 to 0.7): the reset cycle time is set to 40 seconds.
[0085] The first real-time network congestion level target information is severe congestion (0.7 to 1.0): the reset cycle time is set to 80 seconds.
[0086] After allocating and adjusting the port traffic of each routing port, the network weight information of each routing port is reset and initialized after the reset cycle.
[0087] The purpose of reset initialization is to reassess the weight of each routing port based on the latest network conditions at the start of a new cycle, thereby maintaining the flexibility and accuracy of network management policies.
[0088] Based on the network performance information of each routing port at the current moment, the second real-time network congestion information of each routing port is recalculated.
[0089] This step ensures that the network weight information is updated based on the latest network conditions, including bandwidth usage, latency, packet loss rate, etc.
[0090] Based on the recalculated second real-time network congestion information, the network weight information of each routing port is recalculated.
[0091] This step allows the network management system to adjust the weight of each routing port based on the latest congestion information, thereby enabling more efficient traffic allocation. By recalculating the network weights, the port traffic for each routing port is redistributed and adjusted.
[0092] In this embodiment of the application, the reset initialization loop process ensures that network traffic allocation is always matched with the current network conditions, further optimizing network performance and resource utilization.
[0093] Optionally, after the step of recalculating the second real-time network congestion level information of each routing port based on the network performance information of each routing port at the current time, the method further includes: lengthening the reset period if the first real-time network congestion level target information is less than the second real-time network congestion level target information;
[0094] If the first real-time network congestion target information is equal to the second real-time network congestion target information, the reset period is maintained;
[0095] If the first real-time network congestion target information is greater than the second real-time network congestion target information, the reset cycle is shortened.
[0096] In this embodiment of the application, the first real-time network congestion target information is the maximum congestion level at the beginning of the previous reset period, while the second real-time network congestion target information is the maximum congestion level after recalculation in the current period.
[0097] In this embodiment of the application, after recalculating the second real-time network congestion information of each routing port, the first real-time network congestion target information and the second real-time network congestion target information are compared to determine whether the current network congestion situation has been resolved or has further deteriorated.
[0098] If the first real-time network congestion target information is less than the second real-time network congestion target information, then the reset period is extended.
[0099] This is because the second real-time network congestion level target information is higher, indicating that the network congestion situation is worsening, and a longer period of observation and adjustment is needed to avoid frequent weight resets that could lead to network policy instability.
[0100] If the first real-time network congestion target information is equal to the second real-time network congestion target information, then the reset cycle is maintained.
[0101] The network congestion situation has not changed significantly, and the current reset cycle is likely sufficient to handle the network conditions, so no adjustment is needed.
[0102] If the first real-time network congestion target information is greater than the second real-time network congestion target information, then the reset cycle is shortened.
[0103] The second real-time network congestion target information decreases, indicating that the network condition has improved. It may be necessary to update the weight information more frequently in order to respond more quickly to the improvement in network condition.
[0104] In this embodiment, by comparing congestion level target information at different periods, the reset period can be adaptively adjusted according to changes in network conditions, enhancing the flexibility of network management strategies. Lengthening the reset period when congestion worsens can prevent network management strategies from overreacting to short-term fluctuations, maintaining network operational stability. Shortening the reset period when congestion improves allows network management strategies to adapt more quickly to improved network conditions, thus improving network performance.
[0105] Optionally, the step of inputting the network performance information of each routing port into the network congestion assessment model and outputting the first real-time network congestion level information of each routing port includes:
[0106] The network performance information of each routing port is transmitted from the input layer of the network congestion assessment model to the hidden layer of the network congestion assessment model, and the hidden layer feature vector is output. The network performance information also includes: routing port traffic rate information, routing port latency information, routing port bandwidth utilization, routing port error rate, routing port packet loss rate, and routing port connection count.
[0107] The hidden layer feature vector is input into the output layer of the network congestion assessment model to output the first real-time network congestion level information of each routing port.
[0108] In this embodiment of the application, the network structure of the network congestion assessment model may specifically include: an input layer, a hidden layer, and an output layer.
[0109] In this embodiment, the collected network performance information is input into the input layer of the network congestion assessment model. The function of the input layer is to pass the raw network performance information to the hidden layer of the model.
[0110] Network performance information is processed in the hidden layers, which typically contain multiple neurons. Each neuron performs a weighted summation of the input information and generates a feature vector through an activation function. These hidden layer feature vectors are abstract representations of the input information, capturing key features of the network performance data for subsequent congestion assessment.
[0111] The feature vectors generated by the hidden layer are input into the output layer of the network congestion assessment model. The output layer calculates and outputs the first real-time network congestion level information for each routing port based on the feature vectors from the hidden layer. The output layer may use activation functions such as linear functions or softmax functions to generate the final congestion level assessment results.
[0112] For example, a feedforward neural network is used to predict the congestion level of the network. Assuming the network has two hidden layers, each containing several neurons, and finally outputs the predicted congestion level through a sigmoid activation function, the structure is as follows:
[0113] Input layer It contains 7 input features, namely: =PFC message; =Flow rate; =Delay; =Bandwidth utilization; =Error rate; = Packet loss rate; =Number of connections.
[0114] Hidden layer 1: Assume there is One neuron.
[0115] enter After being compared with the weight matrix and bias Linear combination:
[0116] ;
[0117] yes The weight matrix (representing the connection weights between each neuron in hidden layer 1 and the input features). This is the result of a linear combination.
[0118] yes The bias vector (provides a bias value for each neuron in hidden layer 1).
[0119] Then through the activation function To perform a nonlinear transformation, assuming the ReLU activation function is used:
[0120] ;
[0121] in It is the output of hidden layer 1;
[0122] Hidden layer 2: Assuming there is One neuron;
[0123] Output of hidden layer 1 As input to hidden layer 2, it is processed by the weight matrix. and bias Linear combination:
[0124] ;
[0125] yes The weight matrix, This is the result of a linear combination;
[0126] yes The bias vector.
[0127] Similarly, using activation functions The output of hidden layer 2 is then subjected to a non-linear transformation, and the ReLU activation function is continued:
[0128]
[0129] in It is the output of hidden layer 2.
[0130] Output layer: 1 output neuron, output value ;
[0131] Output of hidden layer 2 As the input to the output layer, it is processed by the weight matrix. and bias Linear combination:
[0132] ;
[0133] yes The weight matrix (because the output layer has only one neuron, the output congestion level) ), This is the result of a linear combination.
[0134] It is the bias vector of the output layer;
[0135] The output layer uses the Sigmoid activation function to ensure that the output is within the range [0.0, 1.0], which conforms to the definition of congestion level.
[0136] ;
[0137] in It is a predicted value for network congestion.
[0138] In this embodiment, by combining multiple network performance metrics, the model can comprehensively evaluate the congestion status of routing ports. The use of hidden layers allows the model to capture non-linear relationships in the input data, improving the accuracy of the evaluation.
[0139] Optionally, before the step of inputting the network performance information of each routing port into the network congestion assessment model and outputting the first real-time network congestion level information of each routing port, the method further includes:
[0140] Obtain multiple sets of network performance information samples, and the network congestion level label corresponding to each set of network performance information samples;
[0141] Each group of network performance information samples and the corresponding network congestion level label are used as a training sample to obtain multiple training samples.
[0142] For any training sample, the training sample is input into a preset neural network model, and the network congestion information corresponding to the training sample is output.
[0143] Using a preset loss function, the loss value is calculated based on the network congestion information corresponding to the training sample and the network congestion label in the training sample;
[0144] If the loss value is less than a preset threshold, the training of the preset neural network model is completed, and the network performance information is input into the network congestion assessment model.
[0145] In this embodiment, multiple sets of network performance information samples are obtained, covering different network conditions, including various levels of congestion. Network congestion level labels corresponding to each set of network performance information samples are collected; these labels are typically expert-annotated or obtained through other reliable methods to determine the actual congestion level.
[0146] Each network performance information sample is paired with its corresponding network congestion level label to form a training sample. This process is repeated to obtain multiple training samples, thus constructing a training dataset.
[0147] In this embodiment, any training sample is input into a preset neural network model. The neural network model processes the input according to the current weights and structure, and outputs the network congestion information corresponding to the training sample.
[0148] In this embodiment, a preset loss function (such as mean squared error, cross-entropy loss, etc.) is used to calculate the difference between the network congestion information output by the model and the actual label, i.e., the loss value. The loss value reflects the accuracy of the model's prediction; the smaller the loss value, the closer the model's prediction is to the real situation.
[0149] Based on the loss value, optimization algorithms (such as gradient descent, Adam, etc.) are used to adjust the weights and biases of the neural network model to reduce the loss value. This process is repeated many times, with each iteration making the model's predictions closer to the true labels.
[0150] If the loss value is less than a preset threshold, the model is considered to have achieved sufficient training results. After training is complete, the trained neural network model is deployed as a network congestion assessment model for real-time monitoring and evaluation of network congestion levels.
[0151] In the embodiments of this application, the trained model can process network performance information in real time and quickly and accurately assess the degree of network congestion.
[0152] Optionally, the port traffic of each routing port is allocated and adjusted according to the network weight information, including:
[0153] Based on the network weight information of each routing port, determine the traffic allocation ratio of each routing port;
[0154] Based on the traffic allocation ratio of each routing port, the port traffic of each routing port is allocated and adjusted.
[0155] In this embodiment, the traffic allocation ratio of each routing port is calculated based on the network weight information of each routing port. The network weight information typically reflects the relative performance and congestion status of each routing port.
[0156] Alternatively, the traffic allocation ratio can be calculated using various methods, such as directly using network weight as the allocation ratio, or using a certain weight normalization method to ensure that the sum of the allocation ratios of all routing ports equals 1.
[0157] For example, the network weight information for routes 1, 2, 3, and 4 is calculated from the weight instances: , , , .
[0158] These weight values reflect the congestion level and corresponding load capacity of each route. Routes with lower congestion levels... (weight) More traffic is allocated to routes with higher congestion levels. (weight) If the traffic is less, then less traffic will be allocated.
[0159] Specifically, the multi-path routing algorithm will adjust the traffic distribution ratio of each route according to these weight values: Route 1 will receive approximately 26.7% of the total traffic; Route 2 will receive approximately 23.3% of the total traffic; Route 3 will receive approximately 30.0% of the total traffic; and Route 4 will receive approximately 20.0% of the total traffic.
[0160] Finally, based on the calculated traffic allocation ratio, the port traffic of each routing port is allocated and adjusted.
[0161] In this embodiment, traffic allocation can be dynamically adjusted according to changes in network conditions, improving the flexibility and adaptability of network management strategies. By allocating traffic proportions, load balancing can be achieved among multiple routing ports, extending the lifespan of network devices.
[0162] In an optional embodiment, firstly, network performance information of each routing port at the current moment is obtained, including but not limited to priority flow control information and priority flow control message information of the routing port. Next, this network performance information is input into a pre-trained network congestion assessment model, which outputs the first real-time network congestion level information for each routing port.
[0163] Based on this real-time network congestion information, the network weight information of each routing port is calculated. The network weight information is used to represent the performance and congestion status of each routing port relative to other ports, thereby adjusting the port traffic allocation of each routing port according to this weight information to achieve a more reasonable traffic distribution.
[0164] After traffic allocation adjustments are completed, a reset period is determined based on the first real-time network congestion target information. The first real-time network congestion target information is the maximum value among all first real-time network congestion level information. After the reset period ends, the network weight information of each routing port is reset and initialized to facilitate evaluation and adjustment in the next period.
[0165] Next, based on the current network performance information, the second real-time network congestion level information for each routing port is recalculated. Then, based on this second real-time network congestion level information, the network weight information for each routing port is recalculated, and the port traffic is redistributed and adjusted accordingly.
[0166] Finally, the first real-time network congestion target information is compared with the second real-time network congestion target information. If the first real-time network congestion target information is less than the second real-time network congestion target information, the reset cycle is lengthened; if the first real-time network congestion target information is equal to the second real-time network congestion target information, the reset cycle remains unchanged; if the first real-time network congestion target information is greater than the second real-time network congestion target information, the reset cycle is shortened. In this way, the method can dynamically adjust the management strategy according to changes in network conditions to maintain the efficient and stable operation of the network.
[0167] The network adjustment device provided by the present invention is described below. The network adjustment device described below and the network adjustment method described above can be referred to in correspondence.
[0168] Figure 2 This is a schematic diagram of the network adjustment device structure provided in the embodiments of this application, such as... Figure 2 As shown, it includes:
[0169] The acquisition module 210 is used to acquire network performance information of each routing port at the current time; wherein, the network performance information includes priority flow control message information.
[0170] The input module 220 is used to input the network performance information of each routing port into the network congestion assessment model and output the first real-time network congestion level information of each routing port.
[0171] The adjustment module 230 is used to calculate the network weight information of each of the routing ports based on the first real-time network congestion information of each of the routing ports, so as to adjust the port traffic of each routing port according to the network weight information.
[0172] Optionally, the device is further used for:
[0173] The reset period is determined based on the first real-time network congestion level target information; wherein, the first real-time network congestion level target information is the maximum value among all the first real-time network congestion level information.
[0174] After allocating and adjusting the port traffic of each routing port, and after the reset cycle, the network weight information of each routing port is reset and initialized.
[0175] Based on the network performance information of each routing port at the current moment, recalculate the second real-time network congestion information of each routing port;
[0176] Based on the second real-time network congestion information, the network weight information of each routing port is recalculated, so as to adjust the port traffic of each routing port according to the recalculated network weight information;
[0177] The reset period is adjusted according to the relationship between the first real-time network congestion target information and the second real-time network congestion target information; wherein, the second real-time network congestion target information is the maximum value among all the second real-time network congestion target information.
[0178] Optionally, the device is further used for:
[0179] If the first real-time network congestion target information is less than the second real-time network congestion target information, the reset period is extended; wherein, the second real-time network congestion target information is the maximum value among all the second real-time network congestion target information.
[0180] If the first real-time network congestion target information is equal to the second real-time network congestion target information, the reset period is maintained;
[0181] If the first real-time network congestion target information is greater than the second real-time network congestion target information, the reset cycle is shortened.
[0182] Optionally, the device is further used for:
[0183] The network performance information of each routing port is transmitted from the input layer of the network congestion assessment model to the hidden layer of the network congestion assessment model, and the hidden layer feature vector is output. The network performance information also includes: routing port traffic rate information, routing port latency information, routing port bandwidth utilization, routing port error rate, routing port packet loss rate, and routing port connection count.
[0184] The hidden layer feature vector is input into the output layer of the network congestion assessment model to output the first real-time network congestion level information of each routing port.
[0185] Optionally, the device is further used for:
[0186] Obtain multiple sets of network performance information samples, and the network congestion level label corresponding to each set of network performance information samples;
[0187] Each group of network performance information samples and the corresponding network congestion level label are used as a training sample to obtain multiple training samples.
[0188] For any training sample, the training sample is input into a preset neural network model, and the network congestion information corresponding to the training sample is output.
[0189] Using a preset loss function, the loss value is calculated based on the network congestion information corresponding to the training sample and the network congestion label in the training sample;
[0190] If the loss value is less than a preset threshold, the training of the preset neural network model is completed, and the network performance information is input into the network congestion assessment model.
[0191] Optionally, the device is further used for:
[0192] Based on the network weight information of each routing port, determine the traffic allocation ratio of each routing port;
[0193] Based on the traffic allocation ratio of each routing port, the port traffic of each routing port is allocated and adjusted.
[0194] In this embodiment, priority flow control messages that effectively reflect severe congestion faced by certain links or nodes in the network, along with other network performance information, are input into a pre-trained network congestion assessment model. This model effectively predicts real-time network congestion levels that reflect the congestion status of each routing port. Then, based on the congestion level information, the network weight of each port is calculated. Ports with higher weights will handle more traffic, while ports with lower weights will handle less traffic. In this way, the network can dynamically adjust traffic allocation to avoid congestion and optimize network performance.
[0195] Figure 3 This is a schematic diagram of the structure of the electronic device provided by the present invention, such as... Figure 3 As shown, the electronic device may include a processor 310, a communications interface 320, a memory 330, and a communication bus 340, wherein the processor 310, the communications interface 320, and the memory 330 communicate with each other via the communication bus 340. The processor 310 can call logical instructions in the memory 330 to execute a network adjustment method, which includes: acquiring network performance information of each routing port at the current time; wherein the network performance information includes priority flow control message information of the routing ports.
[0196] The network performance information of each routing port is input into the network congestion assessment model, and the first real-time network congestion level information of each routing port is output.
[0197] Based on the first real-time network congestion information of each of the routing ports, network weight information of each of the routing ports is calculated, so as to allocate and adjust the port traffic of each routing port according to the network weight information.
[0198] Furthermore, the logical instructions in the aforementioned memory 330 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0199] On the other hand, the present invention also provides a computer program product, the computer program product including a computer program, the computer program being able to be stored on a non-transitory computer-readable storage medium, the computer program being executed by a processor, the computer being able to execute the network adjustment method provided by the above methods, the method including: obtaining network performance information of each routing port at the current time; wherein, the network performance information includes priority flow control message information of the routing port;
[0200] The network performance information of each routing port is input into the network congestion assessment model, and the first real-time network congestion level information of each routing port is output.
[0201] Based on the first real-time network congestion information of each of the routing ports, network weight information of each of the routing ports is calculated, so as to allocate and adjust the port traffic of each routing port according to the network weight information.
[0202] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the network adjustment methods provided by the above methods, the method comprising: obtaining network performance information of each routing port at the current moment; wherein the network performance information includes priority flow control message information of the routing port;
[0203] The network performance information of each routing port is input into the network congestion assessment model, and the first real-time network congestion level information of each routing port is output.
[0204] Based on the first real-time network congestion information of each of the routing ports, network weight information of each of the routing ports is calculated, so as to allocate and adjust the port traffic of each routing port according to the network weight information.
[0205] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0206] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0207] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A network adjustment method, characterized in that, include: Obtain network performance information for each routing port at the current moment; wherein, the network performance information includes priority flow control message information of the routing port; The network performance information of each routing port is input into the network congestion assessment model, and the first real-time network congestion level information of each routing port is output. Based on the first real-time network congestion information of each of the routing ports, network weight information of each of the routing ports is calculated, so as to allocate and adjust the port traffic of each routing port according to the network weight information; The method further includes, after the step of calculating network weight information for each routing port based on the first real-time network congestion information of each routing port, and adjusting the port traffic allocation of each routing port according to the network weight information: The reset period is determined based on the first real-time network congestion level target information; wherein, the first real-time network congestion level target information is the maximum value among all the first real-time network congestion level information. After allocating and adjusting the port traffic of each routing port, and after the reset cycle, the network weight information of each routing port is reset and initialized. Based on the network performance information of each routing port at the current moment, recalculate the second real-time network congestion information of each routing port; Based on the second real-time network congestion information, the network weight information of each routing port is recalculated, so as to adjust the port traffic of each routing port according to the recalculated network weight information; The method further includes, after the step of recalculating the second real-time network congestion information of each routing port based on the network performance information of each routing port at the current moment: If the first real-time network congestion target information is less than the second real-time network congestion target information, the reset period shall be lengthened. If the first real-time network congestion target information is equal to the second real-time network congestion target information, the reset period is maintained; If the first real-time network congestion target information is greater than the second real-time network congestion target information, the reset cycle is shortened.
2. The network adjustment method according to claim 1, characterized in that, The step of inputting the network performance information of each routing port into the network congestion assessment model and outputting the first real-time network congestion level information of each routing port includes: The network performance information of each routing port is transmitted from the input layer of the network congestion assessment model to the hidden layer of the network congestion assessment model, and the hidden layer feature vector is output. The network performance information also includes: routing port traffic rate information, routing port latency information, routing port bandwidth utilization, routing port error rate, routing port packet loss rate, and routing port connection count. The hidden layer feature vector is input into the output layer of the network congestion assessment model to output the first real-time network congestion level information of each routing port.
3. The network adjustment method according to claim 1, characterized in that, Before the step of inputting the network performance information of each routing port into the network congestion assessment model and outputting the first real-time network congestion level information of each routing port, the method further includes: Obtain multiple sets of network performance information samples, and the network congestion level label corresponding to each set of network performance information samples; Each group of network performance information samples and the corresponding network congestion level label are used as a training sample to obtain multiple training samples. For any training sample, the training sample is input into a preset neural network model, and the network congestion information corresponding to the training sample is output. Using a preset loss function, the loss value is calculated based on the network congestion information corresponding to the training sample and the network congestion label in the training sample; If the loss value is less than a preset threshold, the training of the preset neural network model is completed, and the network performance information is input into the network congestion assessment model.
4. The network adjustment method according to claim 1, characterized in that, The method for calculating the network weight information of the routing port specifically includes: Obtain the first real-time network congestion margin for each routing port; wherein the first real-time network congestion margin is determined based on the first real-time network congestion level of each routing port; The network weight information of each routing port is determined based on the ratio of the first real-time network congestion margin of each routing port to the sum of the first real-time network congestion margins of all routing ports.
5. The network adjustment method according to claim 1, characterized in that, The port traffic of each routing port is allocated and adjusted according to the network weight information, including: Based on the network weight information of each routing port, determine the traffic allocation ratio of each routing port; Based on the traffic allocation ratio of each routing port, the port traffic of each routing port is allocated and adjusted.
6. A network adjustment device, characterized in that, include: The acquisition module is used to acquire network performance information of each routing port at the current moment; wherein, the network performance information includes priority flow control message information. The input module is used to input the network performance information of each routing port into the network congestion assessment model and output the first real-time network congestion level information of each routing port. The adjustment module is used to calculate the network weight information of each of the routing ports based on the first real-time network congestion information of each of the routing ports, so as to adjust the port traffic of each routing port according to the network weight information. The device is also used for: The reset period is determined based on the first real-time network congestion level target information; wherein, the first real-time network congestion level target information is the maximum value among all the first real-time network congestion level information. After allocating and adjusting the port traffic of each routing port, and after the reset cycle, the network weight information of each routing port is reset and initialized. Based on the network performance information of each routing port at the current moment, recalculate the second real-time network congestion information of each routing port; Based on the second real-time network congestion information, the network weight information of each routing port is recalculated, so as to adjust the port traffic of each routing port according to the recalculated network weight information; If the first real-time network congestion target information is less than the second real-time network congestion target information, the reset period shall be lengthened. If the first real-time network congestion target information is equal to the second real-time network congestion target information, the reset period is maintained; If the first real-time network congestion target information is greater than the second real-time network congestion target information, the reset cycle is shortened.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the network adjustment method as described in any one of claims 1 to 5.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the network adjustment method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Congestion control method, device and system
CN110784417A
Data flow control method, network switching subsystem and intelligent computing platform
CN117938755A