Network congestion processing method, device, equipment, medium and product

By scheduling the target network in the GPU cluster, the problem of low communication performance caused by network congestion is solved, and more efficient data transmission and processing is achieved.

CN119906675APending Publication Date: 2025-04-29BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411875354.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

In GPU clusters, how to improve communication performance to deal with network congestion.

Method used

When congestion occurs in the target network, the monitoring data of the preset duration is obtained, the data flow to be scheduled is determined, and the target port is determined according to the candidate port load of the target switch, and the data flow to be scheduled is scheduled to the target port, thereby reducing the number of congestion notifications.

Benefits of technology

It effectively reduces the number of GPUs that need to be slowed down, improves the transmission rate of the overall GPU, improves data processing efficiency, and avoids the problem of data flow disorder.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119906675A_ABST
    Figure CN119906675A_ABST
Patent Text Reader

Abstract

The invention provides a network congestion processing method and device, and relates to the technical field of artificial intelligence, in particular to the technical fields of intelligent cloud, network communication, large language models and the like. The network congestion processing method comprises the following steps: when a target network is congested, acquiring monitoring data of a preset duration; the target network comprises a target switch, and the target switch is used for controlling access equipment to perform speed reduction through congestion notification; based on the monitoring data, determining a to-be-scheduled data stream in the initial data stream within the preset duration, and obtaining a target load of a candidate port of the target switch; determining a target port in the candidate ports based on the target load; scheduling the data stream to be scheduled to the target port to obtain a target data stream; wherein the number of congestion notifications corresponding to the target data flow is smaller than the number of congestion notifications corresponding to the initial data flow.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, specifically to the technical fields of intelligent cloud, network communication, large language models, etc., and in particular to a network congestion processing method, device, equipment, medium and product. Background Art

[0002] With the development of large artificial intelligence (AI) models, large-scale graphics processing unit (GPU) clusters are needed.

[0003] How to improve the communication performance of GPU clusters is a problem that needs to be solved. Summary of the invention

[0004] The present disclosure provides a network congestion processing method, device, equipment, medium and product.

[0005] According to one aspect of the present disclosure, a network congestion processing method is provided, comprising: when congestion occurs in a target network, obtaining monitoring data of a preset duration; the target network comprises a target switch, and the target switch is used to control the access device to slow down through congestion notification; based on the monitoring data, determining a data flow to be scheduled from an initial data flow within the preset duration, and obtaining a target load of a candidate port of the target switch; based on the target load, determining a target port from the candidate ports; scheduling the data flow to be scheduled to the target port to obtain a target data flow; wherein the number of congestion notifications corresponding to the target data flow is less than the number of congestion notifications corresponding to the initial data flow.

[0006] According to another aspect of the present disclosure, a network congestion processing device is provided, comprising: a first acquisition module, used to acquire monitoring data of a preset duration when congestion occurs in a target network; the target network comprises a target switch, and the target switch is used to control the access device to slow down through congestion notification; a second acquisition module, used to determine a data flow to be scheduled from an initial data flow within the preset duration according to the monitoring data, and to acquire a target load of a candidate port of the target switch; a determination module, used to determine a target port from the candidate ports according to the target load; and a scheduling module, used to schedule the data flow to be scheduled to the target port to obtain a target data flow; wherein the number of congestion notifications corresponding to the target data flow is less than the number of congestion notifications corresponding to the initial data flow.

[0007] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any method as described in any of the above aspects.

[0008] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute any one of the methods according to any one of the above aspects.

[0009] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the computer program implements any one of the methods described in any one of the above aspects.

[0010] The present disclosure can improve network communication performance.

[0011] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0013] Figure 1 is a schematic diagram according to a first embodiment of the present disclosure;

[0014] Figure 2 is a schematic diagram of an implementation system for implementing an embodiment of the present disclosure;

[0015] Figure 3 is a schematic diagram of a physical network provided according to an embodiment of the present disclosure;

[0016] Figure 4 is a schematic diagram of data transmission in a link provided according to an embodiment of the present disclosure;

[0017] Figure 5 is a schematic diagram of network congestion provided according to an embodiment of the present disclosure;

[0018] Figure 6 is a schematic diagram according to a second embodiment of the present disclosure;

[0019] Figure 7 It is a load diagram of an uplink port of an access switch in an on-demand scheduling scenario provided according to an embodiment of the present disclosure;

[0020] Figure 8is a schematic diagram according to a third embodiment of the present disclosure;

[0021] Figure 9a This is a load diagram of an uplink port of an access switch in a full-volume scheduling scenario provided according to an embodiment of the present disclosure;

[0022] Figure 9b yes Figure 9a Corresponding data transmission diagram;

[0023] Fig.10 is a schematic diagram according to a fourth embodiment of the present disclosure;

[0024] Fig.11 is a schematic diagram according to a fifth embodiment of the present disclosure;

[0025] Fig.12 It is a schematic diagram of an electronic device used to implement the network congestion processing method of an embodiment of the present disclosure. DETAILED DESCRIPTION

[0026] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0027] In order to better understand the embodiments of the present disclosure, the relevant terms are explained as follows:

[0028] Graphics Processing Unit (GPU): A microprocessor specifically designed to handle graphics and image-related operations. GPU plays an important role in the field of AI. Deep learning algorithms (such as neural networks) involve a large number of matrix operations. The parallel computing capabilities of GPU are very suitable for processing these operations. For this reason, GPU is usually used as a computing node in AI scenarios.

[0029] High Performance Network (HPN): A network architecture that can provide high-speed data transmission, low latency, high bandwidth and high reliability. It uses advanced network equipment (such as high-performance switches and routers), high-speed transmission media (such as optical fiber), optimized network protocols, etc.

[0030] CLOS network architecture: A network topology that includes multiple levels of switches.

[0031] In HPN, a two-layer CLOS structure can be used, which are called access switch and aggregation switch. The access switch can be a top of rack switch (Tor), which is connected to the GPU; the aggregation switch can be represented by a leaf switch, and the downstream port of the leaf switch is connected to the Tor.

[0032] In large HPNs, especially networks spanning multiple autonomous systems (AS), the BGP protocol is usually used.

[0033] Border Gateway Protocol (BGP): A routing protocol whose main function is to exchange routing information between different ASes to achieve cross-AS routing selection. Through BGP, an AS can learn the network topology information of other ASes and thus select the best path to forward data packets.

