Network congestion control method and device

By obtaining and calculating the target transmission rate of the data stream by the receiving end, and notifying the sending end to send the data stream, solving the problem of inaccurately reflecting the degree of congestion and poor compatibility in the prior art, and achieving efficient network congestion control.

CN119496743APending Publication Date: 2025-02-21ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311059412.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-21
Publication Date
2025-02-21

AI Technical Summary

Technical Problem

In the prior art, network congestion and flow control methods cannot accurately reflect the degree of congestion, have poor compatibility, and are low in realization.

Method used

The receiving end obtains the congestion information of the data stream, calculates the target transmission rate of the data stream, and notifies the sending end to send the data stream according to the target transmission rate.

Benefits of technology

It realizes more accurate acquisition of congestion degree information, accurately adjusts the transmission rate of data streams, and does not require customized switches, with good achievability and compatibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119496743A_ABST
    Figure CN119496743A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a network congestion control method and device. The method comprises the following steps: a receiving end acquires congestion information of a data flow; the receiving end calculates a target sending rate of the data flow according to the congestion information of the data flow; and the receiving end informs the sending end of the target sending rate of the data stream, so that the sending end sends the data stream according to the target sending rate. More accurate congestion degree information can be obtained through a flow control algorithm performed by a receiving end, so that the sending rate of the data flow is accurately adjusted, a switch does not need to be customized, and the method has good realizability and compatibility and is suitable for large-scale popularization and application. The problems that a congestion and flow control method in the prior art cannot accurately reflect the congestion degree, the compatibility is poor, and the realizability is low are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of communications, and in particular, to a method and device for controlling network congestion. Background Art

[0002] At present, the main methods of congestion and flow control include Data Center Quantized Congestion Notification (DCQCN), Data Center Quality of Service Control Network Plus (DCQCN+), and Perception Aware Congestion Control for Real-time Communication (PACC).

[0003] The congestion flow control algorithm of DCQCN and DCQCN+ is mainly at the sending end. The receiving end receives the ECN-marked message from the switch, obtains the switch congestion information, and feeds it back to the sending end in the form of a CNP message after one cycle. The sending end performs network congestion control calculations based on the CNP message. However, the CNP message cannot reflect the number of ECN-marked messages received in one cycle, resulting in CNP not being able to accurately reflect the degree of congestion. In addition, the information is at the receiving end, and the algorithm module is at the sending end. The receiving end feeds back the congestion information to the sending end in the form of a CNP message. The definition of information at both ends, that is, the parameters in the algorithm, needs to be consistent, and the compatibility is poor.

[0004] PACC implements the congestion flow control algorithm in the switch, which can know the queue depth and number of flows of the switch queue, and obtain accurate congestion information. The congestion flow control performance is greatly improved. However, the switch in this solution is designed for a specific transmission protocol and congestion flow control algorithm. Therefore, the switch itself cannot be standardized and universal, and cannot even support data flows of multiple protocols passing through the switch at the same time. Moreover, the switch itself is a traffic convergence point. As the network bandwidth rate continues to increase, it is not feasible for the switch to complete the identification of flows at line speed, calculate the flow control value for each flow, and generate flow control messages. Summary of the invention

[0005] The embodiments of the present invention provide a method and device for controlling network congestion, so as to at least solve the problems in the related art that the congestion and flow control methods cannot accurately reflect the congestion degree, have poor compatibility, and have low feasibility.

[0006] According to an embodiment of the present invention, a method for controlling network congestion is provided, comprising:

[0007] The receiving end obtains the congestion information of the data stream;

[0008] The receiving end calculates a target sending rate of the data flow according to the congestion information of the data flow;

[0009] The receiving end notifies the sending end of the target sending rate of the data stream, wherein the sending end sends the data stream according to the target sending rate.

[0010] According to another embodiment of the present invention, a network congestion control device is provided, which is applied to a receiving end, and the device includes:

[0011] A first acquisition module, used to acquire congestion information of a data flow;

[0012] A first calculation module, configured to calculate a target sending rate of the data flow according to the congestion information of the data flow;

