Congestion control method and device, storage medium and electronic device

By setting specified field values ​​in the data packet header and using an exponential function to adjust the packet sending rate, the problem of slow response speed of congestion control in the existing technology is solved, and the network can respond quickly and improve stability during congestion.

CN118524065BActive Publication Date: 2024-10-01INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202410998250.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-24
Publication Date
2024-10-01
Estimated Expiration
2044-07-24

AI Technical Summary

Technical Problem

In the existing technology, it is relatively slow to initiate speed-down measures or speed-up measures when network transmission data encounters congestion, and the speed-up and speed-down trends are not smooth enough, resulting in slow congestion control response.

Method used

By setting a specified field value in the data packet header to indicate that the congestion notification is allowed to be received, and when a congestion notification message is received, the packet sending rate of the sender is adjusted based on an exponential function. The packet sending rate of the sender is consistent with the packet sending rate cached in the buffer area of ​​the network device. is exponentially related to the number of packets.

Benefits of technology

This enables the network to quickly and promptly reduce the data transmission rate when it encounters congestion, solves the problem of slow control response, and improves network performance and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118524065B_ABST
    Figure CN118524065B_ABST
Patent Text Reader

Abstract

An embodiment of the present application provides a congestion control method and apparatus, a storage medium and an electronic device, wherein the method comprises: setting the field value of the first field of the data packet header of the first data packet to a first field value, wherein the first field value is used to indicate that the sender allows receiving congestion notifications; sending the first data packet to a network device, wherein the network device is used to forward the data packets sent by the sender to the receiving end to the receiving end in sequence; upon receiving a congestion notification message, adjusting the packet sending rate of the sender based on a first number indicated by the congestion notification message, wherein the congestion notification message is used to notify the occurrence of network congestion, the first number is the number of data packets cached in a cache area of ​​the network device that cannot be forwarded to the receiving end, and the packet sending rate of the sender is exponentially related to the number of data packets cached in the cache area of ​​the network device, thereby solving the problem of slow control response speed in the congestion control method in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of data communications, and more specifically, to a congestion control method and device, a storage medium, and an electronic device. Background Art

[0002] In data communication systems, in order to increase the speed of data packet transmission between computing devices, RDMA (Remote Direct Memory Access) technology is usually used for connection. RDMA technology directly transfers data to the computer's storage area through the network, quickly moving data from one system to the remote system memory without the intervention of the operating system or kernel of the two computing devices.

[0003] When the traffic in the network is too large and congestion occurs (the traffic of packets sent from a certain source port may be relatively large in a certain period of time), DCQCN (Data Center Quantized Congestion Notification) stipulates that the CP (Congestion Point) device marks the data packet with RED (Random Early Detection) and ECN (Explicit Congestion Notification). For the receiving end that supports the RoCE protocol, when the receiving end receives a packet carrying the ECN mark, it sends an independent CNP (Congestion Notification Packet) packet to the sending end to notify the network congestion. The sending end reduces the sending rate of subsequent data packets to a certain value based on the CNP packet to eliminate congestion.

[0004] However, the network transmission data in the related art starts the speed reduction measures or the subsequent speed increase measures when encountering congestion, and the speed increase and speed reduction trends are not smooth enough. Therefore, the congestion control method in the related art has the problem of slow control response speed. Summary of the invention

[0005] The embodiments of the present application provide a congestion control method and device, a storage medium, and an electronic device to at least solve the problem of slow control response speed in the congestion control method in the related art.

[0006] According to one embodiment of the present application, a congestion control method is provided, comprising: setting the field value of the first field of the data packet header of a first data packet to a first field value, wherein the first field value is used to indicate that a sender allows receiving congestion notifications, and the first data packet is a data packet to be sent to a receiving end; sending the first data packet to a network device, wherein the network device is used to forward the data packets sent by the sender to the receiving end to the receiving end in sequence; upon receiving a congestion notification message, adjusting the packet sending rate of the sender based on a first number indicated by the congestion notification message, wherein the congestion notification message is used to notify the occurrence of network congestion, the first number is the number of data packets cached in a cache area of ​​the network device that cannot be forwarded to the receiving end, and the packet sending rate of the sender is exponentially related to the number of data packets cached in the cache area of ​​the network device.

[0007] According to another embodiment of the present application, a congestion control device is provided, comprising: a first setting unit, configured to set the field value of a first field of a data packet header of a first data packet to a first field value, wherein the first field value is used to indicate that a sender allows receiving congestion notifications, and the first data packet is a data packet to be sent to a receiving end; a first sending unit, configured to send the first data packet to a network device, wherein the network device is configured to sequentially forward data packets sent by the sender to the receiving end to the receiving end; and an adjustment unit, configured to adjust the packet sending rate of the sender based on a first number indicated by the congestion notification message when a congestion notification message is received, wherein the congestion notification message is used to notify that network congestion has occurred, the first number is the number of data packets cached in a cache area of ​​the network device that cannot be forwarded to the receiving end, and the packet sending rate of the sender is exponentially related to the number of data packets cached in the cache area of ​​the network device.

[0008] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.

[0009] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0010] According to another embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0011] Through the present application, an exponential function is used to adjust the packet sending rate of the sender. Adjusting the packet sending rate based on the exponential function can enable the data transmission rate to be reduced promptly and quickly when the network encounters congestion, thereby solving the problem of slow control response speed in the congestion control method in the related art. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 It is a hardware structure block diagram of an application scenario of a congestion control method in an embodiment of the present application.

[0013] Figure 2 It is a flow chart of a congestion control method according to an embodiment of the present application.

[0014] Figure 3 This is a port routing diagram according to an embodiment of the present application.

[0015] Figure 4 This is a queue threshold schematic diagram in the related art.

[0016] Figure 5 It is a speed increase schematic diagram in the related technology.

[0017] Figure 6 It is a schematic diagram of a congestion control loop in the related technology.

[0018] Figure 7 It is a schematic diagram of speed reduction of a congestion control method according to an embodiment of the present application.

[0019] Figure 8 It is a schematic diagram of speed increase of a congestion control method according to an embodiment of the present application.

[0020] Fig. 9 It is a structural block diagram of an optional congestion control device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0021] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0022] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0023] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0024] The method embodiments provided in the embodiments of the present application can be applied to scenarios for controlling network congestion to prevent network resource overload and ensure the efficiency and reliability of data transmission.