[0034] In order to improve data transmission efficiency, BGP is usually configured to support ECMP.

[0035] Equal-Cost Multipath Routing (ECMP): A routing strategy. In a network environment where there are multiple different links to the same destination address, traditional routing strategies can only use one of the links, and the other links are in backup or invalid state; ECMP allows multiple links to be used simultaneously in this network environment, which not only increases the transmission bandwidth, but also can back up the data transmission of the failed link without delay and packet loss.

[0036] In this way, when the BGP protocol finds that there are multiple equal-cost paths to the same destination address, it can use the ECMP function to evenly distribute the traffic to these equal-cost paths, thereby making full use of the bandwidth resources of multiple links, avoiding overload of a single link, and improving the overall transmission efficiency of the network.

[0037] Routing: Routing refers to the process by which network devices (such as routers and switches) send data packets from the source to the destination. Routing usually determines the forwarding path of data packets through a routing table, which contains information such as network address, subnet mask, and next hop address. For example, when a switch receives a data packet sent to a certain network segment, it will check the routing table, find the corresponding next hop address, and then forward the data packet to the next hop device.

[0038] Access Control List (ACL): A network security mechanism based on packet filtering, used to control the ingress and egress of network traffic. It can allow or deny data packets based on multiple conditions such as source IP address, destination IP address, port number, protocol type, etc. IP refers to Internet Protocol (IP).

[0039] Policy-Based Routing (PBR): is a routing method that forwards data packets based on user-defined policies rather than relying solely on traditional routing tables.

[0040] ACL is an important part of PBR and is used to identify packets that meet specific policies. For example, you can define a policy through ACL to direct network traffic from a specific department (determined by the source IP address range) to a specific high-speed link, while forwarding other traffic according to the normal routing table, thereby achieving refined management of network traffic.

[0041] Communication primitives: In a GPU cluster, communication primitives are basic operating instructions for data exchange and collaborative work between multiple GPU devices. Since GPU clusters are usually used in fields with high requirements for computing speed and data transmission, such as high-performance computing and deep learning, these communication primitives are crucial for achieving efficient parallel computing, and can control the flow of data between GPUs, and implement functions such as task allocation and result aggregation.

[0042] The communication primitives of the GPU cluster include point-to-point communication primitives and collective communication primitives.

[0043] One of the collective communication primitives is AllGather.

[0044] AllGather: It is a many-to-many communication primitive with multiple data senders and multiple data receivers. It can collect data from multiple nodes in the cluster to a master node (Gather), and then distribute the collected data to other nodes (broadcast), that is, collect all the data in the cluster to all nodes.

[0045] Priority Flow Control (PFC) and Explicit Congestion Notification (ECN) are two network congestion management mechanisms used to manage network congestion to ensure network stability and service quality.

[0046] When PFC and ECN detect network congestion, they solve the problem by controlling the sending rate of the source GPU. Taking large model training as an example, since the amount of data required for training is certain, if the data sending rate is reduced, it will take longer to obtain enough training data, which will reduce the training efficiency.

[0047] Adaptive Routing (AR): Unlike ECMP, ECMP generally uses a five-tuple as input and a specific hash algorithm to calculate the path. For a certain five-tuple, if the link does not change, each message goes through the same link. AR, on the other hand, selects a route for each packet based on the real-time quality of the local port to maximize port utilization rather than reducing the GPU's sending rate.

[0048] Since AR forwards packets one by one, the links that each packet travels may be different, which will cause the packets received on the destination GPU to be out of order. The GPU server needs to have a large enough cache to store out-of-order packets and be able to sort them regularly.

[0049] Therefore, PFC or ECN will cause GPU speed reduction, and AR will cause message disorder, and neither can effectively improve network communication performance.

[0050] In order to improve network communication performance, the present disclosure provides the following embodiments.

[0051] Figure 1 1 is a schematic diagram according to the first embodiment of the present disclosure. This embodiment provides a method for handling network congestion, the method comprising:

[0052] 101. When congestion occurs in a target network, monitoring data of a preset duration is obtained; the target network includes a target switch, and the target switch is used to control an access device to reduce speed through congestion notification.

[0053] 102. Based on the monitoring data, determine the data flow to be scheduled in the initial data flow within the preset time period, and obtain the target load of the candidate port of the target switch.

[0054] 103. Determine a target port from the candidate ports based on the target load.

[0055] 104. Schedule the data flow to be scheduled to the target port to obtain a target data flow; wherein the number of congestion notifications corresponding to the target data flow is less than the number of congestion notifications corresponding to the initial data flow.

[0056] The target network refers to a network to be monitored, for example, a HPN used for communication between GPUs. In a large-scale GPU cluster scenario, congestion may occur in the target network.

[0057] The target network includes switches, and the switches may include multi-layer switches. For example, the HPN includes access switches and aggregation switches.

[0058] The target switch is a switch to be processed, such as the access switch mentioned above.

[0059] An access device is a device that is connected to the target network. For example, an access device is a GPU.

[0060] When a port of the access switch is congested, a congestion notification can be generated through PFC or ECN, which can control the access device to slow down. For example, based on PFC, the access switch sends a pause notification to the source GPU, and the source GPU pauses the data flow based on the pause notification to achieve the sending speed reduction; or based on ECN, the ECN identifier is carried in the data flow, and the receiver can notify the sender to slow down based on the ECN identifier.

[0061] To this end, the pause notification of the PFC or the ECN identifier of the ECN may be used as a congestion notification, and the access device (such as the source-side GPU) may be decelerated based on the congestion notification.

[0062] When congestion occurs in the target network, monitoring data of a preset duration (such as 30 seconds) can be obtained, and traffic scheduling is performed based on the monitoring data.

[0063] Monitoring data includes, for example: network topology information, such as the mapping relationship between GPU and access switch; device status, such as whether it is faulty; link status, such as whether it is congested; port rate; port ECN and PFC counts, etc. For scenarios that do not support ECN, the buffer occupancy of the switch port outbound direction can also be collected. In addition, the flow information on each port of the switch can also be collected (the flow information mainly includes five tuples and rates). The five tuples include the source IP address, destination IP address, source port number, destination port number and protocol. The switch obtains the message information through sampling at a certain ratio, and then infers the flow rate based on the sampling rate. Even if there is a small probability of missing collection, it can be supplemented by comparing multi-link data.

