Network congestion control method and device, computer device, storage medium and product

By identifying the location of congestion and adjusting transmission parameter values, the link congestion problem caused by hash allocation in AI training scenarios was solved, thereby improving network bandwidth utilization and communication efficiency.

CN122160324APending Publication Date: 2026-06-05WUXI STARS MICRO SYSTEM TECHNOLOGIES CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
WUXI STARS MICRO SYSTEM TECHNOLOGIES CO LTD
Filing Date
2026-03-16
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

In AI training scenarios, network traffic hash allocation is prone to conflicts, causing multiple large flows to crowd the same link, resulting in congestion and low network bandwidth utilization.

Method used

By obtaining congestion information from response messages, the location of congestion can be identified. When congestion occurs at the message forwarding port, path mapping information can be obtained, and message transmission parameter values ​​can be adjusted to switch to another path, thus avoiding invalid route switching and network disturbances.

Benefits of technology

It enables fast and deterministic path switching during multi-stream concurrent congestion, alleviating link congestion caused by hash collisions and improving network bandwidth utilization and communication efficiency for distributed training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122160324A_ABST
    Figure CN122160324A_ABST
Patent Text Reader

Abstract

The application relates to a network congestion control method and device, computer equipment, a storage medium and a product, and relates to the technical field of communication. The method comprises the following steps: obtaining a response message for a sent message; when it is determined that a data flow where the sent message is located exists congestion based on the response message, identifying a congestion occurrence position according to congestion information carried by the response message; if the congestion occurrence position is located at a message forwarding port, obtaining path mapping information; wherein the path mapping information is used for recording the corresponding relationship between message transmission parameter values and message forwarding paths; the original message transmission parameter value of a to-be-sent message in the data flow is adjusted to a first transmission parameter; the first transmission parameter refers to other transmission parameters in each message transmission parameter, except the original message transmission parameter of the to-be-sent message; and the next to-be-sent message of the sent message in the data flow is transmitted through a message forwarding path indicated by the first transmission parameter. The method can improve network bandwidth utilization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a network congestion control method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Technology

[0002] Large-scale artificial intelligence (AI) training typically employs a distributed parallel computing model, requiring frequent collective communication between multiple computing nodes, which places extremely high demands on network bandwidth, latency, and reliability.

[0003] Currently, data center networks for AI scenarios generally provide high-bandwidth communication capabilities through equal-cost multipath transmission. However, in AI training scenarios, network traffic is characterized by a small number of flows, high bandwidth per flow, and strong bursts. This makes it easy for hash allocation of equal-cost multipath to cause conflicts, resulting in multiple large flows crowding the same link and causing congestion, which in turn leads to low network bandwidth utilization. Summary of the Invention

[0004] Therefore, it is necessary to provide a network congestion control method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can improve network bandwidth utilization in response to the above-mentioned technical problems.

[0005] Firstly, this application provides a network congestion control method, including:

[0006] Retrieve the response message for the sent message;

[0007] If it is determined from the response message that there is congestion in the data stream where the sent message is located, the location of the congestion can be identified based on the congestion information carried in the response message.

[0008] If the congestion occurs at the packet forwarding port, the path mapping information is obtained; the path mapping information is used to record the correspondence between packet transmission parameter values ​​and packet forwarding paths.

[0009] The original message transmission parameter values ​​of the message to be sent in the data stream are adjusted to the first transmission parameter; the first transmission parameter refers to the other transmission parameters among the message transmission parameters, excluding the original message transmission parameters of the message to be sent; the next message to be sent after the message has been sent in the data stream is transmitted through the message forwarding path indicated by the first transmission parameter.

[0010] In one embodiment, the network congestion control method further includes:

[0011] Iterate through multiple different message transmission parameter values ​​and send a probe message corresponding to each message transmission parameter value to the receiving end.

[0012] Record the message forwarding identifier corresponding to each probe message;

[0013] Group the message transmission parameter values ​​corresponding to the same message forwarding identifier into one group, and each group corresponds to one message forwarding path;

[0014] Select any message transmission parameter value from each group as a representative value;

[0015] The path mapping information is determined based on the correspondence between each representative value and each message forwarding path.

[0016] In one embodiment, adjusting the original message transmission parameter values ​​of the message to be sent in the data stream to the first transmission parameter includes:

[0017] Obtain the order of the transmission parameter values ​​of each message in the path mapping information;

[0018] Based on the order of arrangement, the first transmission parameter is selected from the transmission parameter values ​​of each message, and the original transmission parameter values ​​of the messages to be sent in the data stream are adjusted to the first transmission parameter.

[0019] In one embodiment, if it is determined from the response message that the data stream containing the sent message is congested, the location of the congestion is identified based on the congestion information carried in the response message, including:

[0020] If congestion is detected in the data stream containing the sent message based on the response message, a target waiting time is generated.

[0021] If the data stream is still congested after the target waiting time has expired, the location of the congestion can be identified based on the congestion information carried in the response message.

[0022] In one embodiment, the network congestion control method further includes:

[0023] Count the number of response messages carrying congestion information within a preset period;

[0024] If the number of response messages exceeds the message count threshold, it is determined that the data stream containing the sent messages is congested.

[0025] In one embodiment, identifying the location of congestion based on congestion information carried in the response message further includes:

[0026] If the congestion information includes a first congestion identifier, the location of the congestion is determined to be at the packet forwarding port;

[0027] If the congestion information contains a second congestion identifier, the location of the congestion is determined to be at the message sending port.

[0028] Secondly, this application also provides a network congestion control device, comprising:

[0029] The message feedback module is used to obtain response messages for sent messages;

[0030] The congestion location identification module is used to identify the location of congestion based on the congestion information carried in the response message when it is determined that there is congestion in the data stream where the sent message is located based on the response message.

[0031] The path mapping information acquisition module is used to acquire path mapping information if the congestion occurs at the packet forwarding port; the path mapping information is used to record the correspondence between packet transmission parameter values ​​and packet forwarding paths.

[0032] The deterministic switching module is used to adjust the original message transmission parameter values ​​of the message to be sent in the data stream to the first transmission parameter; the first transmission parameter refers to the other transmission parameters among the message transmission parameters, excluding the original message transmission parameters of the message to be sent; the next message to be sent after the message has been sent in the data stream is transmitted through the message forwarding path indicated by the first transmission parameter.

[0033] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0034] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the above-described method embodiments.

