Patent Description:
PFC (Priority-based Flow Control) is one of the functions in the IEEE Data Center Bridge protocol family, and is an enhancement to the pause mechanism for conventional flow control. Upon detecting congestion, a receiving terminal notifies a transmitting terminal to pause data transmission via a PFC PAUSE frame. However, since PFC completely stops data transmission of the corresponding priority, some problems may occur, including: unreasonable pause time, which may cause packet loss, repeat transmission of a previous protocol, congestion diffusion and the like; failure of mechanisms depending on some urgent data and data with a time limit, such as time synchronization data, when PFC is used for congestion control; and failure of a preemption function caused by PFC, for example, some mechanisms of TSN (Telecommunication Supporting Network) require the PFC function to be turned off, etc..

The above is only for an aid of understanding the technical solution herein, and does not represent an admission that the above is prior art.

A European patent application, whose publication number is <CIT>, discloses a network device implementing the subject system for end to end flow control may include at least one processor circuit that may be configured to detect that congestion is being experienced by at least one queue of a port and identify another network device that is transmitting downstream traffic being queued at the at least one queue of the port that is at least partially causing the congestion. The at least one processor circuit may be further configured to generate an end to end flow control message that comprises an identifier of the port, the end to end flow control message indicating that the downstream traffic should be flow controlled at the another network device. The at least one processor circuit may be further configured to transmit, out-of-band and through at least one intermediary network device, the end to end flow control message to the another network device.

A US patent application, whose publication number is <CIT>, discloses a network device that controls the communication of data frames between stations receives data frames having different levels of priority. The network device identifies the levels of priority and processes the frames based on the priority level. When a congestion condition associated with a resource on the network device occurs, the network device generates a pause frame that includes a priority indicator and transmits the pause frame to at least one station. When a receiving station receives the pause frame, the receiving station suspends transmission of data frames having a priority corresponding to the priority indicator and continues transmitting frames having other priorities.

Implementations, functions, features and advantages of the present disclosure will be further explained below with reference to the embodiments and the accompanying drawings.

It should be understood that the specific embodiments described herein are merely for illustration of the disclosure and are not intended to limit the disclosure.

As shown in <FIG> is a schematic structural diagram of a communication system in a hardware operating environment involved in the technical solution of the present disclosure.

As shown in <FIG>, the communication system may include: a processor <NUM>, such as a CPU, a network interface <NUM>, a user interface <NUM>, a memory <NUM>, and a communication bus <NUM>. The communication bus <NUM> is configured to enable connective communication between these components. The user interface <NUM> may include a display, and an input unit such as a keyboard, and optionally the user interface <NUM> may further include a standard wired interface, or a standard wireless interface. The network interface <NUM> may optionally include a standard wired interface or a standard wireless interface (e.g., a WI-FI interface). The memory <NUM> may be a high-speed RAM memory or a stable memory (e.g., a non-volatile memory) such as a magnetic disk memory. The memory <NUM> may optionally be a storage device separate from the processor <NUM> described above.

Optionally, the communication system may further include a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WiFi module, and the like. The sensor may include, for example, an optical sensor, a motion sensor, and the like. Apparently, the communication system may be further provided with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which are not enumerated herein.

Those skilled in the art will appreciate that the communication system structure shown in <FIG> does not constitute a limitation to the communication system, and the communication system may include more or fewer components than shown, or a combination of some components, or a different arrangement of components.

As shown in <FIG>, the memory <NUM>, as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a PFC frame-based congestion control program.

In the communication system shown in <FIG>, the network interface <NUM> is mainly configured to be connected to and perform data communication with a backend server; the user interface <NUM> is mainly configured to be connected to and perform data communication with a client (user terminal); and the processor <NUM> may be configured to call the PFC frame-based congestion control program stored in the memory <NUM>.

In this embodiment, the communication system includes: a memory <NUM>, a processor <NUM> and a PFC frame-based congestion control program stored on the memory <NUM> and executable on the processor <NUM>. When the processor <NUM> calling the PFC frame-based congestion control program stored in the memory <NUM>, steps of the PFC frame-based congestion control method provided in various embodiments of the present application are performed.

The present disclosure further provides a PFC frame-based congestion control method. Referring to <FIG> is a schematic flowchart illustrating a PFC frame-based congestion control method according to the present disclosure.