[0013] The sending module is used to notify the sending end of the target sending rate of the data stream, wherein the sending end sends the data stream according to the target sending rate.

[0014] According to yet another embodiment of the present invention, 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 one of the above method embodiments when run.

[0015] According to yet another embodiment of the present invention, there is provided an electronic device, 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.

[0016] The embodiment of the present invention obtains congestion information through the receiving end, and the receiving end calculates the target sending rate of the data flow according to the congestion information, and notifies the sending end of the target sending rate, and the sending end executes the sending of the data flow according to the target sending rate. Through the flow control algorithm of the receiving end, more accurate congestion degree information can be obtained, so as to accurately adjust the sending rate of the data flow, and there is no need to customize the switch, with good feasibility and compatibility, which solves the problems of the congestion and flow control methods in the related art that cannot accurately reflect the congestion degree, poor compatibility, low feasibility, etc. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is a schematic diagram of the control flow of existing network congestion;

[0018] Figure 2is a hardware structure block diagram of a mobile terminal according to a method for controlling network congestion according to an embodiment of the present invention;

[0019] Figure 3 is a system architecture diagram of controlling network congestion according to an embodiment of the present invention;

[0020] Figure 4 is a flow chart of a method for controlling network congestion according to an embodiment of the present invention;

[0021] Figure 5 is a schematic diagram of a control flow of network congestion according to an embodiment of the present invention;

[0022] Figure 6 is a schematic diagram of a weighting function of a large data stream and a small data stream according to an embodiment of the present invention;

[0023] Figure 7 4 is a structural block diagram of a network congestion control device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0024] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and in combination with the embodiments.

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

[0026] The classic Open System Interconnect (OSI) 7-layer protocol architecture is an open system interconnection reference model jointly developed by the International Organization for Standardization (ISO) and the International Telegraph and Telephone Consultative Committee (CCITT), which provides a functional structure framework for open interconnected information systems. From low to high, it is: physical layer, data link layer, network layer, transport layer, session layer, presentation layer, and application layer. Among them, the transport layer establishes an end-to-end link between hosts. The role of the transport layer is to provide end-to-end reliable and transparent data transmission services for upper layer protocols, including handling error control, congestion, and flow control.

[0027] If the demand for a resource in the network exceeds the available part of the resource over a period of time, the performance of the network will deteriorate. That is, when the demand for resources > available resources, the network will be congested.

[0028] Congestion control is a dynamic process, which is usually compared using network load (the number of packets input to the network per unit time) and throughput (the number of packets output from the network per unit time). When network load > throughput, the network becomes congested and even deadlock may occur in severe cases.

[0029] Many congestion flow control algorithm solutions are optimized and customized according to the data flow characteristics of business scenarios. Among them, data center distributed computing has become an important scenario, including AI, VR, etc.

[0030] However, from the distributed computing paradigm parameter server mode, global reduction Allreduce mode, to the underlying algorithms such as binomial tree and ring algorithm, traffic will be asymmetric:

[0031] 1) The receiving end and the sending end are in a one-to-many communication mode, incast, and the number of data streams at the data receiving end and the data sending end is asymmetric.

[0032] 2) Data traffic is unevenly distributed in time, with intermittent bursts, a large amount of data transmitted at a time and a short duration.

[0033] 3) The forward and reverse data traffic of a data flow is asymmetric. Data is transmitted unidirectionally at the same time, and the reverse bandwidth resources are idle.

[0034] Therefore, if we want to solve the problem of asymmetric data flow numbers between the data receiving end and the data sending end caused by incast in the one-to-many communication mode, we need a congestion flow control mechanism that can first evaluate the incast scale. If we want to solve the problem of intermittent bursts of data traffic, we need a congestion flow control algorithm to avoid severe congestion in the initial stage of data flow transmission, and to respond and converge quickly when congestion occurs, so as to improve bandwidth utilization and reduce long-tail delays. If we want to use it in large-scale networking, we need a congestion flow control algorithm with good compatibility and feasibility.