[0064] The above monitoring data can be used as basic data for traffic scheduling, and can also be visualized on the front end for monitoring operation and maintenance.

[0065] A data flow refers to a data sequence consisting of multiple continuous data units (such as messages). In the same data flow, the data units in the data flow have the same source IP address and destination IP address.

[0066] The initial data flow refers to the data flow before traffic scheduling, that is, the data flow when network congestion occurs.

[0067] Since network congestion has occurred, the number of congestion notifications corresponding to the initial data flow is large.

[0068] The target data flow refers to the data flow after traffic scheduling. Traffic scheduling can alleviate network congestion and effectively reduce the number of congestion notifications.

[0069] In the GPU cluster scenario, since congestion notifications are used to control GPU speed reduction, by reducing the number of congestion notifications, the number of GPUs that need to be slowed down can be reduced. Compared with the scenario where a large number of GPUs need to be slowed down, by reducing the number of congestion notifications, the overall GPU sending rate can be increased, the data transmission efficiency can be improved, and the training or inference speed of large models can be improved.

[0070] Traffic scheduling may be performed based on the target load of the candidate port of the target switch.

[0071] Candidate port refers to the set port on the target switch.

[0072] For example, the target switch is an access switch, and the candidate port is an uplink port of the access switch. An uplink port refers to a port on the access switch that is connected to an aggregation switch. Accordingly, taking an access GPU as an example, a port on the access switch that is connected to a GPU is called a downlink port.

[0073] Each access switch generally includes multiple uplink ports and multiple downlink ports.

[0074] The target port refers to the port that is finally used among multiple candidate ports.

[0075] Specifically, the target port may be determined based on the target load of the candidate port.

[0076] Target load is used to characterize the load of a port. Each port can transmit uplink data and downlink data, and the target load can be calculated based on the uplink and downlink data.

[0077] After the target load is obtained, the target port is determined based on the target load. For example, the candidate port with the smallest target load is used as the target port.

[0078] After the target port is obtained, the data stream to be scheduled is scheduled to the target port to obtain the scheduled target data stream, that is, the target data stream is transmitted through the target port.

[0079] In this embodiment, when the network is congested, the number of congestion notifications can be reduced by performing traffic scheduling. Compared with the method of controlling GPU speed reduction based only on PFC or ECN, the number of GPUs that need to be slowed down can be effectively reduced, which can improve the overall GPU transmission rate and thus improve data processing efficiency; scheduling is performed in units of data streams, rather than AR processing in units of messages, which can ensure that the same data stream is transmitted through the same link to avoid disorder problems; therefore, when the network is congested, network communication performance can be improved through traffic scheduling.

[0080] In order to better understand the embodiments of the present disclosure, the application scenarios of the embodiments of the present disclosure are described as follows.

[0081] Figure 2 It is a schematic diagram of an implementation system for implementing the embodiments of the present disclosure.

[0082] like Figure 2 As shown, the system includes: a physical network 201, a monitoring platform 202 and a controller 203.

[0083] The physical network 201 is used for communication between access devices. In a scenario where there are a large number of access devices, network congestion may occur.

[0084] The monitoring platform 202 is used to monitor relevant data of the physical network, which is called monitoring data, so as to perform traffic scheduling based on the monitoring data.

[0085] Monitoring data includes, for example: network topology information, such as the mapping relationship between GPU and access switch; device status, such as whether it is faulty; link status, such as whether it is congested; port rate; port ECN and PFC counts, etc. For scenarios that do not support ECN, the buffer occupancy of the switch port outbound direction can also be collected. In addition, the flow information on each port of the switch can also be collected (the flow information mainly includes five tuples and rates). The five tuples include the source IP address, destination IP address, source port number, destination port number and protocol. The switch obtains the message information through sampling at a certain ratio, and then infers the flow rate based on the sampling rate. Even if there is a small probability of missing collection, it can be supplemented by comparing multi-link data.

[0086] The above monitoring data can be visualized on the front end for monitoring operation and maintenance; it can also be provided as basic data to the controller, and the controller performs traffic scheduling based on this data.

[0087] The controller 203 is used to perform traffic scheduling on the physical network 201 according to the congestion events sent by the monitoring platform. For example, an ACL may be issued to the physical network 201, and the physical network 201 performs routing based on the ACL to complete traffic scheduling.

[0088] Based on this, in combination with the previous embodiment, the network congestion processing method of the previous embodiment can be specifically executed by a controller, that is, the controller can send an ACL to a target switch of the target network, and the target switch completes traffic scheduling based on the ACL.

[0089] Taking the access device as a GPU as an example, the physical network may be a high performance network (HPN) including switches at multiple levels.

[0090] Figure 3 is a schematic diagram of a physical network provided according to an embodiment of the present disclosure.

[0091] like Figure 3 As shown, multiple levels of switches include: access switches and aggregation switches.

[0092] The access switch is connected to the GPU. Each access switch can connect to multiple GPUs. Figure 3 In the example, each access switch is connected to two GPUs.

[0093] There are usually multiple access switches and aggregation switches. Figure 3 Taking three access switches and two aggregation switches as an example, a fully connected structure can be adopted between the access switches and the aggregation switches, that is, each access switch is connected to all the aggregation switches, and each aggregation switch is connected to all the access switches.

[0094] For access switches: the ports between the access switch and the GPU can be called access switch downlink ports, and the ports between the access switch and the aggregation switch can be called access switch uplink ports. The uplink and downlink ports can be configured 1:1. For example, each access switch includes 64 downlink ports and 64 uplink ports.

[0095] For aggregation switches: The ports between the aggregation switches and access switches are called aggregation switch downlink ports.

[0096] When GPUs communicate with each other, the source GPU (sender) sends data to the connected source access switch, which sends the data to the aggregation switch, which sends the data to the destination access switch, which then sends the data to the destination GPU (receiver).

[0097] For a certain access switch, since it can connect multiple GPUs, the access switch may transmit data of multiple GPUs in the same link between the access switch and the aggregation switch, which may cause network congestion.

[0098] Figure 4 It is a schematic diagram of data transmission in a link provided according to an embodiment of the present disclosure.

[0099] like Figure 4 As shown, the uplink port of the access switch is connected to the downlink port of the aggregation switch to form a data transmission link. For a link between the access switch and the aggregation switch, data from multiple GPUs can be transmitted in the link, and these data can all be uplink data flows, all be downlink data flows, or include uplink data and downlink data.