PFC is defined at a full-duplex MAC layer connected by point-to-point links. Many current network devices support PFC, where PFC allows <NUM> queues to be created on one Ethernet link, and assigns a priority (CoS) to each queue so that any one of the queues can be individually paused and resumed, while allowing traffic of other queues to pass through without interruption.

A standard format of a PFC PAUSE frame (hereinafter "PFC frame") is as shown in <FIG>, where "Destination Mac Address" represents a Destination Mac (MAC) Address field, which occupies <NUM> bytes, and has a designated value of <NUM>-<NUM>-C2-<NUM>-<NUM>-<NUM>; "Source Mac Address" represents an MAC address field of a source, which occupies <NUM> bytes; "type/len" represents an Ethernet frame length or type field, which has a value of <NUM>-<NUM> and indicates that the frame is an MAC control frame; "Control opcode" represents MAC control operation codes, which occupy <NUM> bytes; priority_enable_vector represents priority vector information, which occupies <NUM> bytes, in which a higher byte is reserved and has a default <NUM>, and each bit of a lower byte represents whether the corresponding time[n] is valid, e[n] represents priority n; when e[n] is <NUM>, time[n] is valid, and when e[n] is <NUM>, time[n] is invalid; and "time" represents a time for pausing frame transmission, including <NUM> array units from time[<NUM>] to time[<NUM>], each array unit being <NUM> bytes. When e[n] is <NUM>, time[n] has no meaning; when e[n] is <NUM>, time[n] represents a time for which a receiving station stops transmission of messages at priority n. The unit of time, namely pause_quanta, represents the time required by a physical layer chip to transmit <NUM> bits of data, and the total time priority_timer[n] = time[n] * pause_quanta, where time[n] takes a value in the range of <NUM> to <NUM>. Therefore, for each transmission of PFC PAUSE frames, the longest time length required for a peer device to pause transmission is: <NUM> * pause_quanta.

The PFC frame-based congestion control method includes the following steps S10 to S40.

At step S10, a receiving terminal of the communication system acquires, when a physical link or a logical link is congested, a priority corresponding to a congested queue.

When a queue of a certain priority is congested, a priority corresponding to the congested queue is further acquired.

It should be noted that the receiving terminal determines specific values of the priority_enable_vector field, the time field, and the like of the PFC frame according to the priority of the queue, and the standard format of the PFC frame is optimized in the present disclosure so that the priority_enable_vector corresponding to the optimized PFC frame includes <NUM> bytes, i.e., a higher byte and a lower byte. Each bit of the lower byte represents whether data transmission in the queue of the corresponding priority is temporarily stopped, and each bit of the higher byte represents whether data transmission in the queue of the corresponding priority is temporarily decelerated.

At step S20, the receiving terminal determines a deceleration parameter and/or pause time corresponding to the priority.

When congestion occurs, a solution for solving the congestion is further determined according to a queue length of the congested queue. In other words, the transmitting terminal is notified to control the congested queue by temporarily stopping data transmission, or temporarily decelerating data transmission, or firstly temporarily stopping and then temporarily decelerating data transmission, or firstly temporarily decelerating and then temporarily stopping data transmission. As for specifically which control mode is adopted, it is determined according to the queue length of the current queue. That is, a user presets a correspondence relationship between queue lengths and control modes, and when a congestion occurs, the correspondence relationship is retrieved according to the queue length to determine the control mode for solving the congestion.

Specifically, the congestion control means in the present disclosure is divided into two types, one is temporarily stopping data transmission, and the other is temporarily decelerating data transmission. If the control means of temporarily stopping data transmission is to be adopted, a pause time corresponding to the priority needs to be determined; and if the control means of temporarily decelerating data transmission is to be adopted, a deceleration rate and a deceleration time corresponding to the priority need to be determined.

At step S30, the receiving terminal generates, based on the deceleration parameter, the pause time and the priority, PFC frame-based control data.

After the priority, the deceleration parameter, and the pause time are determined, the PFC frame-based control data is further generated based on the deceleration parameter, the pause time and the priority. It should be noted that the standard PFC frame only reflects the means of temporarily stopping data transmission of the congested queue, and the present disclosure is enhancement based on the standard PFC frame, which supports temporary stop as well as temporary deceleration of data transmission at the same time, and is embodied by the control data.