[0025] Here, the network includes but is not limited to at least one of the following: a data center network; a high-speed network environment; a TCP / IP network; real-time audio and video transmission; an asynchronous transfer mode (ATM) network.

[0026] like Figure 1 As shown, the hardware devices involved may include: a sending end, a network device, and a receiving end.

[0027] Network devices may include but are not limited to routers, switches, etc.

[0028] Router: Responsible for forwarding data packets in the network. Its memory size is limited. Excessive traffic may cause the router to be unable to handle it, thus causing congestion.

[0029] Switch: A device commonly used in data centers that supports lossless flow control technologies such as PFC (priority flow control) and can prioritize the transmission of critical data when the network is congested.

[0030] The sender or receiver can be, but is not limited to, a NIC (Network Interface Card), a hardware device that connects the server to the network and supports RDMA technology, enabling high-throughput, low-latency data transmission.

[0031] In this embodiment, a congestion control method is provided. Figure 2 is a flow chart of a congestion control method according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:

[0032] Step S202: Set the field value of the first field of the data packet header of the first data packet to a first field value, wherein the first field value is used to indicate that the sender is allowed to receive congestion notifications, and the first data packet is a data packet to be sent to the receiver.

[0033] The congestion control method in this embodiment can be applied to the scenario of controlling network congestion. Network congestion refers to the phenomenon that the network performance is degraded in the network because the number of data packets exceeds the processing capacity of network devices (such as routers, switches, etc.). Congestion may cause data packet delay, loss and reduced network efficiency.

[0034] To understand the congestion propagation problem, consider Figure 3As shown in the port routing diagram. Assume that ports A to E on switch 1 are all sending network packets to port G, so that port G receives and forwards data at 100% capacity. Assume that port F on the adjacent switch 2 is also sending data to port G on switch 1 at a rate of 20% of the entire link bandwidth. Because the egress of port G is already full, port F will retransmit the data packet until it is paused by the flow control mechanism. At this time, port G will be congested, but there is no negative effect at this time because all ports will be served by port G as soon as possible.

[0035] Now consider a port X on switch 2 sending data to port Y on switch 1 at 20% of the link bandwidth. Port G, the source of congestion, is not on the path from port X to port Y. In this case, it is not ideal that port F is using only 20% of the bandwidth of the inter-switch link. The remaining 90% of the bandwidth is available to port X because the traffic from port F eventually triggers the flow control mechanism to suspend the inter-switch link and reduce the traffic from port X to 20% instead of the potential 90% bandwidth.

[0036] Congestion control is used to reduce packet loss in lossy networks or the propagation of congestion in lossless networks. It also reduces switch buffer usage, which reduces latency and improves tolerance for bursty traffic. The approach used is to limit the injection rate of network flows to the port (AF) that is the root cause of the congestion, so that network flows from other ports (X) are not affected. By limiting the injection rate of port (AF) to the rate that port G can handle, there will be no significant performance degradation because the packets from port (AF) have to wait anyway, while packets sent from port X to port Y should be forwarded normally because the flow control mechanism will not send pause frames (the purpose of congestion control is to keep the switch buffer usage low, so the flow control mechanism will not be triggered). Current RoCE congestion control relies on ECN (Explicit Congestion Notification) to operate.

[0037] To signal congestion, congestion management (RCM) relies on the ECN mechanism defined in RFC 3168. Once RoCEv2 traffic is congested, the network device marks the ECN field in the IP header of the packet. This congestion indicator is interpreted by the destination terminal node according to the FECN congestion indicator in the BTH (Base Transport Header, which exists in the IB data segment). In other words, when the ECN-marked packets reach their original destination, the congestion notification will be fed back to the source node (i.e., the sender), and the source node will respond to the congestion notification by rate limiting the network packets for the problematic QP.

[0038] RCM is an optional specification behavior. A RoCEv2 host channel adapter that implements RCM should operate according to the following rules:

[0039] When a valid RoCEv2 packet is received, if the value of its IP.ECN field is '11' (binary), then the HCA shall generate a RoCEv2 CNP (Congestion Notification Packet) and send it back to the source node of the received packet. The HCA shall send a single CNP for multiple packets marked with the same QP by ECN (Explicit Congestion Notification).

[0040] When receiving a RoCEv2 CNP, the Host Channel Adapter should implement a slowdown injection rate for the QP marked in the RoCEv2 CNP. The amount of this rate change is determined by a configurable rate slowdown parameter.

[0041] The host channel governor SHOULD increase the network injection rate for an ECN marked QP when a configurable pause time has elapsed since the last received RoCEv2 CNP packet or a configurable number of bytes have been sent.

[0042] Marking congestion is a probability function of queue length. The queue threshold diagram is shown in Figure 4 As shown in Figure 2. The two thresholds of the egress queue size define the marking probability. When the queue length is below the lower threshold, the ECN bit will not be marked. When the queue length exceeds the upper threshold, all network packets transmitted from the queue will be ECN marked. When the queue length is between the two thresholds, the data packets will be ECN marked with a probability that increases linearly with the queue length.

[0043] The DC-QCN algorithm is defined by three parallel processes: α update (measuring congestion); speed reduction; speed increase.

[0044] Speed ​​reduction process: When the RP (Reaction Point, the sending end of the data flow), which refers to the network card, receives a CNP for a flow on the QCN protocol, the flow will be decelerated according to formulas (1), (2), and (3), and the target rate and alpha value will be updated.

[0045] R T = R C (1)

[0046] R C = R C (1-α / 2) (2)

[0047] α = (1-g)α +g (3)

[0048] Among them, R T is the target rate, R C is the current rate, and g is a constant ranging from 0 to 1.

[0049] Alpha update process: If the RP (Reaction Point, the sending end of the data stream, refers to the network card, and supports the QCN protocol) does not receive the CNP sent by the receiving end NP after K time units, the RP updates the alpha (i.e., α) value once, as shown in formula (4). The purpose of formula (4) is to gradually reduce the alpha value when there is no congestion. The value range of alpha is 0~1.

[0050] α = (1-g)α (4)

[0051] It should be noted that K has a longer generation cycle than CNP.

[0052] Speed-up process: RP uses the same speed-up method as QCN, that is, a timer and a byte counter are used to determine the speed-up rhythm. The byte counter triggers the speed-up after receiving B bytes, and the timer triggers the speed-up after every T time units. These two parameters (B, T) are adjustable to control the speed-up rhythm.