[0100] The upstream data flow refers to the data flow sent from the access switch to the aggregation switch, and the downstream data flow refers to the data flow sent from the aggregation switch to the access switch.

[0101] When the GPU is large in scale, there may be a large number of upstream and downstream data flows in the same link, which will cause network congestion.

[0102] Figure 5 It is a schematic diagram of network congestion provided according to an embodiment of the present disclosure.

[0103] refer to Figure 5 , the upper device is the aggregation switch, the middle device is the access switch, and the lower device is the GPU. Assume that the access switches are called the first access switch, the second access switch, and the third access switch from left to right, and the aggregation switches are called the first aggregation switch and the second aggregation switch from left to right.

[0104] Figure 5 Two network congestion situations are shown. As shown on the left, the link between the first access switch and the first aggregation switch is congested. As shown on the right, the link between the second access switch and the first aggregation switch is congested.

[0105] In order to improve network communication performance, it is necessary to efficiently solve the network congestion problem.

[0106] In the related technology, if it is based only on PFC or ECN, it solves the network congestion problem by reducing the data sending rate of the source GPU, but it will lead to poor data processing efficiency and cannot effectively improve the network communication performance.

[0107] Based on this, in the embodiments of the present disclosure, traffic scheduling is used to alleviate or avoid network congestion, which can reduce the number of GPUs that need to be slowed down, thereby ensuring data transmission and processing efficiency.

[0108] In terms of specific scheduling methods, the embodiments of the present disclosure provide three scheduling methods, which can be respectively called on-demand scheduling, full scheduling and enhanced scheduling.

[0109] The three scheduling methods mentioned above are described below respectively.

[0110] Figure 6 It is a schematic diagram according to the second embodiment of the present disclosure. This embodiment provides a method for handling network congestion.

[0111] This embodiment takes on-demand scheduling as an example. Figure 6 As shown, the method includes:

[0112] 601. When congestion occurs in a target network, monitoring data of a preset duration is obtained; the target network includes a target switch, and the target switch is used to control an access device to reduce speed through congestion notification.

[0113] For example, when network congestion occurs, monitoring data of a preset duration (30 seconds) can be collected for subsequent traffic scheduling.

[0114] In large-scale model calculations, it is generally divided into GPU independent calculation processes and data synchronization processes between GPUs. Accordingly, the traffic in the target network can be divided into peak parts (corresponding to data synchronization) and trough parts (corresponding to independent calculations). Therefore, the above-mentioned monitoring data can specifically be the data of the peak part, and traffic scheduling is performed based on these data. Moreover, since the flows of different peaks are usually consistent, the scheduling strategy determined based on the monitoring data corresponding to a peak can be used for the scheduling of data flows corresponding to subsequent peaks.

[0115] 602. Determine, based on the monitoring data, a data flow to be scheduled from the initial data flow within the preset time period, the data flow to be scheduled comprising: a data flow on a congested port among the candidate ports.

[0116] refer to Figure 2 ,When the monitoring platform monitors the target network (physical network), it can be informed of the ,congestion event and send it to the controller.

[0117] After receiving a congestion event, the controller can delay processing after a set period of time (such as 30 seconds). In this way, the monitoring data within the set period of time can be collected through the monitoring platform. Based on the monitoring data, the congested port and the data flow on the congested port can be determined, thereby obtaining the data flow to be scheduled.

[0118] In addition, the rates of data flows in the target network may be different. Data flows with higher rates have a greater impact on network congestion. Therefore, in each scheduling method, the data flow to be scheduled may specifically meet the condition that the rate is greater than a preset value.

[0119] For example, some data flows in the target network have very high rates (tens or hundreds of G), while some have very low rates (tens or hundreds of M). A statistical method, such as the average or variance, can be used to calculate the threshold, and then the data flows with a rate greater than the threshold can be scheduled.

[0120] 603. Obtain a target load of a candidate port of the target switch.

[0121] Taking the target switch as an access switch as an example, the uplink port of the access switch can be used as a candidate port, and each uplink port of the access switch is traversed in turn to calculate its target load. In order to improve the effectiveness, the traversed ports may not include congested ports and faulty ports.

[0122] Specifically, the uplink load and the downlink load of the candidate port may be obtained based on the number of specific data flows; the specific data flow is a data flow with a transmission rate greater than a preset value; and the target load may be obtained based on the uplink load and the downlink load.

[0123] refer to Figure 4 The uplink port of the access switch can transmit uplink data and downlink data. The load obtained based on the uplink data is called the uplink load, and the load obtained based on the downlink data is called the downlink load.

[0124] In this embodiment, the uplink load and the downlink load are determined according to the number of specific data streams, which are data streams with a transmission rate greater than a preset value. That is, the uplink load and the downlink load can be determined based on the number of data streams with a faster transmission rate, and then the target load can be obtained based on the uplink load and the downlink load.

[0125] The load is determined based on the number of specific data flows. The load can also be determined based on port rate, bandwidth usage, etc. However, in a GPU scenario, the number of specific data flows (data flows with higher rates) can more realistically reflect the load situation.

[0126] In this embodiment, the uplink and downlink loads are obtained based on the number of specific data flows. Since the specific data flows have a greater impact on network congestion, the uplink and downlink loads can be accurately and truly obtained, thereby obtaining a more accurate target load.

[0127] Furthermore, the number of the specific data flows in the upstream data flows of the candidate port may be used as the upstream load; and the number of the specific data flows in the downstream data flows of the candidate port may be used as the downstream load.

[0128] For example, assuming that the number of specific data flows in the upstream data flow is represented by n1 (a positive integer), the upstream load load1=n1; assuming that the number of specific data flows in the downstream data flow is represented by n2 (a positive integer), the downstream load load2=n2.

[0129] In this embodiment, the number of specific data flows is used as the load in the corresponding direction, so that the target load can be obtained simply and efficiently.

[0130] Furthermore, the sum of the squares of the uplink load and the downlink load may be used as the target load.

[0131] For example, the formula is: load = load1*load1+load2*load2 = n1 2 +n2 2 .

[0132] Among them, load is the target load, load1 is the uplink load, and load2 is the downlink load.

[0133] In this embodiment, the target load is obtained based on the square sum of the uplink and downlink loads, which can make the scheduling result more balanced and improve the network performance.

