Traffic balancing method, network device and electronic device

By creating and maintaining flow packets in the data center network, and dynamically controlling path switching according to network balancing parameters, the problem of insufficient dynamic load balancing granularity in the existing technology is solved, achieving more flexible and efficient traffic balancing, and reducing the cost of path switching. Roughness and receiver resource consumption.

CN114208131BActive Publication Date: 2024-09-27HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201980099031.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-08-12
Publication Date
2024-09-27
Estimated Expiration
2039-08-12

AI Technical Summary

Technical Problem

In data center networks, it is difficult for existing technologies to achieve dynamic load balancing of sufficient granularity, which may cause path congestion and disorder when data flows are sent through the same path, and it is difficult for existing load balancing methods to trigger sufficiently fine-grained path switching.

Method used

By creating or maintaining flow packets, the data packets to be sent are divided into corresponding flow packets according to the destination node, and dynamically control path switching according to network balancing parameters. Flexibly create or maintain flow packets to achieve flow balancing, and use flow packet labels and control Packets distinguish different flow packets, and reordering is performed at the receiving end through the sorting channel to handle out-of-order.

Benefits of technology

It achieves more flexible and efficient traffic balancing, can dynamically control path switching according to the flow packet to which the data packet belongs, meets the traffic balancing needs in different application scenarios, reduces the roughness of path switching granularity, and improves bandwidth utilization and receiver resource utilization. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114208131B
    Figure CN114208131B
Patent Text Reader

Abstract

The present application provides a flow balancing method, a network device and an electronic device, which relate to the field of communication technology. The network device includes: a first module for acquiring a data packet to be sent; a second module for creating or maintaining a flow packet, and classifying the data packet to be sent into a corresponding flow packet according to a destination node; a third module for sending the data packet to be sent based on the flow packet to which the data packet to be sent belongs, wherein a flow packet includes at least one data packet, the destination nodes of the data packets in the same flow packet are the same, and the sending paths of the data packets in the same flow packet are the same.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a traffic balancing method, a network device, and an electronic device. Background Art

[0002] In a data center network (DCN), different networking modes can be used to provide a network for many servers in the DCN. Figure 1 , which is a common three-layer networking mode among various networking modes. Among them, DCN is divided into three layers. The downlink port of the top of rack (TOR) node of the access layer is connected to the server. The uplink port of the TOR node is connected to the downlink port of the aggregation node of the aggregation layer. The uplink port of the aggregation node is connected to the downlink port of the spine node (also called backbone node) of the core layer.

[0003] from Figure 1 As can be seen from the architecture shown, there may be multiple paths available from the data source to the data destination. Figure 1 There are multiple available paths from the data source S0 to the data destination S4. Therefore, it is urgent to propose a traffic balancing method so that data can be evenly distributed to multiple available paths to maximize the bandwidth utilization of DCN. Summary of the invention

[0004] The traffic balancing method, network device, and electronic device provided in the embodiments of the present application can dynamically control path switching to achieve more flexible traffic balancing.

[0005] To achieve the above objectives, the present application provides the following technical solutions:

[0006] In the first aspect, the embodiment of the present application provides a network device, which may refer to an independent device or a component integrated in the device, such as a chip system in the device. The network device may be a device having a sending node function, such as a sending node or a chip system in a sending node, and the network device includes the following functional modules: a first module for acquiring a data packet to be sent; a second module for creating or maintaining a flow packet, and classifying the data packet to be sent into a corresponding flow packet according to the destination node; and a third module for sending the data packet to be sent based on the flow packet to which the data packet to be sent belongs.

[0007] Among them, a flow packet includes at least one data packet, the destination nodes of the data packets belonging to the same flow packet are the same, and the sending paths of the data packets belonging to the same flow packet are the same.

[0008] It should be noted that the flow packet is a data combination form proposed in the embodiment of the present application. The flow packet refers to a collection of a series of data packets. Different flow packets can be distinguished by flow packet labels and other methods.

[0009] Compared with the dynamic load balancing that is difficult to trigger sufficient granularity in the prior art, the flow balancing method provided by the embodiment of the present application flexibly creates or maintains flow packets, and classifies the data packets to be sent into corresponding flow packets according to the destination node, so that the data packets in the same flow packet can be sent through the same path, and the data packets in different flow packets can be sent through different paths, that is, according to the technical scheme of the embodiment of the present application, it is possible to realize the control path switching according to the dynamic flow packet to which the data packet belongs. In addition, the granularity of the path switching is related to the division mode of the flow packet. Among them, when the flow packet includes fewer data packets, the path switching granularity is finer, that is, each sending of fewer data packets can trigger the path switching, and when the flow packet includes more data packets, the path switching granularity is coarser, that is, each sending of more data packets can trigger the path switching. It can be seen that the flow balancing method provided by the embodiment of the present application can also flexibly control the path switching granularity by controlling the division mode of the flow packet to meet the flow balancing requirements under different application scenarios.

[0010] As a possible implementation method, the second module is also used to: create or maintain a first flow packet; classify a data packet targeted at the first node into the first flow packet; create or maintain a second flow packet; and classify a data packet targeted at the first node that is sent later into the second flow packet.

[0011] The sending path of the data packets in the second flow packet is different from the sending path of the data packets in the first flow packet.

[0012] As a possible implementation method, the second module is also used to: determine whether the network balancing parameters meet the preset conditions; if the network balancing parameters meet the preset conditions, create or maintain the second flow packet; the network balancing parameters are used to classify the data packets into corresponding flow packets based on the network balancing principle.

[0013] The network balancing parameters satisfying the preset conditions include satisfying any one or more of the following conditions:

[0014] 1. In the preset interval from the moment of sending the first data packet in the first stream packet, there is no data packet going to the same destination node; that is, the sender obtains a certain data packet to be sent, and the data packet is classified into a certain created stream packet, from the moment when the data packet is sent, if there are no other data packets with the same destination node as the data packet in a long time, that is, in the preset interval, the sender creates a new stream packet, and the subsequent data packets to be sent outside the preset interval can be classified into the newly created stream packet. In this way, two data packets with a larger time interval can be classified into different stream packets.

[0015] 2. The data volume of the first stream packet reaches a preset data volume; This precondition is to say that if the data volume of a data packet in a certain created stream packet reaches a preset data volume, the sender creates a new stream packet. In other words, each stream packet includes data packets of the same data volume, i.e., each stream packet includes data packets of the preset data volume. In this way, the data volume of the data packets in each stream packet is the same, to balance the bandwidth resources occupied by the data packets in different stream packets.

[0016] 3. The duration of the first stream packet reaches the preset duration; The duration of the created stream packet refers to the duration of the data packet in the created stream packet, specifically, refers to a period of time starting from the sending moment of the first data packet in the created stream packet. If the preset duration is reached from the sending moment of the first data packet in a certain created stream packet, and there is still no data packet going to the same destination node, then the sender creates a new stream packet, and the data packet sent at all times after the preset duration is included in the newly created stream packet. In this way, the time resources occupied by the data packets going to the same destination node in each stream packet are roughly the same, that is, the data packets going to the same destination node in one or several stream packets can be reduced to occupy more time resources, and the probability of data packets occupying less time resources in other stream packets, balance the time resources occupied by data packets in different stream packets.

[0017] 4. The sending frequency of the first flow packet reaches the preset frequency. The sending frequency of the created flow packet refers to. The sending frequency of the data packet can reflect the speed of the data packet sending. Usually, the sending frequency of the data packet is affected by the sending time interval between the data packets. Usually, the sending frequency of the data packet is related to the data sending demand and / or other factors. For example, when sending data in a burst mode, the sending frequency of the data packet is not fixed. It can have a faster sending frequency in a certain period of time and a slower sending frequency in other periods of time. When sending data in a smoothing mode, the sending frequency of the data packet is relatively fixed, and the data packet can be sent at a uniform speed. Usually, if the data is sent in a burst mode, and the sending frequency of one or more flowlets in the currently created flow packet is large, in order to reduce the load of the path corresponding to the currently created flow packet, a new flow packet can be created, and the flowlet sent later can be included in the newly created flow packet. In this way, it is easy to balance the load between the corresponding paths of each flow packet, and reduce the probability that the path corresponding to one or more flow packets is overloaded due to the fast sending frequency of flowlets in one or more flow packets.

[0018] As a possible implementation method, different labels can be added to data packets of different flow packets to distinguish which flow packet a data packet belongs to. Specifically, at least one data packet in the first flow packet carries a first delimiter identifier, and at least one data packet in the second flow packet carries a second delimiter identifier. The first delimiter identifier and the second delimiter identifier are used to distinguish the first flow packet from the second flow packet.

[0019] As a possible implementation method, control packets can be inserted between different flow packets to distinguish which flow packet a data packet belongs to. In this implementation method, the third module is also used to send a delimiter packet through the first path. The delimiter packet is a control packet used to distinguish between the first flow packet and the second flow packet. The first path is the path for sending the data packet in the first flow packet.

[0020] As a possible implementation manner, data packets in a flow packet come from the same or different data flows.

[0021] As a possible implementation manner, the second module is also used to set a sending path for the data packets in the flow packet based on the principle of network balance.

[0022] In the second aspect, the embodiment of the present application provides a network device, which may refer to an independent device or a component integrated in the device, such as a chip system in the device. The network device may be a device having a receiving node function, such as a receiving node or a chip system in a receiving node, and the network device includes the following functional modules: a fourth module for determining whether the tail packet of the first stream packet has been received when the second stream packet is received; a fifth module for reordering the data packets in the first stream packet and the second stream packet through the sorting channel RC if the tail packet of the first stream packet has not been received; and a sixth module for releasing the RC after reordering if it is determined that the tail packet of the first stream packet has been received.