At step S40, the receiving terminal transmits a congestion control instruction including the control data to a transmitting terminal of the communication system so that the transmitting terminal determines, based on the control data, a transmitting speed of data flow corresponding to the priority.

The receiving terminal generates, based on the deceleration parameter, the pause time and the priority, the PFC frame-based control data, and the receiving terminal transmits the congestion control instruction including the control data to the transmitting terminal so that the transmitting terminal determines, according to the control data, the transmitting speed of data flow of the queue corresponding to the priority. It should be noted that if the means of temporarily stopping data transmission is adopted, the data transmitting speed at the transmitting terminal is <NUM>.

Further, in an implementation, after step S40, the method further includes: when a control time corresponding to the control data is expired, the transmitting terminal transmits a data flow to the receiving terminal according to a preset speed (step S50).

Upon receiving the congestion control instruction, the transmitting terminal control the data transmitting speed according to the control data in the congestion control instruction. Meanwhile, the control data further provides the control time, that is, a pause time and a deceleration time. When the control time is expired, the transmitting terminal resumes the data transmitting speed, that is, transmits the data flow to the receiving terminal at the preset speed.

Further, in an implementation, before step S10, the method further includes: the receiving terminal detects in real time, based on a queue length corresponding to a queue, whether congestion occurs in any of the queues (step S60).

The receiving terminal detects in real time whether each queue is congested according to the queue length corresponding to each queue, and timely congestion control is required when a queue is congested, so as to avoid network paralysis.

Specifically, step S60 includes: the receiving terminal determines whether the queue length is greater than a threshold (step S61). When the queue length is greater than or equal to the threshold, it is determined that the queue is congested.

The receiving terminal detects in real time the queue length of each queue, and compares the queue length with the threshold. The threshold is a boundary value for determining congestion, and is set by a user according to actual situations, which is not limited in the present disclosure. When the length of the queue corresponding to a certain priority exceeds the threshold, it is determined that the queue is congested. In contrast, when the queue length does not exceed the threshold, it is determined that the queue is not congested and traffic control is not needed.

In the PFC frame-based congestion control method provided in the embodiments of the present disclosure, the receiving terminal of the communication system acquires, when a physical link or a logical link is congested, a priority corresponding to the congested queue; then the receiving terminal determines, based on the congested queue, the deceleration parameter and/or pause time corresponding to the priority; next, the receiving terminal generates, based on the deceleration parameter, the pause time and the priority, the PFC frame-based control data, and then the receiving terminal transmits the congestion control instruction including the control data to the transmitting terminal of the communication system so that the transmitting terminal determines, based on the control data, the transmitting speed of the data flow in the congested queue. By controlling the data traffic via the control data, the problem of network congestion is solved, and meanwhile, there is no packet loss in data transmission, emergency data can be transmitted in time, and a preemption mechanism can take effect.

Based on the above embodiment and referring to <FIG>, a PFC frame-based congestion control method according to the present disclosure is proposed. In this embodiment, step S30 includes the following steps S31 to S33. In this embodiment, the reserved higher byte in the priority_enable_vector field in the PFC frame format is used as an enable field for the deceleration function. A format of the expanded priority_enable_vector field is as shown in <FIG>. Similar to the lower byte, <NUM> bits represent the corresponding priority, r[n] represents priority n, when r[n] is <NUM>, it indicates enabling the deceleration function at priority n; and when r[n] is <NUM>, it indicates that the deceleration function is enabled. Information required by the deceleration function includes a deceleration time and a deceleration rate, which are embodied by modifying the time field. As shown in <FIG>, the modified time_s[n] and time_t[n] represents the deceleration rate and the deceleration time respectively. The deceleration rate may be represented in a percentage form, and take values from <NUM> to <NUM>, which correspond to <NUM>% to <NUM>%, and represent a rate after deceleration obtained by multiplying an original transmission rate by the percentage. The deceleration rate may also adopt a multiple form, and take values in the range from <NUM> to <NUM>, which represent dividing the original transmission rate by the value of multiple.

At step S31, when the control mode is determined to be a pause and deceleration mode according to a preset control strategy, the priority_enable_vector field and the time field corresponding to a PFC frame are updated based on the pause time, the deceleration parameter and the priority to obtain a first PFC frame and take the first PFC frame as the control data.

