Congestion processing method, device and equipment of communication network, medium and product

By identifying congested paths in the communication network and migrating data streams to non-congested paths, the problem of communication network congestion is solved, enabling rapid congestion relief and load balancing, and improving network performance and the service quality of cloud products.

CN122093322APending Publication Date: 2026-05-26TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2024-11-26
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Congestion in communication networks can lead to data transmission delays and packet loss, affecting the smooth execution of upper-layer services. Existing technologies are unable to quickly alleviate network congestion.

Method used

By identifying congested paths in the communication network, obtaining migration control information, selecting non-congested paths, and migrating data streams on congested paths to non-congested paths for transmission, traffic balancing is achieved through flow migration.

Benefits of technology

Quickly alleviate communication network congestion, reduce data stream transmission latency, improve network load balancing capabilities, and ensure the stability of upper-layer services and the SLA of latency-sensitive cloud products.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122093322A_ABST
    Figure CN122093322A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a congestion processing method and device for a communication network, equipment, a medium and a product. The communication network comprises a first device and a second device, and a plurality of network paths (used for transmitting data streams between the first device and the second device) are arranged between the first device and the second device. The method is executed by first equipment, and comprises the following steps: determining a first network path with congestion from a plurality of network paths; obtaining preset migration control information, wherein the migration control information is used for controlling the migration granularity of flow migration; the migration granularity is used for indicating migration flow of flow migration; selecting a non-congested second network path from the plurality of network paths; and based on the control of the migration control information, selecting the data flow with the flow as the migration flow from the data flows transmitted on the first network path, and migrating the selected data flow to the second network path for transmission. By adopting the embodiment of the invention, the congestion of the communication network can be quickly relieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to a method for handling congestion in a communication network, a device for handling congestion in a communication network, a computer device, a computer-readable storage medium, and a computer program product. Background Technology

[0002] Communication networks are used to transmit data streams, which can be transmitted from one device in the network to another. Communication networks are physical networks, and congestion in physical networks is unavoidable. Once congestion occurs, the transmission delay of data streams increases due to queuing or packet loss, severely impacting the smooth execution of upper-layer services based on data streams. Therefore, how to quickly alleviate communication network congestion has become a current research hotspot. Summary of the Invention

[0003] This application provides a method, apparatus, device, medium, and product for handling congestion in communication networks, which can quickly alleviate congestion in communication networks.

[0004] On one hand, embodiments of this application provide a congestion handling method for a communication network, the communication network including a first device and a second device, with multiple network paths between the first device and the second device, any one of which is used to transmit a data stream between the first device and the second device; the congestion handling method for the communication network is executed by the first device; the congestion handling method for the communication network includes:

[0005] Identify the first network path that is congested from among multiple network paths;

[0006] Obtain preset migration control information, which is used to control the migration granularity of flow migration; flow migration refers to migrating the data flow transmitted in a congested network path to a non-congested network path for transmission, and the migration granularity is used to indicate the migration traffic of flow migration.

[0007] Select a non-congested second network path from multiple network paths;

[0008] Based on the control of migration control information, a data stream whose traffic is to be migrated is selected from the data streams transmitted on the first network path, and the selected data stream is migrated to the second network path for transmission.

[0009] Accordingly, this application provides a congestion handling apparatus for a communication network, the communication network including a first device and a second device, with multiple network paths between the first device and the second device, any one of which is used to transmit a data stream between the first device and the second device; the congestion handling apparatus for the communication network is disposed in the first device; the congestion handling apparatus for the communication network includes:

[0010] The processing unit is used to determine the first network path that is congested from multiple network paths;

[0011] The processing unit is also used to acquire preset migration control information, which is used to control the migration granularity of the flow migration; flow migration refers to migrating the data flow transmitted in a congested network path to a non-congested network path for transmission, and the migration granularity is used to indicate the migration traffic of the flow migration.

[0012] The processing unit is also used to select a non-congested second network path from multiple network paths;

[0013] The processing unit is also used for control based on migration control information to select data streams whose traffic is migration traffic from data streams transmitted on the first network path;

[0014] A communication unit is used to migrate the selected data stream to a second network path for transmission.

[0015] In one implementation, the migration control information includes the number of flow mapping groups N and the number of flow migration groups K, where N is an integer greater than 1 and K is a positive integer less than or equal to N; any data flow mapped to any one of the multiple network paths is mapped to one of the N groups corresponding to the network path.

[0016] The processing unit, used for control based on migration control information, specifically performs the following steps when selecting a data stream whose traffic is migration traffic from the data streams transmitted on the first network path:

[0017] Based on the number of flow migration groups K, select K groups from the N groups mapped to the data flow mapped to the first network path;

[0018] The data streams mapped to the selected K groups are determined as the selected data streams; the traffic of the data streams mapped to the selected K groups is the migration traffic.

[0019] In one implementation, when the processing unit selects K packets from N packets mapped to the data stream of the first network path based on the number of flow migration groups K, it specifically performs the following steps:

[0020] Obtain the flow mapping table of the first device; the flow mapping table includes a hash bucket corresponding to each of the multiple network paths, each hash bucket corresponding to the network path includes N hash slots, one hash slot corresponds to one packet, and the hash slot is used to store the path identifier; any data flow mapped to the first network path is mapped to one hash slot in the hash bucket corresponding to the first network path;

[0021] The K packets corresponding to the first hash slots in the hash bucket corresponding to the first network path are determined as the K packets, and the data streams mapped to the K first hash slots are determined as the data streams mapped to the K packets;

[0022] The first hash slot is a hash slot in the hash bucket corresponding to the first network path, where the path identifier is the path identifier corresponding to the first network path.

[0023] In one implementation, the data stream mapped to the hash slot of the stream mapping table is transmitted through the network path corresponding to the path identifier stored in the mapped hash slot; the processing unit is used to migrate the selected data stream to a second network path for transmission, including:

[0024] The path identifiers stored in the K first hash slots are switched to the path identifiers corresponding to the second network path, so as to migrate the data streams mapped to the K first hash slots to the second network path for transmission.

[0025] In one implementation, the hash buckets corresponding to multiple network paths are arranged sequentially according to the path identifier; each hash bucket corresponding to a network path has its own index of the path to be migrated, the first index of the path to be migrated is the index of the hash bucket corresponding to the first network path, and the first index of the path to be migrated points to the hash bucket corresponding to any network path other than the first network path among the multiple network paths; the number of the second network paths is Q, where Q is a positive integer less than or equal to K.

[0026] The processing unit, when selecting a non-congested second network path from multiple network paths, specifically performs the following steps:

[0027] Perform congestion checks on the network path corresponding to the current hash bucket pointed to by the first path to be migrated;

[0028] If the network path corresponding to the current hash bucket is a non-congested network path, then the network path corresponding to the current hash bucket is determined as a second network path; the pointer of the first path to be migrated is updated from the current hash bucket to the next hash bucket of the current hash bucket;

[0029] If the network path corresponding to the current hash bucket is a congested network path, then the pointer of the first path to be migrated will be updated from the current hash bucket to the next hash bucket of the current hash bucket.

[0030] Repeat the congestion check process and the process of updating the pointer to the first path to be migrated until the number of determined second network paths is Q.

[0031] In one implementation, the communication unit is further configured to perform the following steps: receiving a target data stream flowing toward the first device;

[0032] The processing unit is also configured to perform the following steps: allocate a network path to the target data stream according to the stream mapping table;

[0033] The communication unit is also used to perform the following steps: transmitting the target data stream using the assigned network path.

[0034] In one implementation, the processing unit, when allocating a network path for a target data stream according to the stream mapping table, specifically performs the following steps:

[0035] Perform hash bucket mapping on the target data stream to obtain the target hash bucket mapped to the stream mapping table;

[0036] Map the target data stream to hash slots within the target hash bucket to obtain the target hash slots mapped to the target data stream in the target hash bucket.

[0037] The network path identified by the path identifier stored in the target hash slot is determined as the assigned network path.

[0038] In one implementation, the number of second network paths is Q, where Q is a positive integer less than or equal to K; the communication unit, used to migrate the selected data stream to the second network path for transmission, specifically performs the following steps:

[0039] The data stream mapped to K packets is migrated to Q second network paths for transmission.

[0040] Specifically, the data streams mapped to the K packets are migrated to Q second network paths for transmission, including:

[0041] When Q=1, the data streams mapped to K packets will all be migrated to the same second network path for transmission;

[0042] When Q∈(1,K), the data streams mapped to K packets are allocated to Q second network paths according to the packets, and the data streams mapped to K packets are migrated to the allocated second network paths for transmission; the data streams mapped to at least two packets in the K packets are allocated to the same second network path;

[0043] When Q=K, the data streams mapped to K packets will be migrated to K second network paths for transmission, with different packets corresponding to different second network paths.

[0044] In one implementation, the processing unit is further configured to perform the following steps:

[0045] The migration control information is adjusted according to the congestion level of the communication network;

[0046] The number of flow mapping groups N controls the migration granularity of flow migration by controlling the traffic mapped to a group; the number of flow migration groups K controls the migration granularity of flow migration by controlling the number of migration groups in the flow migration.

[0047] In one implementation, when the processing unit determines the first network path with congestion from multiple network paths, it specifically performs the following steps:

[0048] Congestion detection is performed on each of the multiple network paths according to the detection cycle, and the detection result of each network path is obtained; one congestion detection is performed on the network path in one detection cycle;

[0049] If the results of P consecutive congestion probes on any network path indicate that the network path is a congested network path, then the network path is determined to be the first network path with congestion among multiple network paths, where P is a positive integer.

[0050] In one implementation, any network path is represented as the target network path; the communication unit, when performing a congestion probe on the target network path, specifically performs the following steps:

[0051] Send probe messages to the second device via the target network path;

[0052] If a response message is received from the second device regarding the probe message for the target network path within M probe cycles, the communication delay time of the target network path is calculated based on the sending time of the probe message for the target network path, the receiving time of the response message, and the response delay time of the second device carried in the response message. The response delay time refers to the time elapsed between the second device receiving the probe message and returning the response message; M is a positive integer.

[0053] If the communication delay of the target network path is greater than the time threshold, a detection result indicating that the target network path is a congested network path is generated; or, the communication delay information of other network paths among multiple network paths is obtained, where other network paths refer to network paths among multiple network paths that are subjected to congestion detection in the same detection period as the target network path; if the communication delay of the target network path is greater than the time threshold, and there are network paths among the other network paths whose communication delay information is less than or equal to the time threshold, a detection result indicating that the target network path is a congested network path is generated.

[0054] In one implementation, the communication unit is also used to perform the following steps:

[0055] If no response message is received from the second device for the probe message of the target network path within M probe cycles, a probe result indicating that the target network path is a congested network path is generated; or, if no response message is received from the second device for the probe message of the target network path within M probe cycles, and there is a network path among the other network paths that receives a corresponding response message within M probe cycles, a probe result indicating that the target network path is a congested network path is generated; other network paths refer to network paths among multiple network paths that are subjected to congestion detection in the same probe cycle as the target network path.

[0056] In one implementation, the first device and the second device are connected through two switch layers. Both the first device and the second device are connected to switches in the first switch layer. Any two switches in the first switch layer are connected through switches in the second switch layer. The transmission path between the first device or the second device and the switches in the first switch layer is identified by port numbers under the first type of port. The transmission path between any two switches in the first switch layer is identified by port numbers under the second type of port.