[0023] It is easy to understand that after receiving a new stream packet (such as the second stream packet), if the receiver determines in some way that the previous stream packet, i.e., the tail packet of the first stream packet, has not been received, it means that the first stream packet and the second stream packet have not reached the receiver in the order of first-in-first-out and last-in-last-out, resulting in disorder. Therefore, the receiver performs reordering through RC. In an embodiment of the present application, the receiver releases RC after receiving the tail packet of the first stream packet. It is easy to understand that the receiver receives the tail packet of the first stream packet, indicating that the first stream packet has been received. In this way, there is no disorder problem between the first stream packet and the second stream packet, and the RC can be released, and the released RC can be used for other reordering processes, thereby improving the utilization rate of RC. Since the idle RC can also be used for other reordering processes, it is equivalent to expanding the number of available RCs.

[0024] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a storage device, the storage device being used to store instructions, and the processor being used to perform the following actions based on the instructions: creating or maintaining a first flow packet; classifying a data packet targeting a first node into the first flow packet; creating or maintaining a second flow packet when network balancing parameters meet preset conditions; classifying subsequent data packets targeting the first node into a second flow packet, wherein the destination nodes of the data packets in the same flow packet are the same, and the sending paths of the data packets in the same flow packet are the same; the sending path of the data packets in the second flow packet is different from the sending path of the data packets in the first flow packet.

[0025] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising a processor and a storage device, the storage device being used to store instructions, and the processor being used to perform the following actions based on the instructions: determining whether the tail packet of the first stream packet has been received when the second stream packet is received; if the tail packet of the first stream packet has not been received, reordering the data packets in the first stream packet and the second stream packet through a sorting channel RC; after reordering, if it is determined that the tail packet of the first stream packet has been received, releasing the RC.

[0026] In a fifth aspect, an embodiment of the present application provides a traffic balancing method, which can be performed by the device of the first aspect or the third aspect. The method comprises the following steps: obtaining a data packet to be sent, creating or maintaining a flow packet, and classifying the data packet to be sent into a corresponding flow packet according to the destination node; and sending the data packet to be sent based on the flow packet to which the data packet to be sent belongs.

[0027] Among them, a flow packet includes at least one data packet, the destination nodes of the data packets belonging to the same flow packet are the same, and the sending paths of the data packets belonging to the same flow packet are the same.

[0028] As a possible implementation method, taking the creation or maintenance of a first flow packet and a second flow packet as an example, a method for creating or maintaining flow packets and dividing flow packets belonging to different data packets includes the following steps: creating or maintaining a first flow packet; classifying a data packet targeted at a first node into the first flow packet; creating or maintaining a second flow packet; and classifying a data packet targeted at the first node that is sent later into the second flow packet.

[0029] The sending path of the data packets in the second flow packet is different from the sending path of the data packets in the first flow packet.

[0030] As a possible implementation method, creating or maintaining a second flow packet can be specifically implemented in the following steps: determining whether the network balancing parameters meet the preset conditions; if the network balancing parameters meet the preset conditions, creating or maintaining the second flow packet; wherein the network balancing parameters are used to classify the data packets into corresponding flow packets based on the network balancing principle.

[0031] The network balancing parameters satisfying the preset conditions include satisfying any one or more of the following conditions:

[0032] Within a preset interval starting from the moment when the first data packet in the first stream packet is sent, there are no data packets going to the same destination node; the data volume of the first stream packet reaches the preset data volume; the duration of the first stream packet reaches the preset duration; the sending frequency of the first stream packet reaches the preset frequency.

[0033] As a possible implementation, the label of the data packet can be used to distinguish which flow packet the data packet belongs to. At least one data packet in the first flow packet carries a first delimiter, and at least one data packet in the second flow packet carries a second delimiter. The first delimiter and the second delimiter are used to distinguish the first flow packet and the second flow packet.

[0034] As a possible implementation method, data packets belonging to different flow packets can be distinguished by inserting control packets between data packets, and delimiter packets are sent through the first path. The delimiter packets are control packets used to distinguish first flow packets from second flow packets, and the first path is the path for sending data packets in the first flow packets.

[0035] As a possible implementation manner, data packets in a flow packet come from the same or different data flows.

[0036] As a possible implementation manner, the above method further includes: setting a sending path for the data packets in the flow packet based on the principle of network balancing.

[0037] In a sixth aspect, an embodiment of the present application provides a traffic balancing method, which can be performed by the device of the second aspect or the fourth aspect (i.e., a device having a receiving node function), and the method includes the following steps:

[0038] Determine whether the tail packet of the first stream packet has been received when the second stream packet is received; if the tail packet of the first stream packet has not been received, reorder the data packets in the first stream packet and the second stream packet through the sorting channel RC; and after the reordering, if it is determined that the tail packet of the first stream packet has been received, release RC.

[0039] In a seventh aspect, the present application provides a flow balancing device, which has the function of implementing any of the flow balancing methods in any of the above aspects. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.

[0040] In an eighth aspect, a flow balancing device is provided, comprising: a processor and a memory; the memory is used to store computer execution instructions, and when the flow balancing device is running, the processor executes the computer execution instructions stored in the memory to enable the flow balancing device to perform a flow balancing method such as any one of the above aspects.

[0041] In a ninth aspect, a flow balancing device is provided, comprising: a processor; the processor is used to couple with a memory, and after reading instructions in the memory, execute a flow balancing method as described in any one of the above aspects according to the instructions.

[0042] In a tenth aspect, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer can execute any of the traffic balancing methods in any of the above aspects.

[0043] In an eleventh aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute any of the traffic balancing methods in any of the above aspects.

[0044] In a twelfth aspect, a circuit system is provided, the circuit system includes a processing circuit, and the processing circuit is configured to execute a flow balancing method as described in any one of the fifth aspect or the sixth aspect.

[0045] In a thirteenth aspect, a chip is provided, the chip includes a processor, the processor is coupled to a memory, the memory stores program instructions, and when the program instructions stored in the memory are executed by the processor, the traffic balancing method of any one of the fifth or sixth aspects is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 A schematic diagram of the system architecture provided for an embodiment of the present application;

[0047] Figure 2 A schematic diagram of a flow block provided in an embodiment of the present application;

[0048] Figure 3 A schematic diagram of a load balancing principle provided in an embodiment of the present application;

[0049] Figure 4 A schematic diagram of another load balancing principle provided in an embodiment of the present application;

[0050] Figure 5 A flow chart of a method for flow balancing provided in an embodiment of the present application;

[0051] Figure 6 A flow chart of a method for flow balancing provided in an embodiment of the present application;

[0052] Figures 7 to 10 A schematic diagram of the principle of the flow balancing method provided in the embodiment of the present application;

[0053] Fig.11 A schematic diagram of the principle of data packet sorting provided in an embodiment of the present application;

[0054] Figures 12 to 15 A schematic diagram of the structure of a flow balancing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0055] The terms "first" and "second" and the like in the specification and drawings of this application are used to distinguish different objects, or to distinguish different processing of the same object, rather than to describe a specific order of objects.

[0056] "At least one" means one or more.

[0057] "Plurality" means two or more.

[0058] "And / or" describes the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. The character " / " generally indicates that the related objects are in an "or" relationship. For example, A / B can mean A or B.

[0059] In addition, the terms "including" and "having" and any variations thereof mentioned in the description of the present application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.

[0060] It should be noted that, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0061] In the specification and drawings of this application, the terms "of", "corresponding, relevant" and "corresponding" may sometimes be used interchangeably. It should be pointed out that when the distinction is not emphasized, the meanings they intend to express are the same.

[0062] The traffic balancing method provided in the embodiment of the present application is applied in a system that needs to perform traffic balancing. For example, it is applied in a DCN that needs to perform traffic balancing. The DCN involved in the embodiment of the present application can have different networking modes and different levels. The following mainly uses the application in a three-layer DCN as an example to illustrate the system architecture applicable to the embodiment of the present application. See Figure 1 The three-layer DCN includes an access layer, a convergence layer, and a core layer.

[0063] Among them, the nodes of the access layer can be called access nodes. In different networking modes, the specific implementation methods and names of access nodes may be different. For example, in a DCN that adopts a leaf-spine networking mode, the access node can be called a leaf node. Among them, if the leaf node is located at the top of the rack, then this leaf node located at the top of the rack can also be called a TOR node. The following mainly takes the access node as a TOR node as an example. The access node may also be a node of other forms, which will not be listed one by one in the embodiments of the present application. The downlink port of the TOR node is connected to a server, and the TOR node can send and receive data through the server.

[0064] The nodes of the aggregation layer can be called aggregation nodes. The downlink port of the aggregation node is connected to the uplink port of the TOR node.

[0065] The nodes in the core layer can be called core nodes. In a DCN that adopts the leaf-spine networking mode, the core nodes can be called spine nodes. The following mainly takes the core layer nodes as spine nodes as an example for explanation, which is explained uniformly here. The core nodes may also be other nodes besides the spine nodes, which are not listed one by one in the embodiments of the present application. The ports of the spine nodes can be connected to the uplink ports of the aggregation nodes.

[0066] In the embodiment of the present application, the access nodes, aggregation nodes and core nodes mentioned above can all be referred to as switching nodes, which are hereby uniformly stated and will not be described in detail below.

[0067] Among them, one or more TOR nodes and one or more aggregation nodes can form a group (point of delivery, Pod). Spine nodes can also be divided into different spine planes. Different aggregation nodes of the same Pod can be connected to different spine planes. For example, Figure 1 The spine nodes of the Pod are divided into three planes. The spine nodes in each plane are directly connected to different aggregation nodes in each Pod.