The preset control strategy includes three control modes, i.e., the pause and deceleration mode, a pause mode and a deceleration mode. The receiving terminal determines a current control mode for the congestion according to the preset control strategy based on the accumulated traffic corresponding to the current congested queue. The preset control strategy is customized by a user, and is not limited in the disclosure.

When the control mode is determined to be the pause and deceleration mode according to the preset control strategy, it indicates that temporary stop and temporary deceleration of data transmission are required, and the pause function and the deceleration function corresponding to the priority need to be enabled. That is, a bit corresponding to the priority in the lower byte of the priority_enable_vector field of the PFC frame needs to be set, and a bit corresponding to the priority in the higher byte of the priority_enable_vector field of the PFC frame needs to be set. Meanwhile, a byte corresponding to the priority in the time field of the PFC frame is updated based on the pause time and the deceleration parameter.

It should be noted that when temporary stop and temporary deceleration of data transmission are implemented at the same time, the pause time is the same as the deceleration time corresponding to the deceleration parameter, i.e., time_t[n] represents the deceleration time, as well as the pause time. The execution sequence of the temporary stop and the temporary deceleration is determined according to the preset control strategy.

The PFC frame updated based on the deceleration parameter, the pause time and the priority is the control data.

For example, both the deceleration function and the pause function are used at the same priority, and the time field is modified as deceleration information, where the deceleration rate takes a value of multiple. When a queue is congested, both the deceleration function and the pause function are implemented for the same priority. As shown in <FIG>, priority <NUM> needs to be decelerated and paused at a decelerated rate multiple <NUM>, and the deceleration time and the pause time are both <NUM>. The corresponding time_s[<NUM>] is <NUM>, time_t[<NUM>] is <NUM>, and the rest time fields are set to <NUM>. The deceleration enable r[<NUM>] and the pause enable e[<NUM>] are both set to <NUM>, the rest r[n] and e[n] are set to <NUM>, and a decimal value of the overall priority_enable_vector is <NUM>.

At step S32, when the control mode is determined to be the pause mode according to the preset control strategy, the priority_enable_vector field and the time field corresponding to the PFC frame are updated based on the pause time and the priority to obtain a second PFC frame and take the second PFC frame as the control data.

When the control mode is determined to be the pause mode according to the preset control strategy, it indicates that a bit corresponding to the priority in the lower byte of the priority_enable_vector field of the PFC frame needs to be set, and then the pause time is updated to a position where the time field corresponds to the priority. The PFC frame updated based on the pause time and the priority is the control data.

At step S33, when the control mode is determined to be the deceleration mode according to the preset control strategy, the priority_enable_vector field and the time field corresponding to the PFC frame are updated based on the deceleration parameter and the priority to obtain a third PFC frame and take the third PFC frame as the control data.

When the control mode is determined to be the deceleration mode according to the preset control strategy, the deceleration function corresponding to the priority need to be enabled. That is, a bit corresponding to the priority in the higher byte of the priority_enable_vector field of the PFC frame needs to be set, and then the deceleration parameter is updated to a position where the time field corresponds to the priority.

For example, when a queue is congested, only the deceleration function is used, and the time field is modified as deceleration information, where the deceleration rate takes a percentage. As shown in <FIG>, priorities <NUM> and <NUM> need to be decelerated at deceleration rates are <NUM>% and <NUM>% for a time of <NUM> and a time of <NUM>, respectively. The corresponding time_s[<NUM>] is <NUM>, time_t[<NUM>] is <NUM>, time_s[<NUM>] is <NUM>, time_t[<NUM>] is <NUM>, and the rest time fields are set to <NUM>. The deceleration enable r[<NUM>] and r[<NUM>] are both set to <NUM>, the rest r[n] are set to <NUM>, all e[n] are set to <NUM>, and a decimal value of the overall priority_enable_vector is <NUM>.

In the PFC frame-based congestion control method provided in the embodiments of the present disclosure, new control data is generated by enabling the reserved higher byte in the priority_enable_vector field and redefining the time field, and network congestion is solved based on the control data so that the congestion control mechanism is more flexible, and the technical means for solving network congestion are enriched.

