Packet forwarding method, network device, medium and program product

By updating the forwarding port of long Flowlets in the data center network, the problems of load imbalance and high latency in the Flowlet-granular load balancing method are solved, achieving more efficient load balancing and lower packet out-of-order delivery.

CN122316993APending Publication Date: 2026-06-30ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZTE CORP
Filing Date
2024-12-27
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing load balancing methods based on Flowlet granularity suffer from load imbalance and high latency issues in data center networks, especially in RDMA transmission and large model training scenarios where it is difficult to achieve ideal load balancing results.

Method used

After receiving a message, the system determines its Flowlet and updates the forwarding port when the Flowlet length exceeds a preset threshold. This enables rerouting of long Flowlets, increases rerouting opportunities, shortens transmission latency, and reduces message out-of-order delivery.

Benefits of technology

It effectively shortens the transmission latency of long Flowlets, improves load balancing performance, reduces packet out-of-order delivery, and achieves a better trade-off.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122316993A_ABST
    Figure CN122316993A_ABST
Patent Text Reader

Abstract

This disclosure provides a message forwarding method, comprising: receiving a first message; determining a first Flowlet to which the first message belongs; determining a first forwarding port corresponding to the first Flowlet according to a routing table, wherein the routing table includes forwarding ports corresponding to each Flowlet of each data flow; in response to determining that the length of the first Flowlet is greater than a preset long Flowlet threshold, updating the first forwarding port in the routing table to a second forwarding port; and forwarding the first message through the second forwarding port. This disclosure also provides a network device, a computer-readable medium, and a computer program product.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of communication technology, and in particular to a message forwarding method, network device, computer-readable medium, and computer program product. Background Technology

[0002] In data center networks, packets between source and destination devices can be forwarded through multiple paths provided by various network devices (such as switches and routers). When a large number of packets pass through a network device, in order to reduce network congestion, lower packet forwarding latency, and improve network utilization, the network device can use load balancing technology to balance traffic on different paths.

[0003] Some related technologies employ a flowlet-based load balancing approach to balance traffic across different paths. This approach divides a single data stream into multiple flowlets, each containing multiple consecutively transmitted packets from that data stream. Different paths are selected for different flowlets based on routing policies, and the packets within each flowlet are forwarded according to the chosen path. However, flowlet-based load balancing performs poorly in certain scenarios. Summary of the Invention

[0004] This disclosure provides a message forwarding method, network device, computer-readable medium, and computer program product.

[0005] In a first aspect, embodiments of this disclosure provide a message forwarding method, comprising: receiving a first message, determining a first Flowlet to which the first message belongs, determining a first forwarding port corresponding to the first Flowlet according to a routing table, the routing table including forwarding ports corresponding to each Flowlet of each data stream, and updating the first forwarding port in the routing table to a second forwarding port in response to determining that the length of the first Flowlet is greater than a preset long Flowlet threshold, and forwarding the first message through the second forwarding port.

[0006] In a second aspect, embodiments of this disclosure provide a network device including a memory and a processor; the memory stores a computer program executable by the processor, and when the computer program is executed by the processor, it implements the first aspect and any possible embodiments thereof.

[0007] Thirdly, embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the first aspect and any possible embodiments thereof.

[0008] Fourthly, embodiments of this disclosure provide a computer program product, which includes a computer program that, when executed by a processor, implements the first aspect and any possible embodiments thereof.

[0009] In this embodiment, a first message is received, the first Flowlet to which the first message belongs is determined, and the first forwarding port corresponding to the first Flowlet is determined according to a routing table. The routing table includes the forwarding ports corresponding to each Flowlet of each data stream. In response to determining that the length of the first Flowlet is greater than a preset long Flowlet threshold, the first forwarding port in the routing table is updated to a second forwarding port, and the first message is forwarded through the second forwarding port. For Flowlets whose length is greater than the preset long Flowlet threshold (i.e., long Flowlets), updating their forwarding ports to achieve rerouting of long Flowlets can increase the rerouting opportunities of long Flowlets and help shorten their transmission latency. Attached Figure Description

[0010] In the accompanying drawings of the embodiments disclosed herein:

[0011] Figure 1 This is a schematic diagram of a network structure that can be applied to an embodiment of this disclosure;

[0012] Figure 2 This is a schematic diagram of another network structure that can be applied to the embodiments of this disclosure;

[0013] Figure 3 This is a schematic flowchart of a message forwarding method provided in an embodiment of the present disclosure;

[0014] Figure 4 This is a schematic diagram of another message forwarding method provided in an embodiment of the present disclosure;

[0015] Figure 5 A schematic diagram illustrating an implementation of a message forwarding method provided in this embodiment of the disclosure;

[0016] Figure 6 This is a schematic diagram of a message forwarding device provided in an embodiment of the present disclosure;

[0017] Figure 7 This is a schematic diagram of the structure of a network device provided in an embodiment of this disclosure. Detailed Implementation

[0018] To enable those skilled in the art to better understand the technical solutions of this disclosure, the embodiments of this disclosure will be described in detail below with reference to the accompanying drawings.

[0019] The present disclosure will be described more fully below with reference to the accompanying drawings; however, the embodiments shown may be embodied in different forms, and the present disclosure should not be construed as limited to the embodiments set forth below. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will enable those skilled in the art to fully understand the scope of the disclosure.

[0020] The accompanying drawings of the embodiments disclosed herein are provided to further illustrate the embodiments of this disclosure and form part of the specification. They are used together with the detailed embodiments to explain this disclosure and do not constitute a limitation thereof. The above and other features and advantages will become more apparent to those skilled in the art from the description of the detailed embodiments with reference to the accompanying drawings.

[0021] Where there is no conflict, the various embodiments of this disclosure and the features thereof in the embodiments may be combined with each other.

[0022] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to limit the disclosure. The term "and / or" as used in this disclosure includes any and all combinations of one or more of the associated enumerated entries. The singular forms "a" and "the" as used in this disclosure are also intended to include the plural forms, unless the context clearly indicates otherwise. The terms "comprising," "made of," etc., as used in this disclosure specify the presence of the stated feature, integral, step, operation, element, and / or component, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof.