[0068] In a possible design, the aggregation nodes and TOR nodes in the same Pod may be in a fully connected relationship. That is, each TOR node in a PoD is connected to all the aggregation nodes in the PoD, and each aggregation node in the PoD is connected to all the TOR nodes in the PoD. Of course, the connection relationship between the TOR nodes and the aggregation nodes in the same PoD may also be in other forms, which is not limited in the embodiments of the present application.

[0069] The aggregation node is used to complete the traffic exchange between TOR nodes in the same Pod. Figure 1 The traffic exchange between source d0 and destination d1. The spine node is used to complete the exchange of traffic between Pods. For example Figure 1 Traffic exchange from source S0 to destination s4.

[0070] In order to facilitate understanding of the contents of the embodiments of the present application, some technical terms are introduced as follows:

[0071] 1. Data stream: refers to a group of ordered byte data sequences with a starting point and an end point. Data packets belonging to the same data stream usually have the same attributes, such as the same source Internet protocol address (IP) address, destination IP address, destination port, etc. The source IP address, destination IP address, destination port, etc. can usually form a 5-tuple. Among them, in a commonly used data stream definition method, byte data from the same source and sent to the same destination can be called the same data stream. Of course, data streams can also have other definitions.

[0072] 2. Flowlet: The transmission control protocol (TCP) can usually send packets at a fixed rate, such as 5 Gbps. It can also send packets at a fixed rate, such as sending packets at a rate of 5 Gbps. Instead of sending packets at a fixed rate, it can send a large number of packets at certain times (or in a shorter time interval) and send a small number of packets at other times (or in a shorter time interval). This method of sending packets at a non-fixed rate can be called a burst method. Among them, one or more packets sent each time can be called a flowlet. Usually, a data flow can include multiple flowlets. For example, Figure 2 For example, during the time period t1-t2, the sending node (such as a TOR node) sends flowlet1 with a smaller amount of data, during the time period t3-t4, the sending node sends flowlet2 with a larger amount of data, and during the time period t5-t6, the sending node sends flowlet3.

[0073] See also Figure 3 , a is the sending node, b is the receiving node, flowlet1 is a plurality of data packets sent by the sending node in the time period t3-t4 using the above-mentioned burst packet sending method, flowlet2 is a plurality of data packets sent by the sending node in the time period t1-t2 using the above-mentioned burst packet sending method, the path delays of the two links are d1 and d2 respectively, and the time interval between flowlet1 and flowlet2 is Gap. If flowlet1 and flowlet2 belong to the same data stream, usually when the time interval Gap between flowlet1 and flowlet2 is greater than |d1-d2|, the two flowlets can be sent via different paths without worrying about disorder. Here, the time interval between flowlet1 and flowlet2 refers to the time interval between the last data packet in flowlet1 and the second data packet in flowlet2, that is, the time interval between t2-t3.

[0074] In the embodiment of the present application, a flowlet may also be referred to as a flow segment, or other names.

[0075] 3. Distribution by flow (also known as static load balancing): In a traditional traffic balancing (also known as load balancing (LB)), the switching nodes in the DCN use a hash algorithm to perform hash calculations on the data flow, and based on the hash result, select a path for sending the data flow from multiple available paths. The hash algorithm can use the five-tuple mentioned above as input. Figure 1 For example, if only the traffic exchange within the same PoD is considered, there are 4 available paths from d0 to d2, namely path d0-s0-d2, path d0-s1-d2, path d0-s2-d2, and path d0-s3-d2. Assume that when the hash result is 0, it means that s0 in PoD#1 is selected to forward traffic, when the hash result is 1, it means that s1 in PoD#1 is selected to forward traffic, when the hash result is 2, it means that s2 in PoD#1 is selected to forward traffic, and when the hash result is 3, it means that s3 in PoD#1 is selected to forward traffic. If the hash result of a current data flow is 2, the traffic is forwarded through the path d0-s2-d2.

[0076] In the above load balancing method, packets belonging to the same data flow are usually sent through the same path. This load balancing based on data flow is called flow-based load balancing (FLB) or flow-based load balancing, or static load balancing (SLB).

[0077] The above-mentioned flow-based load balancing method can ensure that the data packets of the same data flow are not out of order because the data packets belonging to the same data flow are usually carried on the same path. Therefore, the receiving end usually does not need to reorder the received data packets.

[0078] However, the flow-based load balancing method may cause congestion in the data transmission and reception ports. Specifically, the SLB mechanism that uses the hash algorithm to select routes may cause hash collisions. For example, hash collisions may occur on the upstream ports from the TOR node to the aggregation node, or from the aggregation node to the spine node. For example, a hash collision occurs between the TOR node and the aggregation node. Figure 4, the hash values ​​of multiple data flows may be the same. In this case, when the TOR node uses the hash algorithm to select routes, it may send multiple data flows with the same hash value to the same aggregation node. If there are multiple active data flows at the same time, a large number of data packets may be sent to the same upstream port at the same time, which may cause congestion on the upstream port.

[0079] 4. Packet distribution: Each switching node distributes packets evenly among multiple available paths. In this way, multiple data packets belonging to the same data flow may be sent through different paths. This mechanism can be collectively referred to as packet distribution (packetspray). Packetspray is a (dynamic load balancing, DLB) technology. Compared with flow distribution, the advantages of packet distribution technology are: there is no hash conflict problem mentioned above, and the bandwidth of multiple paths can be better utilized.

[0080] However, packet distribution also has corresponding disadvantages. Packets belonging to the same data stream are sent through different paths, and the congestion levels of different paths may be different, resulting in different delays on different paths. Therefore, different data packets of the same data stream may arrive at the destination at different times. In other words, packets belonging to the same data stream may be out of order (i.e., the last-sent-first-arrived or the first-sent-last-arrived situation), which requires the receiving end to reorder the out-of-order data packets through special design, such as relying on hardware or software to perform reordering. In one possible implementation, each data stream that needs to be sorted can occupy or share a reordering channel (RC) with other data streams, also known as reordering logic. RC is a general term for logic, cache, resources, and related data structures used for reordering, or other related content. The time occupied by RC is related to the life cycle of the data stream (such as 10ms or 2s). In this way, when there are many data streams, the receiving side needs to have enough RC to reorder the data packets. That is, if each data stream occupies an exclusive RC, then if there are 10K data streams, 10K RCs are required, which leads to the problem of complexity or scalability of the receiving end implementation.

[0081] In one example, the burst packet sending method can also implement DLB, that is, the burst packet sending method can dynamically switch the sending paths for different flowlets belonging to the same data flow, such as Figure 3 Flowlet1 and flowlet2 belonging to the same data flow are sent through different paths, making the traffic distribution more even.

[0082] However, the following two aspects limit the application of flowlets:

[0083] On the one hand, DCN has a large bandwidth, and the delay difference between paths is usually small (for example, the delay difference is 20us). Therefore, it is difficult to trigger sufficiently fine-grained dynamic load balancing if the time interval Gap is set too large (for example, in some algorithms, Gap=500us is set). In other words, when the Gap value is set too large, the path can only be switched if the time interval between two flowlets is greater than the Gap. That is, compared with high-speed transmission data streams, the time interval between two flowlets is often small, and the path switching may be triggered only once every long time, which cannot meet the performance of dynamic load balancing.

[0084] On the other hand, dynamic behaviors in the network may affect path switching. For example, the TCP source uses a pacing method to send data. For example, pacing is used to send data. Since the time interval between data packets is small, it is difficult to meet the preset gap and trigger path switching. In addition, when the switching node resources are exhausted, such as when the buffer of the switching node is exhausted, the switching node may trigger backpressure, which sends a message to the data sender to instruct the data sender to suspend sending. In this way, the data is caused to wait at the sender, and accordingly, the time interval between sending data may not be guaranteed to be greater than the delay difference between paths. In other words, disorder may be caused.

[0085] As mentioned above, when traffic balancing is performed according to the above-mentioned packet distribution method, it is difficult to trigger dynamic load balancing with sufficient granularity. For example, path switching may be triggered only once every long period of time. When traffic balancing is performed according to the flow distribution method, dynamic load balancing is not triggered. As a result, the current load balancing performance is relatively low. In order to solve this technical problem, the embodiment of the present application provides a traffic balancing method, see Figure 5 , the method comprises the following steps:

[0086] S501: The sender obtains a data packet to be sent.

[0087] It is easy to understand that when the sender has data to send, the data to be sent is encapsulated into a data packet according to the protocol definition format. Depending on the amount of data to be sent, the sender can encapsulate the data to be sent into one or more data packets, that is, the data packet to be sent in the embodiment of the present application can refer to one or more data packets.

[0088] S502: The sender creates or maintains a flow packet (flowpac), and classifies the data packets to be sent into corresponding flow packets according to the destination nodes.

[0089] Among them, a flow packet is a data combination form proposed in an embodiment of the present application. A flow packet refers to a collection of a series of data packets, that is, a flow packet includes one or more data packets. The destination nodes of the data packets belonging to the same flow packet are the same, that is, the data packets belonging to the same flow packet all go to the same destination node. Different flow packets can be distinguished by flow packet labels and the like, and the specific scheme for distinguishing flow packets can be found below. It should be noted that a flow packet is not a data encapsulation (data encapsulation) body specified by a protocol.

[0090] In a possible implementation, if the burst packet sending method is adopted, the flow packet may include one or more complete flowlets, for example, Figure 2 For example, a flow packet can include all the data packets in flowlet1 and flowlet2. Of course, a flow packet can also include some data packets in flowlet. Figure 2 For example, a flow packet may include all the data packets in flowlet1 and the first two data packets in flowlet2. For a detailed introduction to flowlet, please refer to the above and will not be repeated here. In addition, the data packets in a flow packet may come from the same data stream or from different data streams. That is, the data packets in a flow packet may be part or all of the data packets in a certain data stream, or may be data packets in multiple data streams. For example, a flow packet includes all the data packets in flowlet1 and flowlet2, and flowlet1 and flowlet2 belong to different data streams. For another example, a flow packet includes all the data packets in flowlet1 and flowlet2, and flowlet1 and flowlet2 belong to the same data stream.