[0053] There are three types of speed increases, which usually occur in the following order:

[0054] 1. Fast recovery (fast recover);

[0055] 2. Additive increase;

[0056] 3. Hyper increase;

[0057] Combination Figure 5 In this embodiment, taking fast recovery as an example, for each speed-up event, the speed is set according to R T The distance is increased by half (that is, logarithmically approached), that is, formula (5) is adopted.

[0058] R C =(R C + R T) / 2 (5)

[0059] The congestion control loop in the related art can be as follows Figure 6 As shown, the injector (i.e., the sender), IP NETWORK, i.e., the network based on the IP protocol, which is the infrastructure of the Internet and can transmit various types of data packets, and the receiver, which refers to the party receiving data during the communication process, is used to receive and process data packets sent from the network.

[0060] Specifically, combined Figure 6 , the congestion control loop can be:

[0061] 1. The injector sets the ECN value '01' in the IP header.

[0062] 2.RoCEv2 packets are injected into the network.

[0063] 3. When a router receives a data packet on a congested queue, it does not discard it immediately. Instead, it may first check the ECN field to determine whether the ECN function is enabled. If so, it turns on the CE bit in the IP header.

[0064] 4. In case of congestion, the packets forwarded normally reach the receiver from the network.

[0065] 5. The receiver will filter the packets with the CE bit turned on and the type is RoCE, trigger the event, and then release the packets into the normal processing flow.

[0066] 6-7. To avoid the load caused by the generated traffic, the receiver should aggregate the congestion notifications generated for each QP. A CN packet is sent back to the injector QP within a few microseconds. The ECN bit in the packet is set to '01' to verify that the packet is not dropped by the IP router.

[0067] 8. The CNP packet is injected back into the network from the receiver.

[0068] 9. The IP router treats the CNP packet as a normal IP data packet.

[0069] 10. The CNP packet arrives at the source injector node. The injector node filters packets with ECN bits of '01' and type RoCE, and then applies the rate limiting algorithm to the indicated network flow.

[0070] However, when network transmission data encounters congestion, the speed reduction measures or subsequent speed increase measures are slow, and the speed increase and speed decrease trends are not smooth enough.

[0071] In order to at least partially solve the above problem, in this embodiment, an exponential function is used instead of a step function to achieve the purpose of rapidly reducing the network speed.

[0072] Optionally, in this embodiment, in order to avoid packet loss, a field value of a specified field may be set in the header of the data packet to indicate that congestion notification is allowed to be received.

[0073] For example, in this embodiment, the sender may set the ECN (Explicit Congestion Notification) value of the ECN field in the IP header of the data packet to 01, to indicate that the data packet supports ECN.

[0074] Step S204: sending a first data packet to a network device, wherein the network device is used to sequentially forward the data packets sent by the sending end to the receiving end to the receiving end.

[0075] Optionally, packets are injected into the network, and when the network device detects congestion, it marks it in the IP header of the packet. If the IP.ECN field value of the packet is '11' (binary).

[0076] In this embodiment, the network device may include but is not limited to a router, a switch, etc.

[0077] Step S206, when a congestion notification message is received, the packet sending rate of the sending end is adjusted based on a first quantity indicated by the congestion notification message, wherein the congestion notification message is used to notify that network congestion has occurred, the first quantity is the number of data packets cached in a cache area of ​​the network device and cannot be forwarded to the receiving end, and the packet sending rate of the sending end is exponentially related to the number of data packets cached in the cache area of ​​the network device.

[0078] Optionally, in this embodiment, the congestion notification message may be generated and sent by the receiving end, or may be generated and sent by a network device, which is not limited in this embodiment.

[0079] The congestion notification message is used to notify that network congestion has occurred, and the first quantity is the quantity of data packets cached in the cache area of ​​the network device and cannot be forwarded to the receiving end.

[0080] Optionally, the packet sending rate of the sending end is exponentially related to the number of data packets cached in the buffer area of ​​the network device, that is, the adjusted packet sending rate of the sending end is equal to the product of the preset packet sending rate of the sending end and an exponential function, and the exponent of the exponential function is related to the number of data packets cached in the buffer area of ​​the network device.

[0081] Through the above steps, the field value of the first field of the data packet header of the first data packet is set to the first field value, wherein the first field value is used to indicate that the sender allows receiving congestion notifications, and the first data packet is a data packet to be sent to the receiving end; the first data packet is sent to the network device, wherein the network device is used to forward the data packets sent by the sender to the receiving end to the receiving end in sequence; when a congestion notification message is received, the packet sending rate of the sender is adjusted based on the first number indicated by the congestion notification message, wherein the congestion notification message is used to notify the occurrence of network congestion, the first number is the number of data packets cached in the cache area of ​​the network device and cannot be forwarded to the receiving end, and the packet sending rate of the sender is exponentially related to the number of data packets cached in the cache area of ​​the network device, thereby solving the problem of slow control response speed in the congestion control method in the related art.

[0082] In an exemplary embodiment, when a congestion notification message is received, adjusting the packet sending rate of the sender based on the first quantity indicated by the congestion notification message includes:

[0083] S11, when a congestion notification message is received, the product of the specified rate and the first adjustment value is determined as the adjusted packet sending rate of the sending end, wherein the first adjustment value is a value with the Euler number as the base and the inverse of the ratio of the first number to the first number threshold as the exponent.

[0084] When a flow on the RP receives CNP, the flow will be decelerated according to formula (6). The deceleration trend is as follows: Figure 7 shown.

[0085] R c = R t e^( -Q α / Q eq ) (6)

[0086] Among them, R t is the preset specified rate, R c is the adjusted packet sending rate of the sender, Q eq represents the first quantity threshold, that is, the number of data packets that the RQ (Receive Queue) configured by the receiving end for QP can accommodate; Q α represents the first quantity, 0≤ Q α / Q eq .

[0087] In an exemplary embodiment, before adjusting the packet sending rate of the sender based on the first number indicated by the congestion notification message, the method further includes:

[0088] S21, receiving a congestion notification message sent by a receiving end, wherein the congestion notification message is generated by the receiving end and sent to the sending end via a network device when network congestion occurs.

[0089] Optionally, in this embodiment, the congestion notification message is generated by the receiving end and sent to the sending end via the network device when network congestion occurs.

