Load balancing method and system, electronic equipment and medium

By marking ECNs at intermediate nodes and aggregating the number of ECN marks, the sending node generates a load balancing strategy, which solves the problem that traditional load balancing cannot perceive the global network status, realizes global optimization and dynamic path selection, and improves network performance.

CN120980028APending Publication Date: 2025-11-18CLOUDNINE INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511300594.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-11
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

Traditional load balancing methods cannot detect the network status after traffic data leaves the local node, which makes it impossible to optimize the overall network performance and meet the dynamic coordination needs in complex network environments.

Method used

By marking and counting ECNs at intermediate nodes, and summarizing the number of ECN marks and traffic data at sending nodes, a load balancing strategy is generated to dynamically allocate traffic to the optimal path throughout the entire process, thus achieving global decision-making.

Benefits of technology

It improved network throughput and transmission stability, enhanced adaptability and rapid response to dynamic network changes, and optimized the transmission efficiency of traffic data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120980028A_ABST
    Figure CN120980028A_ABST
Patent Text Reader

Abstract

The invention provides a load balancing method and system, electronic equipment and a medium. The method comprises the following steps: sending traffic data to each intermediate node, so that each intermediate node performs ECN marking on the traffic data based on the congestion state of an exit link from the respective node to a receiving node, counts the number of ECN marks, and forwards the traffic data to the receiving node; generating a load balancing strategy for each intermediate node based on the summarized ECN mark number counted by each intermediate node and statistical data of the flow data sent to each intermediate node; and based on a load balancing strategy, distributing flow data of an exit link from the node to each intermediate node. According to the method disclosed by the invention, the downstream congestion link can be avoided when the sending link of the flow data is selected, so that the transmission stability of the flow data is integrally optimized, and the network throughput is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of flow control, and in particular to a load balancing method and system, an electronic device, and a medium. BACKGROUND

[0002] In network traffic transmission services, some links may be overloaded while other available links may be in a low load state. This load imbalance wastes network bandwidth resources and may seriously affect the quality of service of critical services. To address this phenomenon, a dynamic load balancing mechanism is introduced into network devices. The dynamic load balancing mechanism can monitor the running state of each egress port of the network device in real time, dynamically distribute traffic data to different paths according to a preset strategy, thereby avoiding single-point congestion and optimizing resource utilization.

[0003] However, in the traditional load balancing mode, the load balancing decision of the network device only depends on the real-time state information of its local egress link. Although this decision can optimize the resource use of the egress link of the node to a certain extent, it cannot optimize the global network performance because it cannot perceive the network state after the traffic data leaves the node, and it is difficult to meet the dynamic coordination requirements in complex network environments. SUMMARY

[0004] Therefore, the present disclosure provides a load balancing method, system, electronic device, and medium to solve the problems in the related art.

[0005] According to a first aspect of an embodiment of the present application, a load balancing method is provided, which is used in a sending node in a communication network; the communication network further includes a receiving node and at least one intermediate node;

[0006] The method includes:

[0007] sending traffic data to each intermediate node, so that each intermediate node marks the traffic data with ECN based on the congestion state of the egress link of the respective node to the receiving node, counts the number of ECN marks, and forwards the traffic data to the receiving node;

[0008] based on the aggregated number of ECN marks counted by each intermediate node and the statistical data of the traffic data sent to each intermediate node, generating a load balancing strategy for each intermediate node;

[0009] based on the load balancing strategy, distributing the traffic data of the egress link from the node to each intermediate node.

[0010] According to a second aspect of the embodiments of the present application, another load balancing method is provided, which is used in an intermediate node in a communication network; the communication network comprises a sending node, a receiving node and at least one intermediate node;

[0011] The method comprises:

[0012] monitoring a congestion state of an egress link from the node to the receiving node;

[0013] receiving traffic data sent by the sending node, marking the traffic data with ECN based on the congestion state, counting the number of ECN marks, and forwarding the traffic data to the receiving node;

[0014] transmitting the counted number of ECN marks to the sending node, so that the sending node generates a load balancing strategy for each of the intermediate nodes based on the aggregated number of ECN marks counted by each of the intermediate nodes and the statistical data of the traffic data sent to each of the intermediate nodes, and allocates the traffic data of the egress link from the node to each of the intermediate nodes based on the load balancing strategy.

[0015] According to a third aspect of the embodiments of the present application, a load balancing system is provided, which comprises a sending node, a receiving node and at least one intermediate node;

[0016] The intermediate node is configured to monitor a congestion state of an egress link from the node to the receiving node;

[0017] The sending node is configured to send traffic data to each of the intermediate nodes;

[0018] The intermediate node is further configured to receive the traffic data sent by the sending node, mark the traffic data with ECN based on the congestion state, count the number of ECN marks, and forward the traffic data to the receiving node;

[0019] The sending node is further configured to generate a load balancing strategy for each of the intermediate nodes based on the aggregated number of ECN marks counted by each of the intermediate nodes and the statistical data of the traffic data sent to each of the intermediate nodes, and allocate the traffic data of the egress link from the node to each of the intermediate nodes based on the load balancing strategy.

[0020] According to a fourth aspect of the embodiments of the present application, an electronic device is provided, which comprises a processor and a machine readable storage medium, the machine readable storage medium stores machine executable instructions which can be executed by the processor, and the processor is prompted by the machine executable instructions to execute the method according to the first aspect or the second aspect.

[0021] According to a fifth aspect of the embodiments of the present application, a computer readable storage medium is provided, which stores a computer program. The program is executed by a processor to implement the steps of the method according to the first aspect or the second aspect.

[0022] The load balancing method of the present disclosure breaks through the original application mode of the ECN standard protocol for congestion control, and reconstructs it as a distributed network state awareness mechanism, thereby realizing a hierarchical information collection and global decision mechanism dominated by the sending node. Among them, each intermediate node performs ECN marking based on the congestion state of its local egress link, and independently counts the number of ECN markings; the sending node can obtain the real-time congestion condition of the egress link between each intermediate node and the receiving node by collecting the number of ECN markings from each intermediate node and the statistical data of the traffic data sent by itself to each intermediate node.

[0023] Since the real-time congestion condition carried by the ECN marking is used as a global network state awareness signal, the sending node generates a load balancing strategy accordingly, and then dynamically allocates traffic data to the egress links to each intermediate node, so that when selecting the sending link of the traffic data, the sending node can break through the limitation of local information, actively avoid the congested link downstream, and dynamically allocate the traffic to the optimal path, thereby optimizing the transmission stability of the traffic data as a whole and improving the network throughput. BRIEF DESCRIPTION OF DRAWINGS

[0024] Figure 1 is a flowchart of a load balancing method according to an example embodiment of the present application;

[0025] Figure 2 is a flowchart of generating a load balancing strategy for each intermediate node according to an example embodiment of the present application;

[0026] Figure 3 is a structural diagram of a communication network according to an example embodiment of the present application;

[0027] Figure 4 is a node interaction diagram of a communication network according to an example embodiment of the present application;

[0028] Figure 5 is a flowchart of another load balancing method according to an example embodiment of the present application;