[0091] In the embodiment of the present application, the sender can utilize the data packets to be sent that are obtained to create or maintain different stream packets, here, the multiple data packets to be sent that the sender obtains can be classified into the same stream packet, and some data packets in the data packets to be sent can also be classified into a certain stream packet, and other partial data packets in the data packets to be sent can be classified into other stream packets, that is, the data packets to be sent can be classified into different stream packets. Taking creation and maintenance of a certain stream packet as an example, after the sender obtains the data packets to be sent, it is necessary to create a stream packet first, and subsequently, the sender can continue to obtain the data packets to be sent to maintain the created stream packet. For example, the current data packet to be sent includes 3 data packets, and the sender can create a stream packet including 3 data packets according to the destination node of these 3 data packets, and will classify these 3 data packets into this stream packet. Afterwards, as time goes by, the sender obtains the data packets to be sent at the subsequent moment, and maintains this stream packet created before, that is, the data packets to be sent at the subsequent moment can be classified into this stream packet created before, and the number of data packets included in the stream packet is updated. In this way, the sender obtains one or more data packets to be sent and creates or maintains multiple flow packets, thereby classifying one or more data packets into corresponding flow packets, so as to facilitate subsequent decision of a sending path for the data packets according to the flow packets to which each data packet belongs.

[0092] In some embodiments, the basis for the sender to classify a data packet into which flow packet may be the destination node of the data packet, that is, data packets sent to the same destination node are classified into the same flow packet. In addition, the sending paths of the data packets in the same flow packet are the same.

[0093] In other embodiments, the basis for the sender to divide the flow packets belonging to the data packets can also be the network balancing parameters of the data packets. When the network balancing parameters meet the preset conditions, a new flow packet can be created, and the data packets to be sent later can be classified into the newly created flow packet. The network balancing parameters are used for the sender to classify multiple data packets into different flow packets based on the network balancing principle, and the data packets of different flow packets are sent through different paths. In other words, the transmission path can be set for the data packets in the flow packet based on the network balancing principle. In the embodiment of the present application, network balancing mainly refers to the flow balance between links, and the flow balance means that the difference between the flow of each link in multiple links is within a preset range within a period of time. In other words, flow balance refers to that the flow is shared by multiple links, and the difference in the flow value shared by each link is not large. When only a few links in multiple links are used to share most of the flow, and other links only share a small part of the flow, we can regard it as an imbalance of flow between links. In the embodiment of the present application, the sender determines which flow packet the data packet needs to be assigned to based on the network balancing principle. That is, when there are many data packets, it is necessary to assign some of the data packets to a certain flow packet and other data packets to another flow packet according to the network balancing parameters. In this way, subsequently, some of the data packets can be sent through the path corresponding to a certain flow packet, and other data packets can be sent through the path corresponding to the above-mentioned other flow packet. That is, multiple data packets can be sent through different paths to achieve traffic balance between multiple paths.

[0094] Among them, the network balancing parameters of the data packet can be used to characterize the network resources occupied by the data packet, and the network resources can be, for example, bandwidth resources, time resources, etc. The main network balancing parameters used for traffic balancing in the embodiment of the present application can be, for example, one or a combination of the following: the time interval Gap between data packets, the data volume Size of the data packet, the duration Time of the data packet, the sending frequency of the data packet, and of course, other various measurable methods.

[0095] The one or more network balancing parameters are used to control the dynamic capability of DLB. The dynamic capability of DLB ​​refers to the ability of data packets to flexibly select different paths. Generally, the stronger the dynamic capability, the greater the possibility that different data packets are transmitted through different paths, or in other words, it is easier to trigger path switching. The weaker the dynamic capability, different data packets tend to be carried through the same one or several paths. In other words, it is difficult to trigger path switching.

[0096] Of course, in addition to the network balancing parameters listed above, the network balancing parameters used for traffic balancing in the embodiments of the present application may also be other parameters, such as the congestion levels of different paths obtained by a switching node from other switching nodes, such as the congestion level of the path between the TOR and the aggregation obtained by the TOR from the upstream aggregation node, and the congestion level of the path between spine 0 and the TOR obtained by the TOR from spine 0, the depth of the sending queue of a switching node, and the characteristics of the sliding window of the switching node, such as the sliding window size. These network balancing parameters listed in this paragraph can be used to reflect the congestion status of the network. The network balancing parameters used for traffic balancing in the embodiments of the present application may also include other parameters, and these parameters are not listed one by one in the embodiments of the present application.

[0097] As pointed out above, in the process of the sender continuously acquiring data packets to be sent and creating or maintaining different flow packets, if the network balancing parameter meets the preset conditions, the sender can create a new flow packet and can classify subsequent data packets to be sent into the newly created flow packet, wherein the network balancing parameter meets the preset conditions and includes a combination of one or more of the following:

[0098] 1, in the preset interval of the moment of the first data packet in the created stream bag from sending, there is no data packet going to the same destination node, that is to say, the sender obtains a certain data packet to be sent, and this data packet is included in a certain stream bag created, from the moment when this data packet is sent, if in the long time, i.e. in the preset interval, there are no other data packets with the same destination node with this data packet, then the sender creates a new stream bag, and the subsequent data packets to be sent beyond the preset interval can be included in the newly created stream bag. Like this, two data packets with larger time intervals can be included in different stream bags.

[0099] 2. The data volume of the created stream packet reaches the preset data volume. The data volume of the created stream packet refers to the data volume of the data packet in the created stream packet. This precondition is to say that if the data volume of the data packet in a certain created stream packet reaches the preset data volume, the sender creates a new stream packet. In other words, each stream packet includes the data packets of the same data volume, i.e., each stream packet includes the data packets of the preset data volume. In this way, the data volume of the data packets in each stream packet is the same, so as to balance the bandwidth resources occupied by the data packets in different stream packets.

[0100] 3, the duration of the described stream bag created reaches the preset duration.The duration of the stream bag created refers to the duration of the data packet in the stream bag created, specifically, refers to a period of time starting from the sending moment of first data packet in the stream bag created.If the sending moment of first data packet in a certain stream bag created reaches the preset duration and still does not exist the data packet going to the same destination node, then the sender creates a new stream bag, and the data packet sent at all times after the preset duration is included in the newly created stream bag.Like this, the time resource that the data packet going to the same destination node in each stream bag is roughly the same, namely can reduce the data packet going to the same destination node in one or several stream bags and occupy more time resources, and the probability of data packet occupying less time resources in other stream bags, balances the time resource that data packet occupies in different stream bags.

[0101] 4. The sending frequency of the created flow packet reaches the preset frequency. The sending frequency of the created flow packet refers to. The sending frequency of the data packet can reflect the speed of the data packet sending. Usually, the sending frequency of the data packet is affected by the sending time interval between the data packets. Usually, the sending frequency of the data packet is related to the data sending demand and / or other factors. For example, when the above-mentioned burst mode is used to send data, the sending frequency of the data packet is not fixed. It can have a faster sending frequency in a certain period of time and a slower sending frequency in other periods of time. When the smoothing mode is used to send data, the sending frequency of the data packet is relatively fixed, and the data packet can be sent at a uniform speed. Usually, if the burst mode is used to send data, and the sending frequency of one or more flowlets in the currently created flow packet is large, in order to reduce the load of the path corresponding to the currently created flow packet, a new flow packet can be created, and the flowlet sent later can be included in the newly created flow packet. In this way, it is easy to balance the load between the corresponding paths of each flow packet, and reduce the probability that the path corresponding to one or more flow packets is overloaded due to the fast sending frequency of flowlets in one or more flow packets.

[0102] S503: The sender sends the data packet to be sent based on the flow packet to which the data packet to be sent belongs.

[0103] The data packets in different flow packets have different sending paths.

[0104] Compared with the dynamic load balancing that is difficult to trigger sufficient granularity in the prior art, the flow balancing method provided by the embodiment of the present application flexibly creates or maintains flow packets, and classifies the data packets to be sent into corresponding flow packets according to the destination node, so that the data packets in the same flow packet can be sent through the same path, and the data packets in different flow packets can be sent through different paths, that is, according to the technical scheme of the embodiment of the present application, it is possible to realize the control path switching according to the dynamic flow packet to which the data packet belongs. In addition, the granularity of the path switching is related to the division mode of the flow packet. Among them, when the flow packet includes fewer data packets, the path switching granularity is finer, that is, each sending of fewer data packets can trigger the path switching, and when the flow packet includes more data packets, the path switching granularity is coarser, that is, each sending of more data packets can trigger the path switching. It can be seen that the flow balancing method provided by the embodiment of the present application can also flexibly control the path switching granularity by controlling the division mode of the flow packet to meet the flow balancing requirements under different application scenarios.

[0105] The following is a specific example, and takes creating or maintaining a first flow packet and creating or maintaining a second flow packet as an example to illustrate the technical solution of the embodiment of the present application. Figure 6 The flow balancing method provided in the embodiment of the present application includes the following steps:

[0106] S601: The sender obtains a data packet to be sent.

[0107] For example, the data packet to be sent is Figure 7 As shown, it includes 8 data packets.

[0108] S602: The sender creates or maintains a first flow packet, and classifies a data packet with the first node as the destination node into the first flow packet.