[0090] Similar to the above embodiment, in order to notify the sender of network congestion, the network device will mark the ECN (Explicit Congestion Notification) field in the IP header of the data packet. The ECN field is part of the IP header and consists of two bits. When set to '11', it means congestion encountered (CE for short).

[0091] Packets marked as congested continue to travel through the network and eventually reach their destination. When the receiver (RoCEv2 host or network card) receives packets with ECN marking, it knows that these packets have encountered congestion somewhere in the network. In order to provide congestion feedback to the sender, the receiver generates a CNP (Congestion Notification Packet). CNP contains information about which specific data flows (Queue Pair, QP) have encountered congestion.

[0092] The CNP packet usually includes the source address, the destination address, and the identification information of the QP that encounters congestion. This information allows the sender to identify which data flows need to reduce the sending rate.

[0093] The generated CNP packet is sent back to the sender. The CNP packet is transmitted back to the host or network card of the sender through the RoCEv2 network. After receiving the CNP packet, the sender will implement rate limit on its corresponding QP according to the information in the CNP packet, reduce the sending rate of the data packet, and thus reduce network congestion.

[0094] Through this embodiment, by reducing the sending rate of the affected data flow, the sending end helps to alleviate network congestion and improve the overall performance and stability of the network.

[0095] In an exemplary embodiment, before receiving the congestion notification message sent by the receiving end, the method further includes:

[0096] S31, in response to a received congestion notification message sent by a receiving end, determining the number of data packets cached in a cache area of ​​a network device to obtain a first number;

[0097] S32: Add the first amount of indication information to the congestion notification message, and forward the updated congestion notification message to the sending end.

[0098] For a network device, in response to a congestion notification message received from a receiving end, the number of data packets cached in a buffer area of ​​the network device is determined to obtain a first number; indication information of the first number is added to the congestion notification message, and the updated congestion notification message is forwarded to the sending end so that the sending end adjusts the packet sending rate based on the first number.

[0099] Similar to the above-mentioned embodiment, the congestion notification message includes information about which specific data flows (QueuePair, QP) encounter congestion.

[0100] Through this embodiment, when the congestion notification message sent by the receiving end to the sending end arrives at the network device, the network device collects the number of data packets cached in the buffer area and obtains a first number for adjusting the packet sending rate of the sending end, thereby ensuring the timeliness and accuracy of the data.

[0101] In an exemplary embodiment, before receiving the congestion notification message sent by the receiving end, the method further includes:

[0102] S41, when a first trigger condition is met, setting a field value of a second field of a second data packet to be sent in a buffer area of ​​the network device to a second field value, wherein the second field value is used to indicate that network congestion occurs, and the first trigger condition includes at least one of the following: detecting that network congestion occurs, detecting that network congestion occurs at a detection time corresponding to a first detection period, and detecting that a duration of network congestion is greater than or equal to a first duration threshold;

[0103] S42, sending a second data packet to the receiving end, wherein the congestion notification message is generated by the receiving end based on the number of data packets whose field value of the second field is the second field value received in the first time period.

[0104] When the network device detects that network congestion occurs, the field value of the second field of the second data packet to be sent in the buffer area of ​​the network device may be set to the second field value.

[0105] For example, in this embodiment, when a router receives a data packet on a queue where congestion occurs, it does not discard it immediately. Instead, it can first check the ECN field to determine whether the ECN function is enabled. If so, the CE bit is turned on in the IP header, that is, in order to notify the sender of network congestion, the network device will mark the ECN (Explicit Congestion Notification) field in the IP header of the data packet. The ECN field is part of the IP header and consists of two bits. When set to "11", it means that congestion has been encountered (Congestion Encountered, referred to as CE).

[0106] Optionally, the network device can monitor the number of data packets in its internal buffer. When the queue length exceeds a preset threshold, the device may believe that congestion is about to occur, that is, network congestion is detected. If the network device starts to discard data packets, the device can count the number of packet losses within a certain period of time. If it exceeds a preset ratio, it can be considered that the device has detected network congestion. The network device can measure the transmission delay of the data packet and the fluctuation of the delay (jitter). If the delay and jitter increase significantly, this may indicate that the network link or device is experiencing congestion.

[0107] In order to reduce resource usage, when network congestion is detected at the detection time corresponding to the first detection cycle, the field value of the second field of the second data packet to be sent in the cache area of ​​the network device can be set to a second field value, and the second field value is used to indicate that congestion has occurred.

[0108] That is, in this embodiment, the network device may detect whether network congestion occurs periodically.

[0109] Optionally, when it is detected that the duration of network congestion is greater than or equal to the first duration threshold, the field value of the second field of the second data packet to be sent in the cache area of ​​the network device may be set to a second field value, and the second field value is used to indicate that congestion has occurred.

[0110] When the network device forwards data packets to the receiving end in sequence, the receiving end can, upon successfully receiving the data packet, send a confirmation message to the network device to inform it that the data packet has been successfully received. Upon receiving the confirmation message sent by the receiving end, the network device discards the data packet cached in the buffer area of ​​the network device. If no confirmation message is received within a specified time or an indication message of reception failure is received, the data packet will not be discarded. Optionally, the data packet can be resent after a specified period of time.

[0111] For example, when data packet 1, data packet 2, ..., data packet 10 are sent to the receiving end in sequence, if data packet 6 fails to be sent, the field value of the ECN field of data packet 6 in the buffer area of ​​the network device is set to "11", and this time is confirmed as the starting time when the network congestion is detected. If retransmission of data packet 6 still fails, it means that the duration of the current detected network congestion has not ended. Until the confirmation message of the successful sending of data packet 6 is received, it can be considered that the duration of the current detected network congestion has ended. If data packet 7 fails to be sent after the data packet is sent successfully, the time when the failure to send data packet 7 is confirmed is used as the new starting time when the network congestion is detected, and the duration of the network congestion is recalculated.

[0112] Optionally, when the receiving end successfully receives data packet 5 and confirms that the receiving queue of the receiving end is full, an indication message can be sent to the network device to indicate that the receiving end cannot receive new data packets. At this time, the network device can set the field value of the second field of the data packet 6 to be sent in the cache area of ​​the network device to the second field value.

[0113] The network device can send a second data packet to the receiving end, wherein the network device can send the second data packet to the receiving end after a preset time, or can send the second data packet to the receiving end when the receiving end sends an indication message to the network device to indicate that a new data packet can be forwarded. This is not limited in this embodiment.