[0035] However, the congestion flow control algorithms of DCQCN and DCQCN+ in the prior art are Figure 1 This is a schematic diagram of the control flow of existing network congestion. Figure 1, the receiving end receives the message marked by explicit congestion notification (ECN) sent by the sending end, and generates a congestion notification (CNP) message. The sending end receives the CNP message, calculates the sending rate of the data flow according to the CNP message, and sends the data according to the calculated sending rate. The receiving end perceives the information, transmits it remotely to the sending end, and the sending end makes a decision, resulting in inaccurate conversion of congestion information; at the same time, the sending end cannot evaluate the incast scale, and the parameters in the algorithms at both ends must be consistent, resulting in poor compatibility. Moreover, the receiving end does not count the number of ECN marks, but only detects whether there is an ECN mark in each preset period. If there is, a CNP message is generated and sent to the data sending end. In this way, CNP cannot accurately reflect the degree of congestion.

[0036] The switch in the PACC congestion flow control algorithm is designed for a specific congestion flow control protocol. The switch is not compatible and universal, and is not easy to implement.

[0037] The technical concept of this embodiment is that the receiving end obtains congestion information, calculates the target sending rate of the data flow according to the congestion information, and notifies the sending end of the target sending rate, and the sending end sends the data flow according to the target sending rate. By performing a flow control algorithm on the receiving end, more accurate congestion degree information can be obtained, thereby accurately adjusting the sending rate of the data flow, and there is no need to customize the switch, which has good feasibility and compatibility.

[0038] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a computer terminal as an example, Figure 2 FIG. 1 is a hardware structure block diagram of a computer terminal of a network congestion control method according to an embodiment of the present invention. Figure 2 As shown, the computer terminal may include one or more ( Figure 2 Only one is shown in the figure) a processor 202 (the processor 202 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 204 for storing data, wherein the above-mentioned computer terminal may also include a transmission device 206 and an input and output device 208 for communication functions. It can be understood by those skilled in the art that Figure 2 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. Figure 2 More or fewer components as shown, or with Figure 2 Different configurations shown.

[0039] The memory 204 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for controlling network congestion in the embodiment of the present invention. The processor 202 executes various functional applications and data processing by running the computer program stored in the memory 204, that is, to implement the above method. The memory 204 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 204 may further include a memory remotely arranged relative to the processor 202, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0040] The transmission device 206 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 206 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 206 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0041] Figure 3 is a system architecture diagram of network congestion control according to an embodiment of the present invention. The embodiment of the present application can be run on Figure 3 In the network architecture shown in Figure 3 As shown, the network architecture includes: a sending end, a switch, and a receiving end, wherein the sending end is used to send data according to the sending rate of the data stream, and can send the data stream to the switch; the switch is used to ECN mark the messages in the data stream according to a certain probability and send them to the receiving end; the receiving end is used to obtain congestion information based on the message information marked by ECN, and calculate to obtain the sending rate of the data stream and then send it to the sending end.

[0042] In this embodiment, a method for controlling network congestion running on the above system architecture is provided. Figure 4 is a flow chart of a method for controlling network congestion according to an embodiment of the present invention. Figure 4 As shown, the process includes the following steps:

[0043] Step S401: The receiving end obtains congestion information of the data flow.

[0044] In the embodiment of the present invention, the congestion information of the data flow is obtained through the receiving end, so as to calculate the sending rate of the data flow according to the congestion information.

[0045] In an optional embodiment, the congestion information includes at least one of the following information:

[0046] The number of messages within a preset period, the number of messages marked by explicit congestion notification (ECN) within the preset period, and the current sending rate of the data flow.

[0047] As an example, the receiving end may count the number of packets in the data stream and the number of packets marked by ECN every preset period to obtain the number of packets within the preset period and the number of packets marked by ECN within the preset period.

[0048] Exemplarily, the receiving end may obtain information such as the number of packets in a preset period of the data stream, the number of packets marked by ECN in the preset period, and the current sending rate of the data stream.

[0049] Among them, Explicit Congestion Notification ENC is an extension of the TCP / IP protocol and is defined in the RFC 3168 (2001) standard. When a switch supporting ECN is congested, it can set two bits (called ECT(0) and ECT(1)) in the IP packet header forwarded by it to '11' before forwarding, which explicitly notifies the receiving end of the congestion.