[0109] The embodiment of the present application mainly takes the case where a data packet is sent from the same source node to the same destination node as an example to illustrate the technical solution of using the same path or different paths to balance traffic to the same destination node. Figure 7 to Figure 10 The destination node can be Figure 7 to Figure 10 , that is, the first node may be node b.

[0110] As described above, in addition to classifying data packets into flow packets according to their destination nodes, the sender can also create or maintain flow packets based on network balancing parameters of the data packets and classify the data packets to be sent into corresponding flow packets.

[0111] If the network balancing parameter is set to the time interval between data packets, initially, the first flow packet created by the sender may only include one of the data packets to be sent. Figure 7As shown in FIG. 1 , the data packets to be sent obtained by the sender include 8 data packets. Initially, the sender may classify the first data packet (i.e., the data packet numbered 1) among the 8 data packets to be sent into the first flow packet, and create a first flow packet including only the first data packet. Subsequently, the sender may maintain the created first flow packet and update the number of data packets included in the first flow packet, for example, Figure 7 As shown, data packet 2, whose sending time interval with data packet 1 is less than or equal to the preset interval, is classified into the first flow packet. Similarly, data packet 3, whose sending time interval with data packet 2 is less than or equal to the preset interval, is also classified into the first flow packet. That is to say, the sender detects the sending time interval between the last data packet in the first flow packet and the next data packet to be sent. If the sending time interval between the next data packet to be sent and the last data packet in the first flow packet is less than or equal to the preset interval, the sender classifies the next data packet to be sent into the first flow packet. Exemplarily, as Figure 7 As shown, the sending time interval between every two data packets in the data packets 1 to 5 to be sent is less than or equal to the preset interval, so the sender classifies the data packets 1 to 5 into the first flow packets.