[0029] Figure 6 is a structural diagram of a load balancing system according to an example embodiment of the present application;

[0030] Figure 7 is a structural diagram of an electronic device according to an example embodiment of the present application. DETAILED DESCRIPTION

[0031] The exemplary embodiments will be described in detail herein with reference to the attached drawings. In the following description, like reference numerals refer to like elements, unless the context clearly dictates otherwise. The following exemplary embodiments are described in enough detail to enable those having ordinary skill in the art to make and use the apparatus and methods in accordance with the application. The examples provided serve illustrative purposes only and should not be construed as limiting the scope of the present application, as defined by the appended claims and their equivalents.

[0032] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0033] It should be understood that although the terms first, second, third, etc. can be used herein to describe various information, but these information should not be limited to these terms. These terms are only used to distinguish one type of information from another type of information. For example, without departing from the scope of the present application, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information. Depending on the context, the word "if" as used herein can be interpreted as "when" or "upon" or "in response to determining".

[0034] In the current network architecture, servers, switches, routers and other devices undertake the important task of data forwarding. These devices are connected with each other through multiple physical or logical ports, and together constitute the transmission path of the traffic. In actual operation, network traffic often presents dynamic changes, strong burstiness and uneven distribution, which can easily lead to excessive load on some links, and further cause queue accumulation, increased transmission delay and even packet loss. While some links are overloaded, other available links may be in a light load state, resulting in low overall resource utilization. This load imbalance not only wastes network bandwidth resources, but also can have a serious impact on the quality of service of critical services.

[0035] In order to solve the above problems, a dynamic load balancing mechanism is introduced into the network device. This mechanism can monitor the running state of each local egress port of the network device in real time, and dynamically distribute traffic data to different paths according to a preset strategy, thereby avoiding single-point congestion, optimizing resource utilization, improving system throughput and reducing transmission delay.

[0036] However, in the traditional load balancing manner, the load balancing decision of the sending node only depends on the real-time state information of its local egress link, such as the queue depth, the instant throughput or the error rate of the port and other local indicators. Although this decision mechanism can optimize the resource use of the node to a certain extent, its core defect lies in the inability to perceive the network state after the traffic data leaves the node. Specifically, when the sending node allocates traffic to the downstream intermediate node, the traffic still needs to be forwarded to the final receiving node via the intermediate node. The sending node cannot perceive the congestion condition of the critical path between the intermediate node and the receiving node. Therefore, if the state of a certain egress link of the sending node is good, but the downstream intermediate node is facing a serious congestion of the egress link to the receiving node, the sending node will continue to send new traffic to the congested intermediate node, which not only cannot efficiently complete the transmission task, but also further aggravates the congestion degree of the downstream link, causing the deterioration of the network performance, leading to the increase of the data forwarding delay and the decrease of the throughput of the entire communication network.

[0037] Therefore, the traditional load balancing manner, although it can optimize the resource use of the egress link of the node to a certain extent, cannot optimize the global network performance due to its inability to perceive the network state after the traffic data leaves the node, and is difficult to meet the dynamic coordination demand in the complex network environment.

[0038] Figure 1 The method is an exemplary embodiment of the present application, which is a load balancing method, and the method is used in a sending node in a communication network; the communication network further includes a receiving node and at least one intermediate node;

[0039] In the communication network of the embodiments of the present application, the sending node can send traffic data and implement a load balancing strategy for managing its egress link. The receiving node is the destination of the traffic data, and receives the data packets forwarded by the intermediate node. The intermediate node is located on the transmission path between the sending node and the receiving node, undertakes the data packet forwarding task, and has the ability to perceive the congestion state of its own egress link to the receiving node, and can feed back the related information to the sending node.

[0040] Specifically referring to Figure 1 , the method includes the following steps:

[0041] S100: sending traffic data to each intermediate node, so that each intermediate node marks the traffic data based on the congestion state of its own egress link to the receiving node, counts the number of ECN marks, and forwards the traffic data to the receiving node.

[0042] ECN (Explicit Congestion Notification) refers to the way of notifying the congestion condition to the communication endpoint by marking the traffic data with ECN.

[0043] The sending node sends the traffic data to a plurality of intermediate nodes. Each intermediate node, upon receiving the traffic data, monitors the congestion state of its own egress link to the receiving node. If the link is congested, the intermediate node marks the traffic data with ECN, and then sends the marked traffic data to the receiving node to complete the traffic forwarding task. While marking the traffic data with ECN, the intermediate node continuously counts the number of ECN marks, i.e., the number of times of marking the traffic data with ECN.

[0044] For example, marking the traffic data with ECN can be implemented by a field in the IP header of the traffic data. The traffic data sent can be a data packet, and the IP header of the data packet is provided with an ECN field. The value of the ECN field can be set to 00, 01, 10, and 11. When the value is 00, it indicates that the data packet does not support ECN marking; when the value is 01 or 10, it indicates that the data packet supports ECN marking. After the sending node sends the data packet to the intermediate node, the intermediate node can change the value of the field from 01 or 10 to 11 based on the congestion state of its own egress link to the receiving node, i.e., mark the data packet with ECN. The receiving node, upon receiving the data packet, can determine whether the link between the intermediate node sending the data packet and the receiving node is in a congested state based on the value of the ECN field. It can be understood that the above description of the ECN field is only an example, and the present solution is not limited thereto.

[0045] In an embodiment, before step S100, the method of the present specification can further include a capability negotiation phase for the ECN function between the sending node and the receiving node. Specifically, in the TCP three-way handshake process of the transmission control protocol connection establishment, the sending node and the receiving node confirm the support for the ECN function by exchanging specific flag bits. First, the sending node sets the explicit congestion notification transmission (such as ECE=1) and the congestion window reduction flag (such as CWR=1) in the issued synchronization message segment SYN, indicating that it has the ECN processing capability. The server also sets these flag bits (ECE=1, CWR=1) in the reply synchronization acknowledgment message segment SYN-ACK to confirm the support for the ECN mechanism. If either party does not indicate support for ECN in the handshake process, the subsequent data transmission will not enable the function.

[0046] On the basis of completing the capability negotiation phase for the ECN function, the conventional congestion control mode is usually implemented by the following ECN mechanism:

[0047] The sender supporting ECN sets an explicit congestion notification capability indication in the IP header of the outgoing data packet to indicate that the data packet has the capability of being marked by network devices with ECN. When the data packet passes through an intermediate router, if the router detects that its forwarding queue is congested, instead of discarding the data packet, the router modifies the explicit congestion notification field in the IP header of the data packet, i.e., marks the data packet with ECN, to indicate that the data packet has experienced congestion on the transmission path. The data packet carrying the congestion experienced mark finally reaches the receiver. After detecting the mark, the receiver sets an explicit congestion notification has been transmitted flag in the acknowledgement packet returned by the receiver, to notify the sender that there is congestion in the network. After receiving the acknowledgement, the sender starts its congestion control algorithm, and takes measures such as halving the congestion window to alleviate the congestion in the network. Subsequently, the sender sets a congestion window has been reduced flag in the next outgoing data packet, to notify the receiver that the sender has performed the speed reduction operation, thereby completing a complete explicit congestion notification and control process. In the above process, the ECN mechanism does not allocate traffic to different paths, but optimizes the use of traffic on the existing path. Specifically, after receiving the congestion mark, the sender reduces the speed, which may indirectly reduce the traffic on the path, so that other paths are relatively more idle. However, this is not active load balancing, but passive traffic adjustment.