[0057] The processing unit is also configured to perform the following steps: combine the transmission path identified by a port number under the first type of port with the transmission path identified by a port number under the second type of port to obtain a network path between the first device and the second device.

[0058] Accordingly, embodiments of this application provide a computer device, which includes:

[0059] A processor is a tool for implementing computer programs.

[0060] A computer-readable storage medium storing a computer program adapted for loading and execution by a processor of the congestion handling method for the communication network described above.

[0061] Accordingly, embodiments of this application provide a computer-readable storage medium storing a computer program. When the computer program is read and executed by the processor of a computer device, the computer device performs the aforementioned congestion handling method for a communication network.

[0062] Accordingly, embodiments of this application provide a computer program product comprising a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the aforementioned congestion handling method for a communication network.

[0063] In this embodiment, after determining the congested first network path from multiple network paths between the first device and the second device, preset migration control information can be obtained. This migration control information can be used to control the migration granularity of the flow migration, which in turn indicates the migration traffic. Based on the control of the migration control information, a data stream with migration traffic can be selected from the data streams transmitted on the first network path, and the selected data stream can be migrated to a non-congested second network path between the first device and the second device for transmission. It can be seen that for congested network paths in the communication network, this embodiment can migrate a data stream with specified traffic (specified traffic refers to migration traffic) on the congested network path to a non-congested path through a single flow migration. The number of flow migrations is one, not multiple, and the target of the flow migration is a non-congested network path, not a congested one, thus quickly alleviating congestion in the communication network. Attached Figure Description

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

[0065] Figure 1 This is a schematic diagram of the architecture of a communication network provided in an embodiment of this application;

[0066] Figure 2 This is a schematic diagram of the architecture of a congestion handling system provided in an embodiment of this application;

[0067] Figure 3 This is a schematic diagram illustrating an application scenario of a congestion handling method provided in an embodiment of this application;

[0068] Figure 4This is a flowchart illustrating a congestion handling method for a communication network provided in an embodiment of this application;

[0069] Figure 5 This is a schematic diagram of a routing strategy for a communication network provided in an embodiment of this application;

[0070] Figure 6 This is a schematic diagram illustrating the selection of a non-congested network path in a communication network according to an embodiment of this application;

[0071] Figure 7 This is a schematic diagram of a traffic migration path allocation provided in an embodiment of this application;

[0072] Figure 8 This is a schematic diagram illustrating a path identifier switching method provided in an embodiment of this application;

[0073] Figure 9 This is a schematic diagram of a traffic balancing strategy for a communication network provided in an embodiment of this application;

[0074] Figure 10 This is a flowchart illustrating another method for handling congestion in a communication network provided in an embodiment of this application.

[0075] Figure 11 This is a schematic diagram of a path control strategy for a communication network provided in an embodiment of this application;

[0076] Figure 12 This is a schematic diagram of a congestion detection strategy for a communication network provided in an embodiment of this application;

[0077] Figure 13 This is a schematic diagram of another congestion detection strategy for a communication network provided in an embodiment of this application;

[0078] Figure 14 This is a schematic diagram of the structure of a congestion detection device for a communication network provided in an embodiment of this application;

[0079] Figure 15 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0080] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0081] To better understand the technical solutions provided in the embodiments of this application, the technical terms involved in the embodiments of this application will be introduced first:

[0082] I. Communication Network:

[0083] A communication network refers to a data center network, specifically a physical network used to transmit data streams. A physical network is a network built within a physical environment using physical devices (e.g., servers, routers, and switches) and physical media (e.g., fiber optic cables, electrical cables, and twisted-pair cables). This network environment is physically present and can be directly accessed and managed.

[0084] like Figure 1 As shown, a communication network can include multiple devices, where a device refers to a server. Multiple network paths can be set between any two devices, and these network paths can be used to transmit data streams between any two devices. Figure 1 The communication network shown in the embodiments is intended to more clearly illustrate the technical solutions of the embodiments of this application, and does not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0085] This application embodiment takes any two devices in a communication network as a first device and a second device as an example. Multiple network paths can be set between the first device and the second device, and any one of these network paths can be used to transmit data streams between them. In the first device and the second device, the device sending the data stream can be called the sending device, and the device receiving the data stream can be called the receiving device. This application embodiment uses the example where the first device is the sending device that sends the data stream, and the second device is the receiving device that receives the data stream. Optionally, the first device can also be the receiving device that receives the data stream, and the second device can also be the sending device that sends the data stream.

[0086] The server mentioned in the embodiments of this application can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, etc.

[0087] II. Data Flow:

[0088] A data stream refers to a sequence of network packets continuously transmitted between a source (sending device) and a destination (receiving device). A network packet is a data unit exchanged and transmitted in a communication network. Network packets within the same data stream share the same message information, which refers to a 5-tuple. This 5-tuple may include the IP (Internet Protocol) source address, IP destination address, Layer 4 source port, Layer 4 destination port, and Layer 4 protocol type. Message information is used to uniquely identify a network connection in network communication, ensuring the correct transmission and processing of network packets.

[0089] Based on the above introduction of technical terms such as communication networks and data flows, this application provides a congestion handling method for communication networks (LBHarp) that can quickly alleviate congestion in communication networks. Specifically, this congestion handling method proposes a network congestion detection mechanism. This mechanism detects the transmission delay of all network paths between any two devices in the communication network in real time, enabling the detection of congested network paths within a defined timeframe. Furthermore, this method proposes a low-overhead traffic balancing strategy. For congested network paths, this strategy can migrate the data flow transmitted on the congested network path to a non-congested network path through a single route change (i.e., a single flow migration). As can be seen, the congestion handling method for communication networks provided in this application has two advantages: the first advantage is that it can ensure that a congested network path is detected within a certain time; the second advantage is that after a network path becomes congested, the data stream transmitted on the congested network path can be quickly migrated to a non-congested network path for transmission through a single route switch (i.e., a single flow migration), thereby allowing the transmission delay of the data stream to recover quickly from the congestion of the communication network.

[0090] Furthermore, this congestion handling method for communication networks is a software solution that requires no special hardware support, thus it can be deployed on all communication networks. For example, it can be applied to communication networks using traditional equipment, as well as communication networks that do not support IPv6 (Internet Protocol Version 6), and communication networks that do support IPv6.

[0091] The following describes the execution entity of the congestion handling method for communication networks provided in the embodiments of this application.

[0092] The congestion handling method for a communication network provided in this application embodiment can be executed by a computer device. The computer device can be any data transmission device in the communication network (in this application embodiment, the data transmission device is the first device as an example). The first device transmits the data stream to the second device through a network path between the first device and the second device.

[0093] The congestion handling system in which computer equipment is located, such as Figure 2 As shown, the congestion handling system may include a first device 201 and a second device 202. The first device 201 serves as a sending device for transmitting data streams, and the second device 202 serves as a receiving device for receiving data streams. Multiple network paths may be provided between the first device 201 and the second device 202, and any one of these network paths can be used to transmit the data stream flowing to the first device 201 to the second device 202.

[0094] In a congestion handling system composed of a first device 201 and a second device 202, the congestion handling method provided in this application manages all network paths between the first device 201 and the second device 202 and detects the congestion status of the network paths in real time. The first device 201 can periodically send probe messages (probe messages refer to RTT (Round Trip Time) probe messages) to the probed network paths, and the second device 202 can periodically return response messages (response messages refer to RTT response messages) to the first device 201. The first device 201 can calculate the communication delay time (i.e., RTT value) of the probed network path through the response messages. If the RTT value of the probed network path exceeds a time threshold, or if the first device 201 does not receive a response message within a specified time, it can be determined that the probed network path is congested; conversely, if the first device 201 receives a response message within a specified time and the RTT value does not exceed the time threshold, it can be determined that the probed network path is not congested. For a network path identified as congested, the first device 201 can migrate the data stream of specified traffic on the congested network path to a non-congested network path for transmission, thereby rebalancing the network load.

[0095] Both the first device 201 and the second device 202 may include a path pool, a routing module, a congestion detection module, and a congestion recovery module. Among them:

[0096] The path pool can include path identifiers (path IDs) for multiple network paths between the first device 201 and the second device 202. Each path identifier uniquely identifies the network path. The routing module can select a non-congested network path for each data flow, and all network packets in the same data flow are forwarded through the selected network path. The congestion detection module can periodically perform congestion detection on each network path between the first device 201 and the second device 202. Congestion detection on any network path means that the first device 201 sends an RTT probe message to the second device 202 through that network path. After receiving the RTT probe message, the second device 202 returns an RTT response message. The first device 201 can determine the congestion status of the network path based on whether it receives the RTT response message within a specified time, or it can calculate the RTT value based on the time it receives the RTT response message within the specified time and determine whether the network path is congested based on the RTT value. The congestion recovery module can be used to migrate data streams transmitted on congested network paths to non-congested network paths after network path congestion occurs.

[0097] In the congestion handling system composed of the first device 201 and the second device 202, the congestion handling process may specifically include: ① For data flows to the first device 201, the routing module of the first device 201 can select a non-congested network path for each data flow, and all network packets in the data flow are forwarded through the selected network path. ② The congestion detection module of the first device 201 can periodically send probe messages to the second device 202 through various network paths between the first device 201 and the second device 202. ③ The congestion detection module of the second device 202 processes the received probe messages and periodically returns response messages to the first device 201. During this process, the routing module of the second device 202 will also select a non-congested network path for the response message and return the response message. ④ After receiving the response message, the congestion detection module of the first device 201 can calculate the RTT value of each network path and determine whether each network path is congested based on the RTT value; or, if the first device 201 does not receive the response message within a specified time, it can determine that the network path is congested. ⑤ If a network path is determined to be congested once or multiple times consecutively, the congestion recovery module of the first device 201 can migrate the data stream transmitted on this network path to a non-congested network path for transmission. After the data stream migration on the congested network path is completed, the congestion detection module of the first device 201 can start congestion detection on this network path again.

[0098] Figure 2The congestion handling system shown can quickly migrate the data stream transmitted on the congested network path to a non-congested network path through a single route switch (i.e., a single flow migration) after the network path becomes congested, thereby rapidly alleviating congestion. Figure 2 The congestion handling system shown in the embodiments is intended to more clearly illustrate the technical solutions of the embodiments of this application, and does not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of system architecture and the emergence of new business scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0099] The following describes the application scenarios of the congestion handling method for communication networks provided in the embodiments of this application.

[0100] like Figure 3 As shown, a server in a communication network (taking the first and second devices as examples) can include multiple virtual machines (VMs). The server can be called the host machine, and the VMs can be called slave machines. A VM is a process within the server. VM tenants (or public cloud tenants) can purchase VMs from the server through a VPC (Virtual Private Cloud) service and create and manage private virtual networks on the public cloud based on these VMs. This virtual network can be called a VPC network. The VM is the communication unit within the VPC network, similar to a server in a communication network. VPC service is a cloud service, referring to cloud-based network services. VPC service provides a logically isolated network environment, allowing public cloud tenants to create VPC networks on the public cloud and customize the network configuration (e.g., network segments). In other words, VPC service provides network customization capabilities for public cloud tenants in a public cloud environment. A public cloud tenant refers to a user who accesses and uses computing resources and cloud services provided by a cloud service provider via the internet in a public cloud environment.