[0035] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0036] The aforementioned network congestion control method, apparatus, computer equipment, computer-readable storage medium, and computer program product, after obtaining the response message of a sent message and determining that the data stream is congested based on the response message, further identify the location of the congestion based on the congestion information carried in the response message. Subsequent routing operations are triggered only when congestion occurs at the message forwarding port, thus avoiding invalid routing and network disturbances caused by blindly adjusting message transmission parameters in other scenarios where routing is not required. Furthermore, pre-generated path mapping information is obtained, which records the correspondence between message transmission parameter values ​​and message forwarding paths. This allows the sending end to accurately know the message forwarding paths corresponding to different message transmission parameter values, and then adjusts the original transmission parameter values ​​of the message to be sent to other transmission parameters, i.e., a first transmission parameter. This ensures that subsequent messages are transmitted through another forwarding path corresponding to the first transmission parameter, achieving precise switching from the original congested path to the new path and avoiding invalid routing caused by random blind attempts. Therefore, this application can quickly and deterministically switch data streams from congested paths to other paths when multiple streams are concurrently congested, effectively alleviating link congestion caused by hash collisions, and significantly improving network bandwidth utilization and the overall communication efficiency of distributed training in AI scenarios. Attached Figure Description

[0037] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0038] Figure 1 This is a schematic diagram of the network topology for an AI training scenario in one embodiment.

[0039] Figure 2 This is a schematic diagram of ECMP hash routing in one embodiment;

[0040] Figure 3 This is a schematic diagram showing the location of the ECN field in one embodiment;

[0041] Figure 4 This is a schematic diagram illustrating the principle of the WRED probabilistic labeling mechanism in one embodiment;

[0042] Figure 5 This is a schematic diagram illustrating the application environment of a network congestion control method in one embodiment;

[0043] Figure 6 This is a flowchart illustrating a network congestion control method in one embodiment;

[0044] Figure 7 This is a schematic diagram illustrating different types of congestion in one embodiment;

[0045] Figure 8 This is a schematic diagram of group detection in one embodiment;

[0046] Figure 9 This is a schematic diagram illustrating the correspondence between packets and Spine switches in one embodiment;

[0047] Figure 10 This is a schematic diagram illustrating the selection of message transmission parameter values ​​in one embodiment;

[0048] Figure 11 This is a schematic diagram illustrating data flow waiting in one embodiment;

[0049] Figure 12 This is a schematic diagram of the global configuration of network congestion control in one embodiment;

[0050] Figure 13 This is a schematic diagram comparing the performance of the present application's solution with that of a traditional solution in one embodiment;

[0051] Figure 14 This is a structural block diagram of a network congestion control device in one embodiment;

[0052] Figure 15 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0053] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0054] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0055] In AI training scenarios, since a single computing node cannot complete the training task independently, a distributed parallel computing model is commonly adopted. This model involves breaking down the computing task into multiple sub-tasks and distributing them to different nodes for parallel processing. In this model, frequent aggregation communication is required between multiple computing nodes, thus placing extremely high demands on network bandwidth, latency, and reliability.

[0056] Currently, data center networks for AI training scenarios typically employ two- or three-layer network topologies based on the Clos architecture. For example... Figure 1 As shown, this network topology comprises two layers of switches: Leaf switches (L1 to L16) at the edge layer and Spine switches (S1 to S32) at the aggregation layer. The bottom layer consists of servers (H1 to H64) equipped with Graphics Processing Units (GPUs) and their connected network interface cards (NICs). To support efficient communication between GPUs, each server typically has eight GPUs, each with its own dedicated NIC. These eight NICs are connected to eight different Leaf switches. At the network architecture level, all Leaf switches and Spine switches are networked in a full-mesh manner, meaning that the uplink port of each Leaf switch is connected to every Spine switch, thus creating multiple equivalent parallel forwarding paths at the physical layer. For downlink connections between Leaf switches and server NICs, a "track" optimized connection method is used. Within a block, the k-th Leaf switch connects only to the k-th NIC of each server. This connection method ensures horizontal distribution of traffic within the same track, preventing a single Leaf switch from becoming a bottleneck. Limited by the switching capacity of current switches, taking a switch with a switching capacity of 25.6Tbps (terabits per second) and a port speed of 400Gbps (gigabits per second) as an example, the number of downlink network cards it can support is usually limited to 32. Based on the above connection method, a group of 8 Leaf switches and all the servers connected to them together constitute a network block, which corresponds to a rack in a traditional data center network.

[0057] In the network architecture described above, Leaf switches often have multiple equivalent candidate outgoing ports when selecting the next hop for routing. Figure 1 For example, a data packet destined for block 2 can have 32 equivalent candidate outgoing ports on L1, each heading to a switch from S1 to S32. Currently, Leaf switches typically use the Equal Cost Multi-Path (ECMP) mechanism for routing. ECMP involves selecting a port from multiple equivalent candidate ports using a specific method for route forwarding. Figure 2 As shown, the ECMP mechanism performs a hash calculation on the input value and then takes the modulo of the number of candidate output ports, i.e., Hash(in) % |V|, where |V| represents the number of candidate output ports. Figure 2In this case, |V| = 32. The result of the modulo operation is the index value of a port, that is, the position number of a port in the candidate output port list, such as... Figure 2 The calculated index value is 3, therefore, the data stream will be assigned to the output port corresponding to index value 3. The input value is generally the five-tuple information of the data stream, including the source IP address, destination IP address, source port number, destination port number, and transport layer protocol number.

[0058] An ideal hash function can evenly distribute traffic across all candidate outgoing ports when there is a sufficient volume of data flow, achieving ideal load balancing. However, in AI training scenarios, network traffic exhibits characteristics drastically different from traditional data center services: First, the number of flows generated in AI scenarios is relatively small; at any given time, a switch typically has only a few to dozens of active flows, rather than hundreds or thousands. Second, the bandwidth of a single flow is extremely high, often fully utilizing the physical bandwidth of the network interface card, such as 400Gbps. Third, traffic exhibits significant bursts and periodicity, repeating at second-level intervals within long training periods, with each burst lasting from milliseconds to seconds. These characteristics make ECMP hash allocation highly susceptible to polarization, where multiple large flows are hashed to the same outgoing port, causing congestion on that link while other links remain idle, thus leading to a decline in network performance.

[0059] To address congestion issues, traditional technologies employ Explicit Congestion Notification (ECN). ECN relies on the switch's WRED (Weighted Random Early Detection) probabilistic labeling mechanism. Specifically, when a switch decides to mark a packet with ECN based on the WRED mechanism, it modifies the ECN field in the packet's IP header. The DSCP (Differentiated Services CodePoint) field in the IP header is 8 bits long, with the lower 2 bits representing the ECN field, such as... Figure 3 As shown. Tagging involves changing the value of the ECN field to 0b11 (binary 11). It should be noted that only packets with an ECN field value of 0b01 or 0b10 (indicating that both the sender and receiver support ECN) will be tagged; 0b00 indicates that ECN is not supported and will not be tagged.