[0023] Unless otherwise specified, all terms used in this disclosure (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning, unless expressly so defined in this disclosure.

[0024] See attached document Figure 1 This is a schematic diagram of a network structure applicable to embodiments of this disclosure. For example... Figure 1 As shown, the Spine-Leaf network structure 10 may include a spine switch 11, a leaf switch 12, and terminals 13. Leaf switch 12 connects terminals 13 to spine switch 11, and multiple available paths exist from leaf switch 12 to spine switch 11. When the source terminal in terminal 13 communicates with the destination terminal, data packets can be forwarded through the multiple available paths from leaf switch 12 to spine switch 11. Terminal 13 may include, but is not limited to, server devices. It should be understood that... Figure 1 The number of devices in the network structure shown is for illustrative purposes only, and the embodiments of this application are not limited thereto.

[0025] The methods provided in the embodiments of this disclosure can be applied to... Figure 1 The spine switch 11 or leaf switch 12 is not limited in this respect.

[0026] In some possible embodiments, the destination terminal of the data flow is determined, and the spine switch 11 has only one routing option. In this scenario, the method provided in this disclosure is applied to the leaf switch 12.

[0027] See attached document Figure 2 This is a schematic diagram of another network structure that can be applied to the embodiments of this disclosure. Figure 2 The diagram illustrates a three-layer fat-tree network structure. The fat-tree network structure 20 may include an access layer 21, an aggregation layer 22, a core layer 23, and a terminal 24. The terminal 24 may include, but is not limited to, server devices. The functions of each component are as follows:

[0028] Access layer 21 is the layer closest to terminal 24 in the network topology. Its main task is to connect terminal 24 to the network and provide an interface for terminal 24 to access the network. Network devices located in access layer 21 can be customer edge (CE) devices (such as switches or routers), and CE devices can provide access services to terminal 24.

[0029] Aggregation layer 22 is the intermediate layer in network topology, responsible for aggregating data flows from access layer 21 to core layer 23. The main tasks of aggregation layer 22 are to forward, switch, and control data, while providing high-availability bandwidth to ensure fair sharing among access layer 21 devices and optimize network resource utilization. Network devices located at aggregation layer 22 can be provider edge (PE) devices (such as switches or routers). PE devices can be used to connect access layer 21 and core layer 23, and data flows can be forwarded to either access layer 21 or core layer 23 via PE devices.

[0030] The core layer 23 is the highest-level layer in the network architecture, responsible for handling large volumes of data flow and connecting different devices and network services in the aggregation layer 22. The core layer 23 undertakes crucial network tasks, including high-speed data transmission, routing decisions, and cross-network communication. Typically, the core layer 23 uses high-bandwidth network devices. These network devices can be service provider (P) devices (such as switches or routers), which possess powerful data switching capabilities and can be used for high-speed data flow exchange.

[0031] The methods provided in the embodiments of this disclosure can be applied to... Figure 2The network devices in the access layer 21, the aggregation layer 22, or the core layer 23 are not limited to these.

[0032] It is understood that since the network devices in the access layer 21 directly connect to a large number of terminals 24, congestion usually occurs in the network devices in the access layer 21, while the network devices in the aggregation layer 22 and the core layer 23 perceive a lower degree of congestion. Therefore, in some possible embodiments, the method provided in this disclosure is applied to the network devices in the access layer 21.

[0033] In this embodiment of the disclosure, the above network structure can be applied to data center networks and can be deployed based on Remote Direct Memory Access (RDMA) protocols (such as InfiniBand (IB) protocol, RDMA over Converged Ethernet (RoCE) protocol, RoCEv2 protocol, etc.).

[0034] With the development of network technology, data center networks based on RDMA have been widely used due to their advantages such as low latency, low CPU load, and high network communication efficiency. Large-scale model training has also gained widespread application due to its powerful data processing capabilities, breakthroughs in deep learning technology, and significant enhancements in computing resources. In both RDMA transmission and large-scale model training scenarios, data streams exhibit several typical characteristics, such as rate-based transmission, uniform transmission of large numbers of packets, and the presence of numerous long data streams. In these scenarios, traditional load balancing methods designed for the Transmission Control Protocol / Internet Protocol (TCP / IP) stack and traditional cloud computing and cloud storage services are insufficient to achieve ideal load balancing results.

[0035] Equal-cost multi-path routing (ECMP) is a common technique for load balancing. Network devices using ECMP, upon receiving a packet, can forward it according to their routing table. First, based on a hash algorithm, they determine the index corresponding to the received packet using its key information. Then, by querying the routing table for the entry matching that index, they forward the packet according to the forwarding port listed in that entry. ECMP load balancing is a flow-based load balancing technique. Its main drawback is that hash collisions can lead to load imbalances, and it lacks proactive adjustment capabilities, resulting in low link utilization and high data flow completion latency.

[0036] Improvements to the ECMP load balancing algorithm include packet-level and flowlet-level load balancing methods. Packet-level load balancing selects paths packet-by-packet based on routing policies; however, due to varying forwarding delays across different paths, this can lead to out-of-order packet delivery. Flowlet-level load balancing divides a data flow into multiple flows, each containing consecutively transmitted packets. Different paths are selected for different flows based on routing policies, and the packets within each flow are forwarded along the chosen path. Flowlet-level load balancing is suitable for data center networks using window-based transmission control. However, for data center networks using RDMA (Real-Time DMA) transmission protocols with rate-based transmission control, this approach struggles with flowlet segmentation, degenerating into flow-based load balancing and resulting in performance degradation.

[0037] In view of the above, embodiments of this disclosure provide a message forwarding method, a network device, a computer-readable medium, and a computer program product, which can be applied to, but are not limited to, applications. Figure 1 or Figure 2 The network devices in the network structure shown can be applied to, but are not limited to, large model training scenarios and RDMA transmission scenarios. A detailed description is provided below with reference to the accompanying drawings.

[0038] Firstly, refer to the appendix Figure 3 This is a schematic flowchart of a message forwarding method provided in this disclosure, which can be applied to network devices (such as switches or routers). The method includes:

[0039] S31: Receive the first message and determine the first Flowlet to which the first message belongs.

[0040] In this embodiment of the disclosure, the network device may receive the first message from the previous node.

[0041] For example, in Figure 1 In this context, when the network device is a leaf switch, the upstream node can be the terminal that initiates the data stream transmission (hereinafter referred to as the source terminal). The leaf switch receives the first message from the source terminal, and the first message needs to be forwarded by the leaf switch to the terminal that receives the data stream (hereinafter referred to as the destination terminal) through the spine switch.

[0042] For example, in Figure 2 In this context, when the network device is an access layer switch, the upstream node can be the source terminal. The access layer switch receives the first packet from the source terminal, and the first packet needs to be forwarded to the destination terminal by the access layer switch through the aggregation layer and core layer switches.

[0043] In this embodiment of the disclosure, each time the network device receives a new data stream, it can add an entry corresponding to that data stream to the routing table. For each new Flowlet added to each data stream, an entry corresponding to that Flowlet is added to the routing table. The routing table can be stored in the network device's Ternary Content Addressable Memory (TCAM).

[0044] For example, the routing table may include a flow identifier for each data flow and the arrival time of the previous packet for the current packet of each data flow. The flow identifier may be a key-value pair (i.e., an index) obtained by hashing the 5-tuple information of packets belonging to that data flow. The 5-tuple information includes the source Internet Protocol (IP) address, destination IP address, source port, destination port, and protocol type.

[0045] For example, the routing table may also include the forwarding port corresponding to each Flowlet of each data flow.

[0046] In this embodiment of the disclosure, after the network device receives the first packet from the previous node, it can parse the first packet, extract the five-tuple information from the packet header of the first packet, and then determine the flow identifier of the first packet based on the five-tuple information using a hash algorithm. The flow identifier of the first packet is matched with the flow identifiers of each data flow in the routing table, and the data flow that matches the flow identifier of the first packet is determined as the data flow to which the first packet belongs.

[0047] In this embodiment of the disclosure, after determining the data flow to which the first packet belongs, the first Flowlet to which the first packet belongs can be determined based on the arrival time of the first packet, the arrival time of the previous packet belonging to the same data flow as the first packet in the routing table, and a preset flow segmentation time interval threshold (which can also be described as FlowletGap). For example, if the arrival time difference between the first packet and the previous packet belonging to the same data flow is less than or equal to the preset flow segmentation time interval threshold, it can be determined that the first packet and the previous packet belong to the same Flowlet; if the arrival time difference between the first packet and the previous packet belonging to the same data flow is greater than the preset flow segmentation time interval threshold, it can be determined that the first packet belongs to a new Flowlet of that data flow.

[0048] In this embodiment of the disclosure, the preset flow segmentation time interval threshold (i.e., FlowletGap) represents the time interval threshold at which a data flow is segmented into flowlets. This threshold is related to the congestion control algorithm used by the network and needs to be set to be less than the time interval between congestion control windows. In practical applications, appropriate values ​​can be set according to different congestion control algorithms.

[0049] S32: Determine the first forwarding port corresponding to the first Flowlet based on the routing table.

[0050] In this embodiment of the disclosure, the first forwarding port corresponding to the first Flowlet to which the first packet received by the network device belongs can be determined based on the forwarding ports corresponding to each Flowlet of each data flow included in the routing table.

[0051] S33: In response to determining that the length of the first Flowlet is greater than the preset long Flowlet threshold, update the first forwarding port in the routing table to the second forwarding port, and forward the first packet through the second forwarding port.

[0052] In the embodiments of this disclosure, the length of a Flowlet can be understood as the duration of the Flowlet, the duration of a message belonging to the Flowlet, or the number of messages belonging to the Flowlet.

[0053] In this embodiment, a preset long Flowlet threshold (also described as LongFlowletTime) characterizes the decision threshold for whether a Flowlet is a long Flowlet. If the length of the first Flowlet is greater than the preset long Flowlet threshold, then the first Flowlet can be determined to be a long Flowlet; conversely, if the length of the first Flowlet is less than or equal to the preset long Flowlet threshold, then the first Flowlet can be determined not to be a long Flowlet. The preset long Flowlet threshold is related to the rate convergence time of the congestion control algorithm in the network and needs to be set to be greater than the rate convergence time.

[0054] In this embodiment of the disclosure, for a Flowlet whose length is greater than a preset long Flowlet threshold (i.e., a long Flowlet), its forwarding port is updated to realize the rerouting of the long Flowlet, which can increase the rerouting opportunity of the long Flowlet and help to shorten its transmission latency.

[0055] In this embodiment of the disclosure, the method of determining that the length of the first Flowlet is greater than the preset long Flowlet threshold is not limited. Two possible implementation methods are described below.

[0056] Method 1: Directly compare the length of the first Flowlet with the preset long Flowlet threshold to determine that the length of the first Flowlet is greater than the preset long Flowlet threshold.

[0057] In this embodiment of the disclosure, before determining that the length of the first Flowlet is greater than the preset long Flowlet threshold using method one, the length of the first Flowlet and the preset long Flowlet threshold can be obtained first, and the method of obtaining them is not limited.

[0058] For example, a length field for Flowlets can be set in the routing table to count the length of each Flowlet. For instance, if the length of a Flowlet is the duration of a message belonging to that Flowlet, a message duration field can be set in the routing table. This field starts timing after the first message of each new Flowlet arrives, and is updated after each message belonging to that Flowlet is received. The length of the Flowlet can be obtained by retrieving the message duration in this field.

[0059] For example, the preset long Flowlet threshold can be pre-stored in the storage unit of the network device and can be directly retrieved from the storage unit when needed.

[0060] It is understandable that Method 1 can be applied to the determination of a Flowlet before it is first identified as a long Flowlet. After Method 1 determines that the length of the first Flowlet is greater than the preset long Flowlet threshold, a long Flowlet indication can be generated to indicate that the first Flowlet is a long Flowlet. When subsequent packets belonging to the first Flowlet arrive at the network device, the long Flowlet indication can be used to determine that the length of the first Flowlet is greater than the preset long Flowlet threshold, which is Method 2 described below.

[0061] Method 2: Determine that the length of the first Flowlet is greater than the preset long Flowlet threshold based on the long Flowlet indicator corresponding to the first Flowlet.

[0062] In some embodiments, before updating the first forwarding port in the routing table to the second forwarding port in step S33, the method further includes: determining that the duration of packets forwarded through the first forwarding port is greater than a preset Flowlet segmentation duration threshold. This ensures that rerouting occurs after the first Flowlet transmission is stable, avoiding out-of-order issues caused by rerouting when the first Flowlet transmission is unstable. Compared to data flow-based and packet-based routing schemes, the scheme disclosed herein offers a better balance between load balancing performance and out-of-order delivery.

[0063] In this embodiment, a preset Flowlet segmentation duration threshold (also described as a preset mini-Flowlet duration threshold or MiniFlowletTime) characterizes the decision threshold for whether a Flowlet can be segmented into a mini-Flowlet. If the duration of a packet forwarded by the first forwarding port is greater than the preset Flowlet segmentation duration threshold, it can be determined that the first Flowlet can be segmented into a smaller mini-Flowlet; conversely, if the duration of a packet forwarded by the first forwarding port is less than or equal to the preset Flowlet segmentation duration threshold, it can be determined that the first Flowlet cannot be segmented into a smaller mini-Flowlet. The preset Flowlet segmentation duration threshold is related to the trade-off between rerouting frequency and packet out-of-order severity. The larger the preset Flowlet segmentation duration threshold, the lower the rerouting frequency and the lower the packet out-of-order severity. In practical applications, an appropriate value can be set according to the actual application requirements.

[0064] Using the method disclosed herein, for a Flowlet whose length exceeds a preset long Flowlet threshold (i.e., a long Flowlet), its forwarding port is updated only when the long Flowlet meets the decision threshold for splitting into mini-Flowlets, so as to realize the rerouting of the long Flowlet. This allows different mini-Flowlets to be forwarded through different forwarding ports, which increases the rerouting opportunities of the long Flowlet while avoiding frequent switching of forwarding ports. This not only helps to shorten its transmission latency, but also reduces the out-of-order problem of packets, and can achieve a better trade-off between load balancing performance and out-of-order degree.

[0065] In some embodiments, before updating the first forwarding port in the routing table to the second forwarding port in step S33, the method further includes: determining that the first forwarding port is congested and there is a non-congested second forwarding port, and that the number of data flows rerouted through the first forwarding port is less than a preset threshold for the number of rerouted data flows. In this way, each network device can independently make rerouting decisions based on the congestion status of its forwarding port. Compared with rerouting schemes that are unaware of congestion information, the rerouting scheme of this disclosure can improve the rerouting success rate. Compared with routing decision schemes based on global network feedback information, the rerouting scheme of this disclosure has lower implementation complexity, is easier to deploy, and has lower costs.

[0066] In this embodiment of the disclosure, a preset rerouting data flow number threshold (also described as ReRouteFlowNumThrd) characterizes the decision threshold for whether the congestion state of the forwarding port is reliable. For example, if the number of data flows rerouting through the first forwarding port is less than the preset rerouting data flow number threshold, the current congestion state of the first forwarding port can be determined to be reliable. For instance, if congestion is detected at the first forwarding port, it can be considered that the first forwarding port is indeed in a congested state. Conversely, if the number of data flows rerouting through the first forwarding port is greater than or equal to the preset rerouting data flow number threshold, the current congestion state of the first forwarding port can be determined to be unreliable. For instance, even if congestion is detected at the first forwarding port, the first forwarding port may not actually be congested; that is, the determined congestion state of the first forwarding port is unreliable in this case. In practical applications, an appropriate value can be set according to the actual application requirements, for example, it can be set to 3.

[0067] In this disclosure, no limitation is made on how to determine whether a forwarding port is congested. Addressing the issues of large feedback delays in existing end-side rerouting schemes based on congestion information and high implementation complexity in network-side rerouting schemes based on global network congestion information, this disclosure proposes a method for determining congestion based on forwarding port utilization, as detailed below.

[0068] In some embodiments, determining that a first forwarding port is congested and that a second forwarding port is not congested includes: obtaining a first set of utilized ports (also described as a set of high-utilization ports) and a second set of utilized ports (also described as a set of low-utilization ports), wherein the utilization of each forwarding port in the first set of utilized ports is greater than a preset first utilization threshold (also described as a high utilization threshold or HighUtilPortThrehold), and the utilization of each forwarding port in the second set of utilized ports is less than a preset second utilization threshold (also described as a low utilization threshold or LowUtilPortThrehold), and the first utilization threshold is greater than or equal to the second utilization threshold; in response to the first forwarding port belonging to the first set of utilized ports, determining that the first forwarding port is congested; and in response to the second forwarding port belonging to the second set of utilized ports, determining that a second forwarding port is not congested. In this way, each network device can independently make rerouting decisions based on the congestion status of its forwarding ports. Compared with rerouting schemes that are unaware of congestion information, the rerouting scheme of this disclosure can improve the rerouting success rate. Compared with routing decision schemes based on global network feedback information, the rerouting scheme of this disclosure has lower implementation complexity, is easier to deploy, and has lower costs. Compared with the rerouting scheme based on congestion information at the end-side to detect network congestion, the rerouting scheme disclosed herein has a smaller latency.

[0069] In some embodiments, the first and second utilization port sets can be obtained as follows: periodically obtaining the total packet traffic forwarded by each forwarding port at a preset time interval; determining the traffic forwarded by each forwarding port per unit time based on the total packet traffic forwarded by each forwarding port within the preset time interval; determining the utilization of each forwarding port based on the traffic forwarded by each forwarding port per unit time and the theoretical maximum forwardable traffic; determining each forwarding port as the first utilization port set for each forwarding port with a utilization greater than a first utilization threshold, and determining each forwarding port as the second utilization port set for each forwarding port with a utilization less than a second utilization threshold.

[0070] In this embodiment of the disclosure, a preset first utilization threshold (i.e., HighUtilPortThrehold) characterizes the decision threshold for whether a forwarding port is a high-utilization port. For example, if the utilization of a forwarding port is greater than the preset first utilization threshold, then the forwarding port can be determined to be a high-utilization port. In practical applications, an appropriate value can be set according to actual application requirements, for example, it can be set to 95% of the maximum bandwidth.

[0071] In this embodiment of the disclosure, a preset second utilization threshold (i.e., LowUtilPortThrehold) characterizes the decision threshold for whether a forwarding port is a low-utilization port. For example, if the utilization of a forwarding port is less than the preset second utilization threshold, the forwarding port can be determined to be a low-utilization port. In practical applications, an appropriate value can be set according to actual application requirements, for example, it can be set to 30% of the maximum bandwidth.

[0072] In some embodiments, a second message is received, and the second Flowlet to which the second message belongs is determined; a third forwarding port corresponding to the second Flowlet is determined according to the routing table; in response to determining that the length of the second Flowlet is less than or equal to a preset long Flowlet threshold, the second message is forwarded through the third forwarding port. Thus, for Flowlets whose length is less than or equal to the preset long Flowlet threshold (i.e., non-long Flowlets), messages are forwarded through the original forwarding port, avoiding frequent switching of forwarding ports that could lead to out-of-order messages, and achieving a better trade-off between load balancing performance and the degree of out-of-order delivery.

[0073] In some embodiments, a third message is received, and the third Flowlet to which the third message belongs is determined. A fourth forwarding port corresponding to the third Flowlet is determined according to the routing table. In response to determining that the length of the third Flowlet is greater than a preset long Flowlet threshold, and the duration of the message forwarded through the fourth forwarding port is less than or equal to a preset Flowlet segmentation duration threshold, the third message is forwarded through the fourth forwarding port. Thus, for Flowlets whose length is greater than the preset long Flowlet threshold (i.e., long Flowlets), if the long Flowlet does not meet the decision threshold for splitting into mini-Flowlets, the message is forwarded through the original forwarding port, avoiding frequent switching of forwarding ports that could lead to out-of-order packets. This achieves a better trade-off between load balancing performance and the degree of out-of-order delivery.

[0074] In some embodiments, a fourth message is received, and the fourth Flowlet to which the fourth message belongs is determined. A fifth forwarding port corresponding to the fourth Flowlet is determined according to the routing table. In response to determining that the length of the fourth Flowlet is greater than a preset long Flowlet threshold, and the duration of the message forwarded through the fifth forwarding port is greater than a preset Flowlet segmentation duration threshold, and the fifth forwarding port is not congested, or the fifth forwarding port is congested but there is no uncongested sixth forwarding port, or the number of data flows rerouted through the fifth forwarding port is greater than or equal to a preset rerouted data flow number threshold, the fourth message is forwarded through the fifth forwarding port. Thus, for a Flowlet whose length is greater than the preset long Flowlet threshold (i.e., a long Flowlet), if the long Flowlet meets the decision threshold for splitting into mini-Flowlets, but there is no forwarding port that meets the conditions for rerouting, the message is forwarded through the original forwarding port, avoiding frequent switching of forwarding ports that could lead to out-of-order packets. This achieves a better trade-off between load balancing performance and the degree of out-of-order delivery.

[0075] In some embodiments, the routing table also includes the flow identifier of each created data flow. In this embodiment, the fifth packet is received, and the flow identifier corresponding to the fifth packet is determined. In response to the routing table not including the flow identifier corresponding to the fifth packet, the data flow to which the fifth packet belongs is determined to be a new data flow, and the fifth packet is forwarded using a forwarding port selected based on a preset routing policy.

[0076] In some embodiments, upon receiving a sixth message, in response to the arrival time difference between the sixth message and the previous message belonging to the same data flow being greater than a preset flow segmentation time interval threshold, the Flowlet to which the sixth message belongs is determined to be a new Flowlet, and the sixth message is forwarded using a forwarding port selected based on a preset routing policy.

[0077] In this embodiment of the disclosure, the preset routing policy may include, for example, the ECMP routing policy.

[0078] To enable those skilled in the art to more clearly understand the technical solutions provided by the embodiments of this disclosure, the technical solutions provided by the embodiments of this disclosure will be further described below through specific embodiments:

[0079] See attached document Figure 4 This is a schematic diagram of another message forwarding method provided in this embodiment of the disclosure. Figure 4 Taking the application of the packet forwarding method provided in this disclosure embodiment to a switch as an example, the implementation of the packet forwarding method by the switch includes the following steps:

[0080] Step S0: Begin.

[0081] Step S1: Initialize configuration.

[0082] In this embodiment, before the switch receives any packets, the data structures used by the switch to implement this method are first initialized. These data structures may include a routing table, a set of forwarding ports, and a metadata table.

[0083] In this embodiment, the routing table includes a flow identifier, the arrival time of the previous packet in the data flow, a forwarding port, a packet duration, and a long Flowlet indicator. The flow identifier is an index obtained by hashing the five-tuple information of packets belonging to the data flow. The arrival time of the previous packet in the data flow refers to the arrival time of the preceding adjacent packet belonging to the same data flow as the currently received packet. The packet duration refers to the duration of packets forwarded through the same forwarding port in each Flowlet of the data flow; each update of the forwarding port triggers this field to reset to 0. The long Flowlet indicator corresponds to each Flowlet and is used to indicate whether the length of the corresponding Flowlet is greater than a preset long Flowlet threshold. In this embodiment, when the long Flowlet indicator is 0, it indicates that the length of the corresponding Flowlet is less than or equal to the preset long Flowlet threshold; when the long Flowlet indicator is 1, it indicates that the length of the corresponding Flowlet is greater than the preset long Flowlet threshold.

[0084] The forwarding port set can include a high-utilization port set and a low-utilization port set. The forwarding port set can be updated periodically according to a preset period. The high-utilization port set includes the high-utilization forwarding ports counted in the previous period, and the low-utilization port set includes the low-utilization forwarding ports counted in the previous period.

[0085] The metadata table maintains the number of data flows rerouted by each forwarding port and the packet traffic forwarded by each forwarding port. The metadata table can be updated periodically according to a preset period. Specifically, it maintains the number of data flows rerouted by each forwarding port within the current period, as well as the packet traffic forwarded by each forwarding port within the current period.

[0086] In this embodiment, the preset period for updating the forwarding port set and metadata table is related to the hardware capabilities and can be set to an appropriate value according to actual application requirements.

[0087] Step S2: The switch receives the message.

[0088] Step S3: Determine whether the received message belongs to a new data stream.

[0089] In this embodiment, by parsing the received message, the five-tuple information is extracted from the message header. Then, based on the hash algorithm, the flow identifier (i.e., index) of the message is obtained by hash mapping according to the five-tuple information. The flow identifier of the message is matched with the flow identifiers of each data flow in the routing table. If there is a flow identifier in the routing table that matches the flow identifier of the message, it is determined that the message belongs to an existing data flow, and step S4 is continued. If there is no flow identifier in the routing table that matches the flow identifier of the message, it is determined that the message belongs to a new data flow, and step S5 is continued.

[0090] Step S4: Determine whether the received message belongs to a new Flowlet.

[0091] In this embodiment, for packets that are determined to belong to an existing data stream in step S3, i.e., packets that do not belong to a new data stream, it is further determined whether the packet belongs to a new Flowlet in its respective data stream.

[0092] In this embodiment, it can be determined whether the current packet belongs to a new Flowlet by judging whether the arrival time difference between the current packet and the previous packet belonging to the same data flow in the routing table is greater than a preset flow segmentation time interval threshold (i.e., FlowletGap). If the arrival time difference between the current packet and the previous packet belonging to the same data flow in the routing table is greater than FlowletGap, it can be determined that the current packet belongs to a new Flowlet of that data flow, and step S5 continues; if the arrival time difference between the current packet and the previous packet belonging to the same data flow in the routing table is less than or equal to FlowletGap, it can be determined that the current packet and the previous packet belong to the same Flowlet, that is, the current packet does not belong to a new Flowlet, and step S6 continues.

[0093] Step S5: Select a forwarding port to forward packets based on the preset routing policy.

[0094] In this embodiment, for packets determined to belong to a new data flow in step S3, a forwarding port can be selected for forwarding based on a preset routing policy (such as an ECMP routing policy), and the routing table is updated. An entry corresponding to the new data flow is created in the routing table, and the metadata table is updated. Updating the routing table includes: updating the flow identifier of the new data flow based on the flow identifier determined by the packet's five-tuple information; updating the arrival time of the previous packet in the data flow based on the packet's arrival time; updating the forwarding port based on the forwarding port selected for this packet; setting the packet duration of the new data flow to 0; and setting the long flowlet indicator of the new data flow to 0. Updating the metadata table includes: increasing the packet traffic forwarded by the forwarding port of the packet by the number of bytes of the packet. The current packet forwarding processing flow ends.

[0095] In this embodiment, for packets identified as new Flowlets in step S4, a forwarding port can be selected for forwarding based on a preset routing policy (such as an ECMP routing policy), and the routing table and metadata table can be updated. Updating the routing table includes: updating the arrival time of the previous packet in the data flow based on the packet's arrival time; updating the forwarding port based on the forwarding port selected for this packet; setting the packet duration of the new Flowlet to 0; and setting the long Flowlet indicator of the new Flowlet to 0. Updating the metadata table includes: increasing the packet traffic forwarded by the forwarding port of this packet by the number of bytes in the packet. The current packet forwarding processing flow ends.

[0096] Step S6: Determine whether the length of the Flowlet to which the message belongs is greater than the preset long Flowlet threshold (LongFlowletTime).

[0097] In this embodiment, taking the length of the Flowlet as an example, the message duration can be determined through the message duration in the routing table.

[0098] In this embodiment, the length of the current Flowlet is first determined by the long Flowlet indicator in the routing table, i.e., whether the current Flowlet is a long Flowlet. If the long Flowlet indicator is 1, indicating that the length of the current Flowlet is greater than LongFlowletTime, then the current Flowlet is identified as a long Flowlet, and step S7 continues. If the long Flowlet indicator is 0, indicating that the length of the current Flowlet is less than or equal to LongFlowletTime, then the packet duration of the current Flowlet is further compared with LongFlowletTime to determine whether the current Flowlet is a long Flowlet. If the packet duration of the current Flowlet is greater than LongFlowletTime, then the current Flowlet is identified as a long Flowlet, the value of the long Flowlet indicator in the routing table is updated to 1, and step S7 continues. If the packet duration of the current Flowlet is less than or equal to LongFlowletTime, then the current Flowlet is not identified as a long Flowlet, and step S10 continues.

[0099] Step S7: Determine whether the duration of the Flowlet to which the message belongs is greater than the preset Flowlet segment duration threshold (MiniFlowletTime).

[0100] In this embodiment, the duration of the Flowlet to which the message belongs can be determined by the message duration in the routing table.

[0101] In this embodiment, if the duration of the Flowlet to which the packet belongs is greater than MiniFlowletTime, it can be determined that the current Flowlet can be divided into a smaller mini-Flowlet, and the current Flowlet is allowed to perform one rerouting operation, and step S8 continues to be executed; if the duration of the Flowlet to which the packet belongs is less than or equal to MiniFlowletTime, it can be determined that the first Flowlet cannot be divided into a smaller mini-Flowlet, and the current Flowlet does not perform a rerouting operation, and step S10 continues to be executed.

[0102] Step S8: Determine whether the forwarding port corresponding to the Flowlet to which the packet belongs is congested.

[0103] In this embodiment, if the forwarding port corresponding to the Flowlet to which the packet belongs (referred to as the current forwarding port) belongs to the high utilization port set, and the number of rerouted data flows of the current forwarding port is less than the preset rerouted data flow number threshold (ReRouteFlowNumThrd), then it can be determined that the current forwarding port is congested, and step S9 is continued; otherwise, if the current forwarding port belongs to the low utilization port set, and / or the number of rerouted data flows of the current forwarding port is greater than or equal to ReRouteFlowNumThrd, then it can be determined that the current forwarding port is not congested, and step S10 is continued.

[0104] Step S9: Determine if there is an available, non-congested forwarding port.

[0105] In this embodiment, if there is no forwarding port belonging to the low utilization port set among all available forwarding ports of the current data flow, it can be determined that there is no available non-congested forwarding port, and no rerouting operation is performed, and step 10 is continued; if there is a forwarding port belonging to the low utilization port set among all available forwarding ports of the current data flow, it can be determined that there is an available non-congested forwarding port, and a rerouting operation can be performed, and step 11 is continued.

[0106] Step S10: Forward the packet through the forwarding port recorded in the routing table.

[0107] In step S10, the packet is forwarded through the forwarding port recorded in the routing table, and the metadata table is updated by increasing the packet's byte count by the number of packets forwarded by the forwarding port. The forwarding operation of the current data packet ends.

[0108] Step S11: Forward the packet through an available, non-congested forwarding port.

[0109] In this embodiment, if it is determined in step S9 that there is an available, non-congested forwarding port, the received packet can be forwarded through the available, non-congested forwarding port. At this time, a forwarding port switch occurs within a Flowlet, which can be understood as the current Flowlet being divided into smaller, mini-Flowlets, and the routing table and metadata table are updated. Updating the routing table includes: updating the arrival time of the previous packet in the data flow based on the packet's arrival time, updating the forwarding port based on the forwarding port selected this time for the packet, and setting the packet duration of the Flowlet to 0. Updating the metadata table includes: increasing the packet traffic forwarded by the forwarding port of the packet by the number of bytes of the packet, and incrementing the number of rerouting data flows for the original forwarding port and the new forwarding port by 1. Simultaneously, the forwarding port set is updated, and the new forwarding port is removed from the low-utilization port set. The current packet forwarding processing flow ends.

[0110] Step S12: End.

[0111] The switch stops receiving packets, and the process ends.

[0112] See attached document Figure 5 This is a schematic diagram illustrating an implementation of the message forwarding method provided in this disclosure. In this embodiment, the preset flow segmentation time interval threshold (FlowletGap) is configured to 2 time slots, the preset long flowlet threshold (LongFlowletTime) is configured to 10 time slots, and the preset flowlet segmentation duration threshold (MiniFlowletTime) is configured to 4 time slots.

[0113] In this embodiment, in time slot 1, the new data stream selects forwarding port 0 for packet forwarding according to a preset routing policy.

[0114] In this embodiment, in time slot 6, the arrival time difference between the current message and the previous message of the data stream is greater than FlowletGap, and at this time it is identified as a new Flowlet.

[0115] In this embodiment, if the duration of the Flowlet2 message is greater than LongFlowletTime in time slot 16, then Flowlet2 is identified as a long Flowlet. However, the rerouting conditions are not met at this time (for example, the rerouting conditions include the current forwarding port 0 of Flowlet2 being congested, the number of rerouting data flows on forwarding port 0 being less than the preset rerouting data flow number threshold, and the existence of an uncongested forwarding port available for Flowlet2). The message is still forwarded through the original forwarding port 0.

[0116] In this embodiment, in time slot 17, the duration of the Flowlet2 packet is greater than LongFlowletTime, that is, Flowlet2 is identified as a long Flowlet and meets the rerouting conditions (e.g., the current forwarding port 0 of Flowlet2 is congested, the number of rerouting data flows on forwarding port 0 is less than the preset rerouting data flow number threshold, and there is a non-congested forwarding port 1 available for Flowlet2). At this time, Flowlet2 is split into the first mini-Flowlet, and the packet begins to be forwarded on the newly selected forwarding port 1.

[0117] In this embodiment, in time slot 21, if the duration of the message of Flowlet2 is greater than LongFlowletTime, then Flowlet2 is identified as a long Flowlet, satisfying the Flowlet splitting condition (i.e., the duration of the message forwarded through forwarding port 1 in Flowlet2 is greater than MiniFlowletTime), and satisfying the rerouting condition (e.g., the current forwarding port 1 of Flowlet2 is congested, the number of rerouting data flows on forwarding port 1 is less than the preset rerouting data flow number threshold, and there is a non-congested forwarding port 3 available for Flowlet2). At this time, Flowlet2 is split into a second mini-Flowlet, and the message begins to be forwarded on forwarding port 3.

[0118] See attached document Figure 6 This is a schematic diagram of a message forwarding device provided in an embodiment of this disclosure. Figure 6 As shown, the message forwarding device 100 includes a sensing module 110, a rerouting module 120, and a routing module 130. The functions of each module are described below.

[0119] The perception module 110 is used to receive the first packet, determine the first flow segment to which the first packet belongs, and determine the first forwarding port corresponding to the first flowlet according to the routing table, wherein the routing table includes the forwarding ports corresponding to each flowlet of each data flow.

[0120] The rerouting module 120 is used to update the first forwarding port in the routing table to the second forwarding port in response to determining that the length of the first Flowlet is greater than a preset long Flowlet threshold, and forward the first packet through the second forwarding port.

[0121] In some embodiments, before the rerouting module 120 updates the first forwarding port in the routing table to the second forwarding port, the sensing module 110 is further configured to determine that the duration of the packet forwarded through the first forwarding port is greater than a preset Flowlet segment duration threshold.

[0122] In some embodiments, before the rerouting module 120 updates the first forwarding port in the routing table to the second forwarding port, the sensing module 110 is further configured to determine that the first forwarding port is congested and there is a non-congested second forwarding port, and that the number of data flows rerouting through the first forwarding port is less than a preset threshold for the number of rerouting data flows.

[0123] In some embodiments, the sensing module 110 determines that a first forwarding port is congested and that there is a non-congested second forwarding port, including: acquiring a first set of utilization ports and a second set of utilization ports, wherein the utilization rate of each forwarding port in the first set of utilization ports is greater than a preset first utilization threshold, and the utilization rate of each forwarding port in the second set of utilization ports is less than a preset second utilization threshold, and the first utilization threshold is greater than or equal to the second utilization threshold; in response to the first forwarding port belonging to the first set of utilization ports, determining that the first forwarding port is congested; and in response to the second forwarding port belonging to the second set of utilization ports, determining that there is a non-congested second forwarding port.

[0124] In some embodiments, the sensing module 110 acquires a first set of utilization ports and a second set of utilization ports, including: periodically acquiring the total packet traffic forwarded by each forwarding port at a preset time interval; determining the traffic forwarded by each forwarding port per unit time based on the total packet traffic forwarded by each forwarding port within the preset time interval; determining the utilization rate of each forwarding port based on the traffic forwarded by each forwarding port per unit time and the theoretical maximum forwardable traffic; determining each forwarding port with a utilization rate greater than a first utilization rate threshold as the first set of utilization ports, and determining each forwarding port with a utilization rate less than a second utilization rate threshold as the second set of utilization ports.

[0125] In some embodiments, the sensing module 110 is further configured to receive the second message, determine the second Flowlet to which the second message belongs, determine the third forwarding port corresponding to the second Flowlet according to the routing table, and the routing module 130 is configured to forward the second message through the third forwarding port in response to determining that the length of the second Flowlet is less than or equal to a preset long Flowlet threshold.

[0126] In some embodiments, the sensing module 110 is further configured to receive the third message, determine the third Flowlet to which the third message belongs, and determine the fourth forwarding port corresponding to the third Flowlet according to the routing table; the routing module 130 is further configured to forward the third message through the fourth forwarding port in response to determining that the length of the third Flowlet is greater than a preset long Flowlet threshold and the duration of the message forwarded through the fourth forwarding port is less than or equal to a preset Flowlet segment duration threshold.

[0127] In some embodiments, the sensing module 110 is further configured to receive the fourth message, determine the fourth Flowlet to which the fourth message belongs, and determine the fifth forwarding port corresponding to the fourth Flowlet according to the routing table; the routing module 130 is further configured to forward the fourth message through the fifth forwarding port in response to determining that the length of the fourth Flowlet is greater than a preset long Flowlet threshold, and the duration of the message forwarded through the fifth forwarding port is greater than a preset Flowlet segment duration threshold, and the fifth forwarding port is not congested or the fifth forwarding port is congested but there is no uncongested sixth forwarding port, or the number of data flows rerouted through the fifth forwarding port is greater than or equal to a preset rerouted data flow number threshold.

[0128] In some embodiments, the sensing module 110 is further configured to receive the fifth packet and determine the flow identifier corresponding to the fifth packet; the routing module 130 is further configured to, in response to the routing table not including the flow identifier corresponding to the fifth packet, determine that the data flow to which the fifth packet belongs is a new data flow, and select a forwarding port to forward the fifth packet based on a preset routing policy.

[0129] In some embodiments, the sensing module 110 is further configured to receive the sixth message; the routing module 130 is further configured to, in response to the arrival time difference between the sixth message and the previous message belonging to the same data flow being greater than a preset flow segmentation time interval threshold, determine that the Flowlet to which the sixth message belongs is a new Flowlet, and select a forwarding port to forward the sixth message based on a preset routing policy.

[0130] Secondly, refer to the appendix. Figure 7 This is a schematic diagram of the structure of a network device provided in an embodiment of the present disclosure, which includes: at least one processor 701, at least one memory 702, and one or more I / O interfaces 703. The one or more I / O interfaces 703 are connected between the processor 701 and the memory 702. The memory 702 stores one or more computer programs, which are executed by the at least one processor 701 to enable the at least one processor 701 to implement the first aspect described above and any possible embodiment of the first aspect.

[0131] Among them, the processor is a device with data processing capabilities, including but not limited to the central processing unit (CPU); the memory is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), and flash memory (FLASH); the I / O interface (read-write interface) is connected between the processor and the memory, enabling information exchange between the memory and the processor, including but not limited to the data bus (Bus).