[0101] Therefore, a VPC network is a virtual network created based on a communication network. The VPC network operates based on this communication network, specifically in that data flows within the VPC network are transmitted through virtual machines entering the communication network, and the sending devices in the communication network (e.g., ...) Figure 3 The first device in the network, upon receiving the egress traffic of the virtual machine (i.e., the data stream flowing into the VPC network through the virtual machine), allocates a non-congested network path for transmission, and the data stream is transmitted to the receiving device in the communication network (e.g., ...). Figure 3 After the second device in the network, the data flows into the VPC network through the virtual machine. In other words, the data stream transmitted in the communication network is the data stream in the VPC network.

[0102] Latency and throughput are the most important metrics for measuring VPC services. However, physical network congestion is unavoidable in communication networks. Once physical network congestion occurs, VPC network latency will increase due to queuing or packet loss. Furthermore, with the emergence of cloud applications requiring extremely low network latency (e.g., Redis, a cloud database), low-latency VPC networks have become a key factor in ensuring the quality of cloud product services. Therefore, how to quickly restore VPC network latency after physical network congestion, enabling public cloud tenants and cloud applications to recover quickly from congestion, has become a pressing issue that needs to be addressed.

[0103] The congestion handling method for communication networks provided in this application can quickly detect congested network paths within a specified time. After detecting the congested network path, it quickly migrates the data stream transmitted on the congested network path to a non-congested network path through a single route switching (i.e., a single flow migration), thus rapidly alleviating congestion in the communication network. Consequently, VPC networks operating on the communication network can quickly recover from network congestion, achieving efficient network load balancing (network load balancing refers to distributing network traffic load across multiple network path resources to optimize network resource utilization, maximize throughput, minimize response time, and avoid overload). This allows public cloud tenants and cloud applications to quickly recover from VPC network congestion. The congestion handling method for communication networks provided in this application embodiment enables VPC services and latency-sensitive cloud products on the public cloud to recover from network congestion in a deterministic and extremely short time. This allows upper-layer services to have minimal or even zero awareness of network congestion. This solution not only ensures the determinism of VPC network quality but also improves the SLA (Service Level Agreement) of latency-sensitive cloud products.

[0104] Furthermore, the congestion handling method for communication networks provided in this application operates at the VPC virtual forwarding layer (i.e., the virtual switch layer), enabling the method to support applications of public cloud tenants using various network protocols (e.g., TCP (Transmission Control Protocol) and UDP).

[0105] The congestion handling method for communication networks provided in the embodiments of this application will be described in detail below.

[0106] This application provides a congestion handling method for a communication network, which includes routing strategies and traffic balancing strategies for the communication network. This congestion handling method is executed by a computer device, which may be, for example, a first device (data streams are transmitted from the first device to a second device). Figure 4 As shown, the congestion handling method for this data center network may include, but is not limited to, the following steps S401-S404:

[0107] S401, determine the first network path that is congested from among the multiple network paths between the first device and the second device.

[0108] In step S401, the communication network may include multiple network paths between the first device and the second device. Any one of these network paths can be used to transmit data streams between the first device and the second device. This embodiment uses the example of the first device being a sending device that transmits data streams and the second device being a receiving device that receives data streams. Any one of these network paths can be used to transmit data streams flowing to the first device to the second device. Among the multiple network paths between the first device and the second device, the number of first network paths identified as congested can be one or more. For any congested first network path, the method described in steps S402-S404 of this embodiment can be used to migrate the data stream of a specified flow transmitted on that first network path to a non-congested path for transmission, thereby achieving traffic balancing in the communication network.

[0109] S402, Obtain preset migration control information. The migration control information is used to control the migration granularity of the flow migration. Flow migration refers to migrating the data flow transmitted in a congested network path to a non-congested network path for transmission. The migration granularity is used to indicate the migration traffic of the flow migration.

[0110] In step S402, the migration control information refers to the migration granularity information used to control flow migration in the traffic balancing strategy of the communication network; whereby flow migration refers to migrating the data flow transmitted in the congested network path to the non-congested network path for transmission, and the migration granularity can be used to indicate the migration traffic of the flow migration, and the migration traffic here is the specified traffic mentioned above.

[0111] Migration control information may include the number of flow mapping groups N and the number of flow migration groups K. For the number of flow mapping groups N, any data flow mapped to any network path among multiple network paths between the first device and the second device can be mapped to one of the N packets corresponding to the network path; here, data flow mapping to a network path refers to establishing a mapping relationship between the data flow and the network path, and data flow mapping to a packet refers to establishing a mapping relationship between the data flow and the packet. For the number of flow migration groups K, flow migration can migrate data flows mapped to K packets in a congested network path to a non-congested network path for transmission.

[0112] As can be seen, the number of flow mapping groups N controls the migration granularity by controlling the traffic mapped to a single packet. A smaller N results in fewer packets and more traffic mapped to a single packet; conversely, a larger N results in more packets and less traffic mapped to a single packet. Similarly, the number of flow migration groups K controls the migration granularity by controlling the number of migration packets. A larger K results in more migration packets and more traffic; conversely, a smaller K results in fewer migration packets and less traffic. In other words, the traffic balancing strategy of a communication network can migrate K / N data flows from congested network paths to uncongested network paths for transmission, where N is an integer greater than 1 and K is a positive integer less than or equal to N.

[0113] Optionally, the migration control information can be dynamically adjusted based on the congestion level of the communication network. When the congestion level of the communication network is high (e.g., the number of congested network paths in the communication network is greater than or equal to a threshold), the migration granularity controlled by the migration control information can be increased to quickly alleviate the congestion situation of the communication network; when the congestion level of the communication network is low (e.g., the number of congested network paths in the communication network is less than a threshold), the migration granularity controlled by the migration control information can be decreased to reduce the resource consumption of the flow migration.

[0114] Increasing the migration granularity controlled by migration control information can be achieved in any of the following ways: First, reduce the number of flow mapping groups N; second, increase the number of flow migration groups K; third, reduce the number of flow mapping groups N and increase the number of flow migration groups K. Decreasing the migration granularity controlled by migration control information can also be achieved in any of the following ways: First, increase the number of flow mapping groups N; second, decrease the number of flow migration groups K; third, increase the number of flow mapping groups N and decrease the number of flow migration groups K.

[0115] Optionally, the groups of data streams mapped specifically refer to hash slots within hash buckets in the stream mapping table. Here, the stream mapping table is a hash table, a data structure that allows direct access to data via keys. It uses a hash function to map keys to a specific location in the table, enabling fast data lookup and access. A hash bucket is the basic unit in a hash table used to store data. A hash slot is the basic unit within a hash bucket used to store data.

[0116] Specifically, the congestion handling method (LBHarp) for communication networks provided in this application constructs a flow mapping table for the path pool between the first device and the second device. The flow mapping table may include hash buckets corresponding to each of the multiple network paths between the first and second devices. Each hash bucket corresponding to a network path may include N hash slots, with one hash slot corresponding to one packet. Any data flow mapped to each network path can be mapped to a hash slot in the hash bucket corresponding to that network path. Taking the first network path as an example, any data flow mapped to the first network path can be mapped to a hash slot in the hash bucket corresponding to the first network path.

[0117] Hash slots can be used to store path identifiers. Based on this, the routing strategy of a communication network refers to the fact that data streams mapped to the hash buckets corresponding to each network path can be transmitted through the network path identified by the path identifier stored in the hash slots mapped in the corresponding hash bucket. Taking a target data stream flowing to a first device as an example, the routing strategy of the communication network may include: being able to receive the target data stream flowing to the first device; allocating a network path for the target data stream according to the flow mapping table; and using the allocated network path to transmit the target data stream.

[0118] In the routing strategy of a communication network, the process of allocating a network path to a target data stream based on a flow mapping table may include: performing hash bucket mapping on the target data stream to obtain the target hash bucket mapped by the target data stream in the flow mapping table; performing hash slot mapping on the target data stream within the target hash bucket to obtain the target hash slot mapped by the target data stream in the target hash bucket; and determining the network path identified by the path identifier stored in the target hash slot as the allocated network path.

[0119] Hash bucket mapping refers to determining the hash bucket that the target data stream is mapped to in the stream mapping table. Here, the mapping between the data stream and the hash bucket refers to establishing a mapping relationship between them. The hash bucket mapping process may include: performing hash calculation on the message information of the target data stream (for example, the message information here could be the outer 4-tuple in a 5-tuple) to obtain the hash value corresponding to the target data stream; based on the hash value corresponding to the target data stream and the total number of network paths (the total number of network paths refers to the total number of network paths between the first device and the second device), performing hash bucket index mapping on the hash value corresponding to the target data stream (hash bucket index mapping refers to determining the index of the hash bucket to which the target data stream is mapped), obtaining the target hash bucket index; and determining the hash bucket corresponding to the target hash bucket index as the target hash bucket for the target data stream mapping.

[0120] Similarly, hash slot mapping refers to determining the hash slots that a target data stream is mapped to in its mapping hash bucket. Here, the mapping between data streams and hash slots refers to establishing a mapping relationship between data streams and hash slots. The hash slot mapping process may include: obtaining the hash value corresponding to the target data stream; performing hash slot index mapping on the hash value corresponding to the target data stream based on the hash value corresponding to the target data stream and the capacity of the target hash bucket (the capacity of the target hash bucket refers to the size of the target hash bucket, specifically the number of hash slots contained in the target hash bucket), obtaining the target hash slot index; and determining the hash slot corresponding to the target hash slot index in the target hash bucket as the target hash slot mapped by the target data stream in the target hash bucket.

[0121] In other words, the congestion handling method (LBHarp) for communication networks provided in this application constructs a flow mapping table for each pair of communicating devices in the communication network, using the network paths in the path pool of each pair of communicating devices to select the network path for the data flow originating from the virtual machine of the sending device. The flow mapping table is a hash table, and each network path is allocated a hash bucket. Each hash bucket is a fixed-size array, and the array elements are used to store the path identifier (path ID) of the available path. By default, when there is no congestion in the communication network, the hash bucket corresponding to each network path stores only the path identifier of each network path itself. At this time, all data flows mapped to the hash bucket of network path i (network path i refers to any network path) will be routed by network path i.

[0122] Figure 5This is an example of a stream mapping representation with 8 network paths and a hash bucket size (i.e., hash bucket capacity) of 8, where the path identifier for network path i is denoted as i. For each data stream: ①LBHarp takes the outer 4-tuple of the data stream as input and calculates the hash value corresponding to the data stream, calculated as: hash value hv = hash(4-tuple). LBHarp selects a hash bucket for the data stream mapping, and the index of the selected hash bucket is calculated as: hash bucket index = hv % total number of network paths. For example... Figure 5 In the process, Flow1 (data flow 1) selects the hash bucket corresponding to network path 1, and Flow2 (data flow 2) selects the hash bucket corresponding to network path 4. ② For each data flow, a network path within the hash bucket is selected. The index of the hash slot stored in the path identifier of the selected network path is calculated as: Hash slot index = hv % hash bucket capacity. For example... Figure 5 As shown, the hash value corresponding to Flow1 is finally mapped to the first hash slot in the hash bucket corresponding to network path 1. Therefore, all network packets of Flow1 are routed through the network path 1 stored in the hash slot. The hash value corresponding to Flow2 is finally mapped to the fifth hash slot in the hash bucket corresponding to network path 4. Therefore, all network packets of Flow2 are routed through the network path 4 stored in the hash slot.