[0112] If the network balancing parameter is the data volume of the data packet, initially, the first flow packet created by the sender may include data packets of a preset data volume, or may include data packets less than the preset data volume. For example, if the size of each data packet is the same, and the size of a single data packet is 16KB, and the preset data volume is set to 64KB (i.e., the size of 4 data packets), in one example, Figure 8 As shown in (a), at a certain moment, the sender obtains a large amount of data packets to be sent, assuming that the amount is 128KB (the size of 8 data packets), and the amount of data in the data packets to be sent is greater than the preset amount of data. In this case, initially, the sender can send 4 of the 8 data packets to be sent (i.e. Figure 8 The data packets 1 to 4 shown in (a) are classified into the first stream packet, and a first stream packet including the four data packets is created. The data volume of the first stream packet is exactly the preset data volume. In another example, Figure 8As shown in (b), the sender obtains a data packet to be sent with a smaller data volume at a certain moment, assuming it is 32KB (the size of 2 data packets), and the data volume of the data packet to be sent is less than the preset data volume. In this case, initially, the sender can first classify the 2 data packets to be sent into the first stream packet, and create a first stream packet including 2 data packets. Afterwards, the sender continues to obtain the data packets to be sent at subsequent moments. It can be understood that if the data volume of the data packet to be sent at the subsequent moment is greater than 32KB, the sender can only classify the 32KB data packet in the data packet to be sent at the subsequent moment into the first stream packet, and the other data packets in the data packet to be sent at the subsequent moment can be classified into other stream packets created subsequently. On the contrary, if the data volume of the data packet to be sent at the subsequent moment is less than or equal to 32KB, the sender can classify all the data packets to be sent at the subsequent moment into the first stream packet, update the number of data packets in the first stream packet, and continue to obtain the data packets to be sent until the data volume of the data packets in the first stream packet reaches as shown in (b). Figure 8 The preset data volume shown in (b).

[0113] If the network balancing parameter is set to the duration of the data packet, initially, the first flow packet created by the sender may only include one of the data packets to be sent. Fig. 9 As shown in (a), the data packets to be sent obtained by the sender include 8 data packets. Initially, the sender can classify the first data packet (i.e., the data packet numbered 1) among the 8 data packets to be sent into the first flow packet, and create a first flow packet including only the first data packet. Subsequently, the sender can maintain the created first flow packet and update the number of data packets included in the first flow packet. For example, Fig. 9 As indicated in (a), if the sending time of data packet 2 is within the preset duration, the sender will classify data packet 2 into the first stream packet. Similarly, if the sending time of data packet 3 is also within the preset duration, data packet 3 will also be classified into the first stream packet. In other words, starting from the sending time of the first data packet in the first stream packet, the data packets sent within the preset duration are classified into the first stream packet.

[0114] The network balancing parameter can also be a sending cycle. As a possible implementation method, a sending cycle is defined as a preset time period. The sender periodically creates a flow packet, that is, creates a flow packet every other sending cycle. When the network balancing parameter is a sending cycle, initially, the first flow packet created by the sender may only include one data packet in the data packets to be sent. For example, Fig. 9As shown in (b), the data packets to be sent obtained by the sender include 8 data packets. Initially, the sender can classify the first data packet (i.e., the data packet numbered 1) among the 8 data packets to be sent into the first flow packet, and create a first flow packet including only the first data packet. Subsequently, the sender can maintain the created first flow packet and update the number of data packets included in the first flow packet. For example, Fig. 9 As marked in (b), t1-t2 is the sending period of the first flow packet, t2-t3 is the sending period of the second flow packet, and the sending time of data packet 2 is within the sending period of the first flow packet, so the sender classifies data packet 2 into the first flow packet. Similarly, the sending time of data packet 3 is also within the sending period of the first flow packet, so data packet 3 is also classified into the first flow packet.

[0115] If the network balancing parameter is the frequency of sending data packets, initially, the first flow packet created by the sender may include one of the data packets to be sent. Fig.10 As shown in FIG. 1 , the data packets to be sent obtained by the sender include 8 data packets. Initially, the sender may classify the first data packet (i.e., the data packet numbered 1) among the 8 data packets to be sent into the first flow packet, and create a first flow packet including only the first data packet. Subsequently, the sender may maintain the created first flow packet and update the number of data packets included in the first flow packet. For example, Fig.10 As indicated, data packets 2 and 3 belong to the same flowlet 1 as data packet 1, and the sending time interval between data packets 2 and 1 is small (does not reach the preset sending time interval), and the sending time interval between data packets 2 and 3 is also small, indicating that the sending frequency of flowlet 1 is small, so the sender classifies data packets 2 and 3 belonging to flowlet 1 into the first flow packet. Similarly, if the sending frequency of flowlet 2 sent later reaches the preset frequency, data packets 4 to 6 belonging to flowlet 2 are also classified into the first flow packet.

[0116] The network balancing parameter may also be a combination of the data volume of the data packet and the time interval between the data packets. In this case, the time interval between each two data packets in the data packets in the first flow packet is less than or equal to the preset interval, and the data volume of the first flow packet is the preset data volume. The specific creation and maintenance process of the first flow packet can refer to the creation and maintenance process in which the network balancing parameters are the data volume and time interval of the data packet, respectively, and will not be repeated here.

[0117] Of course, the network balancing parameter may also be a combination of two or more of the above-mentioned multiple network balancing parameters. In these cases, the creation and maintenance process of the first flow packet can also refer to the above introduction, which will not be repeated here.

[0118] S603: The sender determines whether the network balancing parameters meet the preset conditions.

[0119] The network balancing parameters satisfying the preset conditions refer to a combination of one or more of the following:

[0120] In the preset interval starting from the moment of sending the first data packet in the first flow packet, there is no data packet destined for the same destination node, wherein the first data packet is a data packet in the first flow packet; the data volume of the first flow packet reaches the preset data volume; the duration of the first flow packet reaches the preset duration; the sending frequency of the first flow packet reaches the preset frequency. Of course, as described above, the network balancing parameters meet the preset conditions, and there may be other situations, which are not listed here one by one.

[0121] S604: If the network balancing parameters meet the preset conditions, the sender creates or maintains a second flow packet, and classifies the data packets sent later and targeting the second node into the second flow packet.

[0122] Taking the network balancing parameter as the time interval between data packets as an example, the sender creates or maintains a first flow packet. If the sender detects that there are no data packets destined for the same destination node within a preset interval starting from the time when a data packet in the first flow packet is sent, a second flow packet is created, and the data packets sent after the preset interval can be classified into the second flow packet. Figure 7 As shown, the sender has created and maintained a first flow packet, which includes data packets 1 to 5. The sender detects that there is no data packet destined for node b within the preset interval since the sending time of data packet 5, so it creates a second flow packet and classifies data packet 6 sent after the preset interval into the second flow packet, and data packet 6 is the first data packet in the second flow packet. The specific maintenance process of the second flow packet can refer to the maintenance process of the first flow packet mentioned above when the network balancing parameter is the time interval between data packets.

[0123] In the embodiment of the present application, the value of the preset interval G can be smaller than the G required by the flowlet in the prior art (the value can be determined based on experience or other methods) to avoid the phenomenon that in actual applications, too large G often makes it difficult to trigger path switching.

[0124] If the network balancing parameter is the amount of data packets, see Figure 8 (a) or Figure 8 In (b), the sender creates or maintains a first flow packet. When the sender detects that the data volume of the first flow packet reaches a preset data volume, it creates a second flow packet and classifies the data packets to be sent thereafter into the second flow packet.

[0125] In this way, when the time interval between the first stream packet and the second stream packet is short, that is, the sending time interval between the last data packet in the first stream packet and the first data packet in the second stream packet is short, and the condition that the time interval is greater than or equal to the preset interval (such as 5us) cannot be met, a stream packet can be constructed by sending a data packet of a preset data amount (such as 256KB) every time, thereby improving the dynamic capability of DLB. Among them, it can be determined based on actual experience and statistical information that the preset interval is "smaller" when meeting what conditions, for example, when the preset interval is less than the first threshold, it is considered that the preset interval is smaller. The first threshold can be flexibly set, and the embodiment of the present application does not limit this.

[0126] If the network balancing parameter is set to the duration of the packet, see Fig. 9 In (a), the sender creates or maintains a first flow packet. When the sender detects that a preset time has elapsed since the first data packet in the first flow packet was sent, the sender creates a second flow packet and classifies the data packets sent after the preset time into the second flow packet.

[0127] The network balancing parameter can also be the sending period, see Fig. 9 In (b), the sender creates or maintains a first flow packet. When the sender detects that the sending cycle of the first flow packet ends, the sender creates a second flow packet and classifies the data packets sent after the sending cycle of the first flow packet into the second flow packet.

[0128] In other embodiments, the sender configuration may also configure other network balancing parameters, and detect whether the parameters meet the preset conditions to determine whether to create the second flow packet. For example, the sender configures the parameter of the congestion level of the current path (such as the first path), and when the sender detects that the congestion level of the data packet in the currently created flow packet when being sent through the link is greater than or equal to the congestion threshold, the second flow packet is created.

[0129] It should be noted that the embodiments of the present application do not restrict what parameters the sender configures and the number of configured parameters.

[0130] Of course, the sender can also judge whether to perform path switching in conjunction with the above two or more conditions. For example, the sender detects that the data volume of the first stream packet is large (i.e., reaching the preset data volume), such as reaching 5 data packets, and since the moment of sending the fifth data packet of the first stream packet, there is no data packet going to the same destination node in the preset interval, and a new second stream packet is created. In other embodiments, the numerical value of the preset data volume S can be configured to be small, and the numerical value of the preset interval G (such as 50us) is large. In this way, when the data volume of a certain data stream is seldom, a new second stream packet can be created by triggering the preset interval G. That is, if the two stream packets are separated by an idle time interval of not less than 50us. Wherein, the idle time between the first stream packet and the second stream packet refers to that the first stream packet has no data packet in this idle time, but allows the data packet of other stream packets to be sent in this idle time. Referring to the above description, the numerical value of the preset data volume S is small, and the specific definition of the numerical value of the preset interval G is large, can be determined according to actual application and algorithm, such as, setting a threshold value, when the preset data volume S is less than or equal to the threshold value, it is considered that the preset data volume S is small.

[0131] In an exemplary parameter configuration mode, the preset interval G=infinity, the preset data volume S=infinity, and the preset duration T=infinity can also be configured. This means that the sender always maintains SLB, that is, does not create a new second flow packet, and all data packets belonging to the same data flow belong to the first flow packet.

[0132] S605: The sender sends the data packet to be sent based on the flow packet to which the data packet to be sent belongs.

[0133] The sending path of the data packets in the second flow packet is different from the sending path of the data packets in the first flow packet.

[0134] It should be noted that one or more data packets in the first stream packet may come from the same data stream or from different data streams. That is, the data packets in the first stream packet may be part of data packets in a certain data stream or may be data packets in multiple data streams (of course, it is required that these data packets in the same stream packet must go to the same target device). Similarly, one or more data packets in the second stream packet may come from the same data stream or from different data streams.

[0135] The first stream packet and the second stream packet may be data packets in the same data stream. The first stream packet and the second stream packet may also be from different data streams. For example, the first stream packet is a data packet in data stream 1, and the second stream packet is a data packet in data stream 2; or, the first stream packet is a data packet in data stream 2, and the second stream packet is a data packet in data stream 1; or, the first stream packet includes a data packet in data stream 1 and a data packet in data stream 2; or, the second stream packet includes a data packet in data stream 1 and a data packet in data stream 2.

[0136] It can be seen that by setting different parameters (such as setting the time interval Gap or the duration Time), DLB with different performances can be achieved. Alternatively, by setting different values ​​for the same parameter, DLB with different performances can also be achieved. Moreover, these set parameters can act separately or in combination. For example, when only the time interval parameter is set, when the sending period is set to 5us, a path switch may be triggered every 5us, and the performance of DLB ​​is higher. Accordingly, the receiving end may require more sorting resources. When the sending period is set to 1OOus, a path switch may be triggered every 100us, and the performance of DLB ​​is lower. Accordingly, the sorting resources required by the receiving end may be less.

[0137] In other embodiments, multiple sets of parameters may be set. A set of parameters refers to one or more parameters, for example, a first set of parameters includes a time interval and a duration. A second set of parameters includes a time interval and a data volume. The same data stream uses a set of parameters. Different data streams may use different parameters. For example, data stream 1 uses a first set of parameters for flow balancing, and data stream 2 uses a second set of parameters. Of course, different data streams may also use the same set of parameters, and the embodiments of the present application do not limit this.

[0138] In addition, in actual applications, different data streams can achieve traffic balancing based on different parameters to meet the requirements of business differentiation. For example, for data stream 1, the sender detects whether the time interval between data packets meets the above preset interval, and thus creates one or more flow packets for data stream 1 to balance traffic. For data stream 2, the sender detects the parameter of the data volume of the data packet, and switches the path every time 256KB of data is sent, thereby dynamically selecting different paths for the data packets in data stream 2.

[0139] In some embodiments, the sender needs to distinguish different flow packets. That is, different flow packets are delimited. Delimitation means clearly distinguishing which flow packet a data packet belongs to. Subsequently, the receiver can perform re-ordering on the data packets based on the delimitation. Exemplarily, taking the first flow packet and the second flow packet as an example, the sender can distinguish the first flow packet from the second flow packet in any of the following ways.

[0140] 1. The sender distinguishes the first flow packet from the second flow packet by re-encapsulating the data packets of the first flow packet or the second flow packet. For example, some label fields can be added to the data packet, and certain values ​​can be set for the fields to identify which flow packet the data packet belongs to. Alternatively, existing fields can be reused directly, and new values ​​can be set for the fields to identify the data packet.

[0141] Correspondingly, the receiver decapsulates the data packet and learns from the corresponding field in the data packet which flow packet the data packet belongs to. The receiver can also determine whether the tail packet of the first flow packet is received according to the delimiter identifier.

[0142] Specifically, the specific implementation method of the sender encapsulating the data packet may be: at least one data packet in the first flow packet carries a delimiter identifier, and at least one data packet in the second flow packet carries a delimiter identifier, and the delimiter identifier is used to distinguish the first flow packet from the second flow packet.

[0143] Optionally, the delimiter identifier can be a flow packet sequence number to explicitly indicate the flow packet to which the data packet belongs. Data packets in the same flow packet all carry the same flow packet sequence number (flowpacsequence, FSN). For example, the value of the FSN field of all data packets in flowpac 0 is 0, the value of the FSN field of all packets in flowpac 1 is 1, and so on. Among them, the FSN bit width (i.e., the number of bits required) needs to enable the receiving side to distinguish different flowpacs received via different paths, for example, it can be 4 bits.

[0144] For example, if the flow packet carries only data of the same flow, after receiving the current data packet, if the receiver finds that the value of the FSN field is 3 for the first time after decapsulating the current data packet, the receiver determines that the current data packet is the first packet of flow packet 3.

[0145] In some embodiments, once the receiver receives a tail packet carrying a tail packet identifier in a certain flow packet, the receiver stores the tail packet information in a re-ordering table (ROT).

[0146] Subsequently, once the receiver receives a new data packet, it can query the sorting flow table. If it can query the tail packet information of the previous flow packet, it means that the receiver has received the tail packet of the previous flow packet, and there is no need to reorder the flowpac to which the new data packet belongs. For example, the receiver receives a data packet with FSN=4, and it queries the sorting flow table to find that it has received the tail packet with FSN=3. Since flow packets 3 and 4 are received in the order of first-sent-first-arrived and last-sent-last-arrived, the receiver does not need to perform reordering.

[0147] On the contrary, see Fig.11 , after receiving the new stream packet (such as the second stream packet), if the receiver determines that the previous stream packet, i.e. the tail packet of the first stream packet, is not received by querying the sorting flow table, it means that the first stream packet and the second stream packet do not reach the receiver in the order of first-sent-first-arrived and last-sent-last-arrived, resulting in disorder. Therefore, the receiver performs reordering through RC. As a possible implementation, the receiver releases the RC after receiving the tail packet of the first stream packet. It is easy to understand that the receiver receives the tail packet of the first stream packet, indicating that the first stream packet has been received, so that the receiver sorts the second stream packet after the first stream packet. In this way, there is no disorder problem between the first stream packet and the second stream packet, and the RC can be released, and the released RC is used for other reordering processes, thereby improving the utilization rate of RC. Since the idle RC can also be used for other reordering processes, it is equivalent to expanding the number of available RCs.

[0148] In some embodiments, the receiver only needs to occupy RC to perform reordering when a path switch occurs. That is to say, if the delay difference between the two paths is at most 20us, the flow packet that undergoes path switching only needs to occupy RC for about 20us, that is, after the data sent first and received last from the original path is guaranteed to be received (only 20us at most), RC can be released. Compared with the packetspray mechanism, RC needs to be occupied throughout the life cycle of the data stream (which can reach ms or even s level), and the reordering process in the embodiment of the present application can reduce RC consumption.

[0149] Furthermore, in the above-mentioned reordering process of the receiver, RC resources are enabled only when disorder occurs, that is, when receiving a new stream packet, the reception of the previous stream packet has not been completed, and the RC is released immediately after it is determined that there is no disorder problem. The sorting cycle of RC is shortened, which can reduce the consumption of RC and improve the utilization rate of RC. Among them, the sorting cycle can refer to the moment when the receiver determines that disorder occurs to the moment when RC is released. Of course, it can also refer to the moment when the receiver determines that there is a stream packet passing through the switching path to the moment when RC is released. The embodiment of the present application does not limit the specific time period of the sorting cycle.

[0150] By using the traffic balancing method provided in the embodiment of the present application, the sending side can control the dynamic capabilities of the DLB through different parameters, such as Gap, Size, and Time. For example, the number of flow packets that undergo path switching can be controlled. Furthermore, based on the flow packets that undergo path switching, the required number of RCs and / or the sorting period of the RCs can also be controlled. Moreover, the performance of load balancing may be different when the parameter values ​​are different and / or the parameter types (such as the parameter type is Time, or Gap) are different. For example, when the value of the data volume is large, a path switch can only be triggered once a large amount of data is sent, and the dynamic performance of the DLB is poor. However, the receiver requires fewer RCs and consumes less RCs.

[0151] In some embodiments, different sorting strategies may be selected based on the number of RCs available at the receiver:

[0152] 1. If the number of available RCs is greater than or equal to the RC number threshold, the data packets of different data streams are reordered through different RCs. That is, each data stream can correspond to one RC.

[0153] 2. If the number of available RCs is less than the RC number threshold, data packets of different data streams are reordered through the same RC, that is, one data stream (such as a data stream including the first stream packet and the second stream packet) or multiple data streams share one RC.

[0154] In some embodiments, the following dynamic re-ordering channel (DRC) algorithm may be used to further control the number of RCs.

[0155] The threshold N1 may be preset, for example, N1=512.

[0156] When the number of available RCs is greater than or equal to N1, each data stream to be sorted can occupy one RC exclusively.

[0157] Otherwise, when the number of available RCs is less than N1, one data stream (such as a data stream including the first stream packet and the second stream packet) or multiple data streams share the same RC.

[0158] By using the above DRC algorithm, limited RC resources can be used to ensure that most or all flows are not out of order. In addition, the receiver can also feed back the available RC resources to the sender to ensure that the corresponding RC is available for the sent flowpac.

[0159] Optionally, the delimiting identifier used to distinguish the first flow packet from the second flow packet can be some preset identifier in the first packet. That is, the sender only carries the preset identifier in the first packet of each flowpac. For example, the value of the SwitchOver (SO) field of the first packet is set to 1 to indicate that the flow packet is the first packet of a new flow packet, and is also used to indicate that the flow packet and the previous flow packet are sent using different paths, that is, the flow packet has undergone a path switch relative to the previous flow packet. Alternatively, the first packet carries other forms of first packet identifiers, such as the first packet (FP) field value is 1. Alternatively, the first packet carries a packet type (packettype) field, for example, packettype=0 represents the first packet.

[0160] Correspondingly, after receiving the current data packet, if the value of the SO field of the current data packet is 1 after decapsulating the current data packet, and the receiving party has received one or more data packets of the first stream packet, the receiving party determines that the current data packet is the first packet of the second stream packet.

[0161] Similar to the above, the receiver can determine whether to perform reordering by querying the sorting flow table. For example, when the receiver receives the current data packet with SO=1, it queries the sorting flow table and finds that it has received the tail packet of the previous flow packet. Since the previous flow packet and the current flow packet are received in the order of first sent first arrived and last sent last arrived, the receiver does not need to perform reordering.

[0162] In this way, it is possible to distinguish which flowpac the current data packet belongs to only through the first packet, which can reduce the overhead of control information and thus improve the transmission efficiency of effective data information.

[0163] Optionally, the delimiter identifier can be some preset identifier in the tail packet. That is, the sender only carries the tail packet identifier in the tail packet of each flowpac, or carries the packet type identifier, and the packet type identifier is used to indicate that the data packet is the tail packet. For example, packettype=3 indicates the tail packet.

[0164] Optionally, other values ​​of packettype can represent packets between the first and last packets in the flowpac.

[0165] Optionally, the delimiting identifier may be a packet sequence number (PSN), wherein the PSN carried by the first packet of the second stream packet is M, where M is a positive integer, the PSN carried by the i-th data packet of the second stream packet is i-1, where i is an integer greater than 1, and M is the difference between the number of data packets in the first stream packet and 1.

[0166] For example, flowpac 3 includes 100 data packets, then PSN=99 in the first packet, PSN=1 in the second packet, PSN=2 in the third packet, PSN=3 in the fourth packet, and so on, PSN=99 in the 100th packet. In this way, when the receiver receives data packets with the same PSN, for example, the receiver first receives the first packet (PSN=99) in flowpac 3, and then receives a data packet with the same PSN of 99, the receiver can determine that the data packet is the last packet of flowpac 3. After that, the receiver can prepare to receive the next flow packet.

[0167] Optionally, the delimiter may also be a characteristic value of the tail packet in the first stream packet carried by the first packet of the second stream packet, the characteristic value including a cyclic redundancy check (CRC) check value, that is, some information of the tail packet of the previous stream packet is carried in the first packet of the current stream packet.

[0168] Of course, the sender may combine the above-mentioned multiple delimiter identifiers, for example, the sender carries a first packet identifier and a last packet identifier in a data packet.

[0169] 2. A dedicated delimiter packet can be inserted between two flowpacs to indicate whether the tail packet of the first flow packet has been received.

[0170] Specifically, when it is determined to start sending a new flow packet and the path needs to be switched, the sender first sends a flowpac delimiter (FPD) through the original path, i.e., the first path, and then sends a new flow packet, i.e., the second flow packet, through a new path, i.e., the second path.

[0171] The delimiter packet is used to distinguish the first flow packet from the second flow packet. The delimiter packet is received through the first path and is the next data packet of the tail packet of the first flow packet. The delimiter packet can be a control packet with preset characteristics. For example, it can be a control packet containing preset fields, or a control packet of preset size. The embodiment of the present application does not limit the specific implementation of the delimiter packet.

[0172] Optionally, the size of the delimited packet is relatively small (e.g., it may be smaller than a certain threshold value), so that the delimited packet can reach the receiver with a relatively low delay. For example, the delimited packet reaches the receiver earlier than the second stream packet. Of course, the delimited packet may also reach the receiver later than the second stream packet, and the embodiment of the present application does not limit the timing of the delimited packet reaching the receiver.

[0173] Accordingly, the receiver is currently receiving the first stream packet through the first path, and subsequently, the receiver also receives the delimited packet through the first path, then the receiver can determine that the first stream packet has been received. In one example, the receiver receives the second stream packet after receiving the delimited packet (the first stream packet has been received), and the first stream packet and the second stream packet usually do not have a disorder problem. Therefore, the receiver usually does not need to reorder, which can reduce RC consumption.

[0174] It should be noted that the field names mentioned in the embodiments of the present application are exemplary names and may be other names in actual implementation, and the embodiments of the present application are not limited to this.

[0175] The above mainly describes the traffic balancing of the same data stream, as well as the delimitation, RC, and DRC methods of the data packets in the data stream.

[0176] In other embodiments, multiple data streams can be aggregated (also referred to as merged) into a coarse-grained stream (for example, through a hash algorithm). Exemplarily, a preset algorithm (such as a hash algorithm, or other similar algorithms) is used to aggregate the sorted data streams. The coarse-grained stream formed by the aggregation may be referred to as an aggregated stream in this article. In an embodiment of the present application, the above-mentioned traffic balancing method can be executed for the aggregated stream, and the specific implementation methods of the delimitation, RC, and DRC methods of the data packets in the aggregated stream can be referred to above.

[0177] Based on this, the "data flow" in this article can refer to the TCP flow in the usual sense as mentioned above, or it can refer to the converged flow.

[0178] As a possible implementation, the converged flows can share the same RC. Among them, head of line blocking (HOL) may occur between flows sharing the same RC. Therefore, the receiver processes the next flowpac only when it is sure that it has received the tail packet corresponding to the previous flowpac.

[0179] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of interaction between different network elements. It can be understood that in order to realize the above functions, the sending node and the receiving node include hardware structures and / or software modules corresponding to the execution of each function. In combination with the units and algorithm steps of each example described in the embodiment disclosed in this application, the embodiment of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present application.

[0180] The embodiment of the present application can divide the sending node and the receiving node into functional units according to the above method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0181] Fig.12 A possible exemplary block diagram of a traffic balancing device involved in an embodiment of the present application is shown. The device 1200 can exist in the form of software, or can be a network device, or can be a chip that can be used for a network device. The device 1200 includes: a processing unit 1202 and a communication unit 1203. The processing unit 1202 is used to control and manage the actions of the device 1200. For example, if the device is used to implement the sending node function, the processing unit 1202 is used to support the device 1200 to execute Figure 5 S502 in Figure 6 S602, S603, S604 in, and / or other processes for the technology described herein. If the device is used to implement the receiving node function, the processing unit 1202 is used to support the device 1200 to determine whether the tail packet of the first stream packet has been received when the second stream packet is received, if the tail packet of the first stream packet has not been received, then reorder the data packets in the first stream packet and the second stream packet through the sorting channel RC, and after reordering, if it is determined that the tail packet of the first stream packet has been received, then release the RC, and / or other processes for the technology described herein. The communication unit 1203 is used to support the communication between the device 1200 and other network entities. The device 1200 may also include a storage unit 1201 for storing program code and data of the device 1200.