[0060] Figure 4 The principle of WRED probabilistic labeling mechanism is shown. Figure 4In the diagram, the horizontal axis represents the queue length, and the vertical axis represents the tagging probability. When the queue length is less than Kmin, the tagging probability is 0, meaning no tagging occurs. When the queue length is between Kmin and Kmax, the tagging probability increases linearly with the queue length, from 0 to a relatively large value (Pmax). When the queue length exceeds Kmax, the tagging probability may reach its maximum value, such as 1. In other words, the longer the queue, the more severe the congestion; therefore, the switch tags passing packets with a higher probability, allowing the sender to detect congestion and slow down.

[0061] However, ECN signals can only indicate the occurrence of congestion, but cannot distinguish the specific location of the congestion, such as whether the congestion occurs on the uplink port of the source Leaf switch, the downlink port of the Spine switch, or the downlink port of the destination Leaf switch. This lack of location information makes it difficult for the sending end to make accurate decisions, further exacerbating the problem of insufficient network bandwidth utilization and affecting the overall efficiency of distributed training. To address this issue, the industry has proposed congestion switching solutions such as PLB (Protective Load Balancing). The basic idea is that when congestion is detected, the sending end randomly changes the IPv6 flow label value of the data flow. Since the switch uses the flow label as one of the hash input fields when calculating the ECMP hash, changing the flow label value can re-hash the flow to another equivalent path, thus achieving routing. However, the PLB solution also cannot distinguish the location of the congestion, and its routing mechanism is random, which can easily lead to invalid routing and path oscillations, wasting system resources and potentially exacerbating network performance instability.

[0062] Based on this, embodiments of this application propose a network congestion control method, which can be applied to, for example... Figure 5 The application environment shown includes: a transmitter 102, a receiver 104, and a switch 106 located between the transmitter 102 and the receiver 104. The transmitter 102 and receiver 104 are computer devices participating in distributed training, such as servers configured with GPUs and network interface cards (NICs). The switch 106 is a forwarding device constituting the data center network, such as a Leaf switch and a Spine switch. The Leaf switch is directly connected to the server, and the Spine switch is fully connected to the Leaf switch, together forming a multi-path forwarding architecture.

[0063] The sending end 102 is connected to the receiving end 104 through the switch 106. The message sent by the sending end 102 is forwarded to the receiving end 104 hop by hop through the switch 106. After receiving the message, the receiving end 104 returns a response message to the sending end 102. After receiving the response message for the sent message, if the sending end 102 determines that there is congestion in the data stream containing the sent message based on the response message, it identifies the location of the congestion based on the congestion information carried in the response message. If the location of the congestion is located at the message forwarding port, the sending end 102 obtains path mapping information, which is used to record the correspondence between message transmission parameter values ​​and message forwarding paths. The sending end 102 adjusts the original message transmission parameter values ​​of the message to be sent in the data stream to the first transmission parameter. The first transmission parameter refers to the other transmission parameters among the message transmission parameters, excluding the original message transmission parameters of the message to be sent. The next message to be sent in the data stream is transmitted to the receiving end 104 through the message forwarding path indicated by the first transmission parameter.

[0064] In one exemplary embodiment, such as Figure 6 As shown, a network congestion control method is provided, which is applied to... Figure 5 Taking the sender 102 as an example, the explanation includes the following steps:

[0065] Step S602: Obtain the response message for the sent message.

[0066] In this context, a sent message refers to a data packet that has been sent by the sender, is being transmitted in the network, or has been received by the receiver. In this embodiment, a sent message is the basic unit constituting a data stream, such as an RDMA (Remote Direct Memory Access) data packet encapsulated using the RoCEv2 protocol. A response message is an acknowledgment or feedback message returned by the receiver to the sender after receiving a data packet sent by the sender. Specifically, a response message can be a standard ACK (Acknowledgment) message or a CNP (Congestion Notification Packet) message specifically used for congestion feedback. The response message may contain congestion information parsed from the data packet header by the receiver, such as the ECN field value.

[0067] For example, the sending end continuously sends data packets to the receiving end, and these packets are forwarded hop-by-hop through switches in the network to the receiving end. Upon receiving each data packet, the receiving end generates a response packet according to protocol requirements. If the data packet carries a congestion flag, such as an ECN flag, the receiving end encapsulates the flag value in an inner field of the response packet. The response packet is returned to the sending end via the network. The sending end's network interface card receives these response packets and extracts the congestion information carried within them, providing a basis for subsequent congestion assessment.

[0068] by Figure 1 For example, suppose the sending server H1 sends an RDMA data stream to the receiving server H33. Each time H33 receives a data packet with an ECN tag, it generates a CNP message, fills in the tag value (such as binary 10 or 11) into a specific field of the CNP message, and sends it back to H1. H1's network card receives these CNP messages and parses out the congestion information within them.

[0069] Step S604: If it is determined from the response message that there is congestion in the data stream where the sent message is located, the location of the congestion is identified according to the congestion information carried in the response message.

[0070] In this context, congestion refers to a situation where the traffic load on a link in the network exceeds its processing capacity, causing data packets to wait for forwarding in the switch queue. Congestion information refers to data carried in response messages that indicates the congestion status, specifically the value of the ECN field. In this embodiment, congestion information is configured with different identifiers to represent different types of congestion. The location of congestion refers to the specific location type of congestion in the network. In this scheme, it is mainly distinguished into packet forwarding ports and packet delivery ports. Packet forwarding ports correspond to packet forwarding paths, i.e., forwarding links between switches, while packet delivery ports correspond to the final access path, i.e., the access link from the last switch to the server.

[0071] In an exemplary embodiment, identifying the location of congestion based on the congestion information carried in the response message includes: determining that the location of congestion is located at the message forwarding port if the congestion information contains a first congestion identifier; and determining that the location of congestion is located at the message sending port if the congestion information contains a second congestion identifier.

[0072] In this embodiment, the first congestion flag is a specific marker set in the data packet by the packet forwarding port when congestion occurs. Specifically, in this embodiment, the first congestion flag is the modified value of the ECN field, such as binary 10 (0b10), used to indicate that congestion occurs at the packet forwarding port, i.e., on the forwarding path within the network. The second congestion flag is also a specific marker set in the data packet by the packet delivery port when congestion occurs. In this embodiment, the second congestion flag is the modified value of the ECN field, such as binary 11 (0b11), used to indicate that congestion occurs at the packet delivery port, i.e., on the end access path. The packet forwarding port refers to a network device port located on the packet forwarding path, specifically including the uplink port of a Leaf switch and all ports of a Spine switch. These ports are configured to set the first congestion flag when congestion occurs. The packet delivery port refers to a network device port located on the packet delivery path, specifically including the downlink port of a Leaf switch. These ports are configured to set the second congestion flag when congestion occurs.