[0123] S403 selects a non-congested second network path from multiple network paths.

[0124] In step S403, the number of non-congested second network paths selected from multiple network paths can be one or more. For ease of understanding, the number of second network paths can be represented as Q, where Q is a positive integer. Specifically, the method for selecting Q non-congested second network paths from multiple network paths can include any of the following:

[0125] The first method is to select based on the index of the path to be migrated corresponding to the hash bucket.

[0126] Specifically, in the flow mapping table, the hash buckets corresponding to multiple network paths are arranged sequentially according to their path identifiers. Each hash bucket corresponding to a network path has its own index of the path to be migrated, and this index can point to the hash bucket corresponding to any other network path besides the hash bucket corresponding to the first network path. The first index of the path to be migrated is the index of the hash bucket corresponding to the first network path, and this index can point to the hash bucket corresponding to any other network path besides the first network path. Based on this, the process of selecting Q non-congested second network paths from the multiple network paths can include:

[0127] Perform a congestion check on the network path corresponding to the current hash bucket pointed to by the first migration path index. If the network path corresponding to the current hash bucket is a non-congested network path, then the network path corresponding to the current hash bucket can be determined as a second network path, and the pointer of the first migration path index is updated from the current hash bucket to the next hash bucket of the current hash bucket. If the network path corresponding to the current hash bucket is a congested network path, then the pointer of the first migration path index is updated from the current hash bucket to the next hash bucket of the current hash bucket. Repeat the above congestion check process and the process of updating the pointer of the first migration path index until the number of determined second network paths is Q.

[0128] Congestion checking refers to checking the results of P consecutive congestion probes on a network path. If the results of P consecutive congestion probes all indicate that the network path is a congested network path, then the network path can be determined to be a congested network path. If the results of P consecutive congestion probes all indicate that the network path is a non-congested network path, then the network path can be determined to be a non-congested network path, where P is a positive integer.

[0129] For example, such as Figure 6 As shown, assuming network path 1 is a congested first network path, two non-congested second network paths are selected from multiple network paths. When network path 1 becomes congested, congestion checks can be performed starting with network path 2, which corresponds to the hash bucket currently pointed to by the migration path index of network path 1. If the check finds network path 2 to be a non-congested network path, then network path 2 can be identified as the first non-congested second network path, and the hash bucket pointed to by the migration path index of network path 1 can be updated from the hash bucket corresponding to network path 2 to the hash bucket corresponding to network path 3. Similarly, congestion checks can be performed on network path 3, which corresponds to the hash bucket currently pointed to by the migration path index of network path 1. If the check finds network path 3 to be a congested network path, then the hash bucket pointed to by the migration path index of network path 1 can be updated from the hash bucket corresponding to network path 3 to the hash bucket corresponding to network path 4. A congestion check can be performed on network path 4, which is the hash bucket currently pointed to by the migration path index of network path 1. If the check shows that network path 4 is a non-congested network path, then network path 4 can be determined as the second non-congested network path, and the selection of the non-congested second network path ends.

[0130] As can be seen, in the first method of selecting a non-congested second network path, by continuously updating the pointer of the path to be migrated and performing congestion checks on the network path corresponding to the hash bucket pointed to by the path to be migrated, duplicate checks can be avoided, thus avoiding repeated checks on already checked network paths and preventing waste of check resources.

[0131] The second method involves selecting based on communication delay times.

[0132] Specifically, communication latency refers to the RTT value, which is the time it takes for the probe message sent by the first device to be transmitted to the second device, plus the time it takes for the response message returned by the second device to be transmitted to the first device. A longer communication latency indicates a higher degree of network path congestion, while a shorter communication latency indicates a lower degree of network path congestion. Based on this, the process of selecting Q non-congested second network paths from multiple network paths can include: obtaining multiple reference network paths whose detection results from P consecutive congestion probes all indicate that they are non-congested network paths; sorting the multiple reference network paths according to their communication latency; and selecting Q second network paths from the sorted multiple reference network paths.

[0133] Optionally, the reference network paths can be sorted in ascending order of communication delay time. The top Q reference network paths can then be selected as the Q second network paths. It can be seen that in this second method of selecting non-congested second network paths, the selected Q second network paths are the Q non-congested network paths with the lowest congestion levels. This ensures that after flow migration, the data flow migrated to the non-congested network paths will not place excessive load on them.

[0134] S404, based on migration control information, selects a data stream whose traffic is migration traffic from the data streams transmitted on the first network path, and migrates the selected data stream to the second network path for transmission.

[0135] The traffic balancing strategy of the communication network can migrate K / N data streams on congested network paths to non-congested network paths for transmission. Therefore, in step S404, based on the control of migration control information, the data streams selected as migration traffic from the data streams transmitted on the first network path are the K / N data streams transmitted on the first network path. Specifically, the selection process for the data streams that are migration traffic transmitted on the first network path can include: any data stream mapped to the first network path can be mapped to one of the N packets corresponding to the first network path; K packets can be selected from the N packets mapped to the data streams mapped to the first network path based on the number of migration groups K; the data streams mapped to the selected K packets can be determined as the selected data streams; wherein, the traffic of the data streams mapped to the K packets is the migration traffic.

[0136] In the flow mapping table, groups correspond to hash slots. The process of selecting K groups from the N groups mapped to the data flow mapped to the first network path, based on the number of flow migration groups K, can include: determining the K groups corresponding to the K first hash slots in the hash bucket corresponding to the first network path as K groups; and determining the data flow mapped to the K first hash slots as the data flow mapped to the K groups. Here, the first hash slot is the hash slot in the hash bucket corresponding to the first network path that stores the path identifier corresponding to the first network path. In other words, K first hash slots with the path identifier corresponding to the first network path can be selected from the hash bucket corresponding to the first network path; the groups corresponding to the K first hash slots can be determined as the selected K groups; and the data flow mapped to the K first hash slots can be determined as the data flow mapped to the K groups.

[0137] In step S404, the selected data stream for migration refers to the data stream mapped to the selected K packets (i.e., K first hash slots). The data stream mapped to the K packets can be migrated to Q second network paths for transmission. The allocation method between the K packets and the Q second network paths can include: when Q = 1, all data streams mapped to the K packets can be migrated to the same second network path for transmission. When Q ∈ (1, K), the data streams mapped to the K packets can be allocated to Q second network paths according to the groups, and the data streams mapped to the K packets can be migrated to the allocated second network paths for transmission; wherein, at least two data streams mapped to the K packets are allocated to the same second network path. When Q = K, the data streams mapped to the K packets can be migrated to K second network paths for transmission, with different groups corresponding to different second network paths.

[0138] For example, such as Figure 7 In (a) shown, the data streams mapped to hash slots 1-3 in the hash bucket corresponding to network path 1 are migrated to a non-congested network path for transmission. Since the non-congested network path is network path 2, all data streams mapped to hash slots 1-3 are migrated to network path 2 for transmission. For example... Figure 7 In diagram (b), the data streams mapped to hash slots 1-3 in the hash bucket corresponding to network path 1 are migrated to non-congested network paths for transmission. These non-congested network paths are network path 2 and network path 3. Therefore, the data streams mapped to hash slots 1 and 2 are migrated to network path 2 for transmission, and the data stream mapped to hash slot 3 is migrated to network path 3 for transmission. For example... Figure 7In (c) shown, in the hash bucket corresponding to network path 1, the data streams mapped to hash slot 1-hash slot 3 are migrated to the non-congested network path for transmission. The non-congested network path is network path 2-network path 4. Therefore, the data stream mapped to hash slot 1 is migrated to network path 2 for transmission, the data stream mapped to hash slot 2 is migrated to network path 3 for transmission, and the data stream mapped to hash slot 3 is migrated to network path 4 for transmission.

[0139] Furthermore, based on the routing strategy of the flow mapping table (i.e., data flows mapped to hash slots in the flow mapping table are transmitted through the network path corresponding to the path identifier stored in the mapped hash slot), the data flow migration method can include: switching the path identifiers stored in K first hash slots to the path identifiers corresponding to the second network path; specifically, switching the path identifier stored in each first hash slot to the path identifier of the second network path to which the data flow mapped to each first hash slot is actually migrated. Figure 7 The example shown is the allocation method of non-congested network paths for migration. Figure 8 This illustrates the switching of path identifiers stored in the mapped hash slots. This switching allows data streams originally mapped to the K first hash slots in the hash bucket corresponding to the first network path to be transmitted via the second network path.

[0140] In summary, based on steps S401-S404, taking the selection of a non-congested network path based on the path index to be migrated corresponding to the hash bucket as an example, the overall process of the traffic balancing strategy for a communication network can include: each network path, in addition to the hash bucket, has a path index to be migrated, which points to the network path to be congested. Initially, it points to the next hash bucket of the hash bucket corresponding to the current network path. For example, in... Figure 9 In the diagram, the path index to be migrated for network path 1 points to the hash bucket corresponding to network path 2.

[0141] Taking the number of migration groups K=1 as an example, when network path i is detected to be congested, LBHarp can rebalance the traffic according to the following steps: (1) Start congestion checking from the network path pointed to by the path index to be migrated of network path i until the first non-congested network path j is found. (2) Find a hash slot in the hash bucket corresponding to network path i that stores the path identifier of network path i, and switch the path identifier stored in the hash slot to the path identifier of network path j; in this case, the data flow originally mapped to the hash slot will choose the new network path j for transmission. (3) Update the path index to be migrated of network path i so that it points to the next hash bucket of the hash bucket corresponding to network path j. Depending on the degree of congestion of the network path, the above 3 steps can be dynamically repeated to migrate more data flow on network path i to other non-congested network paths for transmission. If the size of the hash bucket is N, and the traffic in the K hash slots mapped to the hash bucket corresponding to network path i is migrated, then the traffic balancing strategy can migrate K / N data flow on the congested network path i to a non-congested network path.

[0142] exist Figure 9 In the example shown, N is 8, K is 1, and data flow 1 through data flow 8 both choose network path 1 for routing. When network path 1 becomes congested, congestion checks can begin from network path 2, which is pointed to by the path index to be migrated from network path 1. After finding a non-congested network path 2, the path identifier of network path 1 can be stored in a hash bucket corresponding to network path 1 (for example, the path identifier corresponding to network path 1 is...). Figure 9 The path identifier stored in the hash slot of 1) is updated to the path identifier corresponding to network path 2 (for example, the path identifier corresponding to network path 2 is...). Figure 9 In step 2), the path index to be migrated in network path 1 is updated to point to the hash bucket corresponding to network path 3. After the above steps, data flow 1 will choose network path 2 for routing, while the remaining data flows will still choose network path 1 for routing. Therefore, 12.5% ​​(K / N = 1 / 8 = 12.5%) of the data flow on network path 1 will be migrated from network path 1 to network path 2.

[0143] It is worth noting that if the congestion of network path i is not resolved after one traffic balancing, the traffic balancing strategy of the communication network can quickly determine that there is congestion in network path i again, and can further migrate more data streams on network path i according to the above steps.