[0050] Figure 5 is a schematic diagram of a control flow of network congestion according to an embodiment of the present invention, referring to Figure 4 In the embodiment of the present invention, the congestion information perception and calculation are both at the receiving end, and there is no need to transmit information remotely, which can speed up the frequency of perceiving congestion information; at the same time, the receiving end and the sending end do not need to negotiate parameters to be consistent, and the receiving end and the sending end are more independent. In an optional embodiment, the current sending rate of the data stream is the initial sending rate, and before the receiving end obtains the congestion information of the data stream, it also includes: the receiving end obtains the number of the data streams and the physical bandwidth of the link; the receiving end calculates the initial sending rate of each of the data streams according to the number of the data streams and the physical bandwidth of the link.

[0051] In an embodiment of the present invention, if the current sending rate of the data stream is the initial sending rate, the initial sending rate of each data stream can be pre-set before the receiving end obtains the congestion information of the data stream, so that the sending end can be planned when initially sending the data stream and can quickly reach a steady state, thereby avoiding congestion in the initial stage of data transmission caused by unplanned full-speed sending by the sending end.

[0052] As an example, each time a connection is established between the receiving end and each sending end, each sending end can transmit data through a data stream. The receiving end can count the number of connections established with each sending end, determine the number of data streams according to the number of established connections, and obtain the link physical bandwidth of the data streams at the same time. The initial transmission rate of each data stream can be calculated according to the number of data streams and the link physical bandwidth. The link physical bandwidth of the embodiment of the present invention is the physical bandwidth on the transmission link established between the receiving end and the switch.

[0053] For example, the receiving end can count the number of data flows m in the current connection and obtain the corresponding link physical bandwidth L, and use the ratio of the link physical bandwidth L to the number of data flows m with the same port number as the initial sending rate of each data flow, that is, R0=L / m.

[0054] As an example, when the sender and the receiver establish a new data stream and start transmission, the receiver can update the current number of connections, or the receiver can count the current number of connections between the sender and the receiver every preset period, and the embodiments of the present invention are not limited here.

[0055] Step S402: The receiving end calculates a target sending rate of the data flow according to congestion information of the data flow.

[0056] As an example, the receiving end may calculate the target sending rate of the data flow according to the congestion information of the data flow.

[0057] In an optional embodiment, the congestion information includes the number of packets within a preset period, the number of packets marked by explicit congestion notification ECN within the preset period, and the current sending rate of the data flow. The receiving end calculates the target sending rate of the data flow according to the congestion information of the data flow, including: the receiving end determines the probability that the packet is marked by ECN according to the number of packets within the preset period and the number of packets marked by explicit congestion notification ECN; the receiving end obtains the mapping relationship between the probability and the relative length of the port queue; the receiving end determines the target sending rate of the data flow according to the probability, the mapping relationship between the probability and the relative length of the port queue, and the current sending rate of the data flow.

[0058] Reference Figure 5 ,Since the congestion information perception and calculation are both at the receiving end, the receiving end can count the number of ,packets within the preset period and the number of packets marked by ECN, and then calculate the probability P value of ,packets being marked by ECN. The P value can more accurately reflect the degree of ,network congestion, and more accurately calculate the required sending rate of ,data stream.

[0059] For example, the receiving end can count the total number of packets N in the data flow within a preset period, and the number of packets E marked by ECN, and calculate the probability of the packet being marked by ECN, that is, P = E / N, so as to restore the ECN marking probability P and know the congestion degree of the switch point, which is used to calculate the target sending rate of the data flow.

[0060] As an example, there is a certain mapping relationship between probability P and the relative length Q of the port queue. The receiving end calculates the target transmission rate R of the data flow based on the probability P, the mapping relationship between P and Q, and the current transmission rate Rc of the data flow. As an example, in addition to calculating the probability P of the message being marked by ECN, the way to calculate the congestion level of the switch port can also be through the distribution of ECN messages counted by the receiving end. For example, if the number of ECN messages is decreasing for multiple consecutive cycles, it can be determined that the congestion level of the switch port has decreased.