[0073] For example, switch ports in the network are pre-classified into different types and configured with differentiated ECN tagging rules. For instance, packet forwarding ports are configured with the first tagging mode; when congestion occurs on these ports, the corresponding switch modifies the ECN field of the passing packets to the first congestion identifier, such as 0b10. Packet delivery ports are configured with the second tagging mode; when congestion occurs on these ports, the corresponding switch modifies the ECN field of the packets to the second congestion identifier, such as 0b11. Through this differentiated port configuration, the location information of the congestion is directly encoded into the ECN field.

[0074] After determining from the response message that the data stream containing the sent message is congested, the sending end can determine the specific location of the congestion by parsing the congestion information carried in the response message, i.e., the specific congestion identifier. Specifically, when the congestion information parsed by the sending end is the first congestion identifier (0b10), the sending end determines that the congestion occurred on the message forwarding port, that is, the congestion is located on the forwarding path within the network, such as the uplink port of the source Leaf switch, the uplink port of the Spine switch, or the downlink port. When the congestion information parsed by the sending end is the second congestion identifier (0b11), the sending end determines that the congestion occurred on the message delivery port, that is, the congestion is located on the end access path, such as the downlink port of the Leaf switch connecting to the destination server.

[0075] Similarly Figure 1For example, suppose the downlink port connecting switch S1 to switch L9 becomes congested. Since the downlink port of switch S1 is a packet forwarding port, configured in the first tagging mode, after detecting queue congestion, switch S1 modifies the ECN field of data packets passing through this port from the original value 0b01 to 0b10. When this data packet reaches the receiving end H33, H33 generates a response message, encapsulates it with 0b10, and returns it to the sending end H1. H1 parses the response message and obtains 0b10, thus determining that the congestion occurred on the packet forwarding port. As another example, if the downlink port connecting switch L9 to server H33 becomes congested, since this port is a packet delivery port, configured in the second tagging mode, switch L9 modifies the ECN field of data packets to 0b11. H1, upon learning 0b11 from the response message, determines that the congestion occurred on the packet delivery port.

[0076] Through the above identification mechanism, the sending end can accurately distinguish whether the congestion occurs in the message forwarding path or the message delivery path, thus providing a basis for subsequent differentiated congestion handling strategies.

[0077] In some embodiments, when a server network interface card (NIC) sends a data packet, it uniformly initializes the ECN field in the IP header to an ECN-enabled identifier, such as binary 01 (0b01), indicating that the data packet is eligible for ECN marking. During data packet forwarding, the switch checks the ECN field value currently carried in the data packet. Only when the switch detects that the field is an ECN-enabled identifier will it modify it according to the port's marking mode and congestion status, setting it to the corresponding congestion identifier. Conversely, if the ECN field is detected as another value, such as an identifier indicating ECN non-support (0b00), the switch will not modify the field.

[0078] Step S606: If the congestion occurs at the packet forwarding port, obtain the path mapping information; wherein, the path mapping information is used to record the correspondence between the packet transmission parameter values ​​and the packet forwarding path.

[0079] The path mapping information refers to a pre-generated data structure that records the correspondence between different packet transmission parameter values ​​and different packet forwarding paths. This information can be a switching table stored in the sending end's network interface card (NIC), which contains multiple packet transmission parameter values, each corresponding to a different packet forwarding path.

[0080] It's important to note that the deterministic path switching achieved by path mapping information is based on the principle of relative path control. Specifically, network switches typically use XOR-based hash functions for ECMP routing. These hash functions have a linear property: applying an XOR offset to the input results in the output being XORed with a fixed value related to that offset. Mathematically, this can be expressed as: h(p⊕Δ) = h(p)⊕h(Δ), where p is the original hash input (e.g., a quintuple), and Δ is the free variable applied to the input (e.g., a change in the UDP source port number). This means that for any data stream, applying the same offset Δ will result in the same change in the hash result h(Δ), regardless of the stream's characteristics. Based on this property, the sender can pre-probe to determine the output change h(Δ) corresponding to different offsets Δ, and then apply this relative offset relationship to all data streams. During probing, the sending end selects a freely modifiable field that participates in the hash calculation as Δ, such as the UDP source port number. By traversing different port numbers and observing their corresponding packet forwarding identifiers, the correspondence between Δ and h(Δ) can be established. The specific implementation of this probing process will be described in detail in subsequent embodiments. In this embodiment, the path mapping information obtained by the sending end is formed by summarizing and organizing the probing results. This information records the correspondence between different packet transmission parameter values ​​(i.e., different Δ) and different packet forwarding paths. When the sending end uses this information for routing, it only needs to adjust the packet transmission parameter value of the current data stream to another value, so that the data stream can be re-hashed by the switch to another forwarding path, thereby achieving deterministic path switching.

[0081] Message transmission parameter values ​​refer to field values ​​that participate in the switch's ECMP hash calculation and can be freely modified by the sender, such as the UDP (User Datagram Protocol) source port number. Changes to these field values ​​will cause changes to the 5-tuple, thus causing the switch to re-hash and potentially select a different forwarding path. The message forwarding path refers to the intermediate forwarding links that a data packet traverses from the source Leaf switch to the destination Leaf switch, specifically consisting of the uplink port of the source Leaf switch, at least one Spine switch, and the uplink port of the destination Leaf switch.

[0082] For example, when the sender determines that congestion occurs at the packet forwarding port, it means that the path taken by the current data flow is congested due to hash collisions or other reasons, and it is necessary to switch paths to avoid congestion. At this time, the sender retrieves pre-generated path mapping information from local storage to perform path switching based on the path mapping information.

[0083] In some embodiments, if the congestion occurs at the packet delivery port, it indicates that the congestion is on the final access path, i.e., the downlink from the last Leaf switch to the destination server. Since this path is the only channel for data packets to reach the destination server, congestion cannot be avoided by switching paths. Therefore, the sender does not perform a path switching operation but maintains the current path and triggers a congestion control mechanism, such as reducing the data stream transmission rate, to alleviate congestion pressure on the downlink port. Simultaneously, the sender continues to monitor congestion information carried in subsequent response packets. If congestion is alleviated, the transmission rate is gradually restored; if congestion persists, the rate is further reduced until the congestion is eliminated.