[0144] In this embodiment, the traffic balancing strategy of the communication network has four advantages: First, it can detect the congestion status of all network paths in real time, so a single route change (i.e., a single flow migration) can switch the data flow on a congested network path to a non-congested network path. Second, by controlling the hash bucket size of the network path (i.e., the number of flow mapping groups N) and the number of flow migration groups K for each flow migration, the migration granularity of the flow migration can be dynamically adjusted according to the congestion status of the communication network. Third, the LBHarp traffic balancing strategy only needs to modify the path identifier stored in the hash bucket corresponding to the network path, and its overhead is extremely low. Compared with the data flow-based traffic balancing strategy (which modifies the flow label of the data flow), LBHarp does not need to maintain a huge number of data flow states (e.g., millions of data flows to the device) and does not consume a large amount of device memory resources. Fourth, for the case where the number of non-congested network paths Q=1 for each flow migration, the LBHarp traffic balancing strategy ensures that each data flow will appear on at most 2 network paths, and the data flow switching network paths will at most be out of order once. Compared to packet-based traffic balancing strategies (which migrate data flows on congested network paths to multiple network paths), LBHarp does not cause severe packet out-of-order delivery, thus reducing the impact on upper-layer applications.

[0145] This application provides a congestion handling method for a communication network, which includes a congestion detection strategy and a path control strategy for the communication network. This congestion handling method is executed by a computer device, which may be, for example, a first device (data streams are transmitted from the first device to a second device). Figure 10 As shown, the congestion handling method for this data center network may include, but is not limited to, the following steps S1001-S1005:

[0146] S1001, according to the detection cycle, perform congestion detection on each of the multiple network paths between the first device and the second device, and obtain the detection result of each network path; perform congestion detection once for each network path in one detection cycle.

[0147] In this embodiment, the traffic balancing and congestion detection strategies of the communication network are both implemented at the network path level, and the network path is controlled by the path control strategy of the communication network. By utilizing the ECMP (Equal-Cost Multi-Path) routing strategy of the switches in the communication network and the Hash Dodging (a network path control method) technology, the network path traversed by the packet is controlled by setting the outer UDP source port of the packet and the network card port used by the sending device. This embodiment utilizes this technology to construct a path pool for each device in the communication network.

[0148] Specifically, the first device and the second device can be connected through two switch layers. Both the first and second devices are connected to switches in the first switch layer, and any two switches in the first switch layer are connected through switches in the second switch layer. The transmission path between the first or second device and the switches in the first switch layer is identified by port numbers under Type I ports, and the transmission path between any two switches in the first switch layer is identified by port numbers under Type II ports. Based on this, a transmission path identified by a port number under Type I ports can be combined with a transmission path identified by a port number under Type II ports to obtain a network path between the first and second devices.

[0149] For example, such as Figure 11 As shown, the switch in the first switch layer is represented as LA, and the switch in the second switch layer is represented as LC. Each LA-LA transmission path can be controlled by a unique UDP (User Datagram Protocol) source port. That is, the second type of port is the UDP source port, and the port number under the second type of port is the UDP source port number (srcport). The transmission path between the first device (or the second device) and LA can be determined by the port selected by the network interface card (NIC) of the first device for sending. That is, the first type of port is the NIC port, and the port number under the first type of port is the NIC port number (eth). Therefore, the network path between the first device and the second device can be controlled by (NIC port number, UDP source port number). Figure 11 An example of a path pool is shown, where the first and second devices are within the same module (communication module). This module has four LC switches, and there are a total of 16 network paths between the two devices. Each network path is uniquely identified by (ethi, srcportj). Furthermore, each network path in the path pool is assigned a unique path identifier (path ID), such as... Figure 11 As shown, the path identifiers for the 16 network paths between the first device and the second device are 1-16.

[0150] S1002, if the detection results of P consecutive congestion probes for any network path all indicate that any network path is a congested network path, then any network path is determined to be the first network path with congestion among multiple network paths, where P is a positive integer.

[0151] In steps S1001-S1002, the congestion detection strategy of the communication network may include: performing congestion detection on each of the multiple network paths between the first device and the second device according to a detection cycle, and obtaining the detection result of each network path; one detection cycle can perform one congestion detection on each network path; if the detection results of P consecutive congestion detections on any network path indicate that any network path is a congested network path, then any network path can be determined as the first congested network path among the multiple network paths, where P is a positive integer. In the congestion detection strategy of the communication network, the detection results of P consecutive congestion detections are used for congestion judgment. When P=1, the detection result of one congestion detection is used for congestion judgment, which can quickly determine the congestion status of the network path; when P>1, the detection results of multiple congestion detections are used for congestion judgment, which can avoid accidental erroneous detection results, thereby improving the accuracy of network path congestion judgment.

[0152] In detail, any network path can be represented as a target network path, and the process of performing a congestion probe on the target network path can include:

[0153] A probe message is sent to the second device via the target network path. If a response message is received from the second device within M probe cycles in response to the probe message for the target network path, the communication delay time of the target network path can be calculated based on the sending time of the probe message, the receiving time of the response message, and the response delay time of the second device carried in the response message. If the communication delay time of the target network path is greater than a time threshold, a probe result indicating that the target network path is a congested network path can be generated. Alternatively, the communication delay information of other network paths among multiple network paths can be obtained. Other network paths refer to network paths among multiple network paths that are subjected to congestion probes in the same probe cycle as the target network path. If the communication delay time of the target network path is greater than the time threshold, and there is a network path among the other network paths whose communication delay information is less than or equal to the time threshold, a probe result indicating that the target network path is a congested network path can be generated.

[0154] The response delay time (reply_delay_time) refers to the time elapsed between the second device receiving the probe message and returning a response message. The response delay time is calculated as follows: the response delay time equals the time the second device returns the response message, minus the time the second device receives the probe message. Based on the sending time of the probe message, the receiving time of the response message, and the response delay time of the second device carried in the response message, the communication delay time of the target network path is calculated as follows: The probe delay time (rtt_total_time) is calculated based on the sending time of the probe message and the receiving time of the response message; the communication delay time (RTT value) is calculated based on the probe delay time and the response delay time. The communication delay time (RTT value) equals the probe delay time minus the response delay time, i.e., rtt_total_time - reply_delay_time. The probe delay time, on the other hand, refers to the time elapsed between the first device sending the probe message and receiving the response message. The probe delay time equals the time the first device receives the response message, minus the time the first device sends the probe message.

[0155] If no response message is received from the second device regarding the probe message for the target network path within M probe cycles, a probe result indicating that the target network path is a congested network path can be generated. Alternatively, if no response message is received from the second device regarding the probe message for the target network path within M probe cycles, and there are other network paths that receive corresponding response messages within M probe cycles, a probe result indicating that the target network path is a congested network path can be generated; other network paths refer to network paths that are subjected to congestion detection in the same probe cycle as the target network path.