[0061] In an optional embodiment, the receiving end calculates the target sending rate of the data flow based on the probability, the mapping relationship between the probability and the relative length of the port queue, and the current sending rate of the data flow, including: the receiving end determines the relative length of the port queue based on the probability, the mapping relationship between the probability and the relative length of the port queue; the receiving end calculates the target sending rate of the data flow based on the relative length of the port queue and the current sending rate of the data flow.

[0062] As an example, the receiving end can calculate the port queue relative length Q according to the probability P of the message being marked by ECN, the mapping relationship between the probability P of the message being marked by ECN and the port queue relative length Q. For example, if the mapping relationship P=Q among P, probability P and port queue relative length Q is known, Q can be calculated.

[0063] As an example, after calculating the relative length Q of the port queue, Q and RC can be input into the calculation formula for calculating the target sending rate R, for example,

[0064] R=Rc(1-0.2Q)

[0065] Thus, the target sending rate R of the data flow is calculated. In an optional embodiment, the receiving end determines the relative length of the port queue according to the probability and the mapping relationship between the probability and the relative length of the port queue, including: the receiving end obtains the weight of the data flow; the receiving end determines the relative length of the port queue according to the weight of the data flow, the probability, and the mapping relationship between the probability and the relative length of the port queue.

[0066] As an example, the weight of the data flow may be a weight corresponding to the ratio of the current transmission rate of the data flow to the physical bandwidth of the link.

[0067] As an example, the receiving end may obtain the weight of the data flow, and determine the relative length of the port queue according to the mapping relationship between the weight of the data flow, the probability of the message being ECN marked, the probability of the message being ECN marked and the relative length of the port queue.

[0068] For example, the relative length Q of the port queue, the probability P of the packet being marked by ECN, and the weight of the data flow The relationship expression between can be:

[0069]

[0070] The relative length Q of the port queue can be calculated using the above formula.

[0071] In an optional embodiment, before configuring different weights for the large data stream and the small data stream respectively, it also includes: the receiving end divides the data stream into the large data stream and the small data stream according to the ratio of the current sending rate of the data stream to the physical bandwidth of the link; wherein, the data stream whose current sending rate and link physical bandwidth ratio is greater than or equal to the preset ratio is the large data stream; and the data stream whose current sending rate and link physical bandwidth ratio is less than the preset ratio is the small data stream.

[0072] As an example, the receiving end may divide the data stream into a large data stream and a small data stream according to a ratio Rc / L of a current transmission rate Rc of the data stream to a physical bandwidth L of the link.

[0073] For example, Rc / L≥0.1 may be determined as a large data flow, and Rc / L<0.1 may be determined as a small data flow.

[0074] In an optional embodiment, the data stream includes a large data stream and a small data stream. Before the receiving end obtains the weight of the current data stream, it also includes: the receiving end obtains the ratio of the current sending rate of the data stream to the physical bandwidth of the link and the correspondence between the ratio and the weight; the receiving end configures different weights for the large data stream and the small data stream respectively according to the ratio and the correspondence.

[0075] As an example, the receiving end can divide the data flow into large data flow and small data flow, but the switch does not distinguish between large data flow and small data flow when marking the message with ECN, but randomly marks the message with ECN. The more messages in a data flow, the more ECN marks are made. However, in the short time of the speed adjustment cycle and congestion cycle, there is a certain degree of randomness. For a small data flow, it is marked once, because its transmission rate is low, the probability of being marked by ECN is greater, the speed reduction is large, and it is accidentally damaged.

[0076] Small data flows are generally signaling, control and other messages with low expected delay. Small data flows are not the main cause of congestion, and slowing down small data flows has limited contribution to relieving congestion. Therefore, different weights can be assigned to large data flows and small data flows.

[0077] As an example, the receiving end can obtain the ratio of the current sending rate of the data stream to the physical bandwidth of the link and the correspondence between the ratio and the weight, and configure different weights for large data streams and small data streams according to the ratio of the current sending rate of the data stream to the physical bandwidth of the link and the correspondence between the ratio and the weight.