Based on the above embodiments and referring to <FIG>, a PFC frame-based congestion control method according to the present disclosure is proposed. In this embodiment, step S30 includes the following steps S34 to S36. In this embodiment, the reserved higher byte in the priority_enable_vector field in the PFC frame format is used as an enable field for the deceleration function. A format of the expanded priority_enable_vector field is as shown in <FIG>, which is consistent with the description with respect to <FIG>, and thus is not repeated here. Information required by the deceleration function includes a deceleration time and a deceleration rate, which is embodied by adding a reduce field after the time field, including <NUM> array units from reduce [<NUM>] to reduce [<NUM>], each array unit being <NUM> bytes. the higher <NUM> bits of reduce[n] represent the deceleration rate reduce_s[n] and the lower <NUM> bits of reduce[n] represent the deceleration time reduce_t[n]. A PFC frame format with the added reduce field is as shown in <FIG>. The deceleration rate may be represented in the form of a percentage or a multiple, which is consistent with the description with respect to <FIG>, and thus is not repeated here. The deceleration time reduce_t[n] takes a value in the range of <NUM> to <NUM>, and is in the same unit as pause_quanta in the PFC frame, representing the time required by the physical layer chip to transmit <NUM> bits of data, and the total time priority_reduce_time[n] = reduce_t[n] * pause_quanta.

At step S34, when the control mode is determined to be the pause and deceleration mode according to the preset control strategy, the reduce field is added to the PFC frame, and the priority_enable_vector field, the time field and the reduce field corresponding to the PFC frame are updated based on the pause time, the deceleration parameter and the priority to obtain a fourth PFC frame and take the fourth PFC frame as the control data.

When the control mode is determined to be the pause and deceleration mode according to the preset control strategy, it indicates that temporary stop and temporary deceleration of data transmission are required, and the pause function and the deceleration function corresponding to the priority need to be enabled. That is, a bit corresponding to the priority in the lower byte of the priority_enable_vector field of the PFC frame needs to be set, and a bit corresponding to the priority in the higher byte of the priority_enable_vector field of the PFC frame needs to be set. Meanwhile, the reduce field is added after the time field, and then the deceleration parameter is updated to a position where the reduce field corresponds to the priority.

The PFC frame with the added reduce field and updated based on the deceleration parameter, the pause time and the priority is the control data.

For example, both the deceleration function and the pause function are used at the same priority, and the reduce field is added as deceleration information, where the deceleration rate takes a percentage value. As shown in <FIG>, priority <NUM> needs to be decelerated and paused at a decelerated rate percentage <NUM>% for a deceleration time of <NUM> and a pause time of <NUM>. The corresponding time[<NUM>] is <NUM>, reduce_s[<NUM>] is <NUM>, reduce_t[<NUM>] is <NUM>, and the rest time fields and reduce fields are set to <NUM>. The deceleration enable r[<NUM>] and the pause enable e[<NUM>] are both set to <NUM>, the rest r[n] and e[n] are set to <NUM>, and a decimal value of the overall priority_enable_vector is <NUM>.

Step S35, when the control mode is determined to be the pause mode according to the preset control strategy, the priority_enable_vector field and the time field corresponding to the PFC frame are updated based on the pause time and the priority to obtain a fifth PFC frame and take the fifth PFC frame as the control data.

When the control mode is determined to be the pause mode according to the preset control strategy, it indicates that the means of temporarily stopping data transmission is to be adopted, and the pause function corresponding to the priority need to be enabled. That is, a bit corresponding to the priority in the lower byte of the priority_enable_vector field of the PFC frame needs to be set, and then the pause time is updated to a position where the time field corresponds to the priority. The PFC frame updated based on the pause time and the priority is the control data.

At step S36, when the control mode is determined to be the deceleration mode according to the preset control strategy, the reduce field is added to the PFC frame, and the priority_enable_vector field and the reduce field corresponding to the PFC frame are updated based on the deceleration parameter and the priority to obtain a sixth PFC frame and take the sixth PFC frame as the control data.

When the control mode is determined to be the deceleration mode according to the preset control strategy, it indicates that the means of temporarily decelerating data transmission needs to be adopted, and the deceleration function corresponding to the priority need to be enabled. That is, a bit corresponding to the priority in the higher byte of the priority_enable_vector field of the PFC frame needs to be set, and meanwhile, the reduce field is added after the time field, and then the deceleration parameter is updated to a position where the reduce field corresponds to the priority.