[0084] For ease of understanding, Figure 7 The diagram illustrates different types of congestion. Circle 1 corresponds to a scenario where the uplink port of a Leaf switch is congested. This typically occurs when multiple cross-block data flows within the same block are routed via ECMP hashes on the Leaf switch and assigned to the same uplink port, causing multiple large flows to crowd the same link and resulting in congestion. Circle 2 corresponds to a scenario where the downlink port of a Leaf switch is congested. When multiple data flows from different sources are destined for the same server's network interface card (NIC), these flows will eventually converge on the downlink port of the destination Leaf switch, exceeding the port's bandwidth capacity and causing congestion. Circle 3 corresponds to a scenario where the downlink port of a Spine switch is congested. When data flows from multiple different blocks are simultaneously sent to servers within the same target block (which may have the same or different NICs), these flows may converge at the downlink port of the Spine switch, causing congestion.

[0085] Step S608: Adjust the original message transmission parameter value of the message to be sent in the data stream to the first transmission parameter; the first transmission parameter refers to the other transmission parameters among the message transmission parameters besides the original message transmission parameter of the message to be sent; the next message to be sent after the message has been sent in the data stream is transmitted through the message forwarding path indicated by the first transmission parameter.

[0086] In this context, "pending message" refers to a data packet in the current data stream that has not yet been sent and is still waiting to be sent in the sender's queue. "Original message transmission parameter value" refers to the message transmission parameter value currently being used in this data stream, such as the current UDP source port number. "First transmission parameter" refers to another message transmission parameter value selected from the path mapping information that differs from the original message transmission parameter value; this parameter value corresponds to a message forwarding path different from the original path. "Next pending message after sent message" refers to the subsequent message in this data stream that immediately follows the sent message and is about to be sent; in practical implementations, it generally refers to all unsent messages in this data stream.

[0087] For example, after determining that a route switch is needed, the sending end modifies the transmission parameter values ​​of all pending packets in the current data stream. Specifically, the sending end adjusts the original packet transmission parameter values ​​to another parameter value, namely the first transmission parameter, based on the path mapping information. This first transmission parameter is a value selected from the path mapping information that is different from the original value, to ensure that the adjusted packets can be rehashed by the switch to another forwarding path.

[0088] For example, suppose a data stream on H1 is currently using a UDP source port number of 1000, which corresponds to the first path P1 in the path mapping information. After H1 determines that P1 is congested, it selects another UDP source port number from the path mapping information, say 2000, corresponding to the second path P2, and uses it as the first transmission parameter. It then uniformly modifies the UDP source port number of all packets to be sent in the data stream's transmission queue to 2000. When the modified packets arrive at Leaf switch L1, because the source port number in the 5-tuple has changed, Leaf switch L1's ECMP hash module recalculates and assigns these packets to the uplink port corresponding to the UDP source port number 2000, thus entering path P2. In this way, the data stream can be precisely switched from the original congested path P1 to the other path P2. It should be noted that the packet transmission parameter adjustment action applies to all unsent packets in the data stream, not just a single packet, to ensure that the entire stream subsequently follows the new path and avoids path oscillation.

[0089] In this embodiment, by obtaining the response message of the sent message and determining that the data stream is congested based on the response message, the location of the congestion is further identified according to the congestion information carried in the response message. Subsequent routing operations are triggered only when congestion occurs at the message forwarding port. This avoids invalid routing and network disturbances caused by blindly adjusting message transmission parameters in other scenarios where routing is not required. Furthermore, pre-generated path mapping information is obtained, which records the correspondence between message transmission parameter values ​​and message forwarding paths. This allows the sender to accurately know the message forwarding paths corresponding to different message transmission parameter values. The original transmission parameter values ​​of the message to be sent are then adjusted to other transmission parameters besides the original values, i.e., the first transmission parameter. This ensures that subsequent messages are transmitted through another forwarding path corresponding to the first transmission parameter, achieving a precise switch from the original congested path to the new path and avoiding invalid routing caused by random blind attempts. Therefore, this embodiment can quickly and deterministically switch data streams from congested paths to other paths when multiple streams are concurrently congested, effectively alleviating link congestion caused by hash collisions, and significantly improving network bandwidth utilization and the overall communication efficiency of distributed training in AI scenarios.

[0090] In an exemplary embodiment, the network congestion control method further includes: traversing multiple different message transmission parameter values ​​and sending a probe message corresponding to each message transmission parameter value to the receiving end; recording the message forwarding identifier corresponding to each probe message; grouping message transmission parameter values ​​corresponding to the same message forwarding identifier into a group, with each group corresponding to a message forwarding path; selecting any message transmission parameter value from each group as a representative value; and determining path mapping information based on the correspondence between each representative value and each message forwarding path.

[0091] Probe messages are data packets specifically used for path probing. Their purpose is not to transmit service data, but to observe the network path traversed by traversing different message transmission parameter values. Probe messages are usually encapsulated using the same protocol as service messages (such as RoCEv2), but their payload content can be simplified or carry specific identifiers to distinguish them from normal service flows.

[0092] A packet forwarding identifier is information used to uniquely identify a packet forwarding path. In this embodiment, the packet forwarding identifier is specifically the identifier of the first switch port through which the probe packet passes after being sent from the sender, i.e., the uplink port of the source Leaf switch, such as the port's IP address or port index. Since different uplink ports correspond to different forwarding paths, different paths can be distinguished by the identifier of the first-hop port.

[0093] A group is a collection of message transmission parameter values ​​that share the same message forwarding identifier. Since the same message forwarding identifier corresponds to the same forwarding path, all parameter values ​​within a group will cause the data flow to follow the same path.

[0094] The representative value is a message transmission parameter value selected from each group, used to represent the entire path corresponding to that group in the routing table. Since all parameter values ​​within the same group are equivalent in path selection, only one representative value needs to be retained to index the path.

[0095] For example, during the path mapping information generation phase, the sending end needs to establish a correspondence between message transmission parameter values ​​and actual forwarding paths. To this end, the sending end iterates through a preset set of message transmission parameter values, such as the range of UDP source port numbers, selecting multiple values, either through a full or sampled iteration. For each selected message transmission parameter value, the sending end constructs a probe message, filling the parameter value into the corresponding field in the message header, such as the UDP source port, and sends the probe message to the designated receiving end. When these probe messages pass through switches in the network, the switches perform ECMP hashing based on their five-tuples to select a forwarding path. By sending probe messages carrying different source port numbers to the same receiving end, the sending end can observe the path selection result corresponding to each source port number. To avoid interfering with normal services, the probing process is usually performed during network initialization or idle periods, and the number of probe messages is controllable.

[0096] Each time a probe packet is sent, the sending end needs to know the actual path it took. To do this, the sending end can use network diagnostic tools such as traceroute to obtain the packet forwarding identifier corresponding to the probe packet, such as the IP address of the first-hop switch port. The sending end records the packet transmission parameter values ​​used by each probe packet and its corresponding packet forwarding identifier, forming the original corresponding data. For example, if the sending end sends a probe packet with source port number 1000, it receives a first-hop IP of 10.0.1.1; if it sends a probe packet with source port number 1001, it receives a first-hop IP of 10.0.2.1, and so on.