[0048] Therefore, the core of the above process is to achieve congestion control through ECN marking by network devices and feedback by the receiver, to avoid discarding traffic data.

[0049] Unlike the ECN mechanism in the traditional congestion control mode, the embodiments of the present specification reconstruct the ECN mechanism, and change it from a traditional end-to-end congestion control tool to a global path quality perception mechanism, and apply it to dynamic load balancing.

[0050] Specifically, based on the application scenario of dynamic load balancing, the embodiments of the present specification differ from the above ECN mechanism in terms of the application purpose and action mechanism of ECN marking.

[0051] In terms of application purpose, the above ECN mechanism aims to achieve congestion control from the sender to the receiver, and the ultimate goal is to prompt the sender to adjust the sending rate. In the embodiments of the present specification, the main purpose of ECN marking is not to directly drive the sender to adjust the rate, but to serve as a kind of downstream link congestion state detection signal. The sender aggregates these signals to generate a load balancing strategy, and the core goal is to intelligently select the forwarding path of the data packet, rather than directly reducing the sending rate.

[0052] In terms of mechanism, in the above ECN mechanism, the congestion information is marked by the intermediate nodes, received and interpreted by the receiving end, and then transmitted to the sending end through the reverse path. In the embodiments of the present specification, the intermediate nodes perform the marking operation, increase the local statistical function of the number of marks, and periodically and actively report the statistical information directly to the sending node. This enables the congestion information between each intermediate node and the receiving node to flow between the intermediate nodes and the sending node, so that the sending node can serve as an aggregation layer of global information, combine the ECN statistical information from each intermediate node with its own traffic distribution data, and directly, quickly and quantitatively perceive the real-time state of each path downstream.

[0053] Therefore, based on the above application purposes and mechanisms, the present method converts the ECN mechanism originally used for single-path congestion control into an architecture that supports the sending node's global decision combined with the intermediate node's local perception, which enables the sending node to master the global network state in real time and provide accurate basis for load balancing decisions.

[0054] To achieve the application purposes and mechanisms of the embodiments of the present specification, please refer to steps S102 and S104.

[0055] S102: Based on the ECN mark number of each intermediate node and the statistical data of the traffic data sent to each intermediate node, generate a load balancing strategy for each intermediate node.

[0056] The sending node will systematically aggregate the ECN statistical information of each intermediate node. The statistical information specifically includes the ECN mark number of each intermediate node and the statistical data of the traffic data sent by the sending node to the corresponding intermediate node.

[0057] Wherein, the ECN mark number of each intermediate node can be transmitted by each intermediate node to the sending node based on a preset time interval. Based on the ECN statistical information, the sending node can calculate the real-time congestion index of each intermediate node to receiving node path. By analyzing these quantitative congestion indexes, the sending node can generate a set of dynamic load balancing strategies. The goal of the load balancing strategy is to select the optimal sending target, i.e. the intermediate node, when sending traffic data according to the current congestion condition of each intermediate node to receiving node path.

[0058] S104: Based on the load balancing strategy, allocate the traffic data of the egress link of the node to each intermediate node.

[0059] The sending node applies the generated load balancing strategy to its local traffic scheduling process. When performing data forwarding, the sending node does not distribute traffic equally to all intermediate nodes, but strictly according to the load balancing strategy, allocates the traffic data to be sent to different egress links leading to each intermediate node. In this way, the traffic is guided to the path with lower congestion level and better state, thereby achieving overall avoidance of network congestion and improvement of transmission efficiency. The entire process is periodically repeated to ensure that the load balancing strategy can continuously adapt to the dynamic changes of network state.

[0060] In the load balancing method of the present disclosure, each intermediate node performs ECN marking based on the congestion state of its local egress link and independently counts the number of ECN markings; the sending node can obtain the real-time congestion status of the egress link between each intermediate node and the receiving node by aggregating the number of ECN markings from each intermediate node and the statistical data of the traffic data sent by itself to each intermediate node. Accordingly, the present method breaks through the application mode of the ECN standard protocol originally used for end-to-end congestion control and reconstructs it as a distributed network state awareness mechanism, realizing a hierarchical information collection and global decision mechanism dominated by the sending node.

[0061] Since the real-time congestion status carried by the ECN marking is used as a global network state awareness signal, the sending node generates a load balancing strategy based on this, and then dynamically allocates traffic data to the egress links leading to each intermediate node, so that when selecting the sending link of the traffic data, the sending node can break through its local information limitation and actively avoid the congested links downstream, dynamically allocate traffic to the optimal path throughout, thereby optimizing the transmission stability of the traffic data as a whole and improving the network throughput. Moreover, the load balancing method of the present disclosure also enhances the excellent adaptability and rapid response capability to dynamic changes of the network. In view of the characteristics of strong burstiness and rapid change of network traffic, the intermediate nodes periodically and actively report ECN statistical information, providing the sending node with continuous and near real-time downstream network state feedback. This enables the sending node to quickly capture subtle changes in network congestion state and adjust its load balancing strategy in a timely manner. This efficient and rapid response mechanism ensures that the entire system can continuously adapt to the instantaneous fluctuations of network conditions and always maintain efficient traffic scheduling capability, thereby effectively reducing the delay and jitter of network transmission and ultimately improving user experience.

[0062] In some embodiments of the present disclosure, the statistical data of the traffic data includes the number of data packets. Please refer to Figure 2 generating a load balancing strategy for each of the intermediate nodes, comprising:

[0063] S1021: generating an initial weight of each of the intermediate nodes based on bandwidth capacities of egress links from the sending node to each of the intermediate nodes.

[0064] The initial weight of each of the intermediate nodes is generated based on the bandwidth capacities of the egress links from the sending node to each of the intermediate nodes. Generally, the egress link with higher bandwidth capacity can carry more data traffic, and thus the method assigns a higher initial weight to the egress link with higher bandwidth capacity, which lays a reasonable foundation for subsequent dynamic adjustment.

[0065] Illustratively, the sending node can query the bandwidth capacities of the egress links from the sending node to each of the intermediate nodes; then, sum the bandwidth capacities of the egress links from the sending node to each of the intermediate nodes to obtain a total bandwidth capacity; and finally, take the ratio of the bandwidth capacity of the egress link from the sending node to the intermediate node to the total bandwidth capacity as the initial weight of the intermediate node. That is, the initial weight of a certain intermediate node = bandwidth capacity of the egress link from the sending node to the intermediate node / sum of bandwidth capacities of the egress links from the sending node to each of the intermediate nodes.

[0066] S1022: obtaining a correction coefficient of each of the intermediate nodes based on the number of ECN marks counted by each of the intermediate nodes and the number of data packets sent to each of the intermediate nodes.