[0134] 604. Determine a target port from the candidate ports based on the target load.

[0135] For example, a candidate port with the smallest target load is used as the target port.

[0136] Figure 7 This is a schematic diagram of the load of an uplink port of an access switch in an on-demand scheduling scenario provided according to an embodiment of the present disclosure.

[0137] See also Figure 7 , taking two ports as an example, after calculation, the target load (the sum of the squares of the upstream load and the downstream load) of the second port is the smallest, and the second port is used as the target port.

[0138] In addition, the load is usually calculated by directly adding the upstream and downstream loads. If the loads are directly added, the loads of the first port and the second port are the same. At this time, if the first port is used as the target port, it is not conducive to load balancing. However, by using the square sum method of this embodiment, it can be determined that the second port is the target port, which is conducive to load balancing.

[0139] 605. Schedule the data flow to be scheduled to the target port to obtain a target data flow; wherein the number of congestion notifications corresponding to the target data flow is less than the number of congestion notifications corresponding to the initial data flow.

[0140] For example, based on the above example, the data flow to be scheduled may be scheduled to the second port.

[0141] Furthermore, there may be multiple data streams to be scheduled. In this case, they can be scheduled one by one or in batches. When scheduling one by one, multiple ACLs can be sent, and each ACL is used to schedule one data stream to be scheduled. Alternatively, multiple ACLs can be sent at one time, and each ACL corresponds to one data stream to be scheduled, to achieve batch scheduling.

[0142] Furthermore, the average value of the target load on the candidate ports can be calculated. For the congested ports, scheduling can be started from the data flow with the highest transmission rate, and scheduling can be stopped when the remaining load on the congested port reaches the average value or there is no better port.

[0143] In addition, the above takes ACL-based scheduling as an example, and scheduling can also be performed by configuring static routes.

[0144] In this embodiment, on-demand scheduling can be achieved by scheduling the data flow on the congested port.

[0145] Figure 8 It is a schematic diagram according to the third embodiment of the present disclosure. This embodiment provides a method for handling network congestion.

[0146] This embodiment takes full-volume scheduling as an example. Figure 8 As shown, the method includes:

[0147] 801. When congestion occurs in a target network, obtain monitoring data of a preset duration; the target network includes a target switch, and the target switch is used to control an access device to reduce speed through congestion notification.

[0148] For example, when network congestion occurs, monitoring data of a preset duration (30 seconds) can be collected for subsequent traffic scheduling.

[0149] In large-scale model calculations, it is generally divided into GPU independent calculation processes and data synchronization processes between GPUs. Accordingly, the traffic in the target network can be divided into peak parts (corresponding to data synchronization) and trough parts (corresponding to independent calculations). Therefore, the above-mentioned monitoring data can specifically be the data of the peak part, and traffic scheduling is performed based on these data. Moreover, since the flows of different peaks are usually consistent, the scheduling strategy determined based on the monitoring data corresponding to a peak can be used for the scheduling of data flows corresponding to subsequent peaks.

[0150] 802. Based on the monitoring data, determine a data flow to be scheduled from the initial data flow within the preset duration, where the data flow to be scheduled includes: all data flows within the preset duration.

[0151] refer to Figure 2 ,When the monitoring platform monitors the target network (physical network), it can be informed of the ,congestion event and send it to the controller.

[0152] After receiving a congestion event, the controller can delay processing after a set period of time (such as 30 seconds). In this way, the monitoring data within the set period of time can be collected through the monitoring platform, and subsequent processing can be performed based on the monitoring data, such as treating all data flows collected within the set period of time as data flows to be scheduled.

[0153] In addition, the rates of data flows in the target network may be different. Data flows with higher rates have a greater impact on network congestion. Therefore, in each scheduling method, the data flow to be scheduled may specifically meet the condition that the rate is greater than a preset value.

[0154] 803. Obtain a target load of a candidate port of the target switch.

[0155] Taking the target switch as an access switch as an example, the uplink port of the access switch can be used as a candidate port, and each uplink port of the access switch is traversed in turn to calculate its target load. In order to improve the effectiveness, the traversed ports may not include congested ports and faulty ports.

[0156] Specifically, the uplink load and the downlink load of the candidate port can be obtained based on the number of specific groups; the specific group is composed of data streams that meet preset conditions; the specific data stream is a data stream with a transmission rate greater than a preset value; based on the uplink load and the downlink load, the target load is obtained.

[0157] refer to Figure 4 The uplink port of the access switch can transmit uplink data and downlink data. The load obtained based on the uplink data is called the uplink load, and the load obtained based on the downlink data is called the downlink load.

[0158] In this embodiment, the uplink load and the downlink load are determined according to the number of specific groups, and the specific groups are composed of data flows that meet preset conditions.

[0159] The preset condition is, for example, to group data flows with the same source IP address as a specific group, and / or to group data flows with the same destination IP address as a specific group.

[0160] Specifically, the specific group may include: a first group and a second group, wherein the first group is composed of data flows having the same source IP address, and the second group is composed of data flows having the same destination IP address.

[0161] Taking the communication between GPUs as an example, the data stream sent by the same source GPU is regarded as a specific group, specifically the first group; the data stream received by the same destination GPU is regarded as a specific group, specifically the second group.

[0162] In this way, data flows can be divided into multiple groups based on the source IP address and the destination IP address, and traffic scheduling can be performed on a group basis. For example, data flows with the same source IP address can be transmitted through the same uplink port, so that data flows sent by the same GPU can be transmitted through the same uplink port of the access switch, which facilitates unified management and control of the traffic of the same GPU.

[0163] In this embodiment, the uplink and downlink loads are obtained based on the number of specific groups, and traffic scheduling can be performed based on the groups, thereby improving management and control performance.

[0164] Furthermore, the minimum value between the number of the first group and the number of the second group in the upstream data flow of the candidate port can be obtained, and the minimum value can be used as the upstream load; the upper-layer switch load corresponding to the candidate port is used as the downstream load, and the upper-layer switch load is determined based on the minimum value between the number of the first group and the number of the second group in the downstream data flow.

[0165] For example, the uplink load is represented by load1, load1=min(the number of the first group, the number of the second group)=min(the number of sip addresses, the number of dip addresses), where sip is the source IP address in the uplink data flow, and dip is the destination IP address in the uplink data flow.