[0097] refer to Figure 8 As shown, after collecting enough corresponding data, the sending end can group this data. Specifically, all packet transmission parameter values ​​corresponding to the same packet forwarding identifier (i.e., the same IP address of the first-hop switch port) are grouped into the same group. For example, if source port numbers 1000, 2000, and 3000 all correspond to the first-hop IP 10.0.1.1, these ports are grouped into group G1; source ports 1001, 2001, and 3001 all correspond to the first-hop IP 10.0.2.1, so they are grouped into group G2, and so on. (Continue to refer to...) Figure 9 As shown, each group represents an independent packet forwarding path. Since the first-hop switch has 32 ports, corresponding to 32 uplink ports, 32 groups will eventually be formed, each containing several packet transmission parameter values. After grouping, the sending end knows which source port values ​​will go along the same path and which will go along different paths for the current four-tuple (fixed source IP address, destination IP address, destination port, and transport protocol).

[0098] After grouping, each group typically contains multiple message transmission parameter values. To simplify subsequent routing operations, the sender arbitrarily selects a value from each group as the representative value for that group. The selection method can be the minimum, maximum, or random selection, as long as each group has exactly one representative value. For example, 1000 can be selected as the representative value from group G1, 1001 from group G2, and so on. This way, instead of recording the correspondence of all port numbers, only 32 representative values ​​need to be recorded, significantly reducing storage overhead and lookup complexity during routing.

[0099] Finally, the sending end arranges the selected representative values ​​in a certain order, such as by group number, to form a routing table. The correspondence between each representative value and its corresponding packet forwarding path is implicit in the table generation process; that is, the first representative value corresponds to the first path (group G1), the second representative value corresponds to the second path (group G2), and so on. This routing table is the path mapping information, which clarifies that modifying the packet transmission parameter value to a certain representative value will switch the data stream to the corresponding forwarding path. The sending end stores this path mapping information locally (such as in the network card memory) for use when congestion triggers routing.

[0100] In some embodiments, the packet probing operation only needs to be performed once during network cluster initialization, and the path mapping information can be used directly when a route change is required subsequently.

[0101] In some embodiments, before probing, it is necessary to ensure that the ECMP hashing behavior of all Leaf switches in the network is consistent. Specifically, the network administrator or controller will perform a unified configuration on all Leaf switches: First, set the ECMP hash algorithm of all Leaf switches to the same XOR-based hash function. This type of hash function has linear properties and is the theoretical basis for deterministic switching. Second, configure a consistent hash seed for all Leaf switches to ensure that the same input 5-tuple yields the same hash value on all Leaf switches. Through the above unified configuration, the hashing behavior of all Leaf switches in the cluster will be consistent. After the unified configuration, probing only needs to be performed on any Leaf switch, and the resulting source port number-path mapping can be applied to all Leaf switches in the cluster, greatly simplifying the probing process. After completing the above unified configuration, the sending end can start performing packet probing operations.

[0102] In this embodiment, a precise data foundation for deterministic routing is provided by establishing a correspondence between message transmission parameter values ​​and message forwarding paths through traversal. Parameter values ​​corresponding to the same path are grouped and representative values ​​are selected, significantly reducing storage overhead and routing query complexity. Based on this path mapping information, the sending end can accurately switch to the target path, avoiding invalid attempts and network instability caused by random routing.

[0103] In an exemplary embodiment, adjusting the original message transmission parameter value of the message to be sent in the data stream to a first transmission parameter includes: obtaining the arrangement order of the message transmission parameter values ​​in the path mapping information; selecting a first transmission parameter from the message transmission parameter values ​​based on the arrangement order, and adjusting the original message transmission parameter value of the message to be sent in the data stream to the first transmission parameter.

[0104] The arrangement order refers to the sequential order of the transmission parameter values ​​in the path mapping information, which is usually fixed according to the group number or the probe order. This order determines the order in which paths are tried during route switching, for example, starting from the position after the current value.

[0105] For example, when the sending end determines that a route change is needed, it first obtains the locally stored path mapping information and identifies the order of the packet transmission parameter values ​​in that information. This order is determined when the path mapping information is generated; for example, the representative values ​​of each group are arranged sequentially according to the order of groups G1, G2, ..., G32, forming a fixed sequential list. The sending end locates the current position of the original packet transmission parameter value currently being used by the data stream in this list. Then, it selects a packet transmission parameter value starting from the next position after the current position as the first transmission parameter, according to the order of arrangement.

[0106] Figure 10 This diagram illustrates the selection of message transmission parameter values, such as... Figure 10 As shown, the sending network interface card (NIC) maintains a globally shared list of packet transmission parameter values. This list contains 32 packet transmission parameter values ​​(S-Port1 to S-Port32), each belonging to a pre-defined group (G1 to G32). Packet transmission parameter values ​​within the same group correspond to the same packet forwarding path, while different groups correspond to different forwarding paths. For each data stream connection, the sending NIC maintains an index value pointing to its current position in the list. Figure 10In this context, the message transmission parameter value currently used by the data stream is the value pointed to by the index (i.e., S-Port2). The packet (G2) to which this value belongs determines the forwarding path taken by the current data stream. When a route change is required, the sender only needs to adjust the index value of the data stream to the next position, for example, from S-Port2 to S-Port3, so that the data stream uses the new message transmission parameter value (S-Port3), thereby switching to the corresponding forwarding path, i.e., the forwarding path corresponding to packet G3.

[0107] After selection, the sender modifies the corresponding fields (such as UDP source port) of all packets to be sent in the data stream's transmission queue to the first transmission parameter. When the modified packet arrives at the Leaf switch, because the value of this field in the 5-tuple has changed, the Leaf switch recalculates the forwarding path based on the ECMP hash, thus directing the packet to another forwarding path corresponding to the first transmission parameter. Through this sequential selection mechanism based on arrangement order, the sender can systematically try different forwarding paths until a congestion-free path is found. If congestion is still detected after adjustment, the next parameter value is selected sequentially for adjustment, and the above process is repeated.

[0108] In this embodiment, by obtaining the order of packet transmission parameter values ​​in the path mapping information and selecting the first transmission parameter for adjustment based on this order, the sending end can orderly traverse different forwarding paths when switching routes, avoiding multiple invalid attempts and path oscillations caused by random route switching, thereby improving network bandwidth utilization and congestion mitigation efficiency.