[0132] Thirdly, embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the first aspect and any possible embodiments thereof.

[0133] Fourthly, embodiments of this disclosure provide a computer program product, which includes a computer program that, when executed by a processor, implements the first aspect and any possible embodiments thereof.

[0134] Those skilled in the art will understand that all or some of the steps, systems, and devices disclosed above, as functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0135] In hardware implementations, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be executed by several physical components working together.

[0136] Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit (CPU), digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technique for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH) or other disk storage; read-only optical disc (CD-ROM), digital versatile disc (DVD) or other optical disc storage; magnetic cartridges, magnetic tapes, disk storage or other magnetic storage; and any other media that can be used to store desired information and can be accessed by a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0137] This disclosure has disclosed exemplary embodiments, and although specific terminology has been used, it is for general illustrative purposes only and should not be construed as limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in conjunction with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in conjunction with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of this disclosure as set forth by the appended claims.

Claims

1. A message forwarding method, comprising: Receive the first message and determine the first flow segment to which the first message belongs; The first forwarding port corresponding to the first Flowlet is determined according to the routing table, which includes the forwarding ports corresponding to each Flowlet of each data flow. In response to determining that the length of the first Flowlet is greater than a preset long Flowlet threshold, the first forwarding port in the routing table is updated to a second forwarding port, and the first packet is forwarded through the second forwarding port.