[0067] To dynamically correct the initial weight obtained in step S1021, this step obtains a correction coefficient of each of the intermediate nodes. The number of ECN marks counted and reported by each of the intermediate nodes directly reflects the congestion degree of the path from the intermediate node to the receiving node; and the number of data packets sent to each of the intermediate nodes is the number of data packets sent to each of the intermediate nodes recorded by the sending node itself within a corresponding counting period. By correlating the number of ECN marks with the number of data packets sent, the sending node can calculate a quantitative index that can accurately represent the instantaneous congestion information of each downstream path, and thus can derive a correction coefficient based on the instantaneous congestion information to adjust the initial weight.

[0068] Illustratively, the quantitative index can be the ratio of the number of marks counted by each of the intermediate nodes to the number of data packets forwarded, and can also be a result obtained by data processing on the ratio.

[0069] To obtain a correction coefficient that can smoothly reflect the trend of network state changes, in some embodiments of the present specification, the obtaining of the correction coefficient of each of the intermediate nodes comprises:

[0070] S10220: obtaining a ratio of the number of ECN marks counted by each of the intermediate nodes to the number of data packets sent to each of the intermediate nodes;

[0071] Based on the foregoing, the ECN marking number specifically refers to the total number of times that a data packet is marked with ECN by each intermediate node based on a preset period of statistics and reporting, and the data packet is marked with ECN on the exit link from the intermediate node to the receiving node due to the detection of a congestion state. The number of data packets refers to the total amount of traffic data sent to the corresponding intermediate node recorded by the sending node itself within the same preset period, and the number of data packets is taken as the measurement unit in the embodiment. The ECN marking number is compared and calculated with the number of data packets to obtain a quantitative ratio value. The ratio value directly reflects the proportion of the downstream path encountering a congestion situation in the traffic sent to a certain intermediate node within a certain period of time, thereby quantitatively revealing the real-time congestion severity of each path.

[0072] S10222: The ratio is processed by a second-order exponential smoothing to obtain a correction coefficient of each intermediate node.

[0073] The original ratio calculated above is processed by a second-order exponential smoothing technique to finally obtain a correction coefficient of each intermediate node. The network state has dynamics and burstiness, and directly using the original ratio value may cause frequent oscillation of the load balancing strategy due to the instantaneous fluctuations and random noise contained therein, which is not conducive to network stability. The second-order exponential smoothing not only considers the latest observation value of the current period, but also double-weights and recursively calculates the base level value and the change trend value of the historical data sequence. By applying this method to process the ratio corresponding to each intermediate node, short-term interference can be effectively filtered out, data jitter can be suppressed, and medium and long-term changes in the congestion state can be more accurately captured and continued. The output result after the smoothing processing by this algorithm is a relatively stable correction coefficient. The correction coefficient can reliably represent the congestion status of the downstream path, thereby ensuring that the load weight finally generated and the load balancing strategy based thereon can not only sensitively respond to the continuous changes in the network state, but also maintain the smoothness and stability of the decision-making, avoiding the dramatic shock of the traffic.

[0074] For example, for a correction coefficient corresponding to a certain intermediate node, the above calculation process can be represented as:

[0075] S(t) = a x ECN(t) + (1-a) x S(t-1),

[0076] B(t) = β x (S(t)-S(t-1)) + (1-β) x B(t-1),

[0077] C(t) = S(t) + B(t),

[0078] μ(t) = 1-min(C(t), 100%).

[0079] Wherein, t represents a current time step based on a preset period update, μ(t) represents a correction coefficient of the current time step, C(t) represents a congestion index of the current time step after a second-order exponential smoothing processing, S(t) represents a result of a first-order exponential smoothing of the current time step, B(t) is a result of a second-order exponential smoothing of the current time step, S(t-1) represents a result of a first-order exponential smoothing of a previous time step, B(t-1) is a result of a second-order exponential smoothing of the previous time step, ECN(t) is a proportion obtained by the step S10220 at the time step t. α and β are preset weight parameters, both α and β are not less than 0 and not greater than 1, α and β can be fixed constant values or can be dynamically adjusted in the method implementation process, and the embodiment does not limit this.

[0080] In an embodiment, after the above-mentioned congestion index after the second-order exponential smoothing processing is calculated, the congestion index can be displayed in the form of a visual matrix. Figure 3 A schematic diagram of a communication network is exemplarily shown in the embodiment of the present application, and Figure 3 Taking the communication network as an example, the communication network includes Device-A, Device-B, Device-C, Device-D and Device-E, which are respectively denoted as a sending node A, a first intermediate node B, a second intermediate node C, a third intermediate node D and a receiving node E. Wherein, ports in the sending node A for communication with the first intermediate node B, the second intermediate node C and the third intermediate node D can be respectively denoted as Ab, Ac and Ad; ports in the first intermediate node B, the second intermediate node C and the third intermediate node D for communication with the sending node A can be respectively denoted as Ba, Ca and Da. The egress links between the sending node A and the first intermediate node B, the second intermediate node C and the third intermediate node D can be respectively denoted as Ab-Ba, Ac-Ca and Ad-Da. In addition to the congestion indexes of the egress links Ab-Ba, Ac-Ca and Ad-Da obtained based on the above-mentioned second-order exponential smoothing processing, the visual matrix can also record the last update time of the congestion index corresponding to the egress link of each sending node, that is, the congestion index corresponding to each intermediate node, and the state mark of the congestion state generated based on the congestion index, to represent the congestion degree of the link.

[0081] Accordingly, the generated visual matrix is shown in the following table:

[0082]

[0083]

[0084] It can be understood that the above description of the communication network and the visual matrix is only exemplary, and the embodiment does not limit the number of intermediate nodes.

[0085] S1023: determining a load weight of each intermediate node based on the initial weight and the correction coefficient, and generating a load balancing strategy for each intermediate node based on the load weight.

[0086] In this step, the sending node multiplies the initial weight and the correction coefficient obtained in the previous step to calculate a comprehensive load weight for each intermediate node. This load weight combines both the static bandwidth capacity of the local egress link and the dynamic congestion status of the downstream path. Based on this load weight, the sending node finally generates a specific load balancing strategy, which specifies the distribution ratio of the to-be-sent traffic data on the egress links to different intermediate nodes, thereby realizing adaptive traffic scheduling in a global perspective.

[0087] For example, the load weight of an intermediate node is the product of the initial weight of the intermediate node and the correction coefficient divided by the sum of the products of the initial weights of all intermediate nodes and the correction coefficient.

[0088] For example, the load weights of the intermediate nodes can be calculated in parallel by the multi-core CPU integrated in the sending node. In some embodiments of the present specification, the load weight of each intermediate node is not less than a preset load weight threshold. The load weight threshold is used to ensure that each intermediate node can maintain keep-alive probes and emergency communications. For example, the load weight threshold can be set to 2%, and it can be understood that the value of the load weight threshold is not limited in this embodiment.

[0089] To comprehensively consider the egress links from the sending node to the intermediate nodes and the egress links from the intermediate nodes to the receiving node, in some embodiments of the present specification, the generating of the load balancing strategy for each intermediate node based on the load weight comprises:

[0090] generating a load balancing strategy for each intermediate node based on the load weight of each intermediate node and the bandwidth utilization of the egress link from the node to each intermediate node; the bandwidth utilization is the ratio of the actual used bandwidth of the egress link to the link bandwidth.