For example, when a queue is congested, only the deceleration function is used, and the reduce field is added as deceleration information, where the deceleration rate takes a percentage. As shown in <FIG>, priorities <NUM> and <NUM> need to be decelerated at deceleration rates are <NUM>% and <NUM>% for a time of <NUM> and a time of <NUM>, respectively. The corresponding reduce_s[<NUM>] is <NUM>, reduce_t[<NUM>] is <NUM>, reduce_s[<NUM>] is <NUM>, reduce_t[<NUM>] is <NUM>, and the rest reduce fields are set to <NUM>. The deceleration enable r[<NUM>] and r[<NUM>] are both set to <NUM>, the rest r[n] are set to <NUM>, all e[n] are set to <NUM>, and a decimal value of the overall priority_enable_vector is <NUM>.

In the PFC frame-based congestion control method provided in the embodiments of the present disclosure, new control data is generated by enabling the reserved higher byte in the priority_enable_vector field and adding the reduce field after the time field as deceleration information, and network congestion is solved based on the control data so that the congestion control mechanism is more flexible, and the technical means for solving network congestion are enriched.

Based on the above embodiments and referring to <FIG>, a PFC frame-based congestion control method according to the present disclosure is proposed. In this embodiment, step S30 includes the following steps S37 to S39. In this embodiment, the reserved higher byte in the priority_enable_vector field in the PFC frame format is used as an enable field for the deceleration function. A format of the expanded priority_enable_vector field is as shown in <FIG>, which is consistent with the description with respect to <FIG>, and thus is not repeated here. A TLV (Type Length Value) field is added after the time field to indicate information required by deceleration function. The number of the added TLVs corresponds to the number of priorities enabling the deceleration function, and at most <NUM> TLV fields can be added. The information required by deceleration function is contained in sub-TLVs. A PFC frame format with the added TLV field is as shown in <FIG>. "Type" represents a type of the deceleration, which may be common deceleration including only a deceleration rate and a deceleration time; or may be a different deceleration algorithm, such as an RP (Reaction Point) algorithm, or other customized deceleration algorithms. "Type" occupies two bytes and "Length" occupies <NUM> bytes. When only the pause function is enabled in priority_enable_vector, i.e., when e[n] = <NUM> and r[n] = <NUM>, <NUM> bytes of the time[n] represent the original pause time without adding the TLV field; when only the deceleration function is enabled, i.e., when e[n] = <NUM> and r[n] = <NUM>, time[n] is invalid, and corresponding TLV field and sub-TLV are added; and when the pause function and the deceleration function are both enabled, i.e., when e[n] = <NUM> and r[n] = <NUM>, time[n] represents the pause time, and the corresponding TLV field and sub-TLV are added.

At step S37, when the control mode is determined to be the pause and deceleration mode according to the preset control strategy, the TLV field is added to the PFC frame, and the priority_enable_vector field, the time field and the TLV field corresponding to the PFC frame are updated based on the pause time, the deceleration parameter and the priority to obtain a seventh PFC frame and take the seventh PFC frame as the control data.

When the control mode is determined to be the pause and deceleration mode according to the preset control strategy, it indicates that temporary stop and temporary deceleration of data transmission are required, and the pause function and the deceleration function corresponding to the priority need to be enabled. That is, a bit corresponding to the priority in the lower byte of the priority_enable_vector field of the PFC frame needs to be set, and a bit corresponding to the priority in the higher byte of the priority_enable_vector field of the PFC frame needs to be set. Meanwhile, the TLV field is added after the time field, and then the deceleration parameter is updated to a position where the TLV field corresponds to the priority. It should be noted that the TLV field is added only when the deceleration function is enabled. The PFC frame with the added TLV field and updated based on the deceleration parameter, the pause time and the priority is the control data.

For example, when a queue is congested, some priorities adopt the deceleration function, while some priorities adopt the pause function, and the TLV field is added as deceleration information, where the deceleration type adopts the RP algorithm. The PFC frame format is as shown in <FIG>, in which priority <NUM> needs to be decelerated, and priority <NUM> needs to be paused. The deceleration type adopts the RP algorithm with a pause time of <NUM>. time[<NUM>] is <NUM>, and the rest time fields are set to <NUM>. The deceleration enable r[<NUM>] and the pause enable e[<NUM>] are both set to <NUM>, the rest r[n] and e[n] are set to <NUM>, and a decimal value of the overall priority_enable_vector is <NUM>. The Type is RP algorithm, and parameters to be carried are in sub-TLVs.