[0114] The congestion notification message is generated by the receiving end based on the number of data packets whose field value of the second field is the second field value received in the first time period.

[0115] For example, when the receiving end confirms that the number of data packets whose field value of the second field is the second field value received within the first time period exceeds a preset number threshold, a congestion notification message is generated, wherein the first time period can be the time from when the first data packet whose field value of the second field is the second field value is received as the starting point, the first time period can also be a preset time period (regardless of whether a data packet whose field value of the second field is the second field value is received), and the first time period can also be the time period when the receiving end processes a preset number of data packets, which is not limited in this embodiment.

[0116] Through this embodiment, the receiving end carries the number of data packets whose field value of the second field is the second field value received by the receiving end within the first time period in the congestion notification message. The sending end can adjust the packet sending rate based on this number, so that when the network encounters congestion, it can promptly and quickly reduce the data transmission rate of the corresponding link to avoid packet loss.

[0117] In an exemplary embodiment, before receiving the congestion notification message sent by the receiving end, the method further includes:

[0118] S51, sending a third data packet cached in a buffer area of ​​the network device to a receiving end, and waiting for a response message returned by the receiving end, wherein the third data packet is the same data packet as the second data packet or a data packet sent before the second data packet, and the receiving end stores the data packets to be processed and sent by the sending end through a first receiving queue, and the number threshold of the data packets allowed to be stored in the first receiving queue is a second number threshold;

[0119] S52, determining that network congestion occurs when a first response message returned by the receiving end is received, and the first response message indicates that the third data packet is not successfully placed in the first receiving queue because the number of data packets in the first receiving queue reaches a second number threshold.

[0120] Similar to the above-mentioned embodiment, when the first trigger condition is met, the field value of the second field of the second data packet to be sent in the cache area of ​​the network device is set to the second field value, and the network device can send the third data packet cached in the cache area of ​​the network device to the receiving end and wait for the response message returned by the receiving end. The third data packet is the same data packet as the second data packet or a data packet sent before the second data packet.

[0121] The second quantity threshold may be a preset fixed value, and may be used to indicate an upper limit value of the data packets that the receiving queue of the receiving end can accommodate.

[0122] In an exemplary embodiment, after sending the third data packet cached in the buffer area of ​​the network device to the receiving end and waiting for a response message returned by the receiving end, the method further includes:

[0123] S61, when a second response message returned by the receiving end is received, the second response message indicates that the third data packet has been successfully placed in the first receiving queue, and there is a cached data packet in the cache area of ​​the network device, the fourth data packet cached in the cache area of ​​the network device is sent to the receiving end, and the response message returned by the receiving end is waited for.

[0124] Optionally, in this embodiment, after successfully receiving the data packet, the receiving end sends a second response message back to the network device to inform that the data packet has been successfully received. If there is a cached data packet in the buffer area of ​​the network device, the cached data packet to be sent in the buffer area of ​​the network device is sent to the receiving end, and waits for a response message returned by the receiving end.

[0125] Here, the third data packet and the fourth data packet are different data packets.

[0126] Through this embodiment, the network device determines whether the data packet is sent successfully based on the response message sent by the receiving end, which can improve the reliability of data transmission.

[0127] In an exemplary embodiment, before receiving the congestion notification message sent by the receiving end, the method further includes:

[0128] S71, when a second trigger condition is met, determine the number of data packets cached in a cache area of ​​the network device to obtain a first number, wherein the second trigger condition includes at least one of the following: detecting that network congestion occurs, detecting that network congestion occurs at a detection time corresponding to a second detection period, and detecting that the duration of network congestion is greater than or equal to a second duration threshold;

[0129] S72, generate a congestion indication message, and send the congestion indication message to the receiving end, wherein the congestion indication message carries indication information of a first quantity, and the congestion notification message is generated by the receiving end based on the first quantity indicated by the congestion indication message.

[0130] When the second trigger condition is met, the network device can determine the number of data packets cached in the cache area of ​​the network device, obtain the first number, generate a congestion indication message, and send the congestion indication message to the receiving end, wherein the congestion indication message carries indication information of the first number.

[0131] Here, the second trigger condition is similar to the aforementioned first trigger condition and will not be described in detail here.

[0132] In an exemplary embodiment, before adjusting the packet sending rate of the sender based on the first number indicated by the congestion notification message, the method further includes:

[0133] S81, receiving a congestion notification message sent by a network device, wherein the congestion notification message is generated and sent by the network device when network congestion occurs.

[0134] Optionally, in this embodiment, the congestion notification message may be generated by a network device and sent to the sending end when network congestion occurs, and the congestion notification message may carry indication information of the first quantity and indication information of the QP.

[0135] Through this embodiment, the network device generates and sends the congestion notification message to the sending end, thereby reducing the occupation of network resources.

[0136] In an exemplary embodiment, before receiving the congestion notification message sent by the network device, the method further includes:

[0137] S91, when a third trigger condition is met, determine the number of data packets cached in a cache area of ​​the network device to obtain a first number, wherein the third trigger condition includes at least one of the following: detecting that network congestion occurs, detecting that network congestion occurs at a detection time corresponding to a third detection period, and detecting that the duration of network congestion is greater than or equal to a third duration threshold;

[0138] S92: Generate a congestion notification message based on the first number, and send the generated congestion notification message to the sending end.

[0139] When the third trigger condition is met, the network device determines the number of data packets cached in the cache area of ​​the network device to obtain a first number, generates a congestion notification message based on the first number, and sends the generated congestion notification message to the sending end.

[0140] It should be noted that the third trigger condition is similar to the aforementioned first trigger condition and will not be elaborated here.

[0141] Through this embodiment, the network device generates and sends a congestion notification message to the sender based on a preset condition (the third trigger condition), thereby avoiding waste of system resources caused by the network device sending the congestion notification message to the sender in real time.

[0142] In an exemplary embodiment, before receiving the congestion notification message sent by the network device, the method further includes:

[0143] S101, sending a sixth data packet cached in a buffer area of ​​a network device to a receiving end, and waiting for a response message returned by the receiving end, storing the data packet to be processed and sent by the sending end in a second receiving queue at the receiving end, and the number threshold of the data packets allowed to be stored in the second receiving queue is a third number threshold;