[0078] As an example, Figure 6 is a schematic diagram of a weighted function of a large data stream and a small data stream according to an embodiment of the present invention, referring to Figure 6 , the corresponding relationship between the ratio of the current transmission rate to the link physical bandwidth and the weight can be:

[0079]

[0080] Where x is the ratio of the current transmission rate of the data flow to the physical bandwidth of the link Rc / L, and f(x) is the weight. Rc / L ≥ 0.1 can be determined as a large data flow, and the weight of the large data flow can be 100%; Rc / L < 0.1 can be determined as a small data flow, and the corresponding weight changes linearly with Rc / L. Among them, the data flow at Rc / L ≈ 0 has a corresponding weight of 10%.

[0081] Step S403: the receiving end notifies the sending end of the target sending rate of the data stream, so that the sending end sends the data stream according to the target sending rate.

[0082] After determining the relative length Q of the port queue, the target sending rate of the data flow can be calculated according to the mapping relationship between the relative length Q of the port queue, the sending rate Rc of the current data flow, and the relative length Q of the port queue and the sending rate R of the data flow.

[0083] For example, the mapping relationship between the relative length Q of the port queue and the sending rate R of the data flow can be:

[0084] R=Rc(1-0.2Q)

[0085] The relative length Q of the port queue and the sending rate Rc of the current data flow can be input into the above formula to calculate the target sending rate of the data flow.

[0086] As an example, the receiving end may notify the sending end of the target sending rate of the data stream. After receiving the notification message, the sending end sends the data stream according to the target sending rate in the notification message.

[0087] In an optional embodiment, the receiving end notifies the sending end of the target sending rate of the data stream so that the sending end sends the data stream according to the target sending rate, including: the receiving end attaches the target sending rate of the data stream to an acknowledgment ACK message, and notifies the sending end through the ACK message, so that the sending end sends the data stream according to the target sending rate; or, the receiving end converts the target sending rate of the data stream into the number of single-sending messages, and attaches the number of single-sending messages to a credit token, and notifies the sending end through the credit token, so that the sending end sends messages according to the number of single-sending messages.

[0088] As an example, the receiving end may notify the sending end of the target sending rate of the data stream in the following two ways:

[0089] Method 1: The receiving end attaches the target sending rate of the data stream to the ACK message and notifies the sending end through the ACK message so that the sending end can send the data stream according to the target sending rate.

[0090] Method 2: The receiving end can convert the target sending rate of the data stream into the number of messages sent at a single time, and append the number of messages sent at a single time to the credit token. The sending end is notified through the credit token so that the sending end can send messages according to the number of messages sent at a single time.

[0091] The embodiment of the present invention obtains congestion information through the receiving end, and the receiving end calculates the target sending rate of the data flow according to the congestion information, and notifies the sending end of the target sending rate, and the sending end executes the sending of the data flow according to the target sending rate. The flow control algorithm is implemented by the receiving end without replacing the switch, which can not only control the congestion degree of the network, but also has good feasibility and compatibility, and solves the problems that the congestion and flow control methods in the related art cannot accurately reflect the congestion degree, have poor compatibility, and have low feasibility.

[0092] 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 can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, 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, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0093] In this embodiment, a network congestion control device is also provided, which is used to implement the above embodiments and preferred implementation modes, 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 of 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.

[0094] Figure 7 is a structural block diagram of a network congestion control device according to an embodiment of the present invention, which is applied to a receiving end, such as Figure 2 As shown, the device comprises:

[0095] A first acquisition module 701 is used to acquire congestion information of a data flow;

[0096] A first calculation module 702, configured to calculate a target sending rate of the data flow according to the congestion information of the data flow;

[0097] The sending module 703 is configured to notify the sending end of the target sending rate of the data stream, wherein the sending end sends the data stream according to the target sending rate.

[0098] In an optional embodiment, the congestion information includes at least one of the following information:

[0099] The number of messages within a preset period, the number of messages marked by explicit congestion notification (ECN) within the preset period, and the current sending rate of the data flow.