[0156] For example, after the first probing period begins, the first device can send an RTT probe message to each network path. The RTT probe message sent to each network path contains the path identifier of that network path. Figure 12 As shown, the first device sends network path 1 at time t1 and time t3 respectively (in Figure 12 The network path is represented as P1) and network path 2 (in Figure 12 The second device receives the RTT probe message (represented as P2). After receiving the RTT probe message, it records the path identifier carried in the RTT probe message and the time when the RTT probe message was received.

[0157] After a probe cycle is completed, the second device returns an RTT response message to the first device. This response message can carry the identifiers of all congestion probed paths recorded during that probe cycle, as well as the time interval from receiving the RTT probe message for each network path to sending the RTT response message (denoted as the response delay time (reply_delay_time)). Figure 12 In the process, after reaching a detection cycle (i.e., time t5), the second device sends an RTT response message. The RTT response message may contain the path identifier of network path 1, the reply_delay_time (t5-t2) of network path 1, the path identifier of network path 2, and the reply_delay_time (t5-t4) of network path 2.

[0158] After receiving the RTT response message, the first device calculates the time interval between receiving the RTT response message and each network path sending an RTT probe message (denoted as probe delay time (rtt_total_time)). The communication delay time (i.e., the RTT value) of each network path is calculated based on reply_delay_time and rtt_total_time. RTT value = rtt_total_time - reply_delay_time. Figure 12 In the above, the second device receives the RTT response message at time t6. Therefore, the rtt_total_time of network path 1 is (t6-t1), and the RTT value of network path 1 is (t6-t1-(t5-t2)). The rtt_total_time of network path 2 is (t6-t3), and the RTT value of network path 2 is (t6-t3-(t5-t4)).

[0159] If the RTT value of a network path is greater than the preset congestion threshold (i.e., the time threshold mentioned above), then this network path can be judged as congested. Figure 12 In the process, the first device sends an RTT probe message for network path 2 at time t9 of the second probe cycle. However, network path 2 is congested, and its RTT probe message does not arrive at the second device until time t12 of the third probe cycle. The second device returns an RTT response message for network path 2 at time t13. At time t14, the first device receives the RTT response message for network path 2. At this time, the RTT value of network path 2 is (t14-t9-(t13-t12)), which is greater than the congestion threshold (i.e., the time threshold mentioned above), so it is determined that network path 2 is congested.

[0160] It is worth noting that in the congestion detection strategy described above, when the first device can determine whether a network path is congested (i.e., rtt_total_time) depends on the degree of congestion in the communication network. When the communication network experiences severe congestion, the time it takes for the first device to learn of the network path congestion will also be delayed (i.e., the rtt_total_time value increases), and the duration of this delay is unpredictable. In this situation, the congestion detection strategy for the communication network cannot provide a definitive time for detecting a congested path. Figure 13 In the first probe cycle, at time t3, the first device sends an RTT probe message for network path 2. However, network path 2 experiences severe congestion, causing the first device to fail to receive an RTT response message from network path 2 for three probe cycles. To ensure congestion is detected within a defined timeframe, LBHarp classifies any network path for which no RTT response message is received for M consecutive probe cycles (M being a positive integer) as also congested. Figure 12 In the process, after failing to receive an RTT response message for 3 cycles (M=3), the first device determines network path 2 as a congested network path.

[0161] It is worth noting that, in Figure 12 and Figure 13 In the example, at the end of a detection period, the second device uniformly returns an RTT response message. This RTT response message applies to all network paths that received the corresponding RTT detection message within the network paths detected during the congestion period, rather than returning an RTT response message for each individual RTT detection message. This saves congestion detection overhead. In the case of uniformly returning RTT response messages, if the network path from which the second device returns an RTT response message is congested, the calculated RTT value will also increase, even exceeding the threshold, while the network paths detected by the first device are not congested. To distinguish this situation, if the RTT value of all detected network paths exceeds the time threshold within a detection period, or if all detected network paths within a detection period do not receive an RTT response message for M detection periods, it can be considered that the network path through which the RTT response message passed is congested, not that the network path detected by the first device is congested. In other words, if the RTT value of all detected network paths exceeds the time threshold within a detection period, or if all detected network paths within a detection period do not receive an RTT response message for M detection periods, the first device will not classify these network paths as congested.

[0162] In the case where the second device returns an RTT response message for each RTT probe message, the network path for sending the RTT probe message and returning the RTT response message is the same. If the network path becomes congested, the RTT value calculated by the first device will increase, or the first device may not receive an RTT response message for an extended period. In this situation, network path congestion can be determined directly by the RTT value, or by whether an RTT response message is received within M probe cycles, without considering other network paths, thus improving the accuracy of congestion detection results.

[0163] S1003, Obtain preset migration control information. The migration control information is used to control the migration granularity of the flow migration. Flow migration refers to migrating the data flow transmitted in the congested network path to the non-congested network path for transmission. The migration granularity is used to indicate the migration traffic of the flow migration.

[0164] In this embodiment of the application, the execution process of step S1003 is the same as described above. Figure 4 The execution process of step S402 in the illustrated embodiment is the same, and the execution process of step S1003 can be found in the above description. Figure 4 The relevant description of step S402 in the illustrated embodiment will not be repeated here.

[0165] S1004: Select a non-congested second network path from multiple network paths.

[0166] In this embodiment of the application, the execution process of step S1004 is the same as described above. Figure 4 The execution process of step S403 in the illustrated embodiment is the same, and the execution process of step S1004 can be found in the above description. Figure 4 The relevant description of step S403 in the illustrated embodiment will not be repeated here.

[0167] S1005, based on migration control information, selects a data stream whose traffic is migration traffic from the data streams transmitted on the first network path, and migrates the selected data stream to the second network path for transmission.

[0168] In this embodiment of the application, the execution process of step S1005 is the same as described above. Figure 4 The execution process of step S404 in the illustrated embodiment is the same, and the execution process of step S1005 can be found in the above description. Figure 4 The relevant description of step S404 in the illustrated embodiment will not be repeated here.

[0169] In this embodiment, the advantages of the congestion detection strategy for the communication network are as follows: First, since network path congestion detection is performed according to a detection period, it can detect network path congestion on a periodic time scale and within a defined time period (up to M detection periods). Second, it detects the congestion status of all paths in real time, thus accurately identifying non-congested network paths for flow migration. Third, for any two devices in the communication network, congestion detection is performed at the physical network path level, and since a communication module typically has only 16 or 32 network paths, the congestion detection overhead is very low.

[0170] The methods of the embodiments of this application have been described in detail above. In order to facilitate better implementation of the above solutions of the embodiments of this application, the apparatus of the embodiments of this application is provided below.

[0171] Please see Figure 14 , Figure 14 This is a schematic diagram of the structure of a congestion processing device for a communication network provided in an embodiment of this application. The congestion processing device for the communication network can be installed in the computer equipment provided in the embodiment of this application. The computer equipment can be a data transmission device (e.g., a first device) in the communication network. The communication network includes a first device and a second device. Multiple network paths are provided between the first device and the second device. Any one of the network paths is used to transmit a data stream between the first device and the second device. Figure 14 The congestion handling device for the communication network shown can be a computer program running on a computer device, and the congestion handling device for the communication network can be used to execute... Figure 4 or Figure 10 Some or all of the steps in the method embodiments shown. Please refer to [link / reference]. Figure 14 The congestion handling device for this communication network may include the following units:

[0172] Processing unit 1401 is used to determine the first network path that is congested from multiple network paths;

[0173] The processing unit 1401 is also used to acquire preset migration control information, which is used to control the migration granularity of the flow migration; flow migration refers to migrating the data flow transmitted in the congested network path to the non-congested network path for transmission, and the migration granularity is used to indicate the migration flow of the flow migration.

[0174] The processing unit 1401 is also configured to select a non-congested second network path from multiple network paths;

[0175] The processing unit 1401 is also used for control based on migration control information to select a data stream whose traffic is migration traffic from the data streams transmitted on the first network path;

[0176] The communication unit 1402 is used to migrate the selected data stream to a second network path for transmission.

[0177] In one implementation, the migration control information includes the number of flow mapping groups N and the number of flow migration groups K, where N is an integer greater than 1 and K is a positive integer less than or equal to N; any data flow mapped to any one of the multiple network paths is mapped to one of the N groups corresponding to the network path.

[0178] Processing unit 1401, used for control based on migration control information, specifically performs the following steps when selecting a data stream whose traffic is migration traffic from the data streams transmitted on the first network path:

[0179] Based on the number of flow migration groups K, select K groups from the N groups mapped to the data flow mapped to the first network path;

[0180] The data streams mapped to the selected K groups are determined as the selected data streams; the traffic of the data streams mapped to the selected K groups is the migration traffic.

[0181] In one implementation, when processing unit 1401 selects K packets from N packets mapped to the data stream of the first network path based on the number of flow migration groups K, it specifically performs the following steps:

[0182] Obtain the flow mapping table of the first device; the flow mapping table includes a hash bucket corresponding to each of the multiple network paths, each hash bucket corresponding to the network path includes N hash slots, one hash slot corresponds to one packet, and the hash slot is used to store the path identifier; any data flow mapped to the first network path is mapped to one hash slot in the hash bucket corresponding to the first network path;

[0183] The K packets corresponding to the first hash slots in the hash bucket corresponding to the first network path are determined as the K packets, and the data streams mapped to the K first hash slots are determined as the data streams mapped to the K packets;

[0184] The first hash slot is a hash slot in the hash bucket corresponding to the first network path, where the path identifier is the path identifier corresponding to the first network path.

[0185] In one implementation, the data stream mapped to the hash slot of the stream mapping table is transmitted through the network path corresponding to the path identifier stored in the mapped hash slot; the processing unit 1401 is used to migrate the selected data stream to a second network path for transmission, including:

[0186] The path identifiers stored in the K first hash slots are switched to the path identifiers corresponding to the second network path, so as to migrate the data streams mapped to the K first hash slots to the second network path for transmission.

[0187] In one implementation, the hash buckets corresponding to multiple network paths are arranged sequentially according to the path identifier; each hash bucket corresponding to a network path has its own index of the path to be migrated, the first index of the path to be migrated is the index of the hash bucket corresponding to the first network path, and the first index of the path to be migrated points to the hash bucket corresponding to any network path other than the first network path among the multiple network paths; the number of the second network paths is Q, where Q is a positive integer less than or equal to K.

[0188] Processing unit 1401, when selecting a non-congested second network path from multiple network paths, specifically performs the following steps:

[0189] Perform congestion checks on the network path corresponding to the current hash bucket pointed to by the first path to be migrated;

[0190] If the network path corresponding to the current hash bucket is a non-congested network path, then the network path corresponding to the current hash bucket is determined as a second network path; the pointer of the first path to be migrated is updated from the current hash bucket to the next hash bucket of the current hash bucket;

[0191] If the network path corresponding to the current hash bucket is a congested network path, then the pointer of the first path to be migrated will be updated from the current hash bucket to the next hash bucket of the current hash bucket.

[0192] Repeat the congestion check process and the process of updating the pointer to the first path to be migrated until the number of determined second network paths is Q.

[0193] In one implementation, the communication unit 1402 is further configured to perform the following steps: receiving a target data stream flowing toward the first device;

[0194] Processing unit 1401 is also configured to perform the following steps: allocate a network path to the target data stream according to the stream mapping table;

[0195] The communication unit 1402 is also used to perform the following steps: transmitting the target data stream using an allocated network path.

[0196] In one implementation, when processing unit 1401 allocates a network path for a target data stream according to a stream mapping table, it specifically performs the following steps:

[0197] Perform hash bucket mapping on the target data stream to obtain the target hash bucket mapped to the stream mapping table;

[0198] Map the target data stream to hash slots within the target hash bucket to obtain the target hash slots mapped to the target data stream in the target hash bucket.

[0199] The network path identified by the path identifier stored in the target hash slot is determined as the assigned network path.

[0200] In one implementation, the number of second network paths is Q, where Q is a positive integer less than or equal to K; the communication unit 1402, when migrating the selected data stream to the second network path for transmission, specifically performs the following steps:

[0201] The data stream mapped to K packets is migrated to Q second network paths for transmission.

[0202] Specifically, the data streams mapped to the K packets are migrated to Q second network paths for transmission, including:

[0203] When Q=1, the data streams mapped to K packets will all be migrated to the same second network path for transmission;

[0204] When Q∈(1,K), the data streams mapped to K packets are allocated to Q second network paths according to the packets, and the data streams mapped to K packets are migrated to the allocated second network paths for transmission; the data streams mapped to at least two packets in the K packets are allocated to the same second network path;

[0205] When Q=K, the data streams mapped to K packets will be migrated to K second network paths for transmission, with different packets corresponding to different second network paths.

[0206] In one implementation, the processing unit 1401 is further configured to perform the following steps:

[0207] The migration control information is adjusted according to the congestion level of the communication network;

[0208] The number of flow mapping groups N controls the migration granularity of flow migration by controlling the traffic mapped to a group; the number of flow migration groups K controls the migration granularity of flow migration by controlling the number of migration groups in the flow migration.

[0209] In one implementation, when processing unit 1401 determines the first network path with congestion from multiple network paths, it specifically performs the following steps:

[0210] Congestion detection is performed on each of the multiple network paths according to the detection cycle, and the detection result of each network path is obtained; one congestion detection is performed on the network path in one detection cycle;

[0211] If the results of P consecutive congestion probes on any network path indicate that the network path is a congested network path, then the network path is determined to be the first network path with congestion among multiple network paths, where P is a positive integer.

[0212] In one implementation, any network path is represented as the target network path; the communication unit 1402, when performing a congestion detection on the target network path, specifically performs the following steps:

[0213] Send probe messages to the second device via the target network path;

[0214] If a response message is received from the second device regarding the probe message for the target network path within M probe cycles, the communication delay time of the target network path is calculated based on the sending time of the probe message for the target network path, the receiving time of the response message, and the response delay time of the second device carried in the response message. The response delay time refers to the time elapsed between the second device receiving the probe message and returning the response message; M is a positive integer.

[0215] If the communication delay of the target network path is greater than the time threshold, a detection result indicating that the target network path is a congested network path is generated; or, the communication delay information of other network paths among multiple network paths is obtained, where other network paths refer to network paths among multiple network paths that are subjected to congestion detection in the same detection period as the target network path; if the communication delay of the target network path is greater than the time threshold, and there are network paths among the other network paths whose communication delay information is less than or equal to the time threshold, a detection result indicating that the target network path is a congested network path is generated.

[0216] In one implementation, the communication unit 1402 is further configured to perform the following steps:

[0217] If no response message is received from the second device for the probe message of the target network path within M probe cycles, a probe result indicating that the target network path is a congested network path is generated; or, if no response message is received from the second device for the probe message of the target network path within M probe cycles, and there is a network path among the other network paths that receives a corresponding response message within M probe cycles, a probe result indicating that the target network path is a congested network path is generated; other network paths refer to network paths among multiple network paths that are subjected to congestion detection in the same probe cycle as the target network path.

[0218] In one implementation, the first device and the second device are connected through two switch layers. Both the first device and the second device are connected to switches in the first switch layer. Any two switches in the first switch layer are connected through switches in the second switch layer. The transmission path between the first device or the second device and the switches in the first switch layer is identified by port numbers under the first type of port. The transmission path between any two switches in the first switch layer is identified by port numbers under the second type of port.

[0219] The processing unit 1401 is also configured to perform the following steps: combine the transmission path identified by a port number under the first type of port with the transmission path identified by a port number under the second type of port to obtain a network path between the first device and the second device.

[0220] According to one embodiment of this application, Figure 14 The various units in the congestion handling device of the communication network shown can be individually or entirely merged into one or more other units, or some of the units can be further divided into multiple functionally smaller units. This achieves the same operation without affecting the technical effects of the embodiments of this application. The above-mentioned units are based on logical function division. In practical applications, the function of one unit can also be implemented by multiple units, or the function of multiple units can be implemented by one unit. In other embodiments of this application, the congestion handling device of the communication network may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented collaboratively by multiple units.

[0221] According to another embodiment of this application, the following can be achieved by running on a general-purpose computing device, such as a computer, which includes processing elements and storage elements such as a central processing unit (CPU), random access memory (RAM), and read-only memory (ROM), a device capable of performing operations such as... Figure 4 or Figure 10 Computer programs for the steps involved in some or all of the methods shown, to construct, for example... Figure 14 The invention relates to a congestion handling apparatus for a communication network and a congestion handling method for implementing the embodiments of the present application. A computer program may be recorded on, for example, a computer-readable storage medium, loaded onto the aforementioned computing device via the computer-readable storage medium, and executed therein.

[0222] In this embodiment, after determining the congested first network path from multiple network paths between the first device and the second device, preset migration control information can be obtained. This migration control information can be used to control the migration granularity of the flow migration, which in turn indicates the migration traffic. Based on the control of the migration control information, a data stream with migration traffic can be selected from the data streams transmitted on the first network path, and the selected data stream can be migrated to a non-congested second network path between the first device and the second device for transmission. It can be seen that for congested network paths in the communication network, this embodiment can migrate a data stream with specified traffic (specified traffic refers to migration traffic) on the congested network path to a non-congested path through a single flow migration. The number of flow migrations is one, not multiple, and the target of the flow migration is a non-congested network path, not a congested one, thus quickly alleviating congestion in the communication network.

[0223] Based on the above methods and apparatus embodiments, this application provides a computer device. Please refer to... Figure 15 , Figure 15 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Figure 15 The computer device shown includes at least a processor 1501, an input interface 1502, an output interface 1503, and a computer-readable storage medium 1504. The processor 1501, input interface 1502, output interface 1503, and computer-readable storage medium 1504 can be connected via a bus or other means.

[0224] The computer-readable storage medium 1504 can be stored in the memory of a computer device. The computer-readable storage medium 1504 is used to store computer programs, including computer instructions. The processor 1501 is used to execute the computer program stored in the computer-readable storage medium 1504. The processor 1501 (or CPU (Central Processing Unit)) is the computing and control core of the computer device, suitable for implementing computer programs, specifically for loading and executing computer programs to achieve corresponding method flows or functions.

[0225] This application also provides a computer-readable storage medium (Memory), which is a memory device in a computer device used to store programs and data. It is understood that the computer-readable storage medium here can include both built-in storage media in the computer device and extended storage media supported by the computer device. The computer-readable storage medium provides storage space for storing the operating system of the computer device. Furthermore, the storage space also stores computer programs suitable for loading and execution by a processor. It should be noted that the computer-readable storage medium here can be high-speed RAM or non-volatile memory, such as at least one disk storage device; optionally, it can also be at least one computer-readable storage medium located remotely from the aforementioned processor.

[0226] The computer device can be a data transmission device (e.g., a first device) in a communication network, which includes a first device and a second device. Multiple network paths are provided between the first device and the second device, and any one of these network paths is used to transmit a data stream between the first device and the second device. Specifically, the processor 1501 can load and execute the computer program stored in the computer-readable storage medium 1504 to implement the aforementioned... Figure 2 or Figure 6 The corresponding steps in the method shown. In a specific implementation, the computer program in the computer-readable storage medium 1504 is loaded by the processor 1501 and executed as follows:

[0227] Identify the first network path that is congested from among multiple network paths;

[0228] Obtain preset migration control information, which is used to control the migration granularity of flow migration; flow migration refers to migrating the data flow transmitted in a congested network path to a non-congested network path for transmission, and the migration granularity is used to indicate the migration traffic of flow migration.

[0229] Select a non-congested second network path from multiple network paths;

[0230] Based on the control of migration control information, a data stream whose traffic is to be migrated is selected from the data streams transmitted on the first network path, and the selected data stream is migrated to the second network path for transmission.

[0231] In one implementation, the migration control information includes the number of flow mapping groups N and the number of flow migration groups K, where N is an integer greater than 1 and K is a positive integer less than or equal to N; any data flow mapped to any one of the multiple network paths is mapped to one of the N groups corresponding to the network path.

[0232] The computer program in the computer-readable storage medium 1504 is loaded and executed by the processor 1501. When selecting a data stream with migration traffic from the data streams transmitted along the first network path based on migration control information, the program specifically performs the following steps:

[0233] Based on the number of flow migration groups K, select K groups from the N groups mapped to the data flow mapped to the first network path;

[0234] The data streams mapped to the selected K groups are determined as the selected data streams; the traffic of the data streams mapped to the selected K groups is the migration traffic.

[0235] In one implementation, when a computer program in computer-readable storage medium 1504 is loaded and executed by processor 1501 to select K packets from N packets mapped to a data stream of a first network path based on the number of stream migration groups K, it specifically performs the following steps:

[0236] Obtain the flow mapping table of the first device; the flow mapping table includes a hash bucket corresponding to each of the multiple network paths, each hash bucket corresponding to the network path includes N hash slots, one hash slot corresponds to one packet, and the hash slot is used to store the path identifier; any data flow mapped to the first network path is mapped to one hash slot in the hash bucket corresponding to the first network path;

[0237] The K packets corresponding to the first hash slots in the hash bucket corresponding to the first network path are determined as the K packets, and the data streams mapped to the K first hash slots are determined as the data streams mapped to the K packets;

[0238] The first hash slot is a hash slot in the hash bucket corresponding to the first network path, where the path identifier is the path identifier corresponding to the first network path.

[0239] In one implementation, the data stream mapped to the hash slots of the stream mapping table is transmitted via the network path corresponding to the path identifier stored in the mapped hash slot; the computer program in the computer-readable storage medium 1504 is loaded and executed by the processor 1501 to migrate the selected data stream to a second network path for transmission, including:

[0240] The path identifiers stored in the K first hash slots are switched to the path identifiers corresponding to the second network path, so as to migrate the data streams mapped to the K first hash slots to the second network path for transmission.

[0241] In one implementation, the hash buckets corresponding to multiple network paths are arranged sequentially according to the path identifier; each hash bucket corresponding to a network path has its own index of the path to be migrated, the first index of the path to be migrated is the index of the hash bucket corresponding to the first network path, and the first index of the path to be migrated points to the hash bucket corresponding to any network path other than the first network path among the multiple network paths; the number of the second network paths is Q, where Q is a positive integer less than or equal to K.

[0242] When the computer program in the computer-readable storage medium 1504 is loaded and executed by the processor 1501 to select a non-congested second network path from multiple network paths, it specifically performs the following steps:

[0243] Perform congestion checks on the network path corresponding to the current hash bucket pointed to by the first path to be migrated;

[0244] If the network path corresponding to the current hash bucket is a non-congested network path, then the network path corresponding to the current hash bucket is determined as a second network path; the pointer of the first path to be migrated is updated from the current hash bucket to the next hash bucket of the current hash bucket;

[0245] If the network path corresponding to the current hash bucket is a congested network path, then the pointer of the first path to be migrated will be updated from the current hash bucket to the next hash bucket of the current hash bucket.

[0246] Repeat the congestion check process and the process of updating the pointer to the first path to be migrated until the number of determined second network paths is Q.

[0247] In one implementation, the computer program in the computer-readable storage medium 1504 is loaded by the processor 1501 and is also used to perform the following steps:

[0248] Receive the target data stream destined for the first device;

[0249] Assign a network path to the target data stream based on the stream mapping table;

[0250] The target data stream is transmitted using the allocated network path.

[0251] In one implementation, when a computer program in computer-readable storage medium 1504 is loaded and executed by processor 1501 to allocate a network path for a target data stream according to a stream mapping table, it specifically performs the following steps:

[0252] Perform hash bucket mapping on the target data stream to obtain the target hash bucket mapped to the stream mapping table;

[0253] Map the target data stream to hash slots within the target hash bucket to obtain the target hash slots mapped to the target data stream in the target hash bucket.

[0254] The network path identified by the path identifier stored in the target hash slot is determined as the assigned network path.

[0255] In one implementation, the number of second network paths is Q, where Q is a positive integer less than or equal to K; when the computer program in the computer-readable storage medium 1504 is loaded and executed by the processor 1501 to migrate the selected data stream to the second network path for transmission, it is specifically used to perform the following steps:

[0256] The data stream mapped to K packets is migrated to Q second network paths for transmission.

[0257] Specifically, the data streams mapped to the K packets are migrated to Q second network paths for transmission, including:

[0258] When Q=1, the data streams mapped to K packets will all be migrated to the same second network path for transmission;

[0259] When Q∈(1,K), the data streams mapped to K packets are allocated to Q second network paths according to the packets, and the data streams mapped to K packets are migrated to the allocated second network paths for transmission; the data streams mapped to at least two packets in the K packets are allocated to the same second network path;

[0260] When Q=K, the data streams mapped to K packets will be migrated to K second network paths for transmission, with different packets corresponding to different second network paths.

[0261] In one implementation, the computer program in the computer-readable storage medium 1504 is loaded by the processor 1501 and is also used to perform the following steps:

[0262] The migration control information is adjusted according to the congestion level of the communication network;

[0263] The number of flow mapping groups N controls the migration granularity of flow migration by controlling the traffic mapped to a group; the number of flow migration groups K controls the migration granularity of flow migration by controlling the number of migration groups in the flow migration.

[0264] In one implementation, when a computer program in computer-readable storage medium 1504 is loaded and executed by processor 1501 to determine a first network path with congestion from multiple network paths, it specifically performs the following steps:

[0265] Congestion detection is performed on each of the multiple network paths according to the detection cycle, and the detection result of each network path is obtained; one congestion detection is performed on the network path in one detection cycle;

[0266] If the results of P consecutive congestion probes on any network path indicate that the network path is a congested network path, then the network path is determined to be the first network path with congestion among multiple network paths, where P is a positive integer.

[0267] In one implementation, any network path is represented as a target network path; when the computer program in the computer-readable storage medium 1504 is loaded and executed by the processor 1501 to perform a congestion probe on the target network path, it is specifically used to perform the following steps:

[0268] Send probe messages to the second device via the target network path;

[0269] If a response message is received from the second device regarding the probe message for the target network path within M probe cycles, the communication delay time of the target network path is calculated based on the sending time of the probe message for the target network path, the receiving time of the response message, and the response delay time of the second device carried in the response message. The response delay time refers to the time elapsed between the second device receiving the probe message and returning the response message; M is a positive integer.

[0270] If the communication delay of the target network path is greater than the time threshold, a detection result indicating that the target network path is a congested network path is generated; or, the communication delay information of other network paths among multiple network paths is obtained, where other network paths refer to network paths among multiple network paths that are subjected to congestion detection in the same detection period as the target network path; if the communication delay of the target network path is greater than the time threshold, and there are network paths among the other network paths whose communication delay information is less than or equal to the time threshold, a detection result indicating that the target network path is a congested network path is generated.

[0271] In one implementation, the computer program in the computer-readable storage medium 1504 is loaded by the processor 1501 and is also used to perform the following steps:

[0272] If no response message is received from the second device for the probe message of the target network path within M probe cycles, a probe result indicating that the target network path is a congested network path is generated; or, if no response message is received from the second device for the probe message of the target network path within M probe cycles, and there is a network path among the other network paths that receives a corresponding response message within M probe cycles, a probe result indicating that the target network path is a congested network path is generated; other network paths refer to network paths among multiple network paths that are subjected to congestion detection in the same probe cycle as the target network path.

[0273] In one implementation, the first device and the second device are connected through two switch layers. Both the first device and the second device are connected to switches in the first switch layer. Any two switches in the first switch layer are connected through switches in the second switch layer. The transmission path between the first device or the second device and the switches in the first switch layer is identified by port numbers under the first type of port. The transmission path between any two switches in the first switch layer is identified by port numbers under the second type of port.

[0274] The computer program in the computer-readable storage medium 1504 is loaded by the processor 1501 and is also used to perform the following steps: combining a transmission path identified by a port number under a first type of port with a transmission path identified by a port number under a second type of port to obtain a network path between the first device and the second device.

[0275] In this embodiment, after determining the congested first network path from multiple network paths between the first device and the second device, preset migration control information can be obtained. This migration control information can be used to control the migration granularity of the flow migration, which in turn indicates the migration traffic. Based on the control of the migration control information, a data stream with migration traffic can be selected from the data streams transmitted on the first network path, and the selected data stream can be migrated to a non-congested second network path between the first device and the second device for transmission. It can be seen that for congested network paths in the communication network, this embodiment can migrate a data stream with specified traffic (specified traffic refers to migration traffic) on the congested network path to a non-congested path through a single flow migration. The number of flow migrations is one, not multiple, and the target of the flow migration is a non-congested network path, not a congested one, thus quickly alleviating congestion in the communication network.

[0276] This application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the aforementioned congestion handling method for a communication network.

[0277] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0278] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0279] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).