[0109] In an exemplary embodiment, when it is determined from the response message that the data stream containing the sent message is congested, the location of the congestion is identified according to the congestion information carried in the response message, including: generating a target waiting time when it is determined from the response message that the data stream containing the sent message is congested; if the data stream is still congested after the target waiting time expires, the location of the congestion is identified according to the congestion information carried in the response message.

[0110] The target waiting time refers to the delay introduced by the sender after detecting congestion but before performing location identification and routing. This time is usually a randomly generated value, ranging from 0 to K RTTs (Round-Trip Time), where K is a configurable parameter, for example, K=5. The waiting times generated by different data streams are independent and random to avoid multiple streams performing routing operations simultaneously.

[0111] For example, when the sending end determines that there is congestion in the current data stream based on the response message, it does not immediately identify the congestion location and switch routes. Instead, it first generates a target waiting time. This waiting time is randomly generated within a preset range [0, K], and the unit is one RTT. It can be understood that when multiple data streams are congested on the same link at the same time, if they switch routes at the same time, they are likely to switch to another link simultaneously, causing the new link to become congested instantly, resulting in path oscillation. This embodiment introduces a random waiting time, and the waiting end times of different streams are staggered, so that only the stream with the shortest waiting time executes subsequent operations first, while the stream with the longest waiting time maintains the current path.

[0112] During the target waiting period, the sender does not stop transmitting data but continues to receive response messages and update the congestion status. After the waiting period ends, the sender reassesses whether there is congestion in the current data stream. If the congestion is cleared, the sender exits the current routing procedure and maintains the current path. If congestion still exists, the sender identifies the location of the congestion based on the congestion information carried in the response message and proceeds with subsequent routing decisions.

[0113] Figure 11 A diagram illustrating data stream waiting is shown. (For example...) Figure 10 As shown, data flow 1 generates a waiting time of 1 RTT, and data flow 2 generates a waiting time of 2 RTTs. After the waiting time of data flow 1 ends, the current congestion status is checked first. If the congestion is eliminated, the routing process is exited directly. If congestion is still detected, the location of the congestion is immediately identified and a routing operation is performed. If congestion is still detected after the switch, the waiting routing process is restarted. At the same time, since data flow 1 has switched paths, the load on the original congested link is relieved, and although the waiting time of data flow 2 has not yet ended, its throughput also returns to normal levels. When the waiting time of data flow 2 ends, if no congestion is detected, data flow 2 does not need to switch paths.

[0114] In this embodiment, by introducing a random waiting time, multiple simultaneously congested flows are staggered in their routing timing, avoiding path oscillations and routing storms caused by simultaneous switching, and ensuring that the network converges smoothly to a congestion-free state.

[0115] In an exemplary embodiment, the network congestion control method further includes: counting the number of response messages carrying congestion information within a preset period; and determining that the data stream containing the sent messages is congested when the number of response messages exceeds a message count threshold.

[0116] The preset period refers to a fixed time window set by the sending end to periodically count the number of congestion feedback messages. This period can be configured, for example, to be 100 microseconds or 1 millisecond, and the specific value can be adjusted according to network latency and congestion response speed requirements. The message quantity threshold is a preset numerical threshold used to determine whether the congestion has reached a level requiring processing. This threshold can be configured according to network size and traffic characteristics. For example, setting it to 10 means that if more than 10 response messages carrying congestion information are received within a period, it is considered congestion.

[0117] For example, the sending end maintains a counter for each data stream to count the number of response messages carrying congestion information received within each preset period. Specifically, the counter is reset to zero at the beginning of each period. During the period, the sending end parses the inner fields of each received response message to determine whether it carries congestion information, such as an ECN field of 0b10 or 0b11. If so, the counter is incremented by 1. At the end of the period, the sending end compares the counter value with a preset message count threshold. If the counter value does not exceed the threshold, it is determined that the data stream is not currently congested, the counter is reset to zero, and the next statistical period begins, continuing monitoring. If the counter value exceeds the threshold, the sending end determines that the data stream is currently congested and further determines the location of the congestion based on the type of congestion information. If the number of first congestion identifiers in the recorded congestion information exceeds the first preset threshold, it is determined that the congestion occurred at the message forwarding port; if the number of second congestion identifiers exceeds the second preset threshold, it is determined that the congestion occurred at the message delivery port.

[0118] Optionally, congestion detection and congestion location identification can be performed simultaneously. That is, when the sender counts the number of response messages carrying congestion information within a preset period, it also records the specific type of this congestion information. When the period ends, if the number of first congestion identifiers exceeds a first preset threshold, the sender can determine that the congestion location is a message forwarding port. If the number of second congestion identifiers exceeds a second preset threshold, the sender can determine that the congestion location is a message delivery port. The first and second preset thresholds can be the same or different.

[0119] In this embodiment, by using a mechanism of periodic statistics and threshold comparison, the transmitting end can filter out occasional, instantaneous congestion noise and only respond to persistent congestion, avoiding misjudgment and frequent route switching, thereby improving the stability and effectiveness of congestion control.

[0120] In one specific embodiment, Figure 12This diagram illustrates the global configuration of network congestion control. It includes Spine switches, Leaf switches (Leaf1 and Leaf2), a controller, and sending network interface cards (NICs). The controller is responsible for uniformly configuring all network devices, including setting the ECMP hash algorithm and seed for all Leaf switches, and differentiating the ECN tagging modes for different ports: all ports on the Spine switches and the uplink ports on the Leaf switches are configured with the first tagging mode, while the downlink ports on the Leaf switches are configured with the second tagging mode.

[0121] During data transmission, the sending network interface card (NIC) is responsible for congestion detection and routing decisions. When the NIC detects congestion through the congestion feedback mechanism, it first performs congestion location detection, distinguishing whether the congestion occurs at the packet forwarding port or the packet delivery port based on the type of congestion information received. If the congestion is determined to occur at the packet forwarding port, the NIC performs a routing operation, switching the data stream to another forwarding path by adjusting the UDP source port number.

[0122] Figure 13 A performance comparison diagram between the proposed solution and traditional solutions is shown. The comparison results show that traditional solution 1 requires multiple random switching attempts to gradually restore bandwidth, while traditional solution 2 does not switch paths but only controls the data packet transmission rate in congestion scenarios. The proposed solution, through congestion location identification and a deterministic routing mechanism, can accurately switch the data stream to an idle path, avoiding invalid routing and path oscillations. Therefore, this embodiment has the shortest path switching time and can quickly restore bandwidth to normal levels after switching (B).

[0123] This embodiment can quickly and deterministically switch data streams from congested paths to other paths when multiple streams are concurrently congested, effectively alleviating link congestion caused by hash collisions, and significantly improving network bandwidth utilization and overall communication efficiency for distributed training in AI scenarios.