[0144] S102: When a third response message returned by the receiving end is received, and the third response message indicates that the sixth data packet is not successfully placed in the second receiving queue because the number of data packets in the receiving queue reaches a third number threshold, it is determined that network congestion occurs.

[0145] When the network device receives a response message sent by the receiving end indicating that the receiving queue of the receiving end is full, it is determined that network congestion occurs.

[0146] In an exemplary embodiment, after adjusting the packet sending rate of the sender based on the first number indicated by the congestion notification message, the method further includes:

[0147] S111: after a predefined time interval or a predefined number of bytes sent, if no notification message for notifying that network congestion has occurred is received, increase the packet sending rate of the sending end.

[0148] In order to prevent congestion, the sender (the source of the data) needs to be able to adjust the rate at which it sends data according to network conditions. If the sending rate is too fast, it may aggravate congestion; if it is too slow, it may waste network resources.

[0149] The sender will adjust the sending rate according to certain rules. These rules may include checking the network congestion after a certain period of time (for example, every few seconds) or after a certain number of data bytes have been sent (for example, every 1000 packets sent).

[0150] If after a predefined time gap or number of sent bytes, the sender does not receive any notification indicating network congestion (such as ECN marked packets or CNP congestion notification packets), this may mean that the network is in good condition and no congestion has occurred. In this case, the sender can decide to increase its sending rate to make more efficient use of network resources.

[0151] Through this embodiment, increasing the sending rate can improve the transmission efficiency of the network, allowing more data to be transmitted in the same time, and the sending rate can be adjusted according to the real-time network conditions instead of maintaining a fixed rate all the time.

[0152] In an exemplary embodiment, after a predefined time interval or a predefined number of sent bytes, when no notification message for notifying that network congestion has occurred is received, increasing the packet sending rate of the sender includes:

[0153] S121, the product of the specified rate and the second adjustment value is determined as the increased packet sending rate of the sending end, wherein the second adjustment value is a value with 1 minus the Euler number as the base and the ratio of the second number to the first number threshold as the exponent, and the second number is the difference between the number of data packets cached in the cache area of ​​the current network device and the first number threshold.

[0154] For example, in this embodiment, after a predefined time interval or a predefined number of bytes are sent, if no speed reduction event occurs, a speed increase event will occur. The flow will increase in speed according to formula (7), and the speed increase trend is as follows: Figure 8 shown.

[0155] R c = R t ( 1-e^( Q α’ / Q eq ) ) (7)

[0156] Among them, Q α’ / Q eq ≤ 0, where the second quantity Q α’It can be sampled by the network device at a fixed time and sent to the sender, or it can be sent back by the receiver at a fixed time. α’ , which is not limited in this embodiment.

[0157] Through this embodiment, the problem that when the Roce V2 network is congested, the algorithm responds slowly when increasing or decreasing the speed and the changing trend is not smooth can be solved. When the network is restored, it can quickly and timely restore to the target rate to transmit data.

[0158] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.

[0159] According to another aspect of the embodiments of the present application, a congestion control device is also provided, which is used to implement the congestion control method provided in the above embodiments, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0160] Fig. 9 is a structural block diagram of an optional congestion control device provided in an embodiment of the present application, such as Fig. 9 As shown, the device comprises:

[0161] A first setting unit 902 is used to set a field value of a first field in a data packet header of a first data packet to a first field value, wherein the first field value is used to indicate that the sender is allowed to receive congestion notifications, and the first data packet is a data packet to be sent to the receiver;

[0162] A first sending unit 904 is used to send a first data packet to a network device, wherein the network device is used to sequentially forward the data packets sent by the sending end to the receiving end to the receiving end;

[0163] The adjustment unit 906 is used to adjust the packet sending rate of the sending end based on a first quantity indicated by the congestion notification message when a congestion notification message is received, wherein the congestion notification message is used to notify the occurrence of network congestion, the first quantity is the number of data packets cached in the buffer area of ​​the network device and cannot be forwarded to the receiving end, and the packet sending rate of the sending end is exponentially related to the number of data packets cached in the buffer area of ​​the network device.

[0164] It should be noted that the first setting unit 902 in this embodiment can be used to execute the above step S202, the first sending unit 904 in this embodiment can be used to execute the above step S204, and the adjustment unit 906 in this embodiment can be used to execute the above step S206.

[0165] Through the embodiment of the present application, the field value of the first field of the data packet header of the first data packet is set to the first field value, wherein the first field value is used to indicate that the sender allows receiving congestion notifications, and the first data packet is a data packet to be sent to the receiving end; the first data packet is sent to the network device, wherein the network device is used to forward the data packets sent by the sender to the receiving end to the receiving end in sequence; when a congestion notification message is received, the packet sending rate of the sender is adjusted based on the first number indicated by the congestion notification message, wherein the congestion notification message is used to notify the occurrence of network congestion, the first number is the number of data packets cached in the cache area of ​​the network device and cannot be forwarded to the receiving end, and the packet sending rate of the sender is exponentially related to the number of data packets cached in the cache area of ​​the network device, thereby solving the problem of slow control response speed in the congestion control method in the related art.

[0166] In an exemplary embodiment, the adjusting unit comprises:

[0167] The first determination module is used to determine the product of the specified rate and the first adjustment value as the adjusted packet sending rate of the sending end when a congestion notification message is received, wherein the first adjustment value is a value with the Euler number as the base and the inverse of the ratio of the first number to the first number threshold as the exponent.

[0168] In an exemplary embodiment, the above device further comprises:

[0169] The first receiving unit is used to receive a congestion notification message sent by a receiving end before adjusting the packet sending rate of the sending end based on a first number indicated by the congestion notification message, wherein the congestion notification message is generated by the receiving end and sent to the sending end via a network device when network congestion occurs.

[0170] In an exemplary embodiment, the above device further comprises:

[0171] a first determining unit, configured to determine the number of data packets cached in a buffer area of ​​the network device in response to the received congestion notification message sent by the receiving end before receiving the congestion notification message sent by the receiving end, so as to obtain a first number;

[0172] The first execution unit is configured to add a first amount of indication information to a congestion notification message, and forward the updated congestion notification message to a sending end.

[0173] In an exemplary embodiment, the above device further comprises:

[0174] A second setting unit is used for setting the field value of the second field of the second data packet to be sent in the buffer area of ​​the network device to a second field value before receiving the congestion notification message sent by the receiving end, when the first trigger condition is met, wherein the second field value is used to indicate the occurrence of network congestion, and the first trigger condition includes at least one of the following: the occurrence of network congestion is detected, the occurrence of network congestion is detected at the detection time corresponding to the first detection period, and the duration of the detected network congestion is greater than or equal to the first duration threshold;

[0175] The second sending unit is used to send a second data packet to the receiving end, wherein the congestion notification message is generated by the receiving end based on the number of data packets whose field value of the second field is the second field value received in the first time period.

[0176] In an exemplary embodiment, the above device further comprises:

[0177] A second execution unit is used for sending a third data packet cached in a buffer area of ​​the network device to the receiving end before receiving the congestion notification message sent by the receiving end, and waiting for a response message returned by the receiving end, wherein the third data packet is the same data packet as the second data packet or a data packet sent before the second data packet, and the receiving end stores the data packets to be processed and sent by the sending end through the first receiving queue, and the number threshold of the data packets allowed to be stored in the first receiving queue is the second number threshold;

[0178] The second determination unit is used to determine that network congestion occurs when a first response message returned by the receiving end is received, and the first response message indicates that the third data packet has not been successfully placed in the first receiving queue because the number of data packets in the first receiving queue has reached a second number threshold.

[0179] In an exemplary embodiment, the above device further comprises:

[0180] The third execution unit is used to send the third data packet cached in the cache area of ​​the network device to the receiving end and wait for a response message returned by the receiving end, and then, upon receiving a second response message returned by the receiving end, the second response message indicating that the third data packet has been successfully placed in the first receiving queue, and there are cached data packets in the cache area of ​​the network device, send the fourth data packet cached in the cache area of ​​the network device to the receiving end and wait for a response message returned by the receiving end.

[0181] In an exemplary embodiment, the above device further comprises:

[0182] A third determining unit is used to determine the number of data packets cached in the cache area of ​​the network device before receiving the congestion notification message sent by the receiving end, and obtain a first number when a second trigger condition is met, wherein the second trigger condition includes at least one of the following: detecting that network congestion occurs, detecting that network congestion occurs at a detection time corresponding to the second detection period, and detecting that the duration of network congestion is greater than or equal to the second duration threshold;

[0183] The fourth execution unit is used to generate a congestion indication message and send the congestion indication message to the receiving end, wherein the congestion indication message carries indication information of the first quantity, and the congestion notification message is generated by the receiving end based on the first quantity indicated by the congestion indication message.

[0184] In an exemplary embodiment, the above device further comprises:

[0185] The second receiving unit receives a congestion notification message sent by the network device before adjusting the packet sending rate of the sending end based on the first number indicated by the congestion notification message, wherein the congestion notification message is generated and sent by the network device when network congestion occurs.

[0186] In an exemplary embodiment, the above device further comprises:

[0187] a fourth determining unit, configured to determine, before receiving the congestion notification message sent by the network device, the number of data packets cached in the cache area of ​​the network device to obtain a first number when a third trigger condition is met, wherein the third trigger condition includes at least one of the following: detecting that network congestion occurs, detecting that network congestion occurs at a detection time corresponding to a third detection period, and detecting that the duration of network congestion is greater than or equal to a third duration threshold;

[0188] The fifth execution unit is configured to generate a congestion notification message based on the first quantity, and send the generated congestion notification message to the sending end.

[0189] In an exemplary embodiment, the above device further comprises:

[0190] a sixth execution unit, configured to send a sixth data packet cached in a buffer area of ​​the network device to a receiving end before receiving the congestion notification message sent by the network device, and wait for a response message returned by the receiving end, and store the data packet to be processed and sent by the sending end in a second receiving queue at the receiving end, wherein a quantity threshold of the data packets allowed to be stored in the second receiving queue is a third quantity threshold;

[0191] The fifth determination unit is used to determine that network congestion occurs when a third response message returned by the receiving end is received, and the third response message indicates that the sixth data packet has not been successfully placed in the second receiving queue because the number of data packets in the receiving queue has reached a third number threshold.

[0192] In an exemplary embodiment, the above device further comprises:

[0193] The seventh execution unit is used to increase the packet sending rate of the sending end after adjusting the packet sending rate of the sending end based on the first number indicated by the congestion notification message, if no notification message for notifying the occurrence of network congestion is received after a predefined time interval or a predefined number of sent bytes.

[0194] In an exemplary embodiment, the seventh execution unit includes:

[0195] The second determination module is used to determine the product of the specified rate and the second adjustment value as the increased packet sending rate of the sending end, wherein the second adjustment value is a value with 1 minus the Euler number as the base and the ratio of the second number to the first number threshold as the exponent, and the second number is the difference between the number of data packets cached in the cache area of ​​the current network device and the first number threshold.

[0196] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0197] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0198] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a ROM (Read-Only Memory), a RAM (Random Access Memory), a mobile hard disk, a magnetic disk or an optical disk.

[0199] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0200] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0201] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0202] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0203] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0204] The embodiments of the present application also provide a computer program, which includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps in any one of the above method embodiments.

[0205] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0206] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A congestion control method, characterized in that: include: Setting a field value of a first field in a data packet header of a first data packet to a first field value, wherein the first field value is used to indicate that the sender allows receiving congestion notifications, and the first data packet is a data packet to be sent to the receiver; Sending the first data packet to a network device, wherein the network device is used to sequentially forward the data packets sent by the sending end to the receiving end to the receiving end; When a congestion notification message is received, the packet sending rate of the sending end is adjusted based on a first number indicated by the congestion notification message, wherein the congestion notification message is used to notify the occurrence of network congestion, the first number is the number of data packets cached in the buffer area of ​​the network device and cannot be forwarded to the receiving end, and the packet sending rate of the sending end is exponentially related to the number of data packets cached in the buffer area of ​​the network device.

2. The method according to claim 1, characterized in that The step of adjusting the packet sending rate of the sender based on the first quantity indicated by the congestion notification message when the congestion notification message is received includes: When the congestion notification message is received, the product of the specified rate and the first adjustment value is determined as the adjusted packet sending rate of the sending end, wherein the first adjustment value is a value with the Euler number as the base and the inverse of the ratio of the first number to the first number threshold as the exponent.

3. The method according to claim 1, characterized in that Before adjusting the packet sending rate of the sending end based on the first number indicated by the congestion notification message, the method further includes: The congestion notification message sent by the receiving end is received, wherein the congestion notification message is generated by the receiving end and sent to the sending end via the network device when network congestion occurs.