[0091] Specifically, when generating the load balancing strategy for each intermediate node, the scheme is based on the load weight of each intermediate node and the bandwidth utilization of the egress link from the node to each intermediate node. The load weight is obtained through the previous step S1022. The bandwidth utilization represents the ratio between the actual used bandwidth of the egress link and the physical bandwidth capacity of the link. This ratio quantifies the current busy degree and load level of each egress link of the sending node, reflecting its immediate available capacity.

[0092] For example,Figure 3 The illustrated communication network includes a sending node A, intermediate nodes B, C, D, and a receiving node E. Accordingly, the bandwidth utilization of the links from the sending node A to the intermediate nodes B, C, and D can be denoted as Quality_AB, Quality_AC, and Quality_AD, respectively, and the load weight of the links from the intermediate nodes B, C, and D to the receiving node E can be denoted as Quality_BE, Quality_CE, and Quality_DE, respectively. Based on the above, the load balancing strategy can denote the quality indicators of the links from the sending node A to the receiving node E via the intermediate nodes B, C, and D as Quality_ABE, Quality_ACE, and Quality_ADE, respectively, and the calculation method is as follows:

[0093] Quality_ABE = k x Quality_AB + (1 - k) Quality_BE,

[0094] Quality_ACE = k x Quality_AC + (1 - k) Quality_CE,

[0095] Quality_ADE = k x Quality_AD + (1 - k) Quality_DE,

[0096] wherein k is less than 1 and greater than 0, and the value of k can be dynamically modified in the actual network to adapt to the current network conditions.

[0097] The load balancing strategy of the embodiments of the present specification combines the load weight and the bandwidth utilization. For the traffic data that needs to be forwarded, the sending node will calculate the comprehensive quality indicators of each path leading to the respective intermediate nodes, and select the path with the optimal indicator, so that the traffic is preferentially allocated to the complete transmission path not only with a lighter load of the local egress link of the sending node, but also with a more unobstructed path leading to the receiving node, to coordinate the two goals of local resource optimization and downstream congestion avoidance, and to allocate the data traffic to each egress link in a globally optimal manner, thereby improving the accuracy, globality, and comprehensive utilization efficiency of the load balancing decision.

[0098] In an embodiment, the dynamic load balancing strategy is executed by the P4 programmable pipeline built in the sending node. The core is to utilize the programmability of the P4 language for the data plane behavior, to convert the load balancing strategy generated by the control plane calculation into the forwarding rules of the data plane in real time, thereby realizing fast strategy implementation and traffic scheduling.

[0099] Specifically, after the control plane of the sending node calculates the final load weight of each intermediate node based on the global statistical information, the sending node does not rely on the traditional CPU-driven forwarding rule update, but dynamically compiles and issues the latest policy parameters (the load weight of each egress link) to the P4 programmable pipeline through the P4 Runtime or OpenConfig interface. In the process of data packet sending processing, the P4 programmable pipeline identifies the characteristics of the data packet through a programmable parser, and executes the policy in the match-action pipeline. For example, the pipeline can select the optimal egress port for each data packet in real time through priority queue scheduling according to the preset allocation weight. The entire decision and forwarding process is completed in the hardware pipeline, ensuring that the load balancing strategy can closely track the dynamic changes of the network state, and providing accurate and efficient path scheduling capability for high-speed data forwarding.

[0100] To ensure that the load balancing method can still maintain stable and reliable operation in the case of partial information missing, in some embodiments of the present specification, the method further comprises:

[0101] For any of the intermediate nodes, when the number of ECN marks counted by the intermediate node is not obtained within the preset time window, the load balancing strategy for the intermediate node is configured as a preset default parameter. The embodiments of the present specification set a preset time window, and continuously monitor the ECN statistical information reporting channel between the sending node and each intermediate node. In the process of executing normal load balancing, the sending node periodically receives reports from each intermediate node containing the number of ECN marks counted by the intermediate node. Figure 4 The node interaction schematic diagram of the communication network exemplarily shown by the embodiments of the present application can be a communication network Figure 3The communication network is shown, the communication network in sending node receives the report period of ECN mark quantity from each intermediate node statistics is 50ms. If the sending node fails to successfully acquire the ECN mark quantity of the statistics of one of the intermediate nodes in a continuous period of time, i.e. in the entire preset time window length, the abnormal processing flow is triggered. Exemplarily, the preset time window can be three report periods of the communication network, i.e. 150ms. The reasons for the loss of ECN statistics information can be diverse, for example, the network connection with the intermediate node is instantaneously or continuously interrupted, the intermediate node itself fails and stops working, or the ECN statistics function module of the intermediate node is abnormal. Regardless of the reason, the continuous loss of ECN information means that the sending node can no longer perceive the downstream real-time congestion state of the path through the intermediate node. At this time, if the traffic is continued to be dispatched according to the historical information that may be out of date or invalid for the path, it will lead to serious decision errors, for example, the traffic is continuously directed to a path that is actually invalid or severely congested. In order to avoid this situation, the embodiment of the present specification sets that once the ECN mark quantity of the statistics of the intermediate node cannot be successfully acquired, the sending node will immediately reconfigure the load balancing strategy for the specific intermediate node, and set the parameters thereof to a preset default parameter.

[0102] Similarly, in the communication network of Figure 3 and Figure 4 The parameters of the load balancing strategy can be the load weights Quality_BE, Quality_CE and Quality_DE of the intermediate node B, the intermediate node C and the intermediate node D to the receiving node E respectively in the foregoing embodiment, or the quality indicators Quality_ABE, Quality_ACE and Quality_ADE of the links from the sending node A to the receiving node E via the intermediate node B, the intermediate node C and the intermediate node D respectively.

[0103] The preset default parameter is a predefined conservative value. Exemplarily, the priority of the path can be reduced to the lowest; or it is assigned a very low parameter value for maintaining keep-alive probes and emergency communication; or it is set to 0.

[0104] In an embodiment, after configuring the load balancing strategy for the intermediate node as a preset default parameter, a BFD detection mechanism for the intermediate node can also be triggered. BFD (Bidirectional Forwarding Detection) is a low-overhead fast failure detection protocol. When the BFD mechanism is triggered, the sending node will actively send a BFD packet to the intermediate node to detect the connectivity of the bidirectional forwarding path. The detection result of BFD can quickly and clearly identify the root cause of the failure. If the BFD session cannot be established or is quickly interrupted, it confirms that there is indeed a physical or protocol layer hard failure in the network link or intermediate node. If the BFD detection session is normal, it indicates that the underlying connectivity is intact, and the problem may be limited to the application layer exception of the ECN reporting function itself.

[0105] The purpose of the embodiments of the present specification is to maximize the avoidance of sending new data traffic to the suspicious path in the case of unknown information, thereby preventing further deterioration of traffic loss or transmission performance. By implementing this mechanism, when part of the information source fails, the anomaly is automatically isolated, ensuring the stable and efficient operation of the remaining normal path until the communication is restored or the fault is eliminated, which embodies the completeness and safety of the design.