At step S38, when the control mode is determined to be the pause mode according to the preset control strategy, the priority_enable_vector field and the time field corresponding to the PFC frame are updated based on the pause time and the priority to obtain an eighth PFC frame and take the eighth PFC frame as the control data.

At step S39, when the control mode is determined to be the deceleration mode according to the preset control strategy, the TLV field is added to the PFC frame, and the priority_enable_vector field and the TLV field corresponding to the PFC frame are updated based on the deceleration parameter and the priority to obtain a ninth PFC frame and take the ninth PFC frame as the control data.

When the control mode is determined to be the deceleration mode according to the preset control strategy, it indicates that the means of temporarily decelerating data transmission needs to be adopted, and the deceleration function corresponding to the priority need to be enabled. That is, a bit corresponding to the priority in the higher byte of the priority_enable_vector field of the PFC frame needs to be set, and meanwhile, the TLV field is added after the time field, and then the deceleration parameter is updated to a position where the TLV field corresponds to the priority.

In the PFC frame-based congestion control method provided in the embodiments of the present disclosure, new control data is generated by enabling the reserved higher byte in the priority_enable_vector field and adding the TLV field after the time field as deceleration information, and network congestion is solved based on the control data so that the congestion control mechanism is more flexible, and the technical means for solving network congestion are enriched.

The present disclosure further provides a PFC frame-based congestion control apparatus. Referring to <FIG> is a schematic diagram illustrating functional modules in a PFC frame-based congestion control apparatus according to the present disclosure.

The PFC frame-based congestion control apparatus includes: an acquisition module <NUM> by which a receiving terminal of a communication system acquires, when a physical link or a logical link is congested, a priority corresponding to a congested queue; a determination module <NUM> by which the receiving terminal determines a deceleration parameter and/or pause time corresponding to the priority; a generation module <NUM> by which the receiving terminal generates, based on the deceleration parameter, the pause time and the priority, PFC frame-based control data; and a transmitting module <NUM> by which the receiving terminal transmits a congestion control instruction including the control data to a transmitting terminal of the communication system so that the transmitting terminal determines, based on the control data, a transmitting speed of data flow corresponding to the priority.

Further, the PFC frame-based congestion control apparatus may further include: a detection unit by which the receiving terminal detects in real time, based on a queue length corresponding to a queue, whether congestion occurs in any of the queues.

Further, the detection unit specifically includes: a judgement unit by which the receiving terminal determines whether the queue length is greater than a threshold. When the queue length is greater than or equal to the threshold, it is determined that the queue is congested.

Further, the generation module <NUM> may include: a sub-generation unit <NUM> configured to, update, based on the pause time, the deceleration parameter and the priority when a control mode is determined to be a pause and deceleration mode according to a preset control strategy, the priority_enable_vector field and the time field corresponding to the PFC frame to obtain a first PFC frame and take the first PFC frame as the control data; a sub-generation unit <NUM> configured to, update, based on the pause time and the priority when the control mode is determined to be a pause mode according to the preset control strategy, the priority_enable_vector field and the time field corresponding to the PFC frame to obtain a second PFC frame and take the second PFC frame as the control data; and a sub-generation unit <NUM> configured to, update, based on the deceleration parameter and the priority when the control mode is determined to be a deceleration mode according to the preset control strategy, the priority_enable_vector field and the time field corresponding to the PFC frame to obtain a third PFC frame and take the third PFC frame as the control data.

Further, the generation module <NUM> may include: a sub-generation unit <NUM> configured to, add a reduce field to the PFC frame when the control mode is determined to be the pause and deceleration mode according to the preset control strategy, and update, based on the pause time, the deceleration parameter and the priority, the priority_enable_vector field, the time field and the reduce field corresponding to the PFC frame to obtain a fourth PFC frame and take the fourth PFC frame as the control data; a sub-generation unit <NUM> configured to, update, based on the pause time and the priority when the control mode is determined to be the pause mode according to the preset control strategy, the priority_enable_vector field and the time field corresponding to the PFC frame to obtain a fifth PFC frame and take the fifth PFC frame as the control data; and a sub-generation unit <NUM> configured to, add the reduce field to the PFC frame when the control mode is determined to be the deceleration mode according to the preset control strategy, and update, based on the deceleration parameter and the priority, the priority_enable_vector field and the reduce field corresponding to the PFC frame to obtain a sixth PFC frame and take the sixth PFC frame as the control data.