[0166] The downstream load is represented by load2.

[0167] l i It represents the load of the jth upper switch (such as aggregation switch) actually used by multiple data flows with the same source IP address (sip) in the downstream data flow; m represents the number of upper switches (such as aggregation switches) available for these data flows; the load of the upper switch is the minimum value between the number of sip addresses and the number of dip addresses in its downstream data flow.

[0168] For example, the square sum of the load (downstream minimum value) of the aggregation switches corresponding to the first port and the second port is 2 and 8 respectively, and the number of available aggregation switches m=2, then

[0169] In this embodiment, the number of specific groups is used as the uplink load, and the downlink load is determined based on the number of specific groups and the number of corresponding upper-layer switches. The load in the corresponding direction can be accurately and reasonably obtained, so that the target load can be obtained simply and efficiently.

[0170] Furthermore, the sum of the squares of the uplink load and the downlink load may be used as the target load.

[0171] For example, it can be expressed as: load=load1*load1+load2*load2.

[0172] Among them, load is the target load, load1 is the uplink load, and load2 is the downlink load.

[0173] In this embodiment, the target load is obtained based on the square sum of the uplink and downlink loads, so that more attention can be paid to the uplink data flow, congestion of the uplink data flow can be avoided, and network performance can be improved.

[0174] In addition, in order to improve accuracy, the memory data may be cleared before step 803, and then step 803 and subsequent steps may be executed.

[0175] 804. Determine a target port from the candidate ports based on the target load.

[0176] For example, a candidate port with the smallest target load is used as the target port.

[0177] Figure 9a This is a load diagram of an uplink port of an access switch in a full-volume scheduling scenario provided according to an embodiment of the present disclosure.

[0178] Figure 9b yes Figure 9a Corresponding data transmission diagram.

[0179] Combination Figure 9a and Figure 9b Taking two ports as an example, the uplink minimum value and the downlink minimum value refer to the minimum value of the number of source IP addresses (sip) and the destination IP address (dip) in the corresponding direction. Taking the number of available aggregation switches m=2 as an example, after calculation, the target load of the second port (the sum of the squares of the uplink load and the downlink load) is the smallest, then the second port is used as the target port.

[0180] 805. Schedule the data flow to be scheduled to the target port to obtain a target data flow; wherein the number of congestion notifications corresponding to the target data flow is less than the number of congestion notifications corresponding to the initial data flow.

[0181] For example, based on the above example, the target data flow may be scheduled to the second port.

[0182] Specifically, multiple ACLs are sent at one time, each ACL corresponds to a data flow to be scheduled, so as to realize batch scheduling.

[0183] In this way, data flows with the same source IP address can be scheduled to the same upstream port of the access switch with the minimum target load, so that the upstream data flow of the access switch is not congested and the downstream data flow is as little congested as possible.

[0184] In addition, the above takes ACL-based scheduling as an example, and scheduling can also be performed by configuring static routes.

[0185] In this embodiment, full scheduling can be achieved by scheduling the full data stream.

[0186] Fig.10 It is a schematic diagram according to the fourth embodiment of the present disclosure. This embodiment provides a method for handling network congestion.

[0187] This embodiment takes enhanced scheduling as an example, as shown in FIG9 , the method includes:

[0188] 1001. Route the initial data flow based on the ingress port information of the initial data flow on the target switch.

[0189] The initial data flow refers to the data flow transmitted in the target network before congestion.

[0190] Usually, routing is based on the quintuple of data flow, but in this embodiment, it is based on the ingress port information of the data flow, such as the ingress port information may be the ingress port number.

[0191] Specifically, a hash operation can be performed on the inbound port number of the initial data flow, and the outbound port can be determined according to the hash operation result. Alternatively, a mapping relationship between the downlink port and the outbound port of the target switch can be pre-configured, and the corresponding outbound port (uplink port) can be obtained based on the mapping relationship and the inbound port (downlink port) of the initial data flow.

[0192] In this way, data streams with the same source IP address can be output from the same uplink port of the access switch and evenly distributed on the uplink port, thereby improving network transmission performance.

[0193] 1002. When congestion occurs in a target network, monitoring data of a preset duration is obtained; the target network includes a target switch, and the target switch is used to control the access device to reduce the speed through congestion notification.

[0194] 1003. Based on the monitoring data, determine a data flow to be scheduled in the initial data flow of the preset duration, and obtain a target load of a candidate port of the target switch.

[0195] 1004. Determine a target port from the candidate ports based on the target load.

[0196] 1005. Schedule the data flow to be scheduled to the target port to obtain a target data flow; wherein the number of congestion notifications corresponding to the target data flow is less than the number of congestion notifications corresponding to the initial data flow.

[0197] For example, when network congestion occurs, on-demand scheduling can be used for scheduling. The specific content of on-demand scheduling can refer to the above related description.

[0198] In this embodiment, the initial data flow is routed based on the ingress port information, and on-demand scheduling is performed after congestion, thereby achieving enhanced scheduling.

[0199] In some embodiments, after determining the target port by any scheduling method, the following steps may be performed:

[0200] If the target port or the upper layer switch corresponding to the target port fails, the target data flow is routed based on a preset routing policy.

[0201] The target port may be an uplink port of an access switch, and the upper switch is an aggregation switch. Therefore, after a failure occurs in the access switch or the aggregation switch, routing may be performed based on a preset routing policy, such as ECMP.

[0202] The above failures include link failures, device failures, and BGP failures caused by various reasons, including link isolation and device isolation. From the controller's perspective, if a port becomes unreachable, it is considered a failure.

[0203] From the perspective of data flow, faults are divided into two categories: local faults (upstream on access switches) and remote faults (downstream on aggregation switches). For these two types of faults, you can perform the following operations:

[0204] Local failure: When a port fails, ECMP convergence is directly triggered. At the same time, it is detected whether there is an ACL that uses this port as the egress port. If so, the ACL is directly set to invalid, allowing traffic to converge quickly based on ECMP routing.

[0205] Remote failure: When the access switch at the source end finds that the next hop of the route has changed, it searches through BGP to see whether there is an ACL corresponding to the destination IP address that uses the faulty port. If there is, it is set to invalid, allowing the traffic to be routed based on ECMP to complete convergence.

[0206] In this embodiment, by performing routing based on a preset routing strategy after a failure, network transmission reliability can be improved.