[0106] In some embodiments of the present specification, the ECN mark quantity counted by each of the intermediate nodes is aggregated by the following steps:

[0107] S10201: Store the ECN mark quantity corresponding to each of the intermediate nodes.

[0108] The aggregation process of the embodiments of the present specification starts with the sending node maintaining an independent ECN mark quantity value for each intermediate node in its local storage space. The ECN mark quantity value represents the latest cumulative value of the ECN mark quantity reported by the intermediate node known to the sending node, serving as the basis for subsequent load balancing decisions.

[0109] S10202: Receive the change amount of the ECN mark quantity transmitted by each of the intermediate nodes.

[0110] In the embodiments of the present specification, the sending node does not continuously request or receive the total amount of ECN marks from the intermediate nodes, but receives the change amount of ECN marks actively transmitted by each intermediate node. This change amount specifically refers to the newly added ECN mark quantity of the intermediate node within a specific statistical period, i.e., the incremental value compared to the last period. Receiving the change amount instead of the total amount of data reduces the size of control packets transmitted in the network and the processing burden of both the sending and receiving parties.

[0111] S10203: determining the ECN mark number of each intermediate node based on the change amount and the stored ECN mark number.

[0112] After receiving the change amount from an intermediate node, the sending node performs the final step of data aggregation. The change amount is added to the locally stored ECN mark number corresponding to the intermediate node, thereby determining and updating the current ECN mark number of the intermediate node. This newly determined value is the latest cumulative value, which will be used to generate the load balancing strategy at the current time step, and at the same time update the locally stored ECN mark number corresponding to the intermediate node as the basis for the next period of calculation.

[0113] The embodiments of the present specification can reduce the network bandwidth consumption generated for synchronizing state information, optimize network resources and computing efficiency, and ensure the real-time and accuracy of the information relied on by load balancing decisions.

[0114] In some embodiments of the present specification, the sending of traffic data to each of the intermediate nodes comprises:

[0115] Based on the tokens in the token bucket corresponding to each of the intermediate nodes, data packets are sent to each of the intermediate nodes. The tokens are used to represent the sending authority of the data packets.

[0116] In the embodiments of the present specification, the sending node performs the sending operation according to the number of tokens in the token bucket maintained independently for each intermediate node. The token bucket and its token number are set by: presetting a token generator corresponding to each intermediate node, and the token generator continuously adds tokens to the virtual token bucket corresponding to each intermediate node at a pre-set token generation rate. Each token represents the sending authority of a data packet. When the sending node needs to send a data packet to a certain intermediate node, the sending node must first obtain a token from the token bucket corresponding to the intermediate node. Only when a token is successfully obtained, the data packet is allowed to be sent; if there is no available token in the bucket, the sending behavior will be delayed or suspended until a new token is generated. In this way, the token bucket algorithm effectively limits the sending rate of data packets within the range defined by the token generation rate, thereby achieving smooth shaping of the outflow traffic and avoiding the burst impact of the traffic.

[0117] It can be understood that in addition to the token bucket algorithm, a counter set for the number of data packets, a leaky bucket algorithm, etc. can also be used to implement traffic control of data packet sending.

[0118] Based on the above sending method of traffic data, the method further comprises:

[0119] When the ratio of the change amount and the stored token quantity is greater than a change rate threshold, the token generation rate of the token bucket corresponding to each intermediate node is adjusted.

[0120] The embodiment establishes a correlation between the regulation of the token bucket and the ECN congestion feedback downstream. The sending node continuously monitors the change amount of the ECN token quantity from each intermediate node, and calculates the change amount with the locally stored historical value of the ECN token quantity of the node to obtain a ratio. The ratio quantifies the deterioration or improvement rate of the downstream congestion condition in unit time.

[0121] When the ratio is greater than a preset change rate threshold (such as 300%), it indicates that the congestion state of the egress path from the corresponding intermediate node to the receiving node is rapidly deteriorating. At this time, the sending node does not passively wait for further congestion to occur, but adjusts the token generation rate of the token bucket corresponding to the intermediate node. The specific adjustment strategy can be to set the token generation rate to a certain percentage of the historical average value of the token generation rate, so that the sending node will reduce the weight of allocating traffic data to the path that is facing a rapid deterioration of congestion in the next period of time, thereby actively and quickly limiting the new data flow rate sent to the path.

[0122] The sending node of the embodiment of the present specification performs traffic shaping according to the local token bucket, and quickly adjusts the token generation rate according to the instantaneous change trend of the downstream congestion to limit the traffic allocation line of the egress link from the sending node to the intermediate node, which actively prevents congestion from intensifying, improves the adaptive control level of burst traffic, and thus guarantees the stability and transmission efficiency of the network as a whole.

[0123] Figure 5 Another load balancing method is shown in an exemplary embodiment of the present application, which is used for an intermediate node in a communication network. The communication network includes a sending node, a receiving node and at least one intermediate node.

[0124] The method includes:

[0125] S500: Monitor the congestion state of the egress link from the node to the receiving node;

[0126] S502: Receive the traffic data sent by the sending node, ECN mark the traffic data based on the congestion state, count the ECN mark quantity, and forward the traffic data to the receiving node;

[0127] S504: transmit the counted ECN marking number to the sending node, so that the sending node generates a load balancing strategy of each intermediate node based on the aggregated ECN marking number counted by each intermediate node and the statistical data of the traffic data sent to each intermediate node, and allocates the traffic data of the node to the egress link of each intermediate node based on the load balancing strategy.

[0128] In some embodiments of the present specification, the monitoring of the congestion state of the egress link from the node to the receiving node comprises:

[0129] monitoring the bandwidth utilization and the queue depth of the egress link from the node to the receiving node.

[0130] when the bandwidth utilization is greater than a preset bandwidth utilization threshold or the queue depth is greater than a preset queue depth threshold, determining that the egress link is in a congestion state.

[0131] In embodiments of the present specification, the congestion state of the egress link from the intermediate node to the receiving node is determined by the intermediate node. The indicators for determination include the bandwidth utilization and the queue depth of the egress link. The bandwidth utilization is the ratio of the current actual bandwidth to the link bandwidth capacity. The bandwidth utilization directly reflects the busy degree and the remaining capacity of the link, and is a basic indicator for measuring the transmission load. The queue depth refers to the number or total data amount of data packets that are queuing and waiting to be forwarded out in the output buffer queue of the link. This indicator reflects the situation of data packets being processed and forwarded in real time. An increase in the depth value indicates that the data packet arrival rate continuously exceeds the instantaneous sending capacity of the link, resulting in data accumulation. If the monitored real-time bandwidth utilization exceeds a preset bandwidth utilization threshold (such as 85%), it indicates that the transmission capacity of the link has been highly occupied, close to its saturation state, and difficult to cope with the new traffic load. Or, if the monitored real-time queue depth exceeds a preset queue depth threshold (such as 80%), it indicates that although the link may not have reached the absolute bandwidth upper limit, data packets have begun to accumulate in the buffer due to traffic bursts or other reasons, resulting in an increase in forwarding delay and facing the risk of packet loss.

[0132] In some embodiments of the present specification, the determination condition of the congestion state of the egress link is specifically based on the type of the egress link from the node to the receiving node.