[0280] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for handling congestion in a communication network, characterized in that, The communication network includes a first device and a second device, and multiple network paths are provided between the first device and the second device. Any one of the network paths is used to transmit a data stream between the first device and the second device. The method is performed by the first device; the method includes: Identify the first network path that is congested from the plurality of network paths; Obtain preset migration control information, which is used to control the migration granularity of the flow migration; the flow migration refers to migrating the data flow transmitted in the congested network path to the non-congested network path for transmission, and the migration granularity is used to indicate the migration traffic of the flow migration. Select a non-congested second network path from the multiple network paths; Based on the control of the migration control information, a data stream with the migration traffic is selected from the data streams transmitted on the first network path, and the selected data stream is migrated to the second network path for transmission.

2. The method as described in claim 1, characterized in that, The migration control information includes the number of flow mapping groups N and the number of flow migration groups K, where N is an integer greater than 1 and K is a positive integer less than or equal to N; any data flow mapped to any one of the multiple network paths is mapped to one of the N groups corresponding to the network path. The control based on the migration control information, which selects the data stream whose traffic is the migration traffic from the data streams transmitted on the first network path, includes: Based on the number of flow migration groups K, select K groups from the N groups mapped to the data flow mapped to the first network path; The data streams mapped to the selected K groups are determined as the selected data streams; wherein, the traffic of the data streams mapped to the selected K groups is the migration traffic.