2. The method according to claim 1, wherein, Before updating the first forwarding port in the routing table to the second forwarding port, the method further includes: It is determined that the duration of the packet forwarded through the first forwarding port is greater than the preset Flowlet segment duration threshold.

3. The method according to claim 1, wherein, Before updating the first forwarding port in the routing table to the second forwarding port, the method further includes: It is determined that the first forwarding port is congested and there is a second forwarding port that is not congested, and the number of data flows rerouted through the first forwarding port is less than a preset threshold for the number of rerouted data flows.

4. The method according to claim 1, wherein, The determination that the first forwarding port is congested and that there is a second forwarding port that is not congested includes: Obtain a first set of utilization ports and a second set of utilization ports. The utilization of each forwarding port in the first set of utilization ports is greater than a preset first utilization threshold, and the utilization of each forwarding port in the second set of utilization ports is less than a preset second utilization threshold. The first utilization threshold is greater than or equal to the second utilization threshold. In response to the first forwarding port belonging to the first utilization port set, it is determined that the first forwarding port is congested; and in response to the second forwarding port belonging to the second utilization port set, it is determined that there is a non-congested second forwarding port.

5. The method according to claim 4, wherein, The acquisition of the first utilization port set and the second utilization port set includes: The total packet traffic forwarded by each forwarding port is periodically obtained at preset time intervals. Based on the total packet traffic forwarded by each forwarding port within the preset time interval, determine the traffic forwarded by each forwarding port per unit time. The utilization rate of each forwarding port is determined based on the traffic forwarded by each forwarding port per unit time and the theoretical maximum traffic that can be forwarded. Each forwarding port with a utilization rate greater than the first utilization threshold is determined as the first utilization port set, and each forwarding port with a utilization rate less than the second utilization threshold is determined as the second utilization port set.