[0207] In order to verify the relevant performance of traffic scheduling, the GPU cluster is tested based on the AllGather primitive, taking congestion management based on ECN as an example: after the controller receives the congestion event, it collects 30 seconds of data, performs on-demand scheduling based on the data, and sends the ACL to the physical network. After the ACL takes effect, the network congestion is significantly reduced, the number of ECN identifiers received by the access switch and the aggregation switch is significantly reduced, and the overall data transmission rate of the GPU increases. After clearing the issued ACL, the network congestion increases and the overall data transmission rate of the GPU decreases.

[0208] Based on this, traffic scheduling can effectively alleviate network congestion, increase the overall GPU data transmission rate, and improve network communication performance.

[0209] Fig.11 This is a schematic diagram according to the fifth embodiment of the present disclosure. This embodiment provides a network congestion processing device, the device 1100 includes: a first acquisition module 1101, a second acquisition module 1102, a determination module 1103 and a control module 1104.

[0210] The first acquisition module 1101 is used to obtain monitoring data of a preset duration when congestion occurs in the target network; the target network includes a target switch, and the target switch is used to control the access device to slow down through congestion notification; the second acquisition module 1102 is used to determine the data flow to be scheduled in the initial data flow within the preset duration according to the monitoring data, and obtain the target load of the candidate port of the target switch; the determination module 1103 is used to determine the target port in the candidate port according to the target load; the scheduling module 1104 is used to schedule the data flow to be scheduled to the target port to obtain the target data flow; wherein the number of congestion notifications corresponding to the target data flow is less than the number of congestion notifications corresponding to the initial data flow.

[0211] In this embodiment, when the network is congested, the number of congestion notifications can be reduced by performing traffic scheduling. Compared with the method of controlling GPU speed reduction based only on PFC or ECN, the number of GPUs that need to be slowed down can be effectively reduced, which can improve the overall GPU transmission rate and thus improve data processing efficiency; scheduling is performed in units of data streams, rather than AR processing in units of messages, which can ensure that the same data stream is transmitted through the same link to avoid disorder problems; therefore, when the network is congested, network communication performance can be improved through traffic scheduling.

[0212] In some embodiments, the data flow to be scheduled includes: a data flow on a congested port among the candidate ports; and the second acquisition module 1102 is further configured to:

[0213] Based on the number of specific data flows, obtaining the uplink load and the downlink load of the candidate port; the specific data flow is a data flow with a transmission rate greater than a preset value;

[0214] The target load is determined based on the uplink load and the downlink load.

[0215] In this embodiment, the uplink and downlink loads are obtained based on the number of specific data flows. Since the specific data flows have a greater impact on network congestion, the uplink and downlink loads can be accurately and truly obtained, thereby obtaining a more accurate target load.

[0216] In some embodiments, the second acquisition module 1102 is further configured to:

[0217] Taking the number of the specific data flows in the upstream data flow of the candidate port as the upstream load;

[0218] The number of the specific data flows in the downstream data flows of the candidate port is used as the downstream load.

[0219] In this embodiment, the number of specific data flows is used as the load in the corresponding direction, so that the target load can be obtained simply and efficiently.

[0220] In some embodiments, the data stream to be scheduled includes: all data streams within a preset time period in the target network; the second acquisition module 1102 is further used to:

[0221] Based on the number of specific groups, the uplink load and the downlink load of the candidate port are obtained; the specific group is composed of data flows that meet preset conditions;

[0222] The target load is acquired based on the uplink load and the downlink load.

[0223] In this embodiment, the uplink and downlink loads are obtained based on the number of specific groups, and traffic scheduling can be performed based on the groups, thereby improving management and control performance.

[0224] In some embodiments, the specific group includes a first group and a second group, the first group is composed of data flows having the same source IP address, and the second group is composed of data flows having the same destination IP address; the second acquisition module 1102 is further used to:

[0225] Obtaining a minimum value between the number of the first group and the number of the second group in the upstream data flow of the candidate port, and taking the minimum value as the upstream load;

[0226] The upper switch load corresponding to the candidate port is used as the downlink load, and the upper switch load is determined based on the minimum value of the number of the first group and the number of the second group in the downlink data flow.

[0227] In this embodiment, the number of specific groups is used as the uplink load, and the downlink load is determined based on the number of specific groups and the number of corresponding upper-layer switches. The load in the corresponding direction can be accurately and reasonably obtained, so that the target load can be obtained simply and efficiently.

[0228] In some embodiments, the second acquisition module 1102 is further configured to:

[0229] The sum of the squares of the uplink load and the downlink load is used as the target load.

[0230] In this embodiment, the target load is obtained based on the square sum of the uplink and downlink loads, which can make the scheduling result more balanced and improve the network performance.

[0231] In some embodiments, the apparatus 1100 further includes:

[0232] The routing module is used to route the initial data flow based on the ingress port information of the initial data flow on the target switch before a congestion event occurs in the target network.

[0233] In this embodiment, the initial data flow is routed based on the inbound port information, so that data flows with the same source IP address are output from the same uplink port of the access switch and are evenly distributed on the uplink port, thereby improving network transmission performance.

[0234] In some embodiments, the apparatus 1100 further includes:

[0235] The processing module is used to route the target data flow based on a preset routing strategy if the target port or the upper layer switch corresponding to the target port fails.

[0236] In this embodiment, by performing routing based on a preset routing strategy after a failure, network transmission reliability can be improved.

[0237] It can be understood that in the embodiments of the present disclosure, the same or similar contents in different embodiments can be referenced to each other.

[0238] It can be understood that the “first”, “second”, etc. in the embodiments of the present disclosure are only used for distinction and do not indicate the degree of importance, time sequence, etc.

[0239] It is understandable that, unless otherwise specified, the order of the steps in the process indicates that the timing relationship between these steps is not limited.

[0240] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0241] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0242] Fig.12A schematic block diagram of an example electronic device 1200 that can be used to implement an embodiment of the present disclosure is shown. The electronic device 1200 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0243] like Fig.12 As shown, the electronic device 1200 includes a computing unit 1201, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1202 or a computer program loaded from a storage unit 1208 into a random access memory (RAM) 1203. In the RAM 1203, various programs and data required for the operation of the electronic device 1200 can also be stored. The computing unit 1201, the ROM 1202, and the RAM 1203 are connected to each other via a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.