[0100] In an optional embodiment, the congestion information includes the number of messages within a preset period, the number of messages marked by explicit congestion notifications (ECN) within the preset period, and the current sending rate of the data flow, and the first calculation module 702 includes:

[0101] A first determination submodule, configured to determine the probability that the message is marked by an explicit congestion notification (ECN) according to the number of messages within the preset period and the number of messages marked by the ECN;

[0102] An acquisition submodule, used for acquiring a mapping relationship between the probability and the relative length of the port queue;

[0103] The second determination submodule is used to determine the target sending rate of the data flow according to the probability, the mapping relationship between the probability and the relative length of the port queue, and the current sending rate of the data flow.

[0104] In an optional embodiment, the second determining submodule includes:

[0105] A determination unit, configured to determine the relative length of the port queue according to the probability and a mapping relationship between the probability and the relative length of the port queue;

[0106] A calculation unit is used for the receiving end to calculate the target sending rate of the data flow according to the relative length of the port queue and the current sending rate of the data flow. In an optional embodiment, the determination unit includes:

[0107] An acquisition subunit, used to acquire the weight of the data stream;

[0108] The determination subunit is used to determine the relative length of the port queue according to the weight of the data flow, the probability, and a mapping relationship between the probability and the relative length of the port queue.

[0109] In an optional embodiment, the data stream includes a large data stream and a small data stream, and the device further includes:

[0110] A second acquisition subunit, configured to acquire a ratio of a current transmission rate of the data stream to a physical bandwidth of a link and a corresponding relationship between the ratio and the weight before the receiving end acquires the weight of the current data stream;

[0111] A configuration subunit is used to configure different weights for the large data flow and the small data flow respectively according to the ratio and the corresponding relationship.

[0112] In an optional embodiment, the device further includes:

[0113] A classification subunit is used to divide the data stream into the large data stream and the small data stream according to the ratio of the current sending rate of the data stream to the physical bandwidth of the link before respectively configuring different weights for the large data stream and the small data stream; wherein, the data stream whose ratio of the current sending rate to the physical bandwidth of the link is greater than or equal to the preset ratio is the large data stream; and the data stream whose ratio of the current sending rate to the physical bandwidth of the link is less than the preset ratio is the small data stream.

[0114] In an optional embodiment, the current sending rate of the data stream is the initial sending rate, and the device further includes:

[0115] A second acquisition module, used to acquire the number of the data streams and the physical bandwidth of the link;

[0116] The second calculation module is used to calculate the initial sending rate of each of the data flows according to the number of the data flows and the physical bandwidth of the link.

[0117] In an optional embodiment, the sending module 703 includes:

[0118] A sending submodule is used to attach the target sending rate of the data stream to an acknowledgment ACK message, and notify the sending end through the ACK message so that the sending end sends the data stream according to the target sending rate; or, convert the target sending rate of the data stream into the number of single-sending messages, and attach the number of single-sending messages to a credit token, and notify the sending end through the credit token so that the sending end sends messages according to the number of single-sending messages.

[0119] 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.

[0120] An embodiment of the present invention 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.

[0121] 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 read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0122] An embodiment of the present invention 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.

[0123] 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.

[0124] 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.

[0125] Obviously, those skilled in the art should understand that the above modules or steps of the present invention 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 than here, 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 invention is not limited to any specific combination of hardware and software.

[0126] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for controlling network congestion, characterized in that: include: The receiving end obtains the congestion information of the data stream; The receiving end calculates a target sending rate of the data flow according to the congestion information of the data flow; The receiving end sends the target sending rate of the data stream to the sending end, wherein the sending end sends the data stream according to the target sending rate.

2. The method according to claim 1, characterized in that The congestion information includes at least one of the following information: The number of messages within a preset period, the number of messages marked by explicit congestion notification (ECN) within the preset period, and the current sending rate of the data flow.