Further, the generation module <NUM> may include: a sub-generation unit <NUM> configured to, add a TLV field to the PFC frame when the control mode is determined to be the pause and deceleration mode according to the preset control strategy, and update, based on the pause time, the deceleration parameter and the priority, the priority_enable_vector field, the time field and the TLV field corresponding to the PFC frame to obtain a seventh PFC frame and take the seventh PFC frame as the control data; a sub-generation unit <NUM> configured to, update, based on the pause time and the priority when the control mode is determined to be the pause mode according to the preset control strategy, the priority_enable_vector field and the time field corresponding to the PFC frame to obtain an eighth PFC frame and take the eighth PFC frame as the control data; and a sub-generation unit <NUM> configured to, add the TLV field to the PFC frame when the control mode is determined to be the deceleration mode according to the preset control strategy, and update, based on the deceleration parameter and the priority, the priority_enable_vector field and the TLV field corresponding to the PFC frame to obtain a ninth PFC frame and take the ninth PFC frame as the control data.

Further, the PFC frame-based congestion control apparatus may further include: an adjustment unit by which the transmitting terminal transmits, when a control time corresponding to the control data is expired, the data flow to the receiving terminal according to a preset speed.

The present disclosure further provides a non-transitory (non-volatile) computer storage medium storing a computer executable instruction which can cause any method in the above method embodiments to be implemented.

The present disclosure further provides a computer program product including a computer program stored on a non-transitory computer-readable storage medium, the computer program including a program instruction which, when executed by a computer, causes the computer to perform the method according any one of the above method embodiments.

It should be noted that the term "comprise", "comprising" or any variant thereof used herein means to be non-exclusive so that a process, method, item or system including a series of elements includes not only said elements, but also other elements not explicitly listed, or inherent elements of such processes, methods, items or systems. In the absence of more limitations, an element defined by "comprising a. " do not exclude the existence of additional identical elements in the process, method, item or system including the element.

The sequence numbers of the embodiments of the present disclosure are for description only and do not represent preferences of the embodiments.

Through the description of the above implementations, those skilled in the art can clearly understand that the method according to the above embodiment may be implemented by means of software plus a necessary general hardware platform. Obviously, it may also be implemented by hardware, but in most cases, the former is preferable. Based on such understanding, the technical solutions of the present invention essentially or, in other words, a part thereof contributing to the prior art, can be embodied in a form of a software product, wherein the software product is stored in a storage medium as described above (such as an ROM/RAM, a disk, or an optical disc) and includes a number of instructions to make a terminal device (which may be a mobile phone, a computer, a server, an air conditioner or a network device, etc.) to execute the methods of the various embodiments of the present disclosure.

Claim 1:
A Priority-based Flow Control, called PFC, frame-based congestion control method applied to a communication system supporting PFC, wherein each physical link or logical link corresponding to the communication system comprises a preset number of queues, and the PFC frame-based congestion control method comprises:
acquiring (S10), by a receiving terminal of the communication system when a physical link or a logical link is congested, a priority corresponding to a congested queue;
determining (S20), by the receiving terminal, a deceleration parameter and/or pause time corresponding to the priority;
generating (S30), by the receiving terminal based on the deceleration parameter, the pause time and the priority, PFC frame-based control data; and
transmitting (S40), by the receiving terminal, a congestion control instruction comprising the control data to a transmitting terminal of the communication system so that the transmitting terminal determines, based on the control data, a transmitting speed of data flow corresponding to the priority,
wherein the PFC frame comprises a priority_enable_vector field, the priority_enable_vector field comprises two bytes, one bit corresponding to the congested queue in a higher byte of the two bytes represents whether data transmission in the congested queue is temporarily decelerated, and one bit corresponding to the congested queue in a lower byte of the two types represents whether the data transmission in the congested queue is temporarily stopped.