6. The method according to claim 1, wherein, The method further includes: Receive the second message and determine the second Flowlet to which the second message belongs; The third forwarding port corresponding to the second Flowlet is determined based on the routing table; In response to determining that the length of the second Flowlet is less than or equal to the preset long Flowlet threshold, the second packet is forwarded through the third forwarding port.

7. The method according to claim 2, wherein, The method further includes: Receive a third message and determine the third Flowlet to which the third message belongs; The fourth forwarding port corresponding to the third Flowlet is determined based on the routing table; In response to determining that the length of the third Flowlet is greater than the preset long Flowlet threshold, and the duration of the packet forwarded through the fourth forwarding port is less than or equal to the preset Flowlet segment duration threshold, the third packet is forwarded through the fourth forwarding port.

8. The method according to claim 3, wherein, The method further includes: Receive the fourth message and determine the fourth Flowlet to which the fourth message belongs; The fifth forwarding port corresponding to the fourth Flowlet is determined based on the routing table; In response to determining that the length of the fourth Flowlet is greater than the preset long Flowlet threshold, and the duration of the packet forwarded through the fifth forwarding port is greater than the preset Flowlet segment duration threshold, and the fifth forwarding port is not congested or the fifth forwarding port is congested but there is no uncongested sixth forwarding port, or the number of data flows rerouted through the fifth forwarding port is greater than or equal to the preset rerouted data flow number threshold, the fourth packet is forwarded through the fifth forwarding port.

9. The method according to claim 1, wherein, The routing table also includes flow identifiers for each created data flow, and the method further includes: Receive the fifth message and determine the flow identifier corresponding to the fifth message; In response to the fact that the routing table does not include the flow identifier corresponding to the fifth packet, the data flow to which the fifth packet belongs is determined to be a new data flow, and the forwarding port is selected to forward the fifth packet based on the preset routing policy.

10. The method according to claim 1, wherein, The method further includes: Upon receiving the sixth message, in response to the arrival time difference between the sixth message and the previous message belonging to the same data flow being greater than a preset flow segmentation time interval threshold, the Flowlet to which the sixth message belongs is determined to be a new Flowlet, and the sixth message is forwarded using a forwarding port selected based on a preset routing policy.

11. A network device comprising a memory and a processor; the memory storing a computer program executable by the processor, wherein the computer program, when executed by the processor, implements the method of any one of claims 1 to 10.

12. A computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method of any one of claims 1 to 10.

13. A computer program product comprising a computer program that, when executed by a processor, implements the method of any one of claims 1 to 10.