[0133] if the egress link is a high-speed link, when the bandwidth utilization is greater than a preset bandwidth utilization threshold, it is determined that the egress link is in a congestion state;

[0134] if the egress link is a low-speed link, when the queue depth is greater than a preset queue depth threshold, it is determined that the egress link is in a congestion state.

[0135] The intermediate node of the embodiment can dynamically adjust the determination condition of ECN trigger according to the type characteristics of the egress link. The types of the egress link include high-speed link and low-speed link. For example, the high-speed link can be a link with a transmission rate of 100 Gbps or above, and the low-speed link can be a link with a transmission rate below 100 Gbps. For the high-speed link, the data packet processing speed is fast, and the buffer queue is relatively short, so the bandwidth utilization is taken as the primary congestion awareness index. When the utilization exceeds the bandwidth utilization threshold, it indicates that the absolute transmission capacity has tended to be saturated, and the ECN mark is triggered. On the contrary, for the low-speed link, it is more likely to cause data packets to accumulate in the queue due to burst traffic, so the queue depth is taken as the key index. When the depth value exceeds the queue depth threshold of the total capacity of the queue, it indicates that there is a serious risk of instantaneous congestion and delay, and the ECN mark is triggered.

[0136] Figure 6 is an exemplary embodiment of the present application, which shows a load balancing system. The system includes a sending node 601, a receiving node 603, and at least one intermediate node 602;

[0137] The intermediate node 602 is configured to monitor the congestion state of the egress link from the node to the receiving node 603.

[0138] The sending node 601 is configured to send traffic data to each intermediate node 602.

[0139] The intermediate node 602 is further configured to receive the traffic data sent by the sending node 601, perform ECN marking on the traffic data based on the congestion state, count the number of ECN marks, and forward the traffic data to the receiving node 603.

[0140] The sending node 601 is further configured to generate a load balancing strategy for each intermediate node 602 based on the counted number of ECN marks of each intermediate node 602 and the statistical data of the traffic data sent to each intermediate node 602, and distribute the traffic data of the egress link from the node to each intermediate node 602 based on the load balancing strategy.

[0141] In some embodiments of the present application, the statistical data of the traffic data includes the number of data packets, and the sending node 601 is further configured to:

[0142] Generate an initial weight of each intermediate node 602 based on the bandwidth capacity of the egress link from the node to each intermediate node 602.

[0143] obtain a correction coefficient of each intermediate node 602 based on the number of ECN marks counted by each intermediate node 602 and the number of data packets sent to each intermediate node 602;

[0144] determine a load weight of each intermediate node 602 based on the initial weight and the correction coefficient, and generate a load balancing strategy for each intermediate node 602 based on the load weight.

[0145] In some embodiments of the present specification, the obtaining of the correction coefficient of each intermediate node 602 comprises:

[0146] obtaining a ratio of the number of ECN marks counted by each intermediate node 602 and the number of data packets sent to each intermediate node 602;

[0147] obtaining the correction coefficient of each intermediate node 602 by performing second-order exponential smoothing on the ratio.

[0148] In some embodiments of the present specification, the generating of the load balancing strategy for each intermediate node 602 based on the load weight comprises:

[0149] generating the load balancing strategy for each intermediate node 602 based on the load weight of each intermediate node 602 and the bandwidth utilization of an egress link from the node to each intermediate node 602; the bandwidth utilization is a ratio of an actual used bandwidth of the egress link to a link bandwidth.

[0150] In some embodiments of the present specification, the sending node 601 is further configured to:

[0151] for any intermediate node 602, when the number of ECN marks counted by the intermediate node 602 is not obtained within a preset time window, configuring the load balancing strategy for the intermediate node 602 as a preset default parameter.

[0152] In some embodiments of the present specification, the sending node 601 is further configured to aggregate the number of ECN marks counted by each intermediate node 602 by the following steps:

[0153] storing the number of ECN marks corresponding to each intermediate node 602;

[0154] receiving a change amount of the number of ECN marks transmitted by each intermediate node 602;

[0155] determining the number of ECN marks counted by each intermediate node 602 based on the change amount and the stored number of ECN marks.

[0156] In some embodiments of the present disclosure, the sending the data packet to each of the intermediate nodes 602 comprises:

[0157] sending the data packet to each of the intermediate nodes 602 based on a token in a token bucket corresponding to each of the intermediate nodes 602, the token being used to represent a sending right of the data packet;

[0158] The sending node 601 further comprises:

[0159] When the ratio of the change amount and the stored number of tokens is greater than a change rate threshold, adjusting a token generation rate of the token bucket corresponding to each of the intermediate nodes 602.

[0160] In some embodiments of the present disclosure, the monitoring the congestion state of the egress link from the node to the receiving node 603 comprises:

[0161] monitoring a bandwidth utilization and a queue depth of the egress link from the node to the receiving node 603;

[0162] When the bandwidth utilization is greater than a preset bandwidth utilization threshold or the queue depth is greater than a preset queue depth threshold, determining that the egress link is in a congestion state.

[0163] Figure 7 An electronic device shown in an example embodiment of the present disclosure can include a processor 701 and a machine readable storage medium 702 storing machine executable instructions. The processor 701 and the machine readable storage medium 702 can communicate via a system bus 703. By reading and executing the machine executable instructions in the machine readable storage medium 702, the processor 701 can perform the method of any embodiment of the present disclosure.

[0164] The present disclosure further provides a computer readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method of any embodiment of the present disclosure.

[0165] Computer-readable storage media includes permanent and non-permanent, removable and non-removable media implemented in any method or technology for storage of information such as computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD), or other optical storage, magnetic cassettes, magnetic disk storage, quantum memory, graphene-based storage media, or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to computing devices. According to the definition herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.

[0166] Embodiments of the subject matter and the functional operations described in this specification can be implemented in digital electronic circuitry, in tangibly-embodied computer software or firmware, in computer hardware, including the structures disclosed in this specification and their structural equivalents, or in combinations of one or more of them. Embodiments of the subject matter described in this specification can be implemented as one or more computer programs, i.e., one or more modules of computer program instructions encoded on a tangible non-transitory program carrier for execution by, or to control the operation of, data processing apparatus. Alternatively or additionally, the program instructions can be encoded on an artificially generated propagated signal, e.g., a machine-generated electrical, optical, or electromagnetic signal that is generated to encode information for transmission to suitable receiver apparatus for execution by a data processing apparatus. The computer storage medium can be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of one or more of them.

[0167] The processes and logic flows described in this specification can be performed by one or more programmable computers executing one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows can also be performed by special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application specific integrated circuit), and the apparatus can be implemented as special purpose logic circuitry.

[0168] Computers suitable for the execution of a computer program include, by way of example, general and / or special purpose microprocessors, or any other kind of central processing unit. Generally, a central processing unit will receive instructions and data from a read-only memory and / or a random access memory. The essential elements of a computer are a central processing unit for performing or executing instructions and one or more memory devices for storing instructions and data. Generally, a computer will also include, or be operatively coupled to receive data from or transfer data to, or both, one or more mass storage devices for storing data, e.g., magnetic, magneto-optical disks, or optical disks. However, a computer need not have such devices. Moreover, a computer can be embedded in another device, e.g., a mobile telephone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a Global Positioning System (GPS) receiver, or a portable storage device (e.g., a universal serial bus (USB) flash drive), to name just a few.