4. The method according to claim 3, characterized in that Before receiving the congestion notification message sent by the receiving end, the method further includes: In response to the received congestion notification message sent by the receiving end, determining the number of data packets cached in the buffer area of ​​the network device to obtain the first number; Adding the first amount of indication information to the congestion notification message, and forwarding the updated congestion notification message to the sending end.

5. The method according to claim 3, characterized in that: Before receiving the congestion notification message sent by the receiving end, the method further includes: When a first trigger condition is met, setting a field value of a second field of a second data packet to be sent in a buffer area of ​​the network device to a second field value, wherein the second field value is used to indicate that network congestion occurs, and the first trigger condition includes at least one of the following: detecting that network congestion occurs, detecting that network congestion occurs at a detection time corresponding to a first detection period, and detecting that a duration of network congestion is greater than or equal to a first duration threshold; The second data packet is sent to the receiving end, wherein the congestion notification message is generated by the receiving end based on the number of data packets whose field value of the second field is the second field value received in a first time period.

6. The method according to claim 5, characterized in that Before receiving the congestion notification message sent by the receiving end, the method further includes: Sending a third data packet cached in a buffer area of ​​the network device to the receiving end, and waiting for a response message returned by the receiving end, wherein the third data packet is the same data packet as the second data packet or a data packet sent before the second data packet, and storing the data packets to be processed and sent by the sending end at the receiving end through a first receiving queue, and a number threshold of data packets allowed to be stored in the first receiving queue is a second number threshold; When a first response message returned by the receiving end is received, and the first response message indicates that the third data packet is not successfully placed in the first receiving queue because the number of data packets in the first receiving queue reaches the second number threshold, it is determined that network congestion occurs.

7. The method according to claim 6, characterized in that After sending the third data packet cached in the buffer area of ​​the network device to the receiving end and waiting for a response message returned by the receiving end, the method further includes: Upon receiving a second response message returned by the receiving end, the second response message indicating that the third data packet has been successfully placed in the first receiving queue, and there are cached data packets in the buffer area of ​​the network device, the fourth data packet cached in the buffer area of ​​the network device is sent to the receiving end, and the response message returned by the receiving end is waited for.

8. The method according to claim 3, characterized in that Before receiving the congestion notification message sent by the receiving end, the method further includes: When a second trigger condition is met, determining the number of data packets cached in the cache area of ​​the network device to obtain the first number, wherein the second trigger condition includes at least one of the following: detecting that network congestion occurs, detecting that network congestion occurs at a detection time corresponding to a second detection period, and detecting that the duration of network congestion is greater than or equal to a second duration threshold; Generate a congestion indication message, and send the congestion indication message to the receiving end, wherein the congestion indication message carries indication information of the first quantity, and the congestion notification message is generated by the receiving end based on the first quantity indicated by the congestion indication message.

9. The method according to claim 1, characterized in that: Before adjusting the packet sending rate of the sending end based on the first number indicated by the congestion notification message, the method further includes: The congestion notification message sent by the network device is received, wherein the congestion notification message is generated and sent by the network device when network congestion occurs.

10. The method according to claim 9, characterized in that Before receiving the congestion notification message sent by the network device, the method further includes: When a third trigger condition is met, determining the number of data packets cached in the cache area of ​​the network device to obtain the first number, wherein the third trigger condition includes at least one of the following: detecting that network congestion occurs, detecting that network congestion occurs at a detection time corresponding to a third detection period, and detecting that the duration of network congestion is greater than or equal to a third duration threshold; The congestion notification message is generated based on the first number, and the generated congestion notification message is sent to the sending end.

11. The method according to claim 10, characterized in that Before receiving the congestion notification message sent by the network device, the method further includes: Sending the sixth data packet cached in the buffer area of ​​the network device to the receiving end, and waiting for a response message returned by the receiving end, storing the data packet to be processed and sent by the sending end in a second receiving queue at the receiving end, wherein the number threshold of the data packets allowed to be stored in the second receiving queue is a third number threshold; When a third response message returned by the receiving end is received, and the third response message indicates that the sixth data packet is not successfully placed in the second receiving queue because the number of data packets in the receiving queue reaches the third number threshold, it is determined that network congestion occurs.

12. The method according to any one of claims 1 to 11, characterized in that After adjusting the packet sending rate of the sending end based on the first number indicated by the congestion notification message, the method further includes: When no notification message for notifying that network congestion has occurred is received after a predefined time interval or a predefined number of sent bytes, the packet sending rate of the sending end is increased.

13. The method according to claim 12, characterized in that The step of increasing the packet sending rate of the sending end when no notification message for notifying that network congestion has occurred is received after a predefined time interval or a predefined number of sent bytes, comprises: The product of the specified rate and the second adjustment value is determined as the increased packet sending rate of the sending end, wherein the second adjustment value is a value with 1 minus the Euler number as the base and the ratio of the second number to the first number threshold as the exponent, and the second number is the difference between the number of data packets cached in the cache area of ​​the current network device and the first number threshold.

14. A congestion control device, characterized in that: include: A first setting unit, configured to set a field value of a first field in a data packet header of a first data packet to a first field value, wherein the first field value is used to indicate that the sender is allowed to receive congestion notifications, and the first data packet is a data packet to be sent to the receiver; A first sending unit, configured to send the first data packet to a network device, wherein the network device is configured to sequentially forward the data packets sent by the sending end to the receiving end to the receiving end; An adjustment unit is used to adjust the packet sending rate of the sending end based on a first number indicated by a congestion notification message when a congestion notification message is received, wherein the congestion notification message is used to notify the occurrence of network congestion, the first number is the number of data packets cached in a cache area of ​​the network device and cannot be forwarded to the receiving end, and the packet sending rate of the sending end is exponentially related to the number of data packets cached in the cache area of ​​the network device.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method according to any one of claims 1 to 13 when executed by a processor.

16. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 13 are implemented.

17. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 13 are implemented.

Citation Information

Patent Citations

  • Network congestion notifying method, proxy node, and computer device

    CN109391560A

  • Data flow control system, method and device, equipment and medium

    CN112437017A

  • RoCE network congestion control method and related device

    CN114143827A

  • Rate optimized congestion management

    CN115208828A

  • Method and device for adjusting data sending rate and training congestion control model

    CN116192766A