[0182] Among them, the processing unit 1202 can be a processor or a controller, for example, it can be a CPU, a general processor, a DSP, an ASIC, an FPGA or other programmable logic device, a transistor logic device, a hardware component or any combination thereof. It can implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements a computing function, for example, including a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like. The communication unit 1203 can be a communication interface, a transceiver or a transceiver circuit, etc., wherein the communication interface is a general term. In a specific implementation, the communication interface can include multiple interfaces, for example, it can include: an interface between a sending node and a receiving node and / or other interfaces. The storage unit 1201 can be a memory, or other forms of storage devices.

[0183] When the processing unit 1202 is a processor, the communication unit 1203 is a communication interface, and the storage unit 1201 is a memory, the device 1200 involved in the embodiment of the present application can be a Fig.13 Device of the structure shown.

[0184] See also Fig.13 As shown, the device 1300 includes: a processor 1302, a communication interface 1303, and a memory 1301. Optionally, the device 1300 may also include a bus 1304. The communication interface 1303, the processor 1302, and the memory 1301 may be interconnected via the bus 1304; the bus 1304 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus 1304 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.13 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0185] As another possible implementation, in the case where each functional module is divided according to each function, if the traffic balancing device is used to implement the sending node function, Fig.14 Another possible structural diagram of the device for implementing the sending node function involved in the above embodiment is shown. The flow balancing device 1400 may include: a first module 1401, a second module 1402 and a third module 1403. The first module 1401 is used to support the flow balancing device 1400 to execute Figure 5 S501 in Figure 6 S601 in the embodiment, and / or other processes for the solution described herein. The second module 1402 is used to support the flow balancing device 1400 to perform Figure 5 In process S502, Figure 6 The third module 1403 is used to support the flow balancing device 1400 to execute Figure 5 In process S503, Figure 6S605 in the method is also used to send a delimited packet through the first path, the delimited packet is a control packet used to distinguish the first flow packet from the second flow packet, the first path is a path for sending data packets in the first flow packet, and / or other processes for the scheme described herein. Among them, all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, which will not be repeated here. Of course, in order to implement the technical solution of the embodiment of the present application, the traffic balancing device may also include other modules, which will not be repeated here.