[0244] Multiple components in the electronic device 1200 are connected to the I / O interface 1205, including: an input unit 1206, such as a keyboard, a mouse, etc.; an output unit 1207, such as various types of displays, speakers, etc.; a storage unit 1208, such as a disk, an optical disk, etc.; and a communication unit 1209, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1209 allows the electronic device 1200 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0245] The computing unit 1201 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1201 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1201 performs the various methods and processes described above, such as a network congestion processing method. For example, in some embodiments, the network congestion processing method may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 1208. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 1200 via the ROM 1202 and / or the communication unit 1209. When the computer program is loaded into the RAM 1203 and executed by the computing unit 1201, one or more steps of the network congestion processing method described above may be performed. Alternatively, in other embodiments, the computing unit 1201 may be configured to execute the network congestion handling method in any other appropriate manner (eg, by means of firmware).

[0246] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0247] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable information recommendation device, so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

[0248] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0249] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0250] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0251] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.

[0252] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0253] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A method for handling network congestion, comprising: When congestion occurs in the target network, obtain monitoring data for a preset time period; The target network includes a target switch, and the target switch is used to control the access device to reduce the speed through congestion notification; Based on the monitoring data, determining the data flow to be scheduled in the initial data flow within the preset time period, and obtaining the target load of the candidate port of the target switch; Based on the target load, determining a target port among the candidate ports; Scheduling the data flow to be scheduled to the target port to obtain a target data flow; The number of congestion notifications corresponding to the target data flow is smaller than the number of congestion notifications corresponding to the initial data flow.

2. The method according to claim 1, wherein: The data flow to be scheduled includes: a data flow on a congested port among the candidate ports; The obtaining of the target load of the candidate port of the target switch in the target network includes: Based on the number of specific data flows, obtaining the uplink load and the downlink load of the candidate port; the specific data flow is a data flow with a transmission rate greater than a preset value; The target load is acquired based on the uplink load and the downlink load.

3. The method according to claim 2, wherein: The acquiring the uplink load and the downlink load of the candidate port based on the number of specific data flows includes: Taking the number of the specific data flows in the upstream data flow of the candidate port as the upstream load; The number of the specific data flows in the downstream data flows of the candidate port is used as the downstream load.

4. The method according to claim 1, wherein: The data streams to be scheduled include: all data streams within the preset time length; The obtaining of the target load of the candidate port of the target switch in the target network includes: Based on the number of specific groups, the uplink load and the downlink load of the candidate port are obtained; the specific group is composed of data flows that meet preset conditions; The target load is acquired based on the uplink load and the downlink load.

5. The method according to claim 4, wherein: The specific group includes a first group and a second group, the first group is composed of data flows having the same source IP address, and the second group is composed of data flows having the same destination IP address; The acquiring the uplink load and the downlink load of the candidate port based on the number of the specific groups includes: Obtaining a minimum value between the number of the first group and the number of the second group in the upstream data flow of the candidate port, and taking the minimum value as the upstream load; The upper switch load corresponding to the candidate port is used as the downlink load, and the upper switch load is determined based on the minimum value of the number of the first group and the number of the second group in the downlink data flow.

6. The method according to claim 2 or 4, wherein The determining the target load based on the uplink load and the downlink load includes: The sum of the squares of the uplink load and the downlink load is used as the target load.

7. The method according to claim 1, further comprising: Before congestion occurs in the target network, the initial data flow is routed based on the ingress port information of the initial data flow on the target switch.

8. The method according to claim 1, further comprising: If the target port or the upper layer switch corresponding to the target port fails, the target data flow is routed based on a preset routing policy.

9. A network congestion processing device, comprising: A first acquisition module, used to acquire monitoring data of a preset duration when congestion occurs in the target network; The target network includes a target switch, and the target switch is used to control the access device to reduce the speed through congestion notification; A second acquisition module is used to determine the data flow to be scheduled in the initial data flow within the preset time period according to the monitoring data, and to obtain the target load of the candidate port of the target switch; A determination module, configured to determine a target port from among the candidate ports according to the target load; A scheduling module, used for scheduling the data flow to be scheduled to the target port to obtain a target data flow; The number of congestion notifications corresponding to the target data flow is smaller than the number of congestion notifications corresponding to the initial data flow.

10. The device according to claim 9, wherein: The data flow to be scheduled includes: a data flow on a congested port among the candidate ports; The second acquisition module is further used for: Based on the number of specific data flows, obtaining the uplink load and the downlink load of the candidate port; the specific data flow is a data flow with a transmission rate greater than a preset value; The target load is determined based on the uplink load and the downlink load.

11. The device according to claim 10, wherein: The second acquisition module is further used for: Taking the number of the specific data flows in the upstream data flow of the candidate port as the upstream load; The number of the specific data flows in the downstream data flows of the candidate port is used as the downstream load.

12. The device according to claim 9, wherein: The data streams to be scheduled include: all data streams within the preset time length; The second acquisition module is further used for: Based on the number of specific groups, the uplink load and the downlink load of the candidate port are obtained; the specific group is composed of data flows that meet preset conditions; The target load is acquired based on the uplink load and the downlink load.

13. The device according to claim 12, wherein: The specific group includes a first group and a second group, the first group is composed of data flows having the same source IP address, and the second group is composed of data flows having the same destination IP address; The second acquisition module is further used for: Obtaining a minimum value between the number of the first group and the number of the second group in the upstream data flow of the candidate port, and taking the minimum value as the upstream load; The upper switch load corresponding to the candidate port is used as the downlink load, and the upper switch load is determined based on the minimum value of the number of the first group and the number of the second group in the downlink data flow.

14. The device according to claim 10 or 12, wherein: The second acquisition module is further used for: The sum of the squares of the uplink load and the downlink load is used as the target load.

15. The apparatus according to claim 9, further comprising: The routing module is used to route the initial data flow based on the ingress port information of the initial data flow on the target switch before a congestion event occurs in the target network.

16. The apparatus according to claim 9, further comprising: The processing module is used to route the target data flow based on a preset routing strategy if the target port or the upper layer switch corresponding to the target port fails.

17. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 8.

18. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-8.

19. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 8.

Citation Information

Cited By

  • Equipment connection method and device, electronic equipment and storage medium

    CN120281807A

  • Device connection method, device, electronic device, and storage medium

    CN120281807B