[0124] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0125] Based on the same inventive concept, this application also provides a network congestion control device for implementing the network congestion control method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more network congestion control device embodiments provided below can be found in the limitations of the network congestion control method described above, and will not be repeated here.

[0126] In one exemplary embodiment, such as Figure 14 As shown, a network congestion control device is provided, comprising:

[0127] The message feedback module 1402 is used to obtain response messages for the sent messages;

[0128] The congestion location identification module 1404 is used to identify the location of the congestion based on the congestion information carried in the response message when it is determined that there is congestion in the data stream where the sent message is located based on the response message.

[0129] The path mapping information acquisition module 1406 is used to acquire path mapping information if the congestion occurs at the packet forwarding port; wherein, the path mapping information is used to record the correspondence between packet transmission parameter values ​​and packet forwarding paths;

[0130] The deterministic switching module 1408 is used to adjust the original message transmission parameter values ​​of the message to be sent in the data stream to the first transmission parameter; the first transmission parameter refers to the other transmission parameters among the message transmission parameters besides the original message transmission parameters of the message to be sent; the next message to be sent after the message has been sent in the data stream is transmitted through the message forwarding path indicated by the first transmission parameter.

[0131] In one embodiment, the apparatus further includes a path mapping information establishment module, for:

[0132] Iterate through multiple different message transmission parameter values ​​and send a probe message corresponding to each message transmission parameter value to the receiving end.

[0133] Record the message forwarding identifier corresponding to each probe message;

[0134] Group the message transmission parameter values ​​corresponding to the same message forwarding identifier into one group, and each group corresponds to one message forwarding path;

[0135] Select any message transmission parameter value from each group as a representative value;

[0136] The path mapping information is determined based on the correspondence between each representative value and each message forwarding path.

[0137] In one embodiment, the deterministic switching module 1408 is further configured to:

[0138] Obtain the order of the transmission parameter values ​​of each message in the path mapping information;

[0139] Based on the order of arrangement, the first transmission parameter is selected from the transmission parameter values ​​of each message, and the original transmission parameter values ​​of the messages to be sent in the data stream are adjusted to the first transmission parameter.

[0140] In one embodiment, the congestion location identification module 1404 is further configured to:

[0141] If congestion is detected in the data stream containing the sent message based on the response message, a target waiting time is generated.

[0142] If the data stream is still congested after the target waiting time has expired, the location of the congestion can be identified based on the congestion information carried in the response message.

[0143] In one embodiment, the apparatus further includes a congestion detection module for:

[0144] Count the number of response messages carrying congestion information within a preset period;

[0145] If the number of response messages exceeds the message count threshold, it is determined that the data stream containing the sent messages is congested.

[0146] In one embodiment, the congestion location identification module 1404 is further configured to:

[0147] If the congestion information includes a first congestion identifier, the location of the congestion is determined to be at the packet forwarding port;

[0148] If the congestion information contains a second congestion identifier, the location of the congestion is determined to be at the message sending port.

[0149] The modules in the aforementioned network congestion control device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.

[0150] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 15 As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores network congestion control data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a network congestion control method.

[0151] Those skilled in the art will understand that Figure 15 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0152] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0153] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.

[0154] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0155] It should be noted that the data involved in this application (including but not limited to data used for analysis, data stored, data displayed, etc.) are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0156] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited thereto.

[0157] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0158] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A network congestion control method, characterized in that, The method includes: Retrieve the response message for the sent message; If it is determined from the response message that there is congestion in the data stream where the sent message is located, the location of the congestion is identified according to the congestion information carried in the response message. If the congestion occurs at a packet forwarding port, then path mapping information is obtained; wherein, the path mapping information is used to record the correspondence between packet transmission parameter values ​​and packet forwarding paths; The original message transmission parameter values ​​of the message to be sent in the data stream are adjusted to the first transmission parameter; the first transmission parameter refers to the other transmission parameters among the message transmission parameters, excluding the original message transmission parameters of the message to be sent; the next message to be sent of the sent message in the data stream is transmitted through the message forwarding path indicated by the first transmission parameter.

2. The method according to claim 1, characterized in that, The method further includes: Iterate through multiple different message transmission parameter values ​​and send a probe message corresponding to each of the aforementioned message transmission parameter values ​​to the receiving end; Record the message forwarding identifier corresponding to each of the aforementioned probe messages; Group the message transmission parameter values ​​corresponding to the same message forwarding identifier into one group, and each group corresponds to one message forwarding path; Select any one of the message transmission parameter values ​​from each group as a representative value; The path mapping information is determined based on the correspondence between each representative value and each message forwarding path.

3. The method according to claim 1, characterized in that, The step of adjusting the original message transmission parameter values ​​of the message to be sent in the data stream to the first transmission parameter includes: Obtain the order of the values ​​of each message transmission parameter in the path mapping information; Based on the arrangement order, a first transmission parameter is selected from each of the message transmission parameter values, and the original message transmission parameter values ​​of the message to be sent in the data stream are adjusted to the first transmission parameter.

4. The method according to claim 1, characterized in that, When it is determined from the response message that the data stream containing the sent message is congested, identifying the location of the congestion based on the congestion information carried in the response message includes: If it is determined from the response message that the data stream containing the sent message is congested, a target waiting time is generated. If the data stream is still congested after the target waiting time has expired, the location of the congestion is identified based on the congestion information carried in the response message.

5. The method according to claim 1, characterized in that, The method further includes: Count the number of response messages carrying congestion information within a preset period; If the number of response messages exceeds the message number threshold, it is determined that the data stream containing the sent messages is congested.

6. The method according to claim 1, characterized in that, The step of identifying the location of congestion based on the congestion information carried in the response message further includes: If the congestion information includes a first congestion identifier, the location of the congestion is determined to be at the packet forwarding port; If the congestion information contains a second congestion identifier, the location of the congestion is determined to be at the message sending port.

7. A network congestion control device, characterized in that, The device includes: The message feedback module is used to obtain response messages for sent messages; The congestion location identification module is used to identify the location of the congestion based on the congestion information carried in the response message when it is determined that there is congestion in the data stream where the sent message is located based on the response message. The path mapping information acquisition module is used to acquire path mapping information if the congestion occurs at a packet forwarding port; wherein, the path mapping information is used to record the correspondence between packet transmission parameter values ​​and packet forwarding paths; A deterministic switching module is used to adjust the original message transmission parameter values ​​of the message to be sent in the data stream to a first transmission parameter; the first transmission parameter refers to the other transmission parameters among the message transmission parameters besides the original message transmission parameters of the message to be sent; the next message to be sent of the sent message in the data stream is transmitted through the message forwarding path indicated by the first transmission parameter.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

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

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.