3. The method according to claim 1, characterized in that The congestion information includes the number of messages within a preset period, the number of messages marked by explicit congestion notifications (ECN) within the preset period, and the current sending rate of the data flow. The receiving end calculates the target sending rate of the data flow according to the congestion information of the data flow, including: The receiving end determines the probability that the message is marked by ECN according to the number of messages in the preset period and the number of messages marked by ECN; The receiving end obtains a mapping relationship between the probability and the relative length of the port queue; The receiving end determines the target sending rate of the data flow according to the probability, the mapping relationship between the probability and the relative length of the port queue, and the current sending rate of the data flow.

4. The method according to claim 3, characterized in that The receiving end calculates a target sending rate of the data stream according to the probability, a mapping relationship between the probability and the relative length of the port queue, and a current sending rate of the data stream, including: The receiving end determines the relative length of the port queue according to the probability and the mapping relationship between the probability and the relative length of the port queue; The receiving end determines a target sending rate of the data flow according to the relative length of the port queue and the current sending rate of the data flow.

5. The method according to claim 4, characterized in that The receiving end determines the relative length of the port queue according to the probability and the mapping relationship between the probability and the relative length of the port queue, including: The receiving end obtains the weight of the data stream; The receiving end determines the relative length of the port queue according to the weight of the data flow, the probability, and a mapping relationship between the probability and the relative length of the port queue.

6. The method according to claim 5, characterized in that The data stream includes a large data stream and a small data stream, and before the receiving end obtains the weight of the current data stream, it also includes: The receiving end obtains a ratio of a current transmission rate of the data stream to a physical bandwidth of a link, and a corresponding relationship between the ratio and the weight; The receiving end configures different weights for the large data stream and the small data stream respectively according to the ratio and the corresponding relationship.

7. The method according to claim 6, characterized in that Before respectively configuring different weights for the large data stream and the small data stream, the method further includes: The receiving end divides the data stream into the large data stream and the small data stream according to the ratio of the current sending rate of the data stream to the physical bandwidth of the link; The data flow whose ratio of the current transmission rate to the link physical bandwidth is greater than or equal to the preset ratio is the large data flow; The data flow whose ratio of the current sending rate to the link physical bandwidth is smaller than the preset ratio is the small data flow.

8. The method according to claim 1, characterized in that: The current sending rate of the data stream is the initial sending rate, and before the receiving end obtains the congestion information of the data stream, the method further includes: The receiving end obtains the number of the data streams and the physical bandwidth of the link; The receiving end calculates an initial sending rate of each of the data streams according to the number of the data streams and the physical bandwidth of the link.

9. The method according to claim 1, characterized in that: The receiving end notifies the sending end of the target sending rate of the data stream so that the sending end sends the data stream according to the target sending rate, including: The receiving end adds the target sending rate of the data stream to an ACK message, and notifies the sending end through the ACK message, so that the sending end sends the data stream according to the target sending rate; or, The receiving end converts the target sending rate of the data stream into the number of messages sent at a single time, and appends the number of messages sent at a single time to the credit token, and notifies the sending end through the credit token so that the sending end sends messages according to the number of messages sent at a single time.

10. A network congestion control device, characterized in that: Applied to a receiving end, the device comprises: A first acquisition module, used to acquire congestion information of a data flow; A first calculation module, configured to calculate a target sending rate of the data flow according to the congestion information of the data flow; The sending module is used to notify the sending end of the target sending rate of the data stream, wherein the sending end sends the data stream according to the target sending rate.

11. The device according to claim 10, characterized in that The congestion information includes at least one of the following information: The number of messages within a preset period, the number of messages marked by explicit congestion notification (ECN) within the preset period, and the current sending rate of the data flow.

12. The device according to claim 11, characterized in that The computing module comprises: A determination submodule, configured for the receiving end to determine the probability that a message is marked by ECN according to the number of messages and the number of messages marked by ECN; An acquisition submodule, used for acquiring a mapping relationship between the probability and the relative length of the port queue; The calculation submodule is used for the receiving end to calculate the target sending rate of the data flow according to the probability, the mapping relationship between the probability and the relative length of the port queue, and the current sending rate of the data flow.

13. 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 described in any one of claims 1 to 9 when executed by a processor.

14. 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 described in any one of claims 1 to 9 are implemented.