[0169] Computer readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices, including by way of example semiconductor memory devices, e.g., EPROM, EEPROM, and flash memory devices; magnetic disks, e.g., internal hard disks or removable disks; magneto-optical disks; and CD-ROM and DVD-ROM disks. The processor and the memory can be supplemented by, or incorporated in, special purpose logic circuitry.

[0170] While the specification contains many specifics, these should not be construed as limiting the scope of any invention or of any claim, but as merely providing illustrations of some of the embodiments of the inventions. Certain features that are, for clarity, described above in the context of separate embodiments, can also be provided in combination in a single embodiment. Conversely, various features that are, for brevity, described above in the context of a single embodiment, can also be provided separately or in any suitable subcombination. In addition, while features can be described above as being implemented in digital electronic circuitry, forms, or combinations of an appropriate device, such features are not limited to hardware implementations, but can also be provided in terms of a computer software product, or a computer hardware product, including a computer program tangibly embodied in a computer readable storage medium for execution by a computer or any suitable apparatus or processing device executing the program. Furthermore, it should be emphasized that a variety of computer-readable storage media is available, such as a semiconductor-based RAM, a ROM, a DVD, a CD, a hard disk, a floppy disk, a cartridge, a tape, and the like, for storing computer program instructions and data structures.

[0171] Similarly, while operations are depicted in the drawings in a particular order, this should not be understood as requiring such an order, nor that all illustrated operations be performed, to achieve desirable results. In certain circumstances, multitasking and parallel processing can be advantageous. Moreover, the separation of various system modules and components in the embodiments described above should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated in a single software product or packaged into multiple software products.

[0172] Thus, particular embodiments of the subject matter have been described. Other embodiments are within the scope of the following claims. In some cases, actions recited in the claims can be performed in a different order and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve the desired results. In certain implementations, multitasking and parallel processing can be advantageous.

[0173] The above descriptions are only the preferred embodiment of the present application, not to limit the present application, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the present application.

Claims

1. A load balancing method, characterized in that, The method is used for a transmitting node in a communication network; the communication network also includes a receiving node and at least one intermediate node. The method includes: Traffic data is sent to each of the intermediate nodes, so that each of the intermediate nodes marks the traffic data with ECN based on the congestion status of the outgoing link from its own node to the receiving node, counts the number of ECN marks, and forwards the traffic data to the receiving node. Based on the statistical data of the number of ECN tags and the traffic data sent to each of the intermediate nodes, a load balancing strategy is generated for each of the intermediate nodes. Based on the load balancing strategy, traffic data is allocated from this node to the egress links of each of the intermediate nodes.

2. The method according to claim 1, characterized in that, The statistical data of the traffic data includes the number of data packets; the generation of load balancing strategies for each of the intermediate nodes includes: Based on the bandwidth capacity of the outbound links from this node to each of the intermediate nodes, the initial weights of each of the intermediate nodes are generated. Based on the number of ECN tags counted by each intermediate node and the number of data packets sent to each intermediate node, the correction coefficient of each intermediate node is obtained; Based on the initial weights and the correction coefficients, the load weights of each intermediate node are determined, and a load balancing strategy for each intermediate node is generated based on the load weights.

3. The method according to claim 2, characterized in that, The step of obtaining the correction coefficients for each of the intermediate nodes includes: Obtain the ratio of the number of ECN tags counted by each intermediate node to the number of data packets sent to each intermediate node; The proportion is smoothed by second-order exponential smoothing to obtain the correction coefficients for each intermediate node.

4. The method according to claim 2, characterized in that, The generation of load balancing strategies for each intermediate node based on the load weight includes: Based on the load weight of each intermediate node and the bandwidth utilization of the outbound link from this node to each intermediate node, a load balancing strategy is generated for each intermediate node; the bandwidth utilization rate is the ratio of the actual bandwidth used by the outbound link to the link bandwidth.

5. The method according to claim 1, characterized in that, The method further includes: If the number of ECN tags counted by the intermediate node is not obtained within a preset time window for any of the intermediate nodes, the load balancing strategy for the intermediate node will be configured to the preset default parameters.

6. The method according to claim 1, characterized in that, The number of ECN tags counted by each of the intermediate nodes is summarized through the following steps: Store the number of ECN tags corresponding to each of the intermediate nodes; Receive the change in the number of ECN tags transmitted by each of the intermediate nodes; The number of ECN tags counted by each intermediate node is determined based on the change amount and the number of stored ECN tags.

7. The method according to claim 6, characterized in that, Sending traffic data to each of the intermediate nodes includes: Based on the tokens in the token bucket corresponding to each intermediate node, data packets are sent to each intermediate node; the tokens are used to represent the sending authority of the data packets. The method further includes: When the ratio of the change to the number of stored tokens is greater than the change rate threshold, the token generation rate of the token bucket corresponding to each intermediate node is adjusted.

8. A load balancing method, characterized in that, The method is used for intermediate nodes in a communication network; the communication network includes a sending node, a receiving node, and at least one intermediate node. The method includes: Monitor the congestion status of the outbound link from this node to the receiving node; The system receives traffic data sent by the sending node, marks the traffic data with ECN based on the congestion state, counts the number of ECN marks, and forwards the traffic data to the receiving node. The number of ECN tags counted is transmitted to the sending node, so that the sending node generates a load balancing strategy for each intermediate node based on the statistical data of the number of ECN tags counted by each intermediate node and the traffic data sent to each intermediate node, and allocates the traffic data of the node to the egress link of each intermediate node based on the load balancing strategy.

9. The method according to claim 8, characterized in that, The monitoring of the congestion status of the outbound link from this node to the receiving node includes: Monitor the bandwidth utilization and queue depth of the outbound link from this node to the receiving node; When the bandwidth utilization rate is greater than a preset bandwidth utilization rate threshold or the queue depth is greater than a preset queue depth threshold, the outgoing link is determined to be in a congested state.

10. A load balancing system, characterized in that, It includes a sending node, a receiving node, and at least one intermediate node; The intermediate node is used to monitor the congestion status of the outgoing link from this node to the receiving node; The sending node is used to send traffic data to each of the intermediate nodes; The intermediate node is also used to receive traffic data sent by the sending node, mark the traffic data with ECN based on the congestion state, count the number of ECN marks, and forward the traffic data to the receiving node. The sending node is also used to generate a load balancing strategy for each intermediate node based on the statistical data of the number of ECN tags counted by each intermediate node and the traffic data sent to each intermediate node. In addition, based on the load balancing strategy, the traffic data of the local node is allocated to the outbound links of each of the intermediate nodes.

11. An electronic device, characterized in that, The method includes a processor and a machine-readable storage medium storing machine-executable instructions that can be executed by the processor, the processor being prompted by the machine-executable instructions to perform the method as described in any one of claims 1-9.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, it implements the steps of the method according to any one of claims 1-9.