[0186] If the traffic balancing device is used to implement the receiving node function, Fig.15 Another possible structural schematic diagram of the device for realizing the receiving node function involved in the above-mentioned embodiment is shown. The flow balancing device 1500 may include: a fourth module 1501, a fifth module 1502 and a sixth module 1503. The fourth module 1501 is used to support the flow balancing device 1500 to determine whether the tail packet of the first flow packet has been received when the second flow packet is received, and / or other processes for the scheme described herein. The fifth module 1502 is used to support the flow balancing device 1500 to perform reordering of the data packets in the first flow packet and the second flow packet through the sorting channel RC when the tail packet of the first flow packet is not received, and / or other processes for the scheme described herein. The sixth module 1503 is used to support the flow balancing device 1500 to release the RC after reordering if it is determined that the tail packet of the first flow packet has been received, and / or other processes for the scheme described herein.

[0187] It will be appreciated by those skilled in the art that in the above embodiments, the embodiments may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, the embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server, or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server, or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital video disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).

[0188] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical or other forms.

[0189] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network devices (such as terminals). Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0190] In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, or each functional unit can exist independently, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.

[0191] Through the description of the above implementation methods, the technicians in the relevant field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, hard disk or optical disk, etc., and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0192] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A network device, It is characterized in that include: The first module is used to obtain the data packet to be sent; A second module is used to create or maintain a first flow package; Classifying the data packets targeting the first node into the first flow packets; Creating or maintaining second stream packages; The data packets sent later and targeting the first node are classified into the second flow packets, wherein the transmission path of the data packets in the second flow packet is different from the transmission path of the data packets in the first flow packet; Determine whether the network balancing parameters meet the preset conditions; If the network balancing parameter meets the preset condition, creating or maintaining the second flow packet; The network balancing parameters are used to classify data packets into corresponding flow packets based on the network balancing principle; The network balancing parameters satisfying the preset conditions include: Within a preset interval starting from the moment when the first data packet in the first flow packet is sent, there are no data packets destined for the same destination node; The data volume of the first stream packet reaches a preset data volume; The duration of the first stream packet reaches a preset duration; The sending frequency of the first stream packets reaches a preset frequency; The third module is used to send the data packet to be sent based on the flow packet to which the data packet to be sent belongs, Among them, a flow packet includes at least one data packet, the destination nodes of the data packets belonging to the same flow packet are the same, and the sending paths of the data packets belonging to the same flow packet are the same.

2. The network device according to claim 1, It is characterized in that At least one data packet in the first flow packet carries a first delimiter identifier, and at least one data packet in the second flow packet carries a second delimiter identifier. The first delimiter identifier and the second delimiter identifier are used to distinguish the first flow packet from the second flow packet.

3. The network device according to claim 1 or 2, It is characterized in that The third module is further used to send a delimited packet through a first path, where the delimited packet is a control packet used to distinguish the first flow packet from the second flow packet, and the first path is a path for sending data packets in the first flow packet.

4. The network device according to any one of claims 1 to 3, It is characterized in that Data packets within a flow packet come from the same or different data flows.

5. The network device according to any one of claims 1 to 4, It is characterized in that The second module is also used to set a sending path for the data packets in the flow packet based on the principle of network balance.

6. A network device, It is characterized in that include: The fourth module is used to determine whether the tail packet of the first stream packet has been received when the second stream packet is received; A fifth module is used for reordering the data packets in the first flow packet and the second flow packet through the sorting channel RC if the tail packet of the first flow packet is not received; A sixth module, configured to release the RC after reordering if it is determined that the tail packet of the first stream packet has been received; Wherein, the second flow packet is created or maintained when the network balancing parameter meets the preset condition; The transmission path of the data packets in the second flow packet is different from the transmission path of the data packets in the first flow packet; Determine whether the network balancing parameters meet the preset conditions; If the network balancing parameter meets the preset condition, creating or maintaining the second flow packet; The network balancing parameters are used to classify data packets into corresponding flow packets based on the network balancing principle; The network balancing parameters satisfying the preset conditions include: Within a preset interval starting from the moment when the first data packet in the first flow packet is sent, there are no data packets destined for the same destination node; The data volume of the first stream packet reaches a preset data volume; The duration of the first stream packet reaches a preset duration; The sending frequency of the first stream packets reaches a preset frequency.

7. An electronic device, It is characterized in that The system comprises a processor and a storage device, wherein the storage device is used to store instructions, and the processor is used to perform the following actions based on the instructions: Create or maintain first-rate packages; Classifying the data packets targeting the first node into the first flow packets; When the network balancing parameter meets the preset condition, creating or maintaining the second flow packet; The data packets sent later and targeting the first node are classified into the second flow packets, Wherein, the destination nodes of the data packets belonging to the same flow packet are the same, and the sending paths of the data packets belonging to the same flow packet are the same; the sending path of the data packets in the second flow packet is different from the sending path of the data packets in the first flow packet; The network balancing parameters satisfying the preset conditions include: Within a preset interval starting from the moment when the first data packet in the first flow packet is sent, there are no data packets destined for the same destination node; The duration of the first stream packet reaches a preset duration; The sending frequency of the first stream packets reaches a preset frequency.

8. An electronic device, It is characterized in that The system comprises a processor and a storage device, wherein the storage device is used to store instructions, and the processor is used to perform the following actions based on the instructions: Determining whether the tail packet of the first stream packet has been received when the second stream packet is received; If the tail packet of the first stream packet is not received, reordering the data packets in the first stream packet and the second stream packet is performed through the sorting channel RC; After reordering, if it is determined that the tail packet of the first stream packet has been received, releasing the RC; Wherein, the second flow packet is created or maintained when the network balancing parameter meets the preset condition; The transmission path of the data packets in the second flow packet is different from the transmission path of the data packets in the first flow packet; Determine whether the network balancing parameters meet the preset conditions; If the network balancing parameter meets the preset condition, creating or maintaining the second flow packet; The network balancing parameters are used to classify data packets into corresponding flow packets based on the network balancing principle; The network balancing parameters satisfying the preset conditions include: Within a preset interval starting from the moment when the first data packet in the first flow packet is sent, there are no data packets destined for the same destination node; The data volume of the first stream packet reaches a preset data volume; The duration of the first stream packet reaches a preset duration; The sending frequency of the first stream packets reaches a preset frequency.

9. A flow balancing method, It is characterized in that include: Create or maintain first-rate packages; Classifying the data packets targeting the first node into the first flow packets; When the network balancing parameter meets the preset condition, creating or maintaining the second flow packet; The data packets sent later and targeting the first node are classified into the second flow packets, Wherein, the destination nodes of the data packets belonging to the same flow packet are the same, and the sending paths of the data packets belonging to the same flow packet are the same; the sending path of the data packets in the second flow packet is different from the sending path of the data packets in the first flow packet; The network balancing parameters satisfying the preset conditions include: Within a preset interval starting from the moment when the first data packet in the first flow packet is sent, there are no data packets destined for the same destination node; The duration of the first stream packet reaches a preset duration; The sending frequency of the first stream packets reaches a preset frequency.

10. A flow balancing method, It is characterized in that include: Determining whether the tail packet of the first stream packet has been received when the second stream packet is received; If the tail packet of the first stream packet is not received, reordering the data packets in the first stream packet and the second stream packet is performed through the sorting channel RC; After reordering, if it is determined that the tail packet of the first stream packet has been received, releasing the RC; Wherein, the second flow packet is created or maintained when the network balancing parameter meets the preset condition; The transmission path of the data packets in the second flow packet is different from the transmission path of the data packets in the first flow packet; Determine whether the network balancing parameters meet the preset conditions; If the network balancing parameter meets the preset condition, creating or maintaining the second flow packet; The network balancing parameters are used to classify data packets into corresponding flow packets based on the network balancing principle; The network balancing parameters satisfying the preset conditions include: Within a preset interval starting from the moment when the first data packet in the first flow packet is sent, there are no data packets destined for the same destination node; The data volume of the first stream packet reaches a preset data volume; The duration of the first stream packet reaches a preset duration; The sending frequency of the first stream packets reaches a preset frequency.