3. The method as described in claim 2, characterized in that, The step of selecting K packets from the N packets mapped to the data stream mapped to the first network path based on the number of flow migration groups K includes: Obtain the flow mapping table of the first device; the flow mapping table includes a hash bucket corresponding to each of the multiple network paths, each hash bucket corresponding to the network path includes N hash slots, one hash slot corresponds to one packet, and the hash slot is used to store the path identifier; any data flow mapped to the first network path is mapped to one hash slot in the hash bucket corresponding to the first network path; The K packets corresponding to the first hash slots in the hash bucket corresponding to the first network path are determined as the K packets, and the data streams mapped to the K first hash slots are determined as the data streams mapped to the K packets; The first hash slot is a hash slot in the hash bucket corresponding to the first network path, where the path identifier is the path identifier corresponding to the first network path.

4. The method as described in claim 3, characterized in that, Data streams mapped to hash slots in the stream mapping table are transmitted via the network paths corresponding to the path identifiers stored in the mapped hash slots. The step of migrating the selected data stream to the second network path for transmission includes: The path identifiers stored in the K first hash slots are switched to the path identifiers corresponding to the second network path, so as to migrate the data streams mapped to the K first hash slots to the second network path for transmission.

5. The method as described in claim 3, characterized in that, The hash buckets corresponding to the multiple network paths are arranged sequentially according to the path identifier; each hash bucket corresponding to the network path has its own path to be migrated index, the first path to be migrated index is the path to be migrated index of the hash bucket corresponding to the first network path, and the first path to be migrated index points to the hash bucket corresponding to any network path other than the first network path among the multiple network paths; the number of the second network paths is Q, where Q is a positive integer less than or equal to K. The step of selecting a non-congested second network path from the plurality of network paths includes: Perform a congestion check on the network path corresponding to the current hash bucket pointed to by the first path to be migrated; If the network path corresponding to the current hash bucket is a non-congested network path, then the network path corresponding to the current hash bucket is determined as a second network path; the pointer of the first path to be migrated is updated from the current hash bucket to the next hash bucket of the current hash bucket; If the network path corresponding to the current hash bucket is a congested network path, then the pointer of the first path to be migrated is updated from the current hash bucket to the next hash bucket of the current hash bucket; Repeat the above congestion check process and the process of updating the pointer of the first path to be migrated until the number of the second network paths is determined to be Q.

6. The method as described in claim 3, characterized in that, The method further includes: Receive the target data stream flowing to the first device; Assign a network path to the target data stream according to the stream mapping table; The target data stream is transmitted using the allocated network path.

7. The method as described in claim 6, characterized in that, The step of allocating a network path to the target data stream according to the stream mapping table includes: Perform hash bucket mapping on the target data stream to obtain the target hash bucket that the target data stream is mapped to in the stream mapping table; Hash slot mapping is performed on the target data stream within the target hash bucket to obtain the target hash slot mapped by the target data stream in the target hash bucket. The network path identified by the path identifier stored in the target hash slot is determined as the allocated network path.

8. The method as described in claim 2, characterized in that, The number of the second network paths is Q, where Q is a positive integer less than or equal to K; the step of migrating the selected data stream to the second network path for transmission includes: The data streams mapped to the K packets are migrated to the Q second network paths for transmission. The step of migrating the data streams mapped to the K packets to the Q second network paths for transmission includes: When Q=1, the data streams mapped to the K groups will all be migrated to the same second network path for transmission; When Q∈(1,K), the data streams mapped to the K groups are allocated to Q second network paths according to the groups, and the data streams mapped to the K groups are migrated to the allocated second network paths for transmission; the data streams mapped to at least two groups in the K groups are allocated to the same second network path; When Q = K, the data streams mapped to the K groups will be migrated to the K second network paths for transmission, with different groups corresponding to different second network paths.

9. The method as described in claim 2, characterized in that, The method further includes: The migration control information is adjusted according to the congestion level of the communication network. The number of flow mapping groups N controls the migration granularity of the flow migration by controlling the traffic mapped to a group; the number of flow migration groups K controls the migration granularity of the flow migration by controlling the number of migration groups of the flow migration.

10. The method according to any one of claims 1-9, characterized in that, The step of determining the first network path with congestion from the plurality of network paths includes: Congestion detection is performed on each of the multiple network paths according to the detection cycle, and the detection result of each network path is obtained; one congestion detection is performed on each network path in one detection cycle; If the results of P consecutive congestion probes on any one of the network paths indicate that the network path is a congested network path, then the network path is determined to be the first network path with congestion among the multiple network paths, where P is a positive integer.

11. The method as described in claim 10, characterized in that, Any of the aforementioned network paths is referred to as the target network path; the process of performing a congestion detection on the target network path includes: Send a probe message to the second device through the target network path; If a response message is received from the second device regarding the probe message for the target network path within M probe cycles, then the communication delay time of the target network path is calculated based on the sending time of the probe message for the target network path, the receiving time of the response message, and the response delay time of the second device carried in the response message; the response delay time refers to the time elapsed between the second device receiving the probe message and returning the response message; M is a positive integer; If the communication delay time of the target network path is greater than a time threshold, a detection result indicating that the target network path is a congested network path is generated; or, the communication delay information of other network paths among the multiple network paths is obtained, wherein the other network paths refer to the network paths among the multiple network paths that are subjected to congestion detection in the same detection period as the target network path; if the communication delay time of the target network path is greater than a time threshold, and there is a network path among the other network paths whose communication delay information is less than or equal to the time threshold, a detection result indicating that the target network path is a congested network path is generated.

12. The method as described in claim 11, characterized in that, The method further includes: If no response message is received from the second device regarding the probe message for the target network path within M probe cycles, a probe result indicating that the target network path is a congested network path is generated; or, If no response message is received from the second device for the probe message of the target network path within M probe cycles, and there are other network paths that receive the corresponding response message within the M probe cycles, then a probe result indicating that the target network path is a congested network path is generated; the other network paths refer to the network paths among the multiple network paths that are subjected to congestion probes in the same probe cycle as the target network path.

13. The method as described in claim 1, characterized in that, The first device and the second device are connected through two switch layers. Both the first device and the second device are connected to switches in the first switch layer. Any two switches in the first switch layer are connected through switches in the second switch layer. The transmission path between the first device or the second device and the switches in the first switch layer is identified by port numbers under the first type of port. The transmission path between any two switches in the first switch layer is identified by port numbers under the second type of port. The method further includes: The transmission path identified by a port number under the first type of port is combined with the transmission path identified by a port number under the second type of port to obtain a network path between the first device and the second device.

14. A congestion handling device for a communication network, characterized in that, The communication network includes a first device and a second device, and multiple network paths are provided between the first device and the second device. Any one of the network paths is used to transmit a data stream between the first device and the second device. The device is disposed in the first equipment; the method includes: A processing unit is configured to determine, from the plurality of network paths, a first network path that is congested; The processing unit is further configured to acquire preset migration control information, which is used to control the migration granularity of the flow migration; the flow migration refers to migrating the data flow transmitted in a congested network path to a non-congested network path for transmission, and the migration granularity is used to indicate the migration traffic of the flow migration. The processing unit is further configured to select a non-congested second network path from the plurality of network paths; The processing unit is further configured to select, based on the control of the migration control information, a data stream whose traffic is the migration traffic from the data streams transmitted on the first network path; A communication unit is used to migrate the selected data stream to the second network path for transmission.

15. A computer device, characterized in that, The computer device includes: A processor is a tool for implementing computer programs. A computer-readable storage medium storing a computer program adapted to be loaded by the processor and executed as described in any one of claims 1-13 for handling congestion in a communication network.

16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted to be loaded by a processor and executed by the congestion handling method of the communication network as described in any one of claims 1-13.

17. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the congestion handling method for a communication network as described in any one of claims 1-13.