Communication method and related equipment

The Top K algorithm recognizes and processes congestion flows in the communication system, solving the problem that congestion flows cannot be accurately identified and processed in the prior art, and achieving the effect of improving the packet forwarding efficiency.

CN120017588APending Publication Date: 2025-05-16HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311529140.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-15
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

When the existing communication system forwards multiple message streams, it is impossible to accurately identify and process congested streams, resulting in a reduced packet forwarding efficiency.

Method used

The Top K algorithm determines K message streams and performs accurate slowdown processing on these streams to improve packet forwarding efficiency.

Benefits of technology

It realizes accurate identification and processing of congestion streams, reduces the congestion impact of message streams, and avoids unnecessary impact on other message streams, thereby improving message forwarding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120017588A_ABST
    Figure CN120017588A_ABST
Patent Text Reader

Abstract

The invention provides a communication method and related equipment, which are used for determining K message flows through a Top K algorithm and can accurately realize recognition of congestion flows and speed reduction processing of the congestion flows so as to improve the message forwarding efficiency. In the method, after a first communication device receives N message flows with the same destination address, the first communication device determines K message flows from the N message flows and carries out speed reduction processing on the K message flows. Wherein the K message flows are flows determined based on a Top K algorithm. In other words, in the process that the first communication device forwards N message flows with the same destination address, the processing basis for the first communication device to execute the speed reduction processing is K message flows selected based on the Top K algorithm in the N flows. Moreover, the processing object of the first communication device executing the speed reduction processing is the K message flows.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communications, and in particular to a communication method and related equipment. Background Art

[0002] In a communication system, messages can be transmitted between different communication nodes through forwarding by one or more forwarding nodes (such as routers, switches, etc.). For a certain forwarding node, the forwarding node can forward one or more message flows.

[0003] Generally, when a forwarding node forwards multiple message flows, the forwarding node can determine whether the multiple message flows are congested based on information of a cache queue (such as an average queue length or an instantaneous queue length of the cache queue, etc.) Furthermore, when the forwarding node determines that congestion occurs, the forwarding node will decelerate the multiple message flows to reduce the impact of the congestion on the message flows.

[0004] However, in the process of implementing the forwarding node forwarding multiple message flows, congestion in any message flow in the cache queue may cause the forwarding node to indiscriminately slow down the multiple message flows. This congestion identification and congestion processing method may lead to reduced message forwarding efficiency. Summary of the invention

[0005] The present application provides a communication device and related equipment, which are used to determine K message flows through a Top K algorithm, and can accurately identify congested flows and reduce the speed of congested flows, so as to improve the message forwarding efficiency.

[0006] The first aspect of the present application provides a communication method, which is executed by a first communication device, or the method is executed by some components (such as a processor, a chip or a chip system, etc.) in the first communication device, or the method can also be implemented by a logic module or software that can realize all or part of the functions of the first communication device. In the first aspect and its possible implementation, the method is described as being executed by a first communication device, and the first communication device can be a communication device such as a router, a switch, a virtual switch, a virtual router, and an intelligent network card. In this method, the first communication device receives N message flows, N is an integer greater than 1; wherein the destination addresses of the N message flows are the same; the first communication device determines K message flows from the N message flows, K is an integer less than or equal to N; wherein the K message flows are flows determined based on the Top K algorithm; the first communication device performs speed reduction processing on the K message flows.

[0007] Based on the above technical solution, after the first communication device receives N message flows with the same destination address, the first communication device determines K message flows from the N message flows and performs speed reduction processing on the K message flows. Among them, the K message flows are flows determined based on the Top K algorithm. In other words, in the process of forwarding N message flows with the same destination address by the first communication device, the processing basis for the first communication device to perform speed reduction processing is the K message flows selected based on the Top K algorithm in the N processes. And, the processing object of the first communication device to perform speed reduction processing is the K message flows. Therefore, in the process of forwarding N message flows by the first communication device, compared with the implementation method of performing speed reduction processing on the N message flows when any of the N message flows is congested, in the above technical solution, the K message flows determined by the Top K algorithm can accurately realize the identification of congested flows and the speed reduction processing of congested flows, so as to improve the message forwarding efficiency.

[0008] In addition, in the above technical solution, when K is less than N, the first communication device can reduce the impact of congestion on the message flow while avoiding the impact on other message flows as much as possible by accurately identifying the congested flow and slowing down the congested flow.

[0009] In this application, message flow can be replaced by other expressions, such as business flow, transmission flow, etc.

[0010] It should be noted that, in the process of the first communication device performing the speed reduction processing on the K message flows, the first communication device may perform the speed reduction processing on the K message flows in a direct or indirect manner.

[0011] For example, in the process of the first communication device directly slowing down the K message flows, the first communication device may discard the messages of the K message flows based on the first probability. In addition, the discarding process will cause the source end of the K message flows to perceive packet loss, and the source end may perform speed reduction processing based on the perceived packet loss (for example, the protocol stack of the source end achieves speed reduction by lowering the sliding window). It should be understood that the above-mentioned first communication device discarding the messages of the K message flows will reduce the flow rate of the K message flows, and / or, the source end performing speed reduction processing based on the perceived packet loss will also reduce the flow rate of the K message flows.

[0012] Exemplarily, the discarding mechanism may be a mechanism based on random early detection (RED), or a mechanism based on weighted random early detection (WRED), etc., which is not limited here.

[0013] For another example, in the process of the first communication device slowing down the K message flows in an indirect manner, the first communication device may mark the messages of the K message flows based on the second probability and then forward the K message flows, and the mark is used to trigger the receiving direction of the K message flows to send indication information to the sender of the K message flows, so that when the sender subsequently transmits other messages of the K message flows, it can slow down the other messages of the K message flows based on the indication information. Exemplarily, the mark can be an explicit congestion notification (ECN) identifier, or a congestion indication (CI), etc., which is not limited here. Exemplarily, the indication information can be a congestion notification message (CNM), or a congestion notification packet (CNP), etc., which is not limited here.

[0014] It can be understood that the above-mentioned first probability or second probability can be determined by the curve probability based on the average length of the cache queue in the transmission control protocol (TCP), or can be determined by the curve probability based on the instantaneous length of the cache queue in the data center transmission control protocol (DCTCP), or can be determined by other methods, which is not limited here.

[0015] In a possible implementation manner of the first aspect, the first communication device determines K message flows from the N message flows, including: the first communication device determines the K message flows from the N message flows based on the Top K algorithm.

[0016] Based on the above technical solution, the first communication device can determine K message flows from the N message flows based on the Top K algorithm, so that the first communication device can determine K message flows locally, in order to quickly determine the K message flows.

[0017] In a possible implementation of the first aspect, the first communication device determines K message flows from the N message flows based on a Top K algorithm, including: the first communication device determines K message flows from the N message flows based on the Top K algorithm by using parameters of the N message flows, and the parameters include at least one of the following: bandwidth of the flow, cumulative number of bytes of the flow, duration of the flow, number of messages in the cache queue of the flow, and number of bytes in the cache queue of the flow.

[0018] Based on the above technical solution, when the first communication device determines K message flows from the N message flows based on the Top K algorithm, the first communication device can use the above at least one parameter as the basis for determining the K message flows to improve the flexibility of the solution implementation.

[0019] It should be understood that the bandwidth of a flow can be replaced by other expressions, such as the throughput of a flow, the rate of a flow, etc.

[0020] It should be noted that, among the parameters of at least one of the above-mentioned message flows, the value of any parameter is positively correlated with the possibility of congestion in the message flow. In other words, the larger the bandwidth of a message flow (or the more cumulative bytes of the flow, the longer the duration of the flow, the more messages in the cache queue of the flow, the more bytes in the cache queue of the flow, etc.), the greater the possibility of congestion when the first communication device forwards the message flow; conversely, the smaller the bandwidth of a message flow (or the fewer cumulative bytes of the flow, the shorter the duration of the flow, the fewer messages in the cache queue of the flow, the fewer bytes in the cache queue of the flow, etc.), the smaller the possibility of congestion when the first communication device forwards the message flow. Therefore, the implementation method of using at least one of the above-mentioned parameters as one of the input parameters of the Top K algorithm can improve the accuracy of determining the K message flows that are congested based on the Top K algorithm.

[0021] It can be understood that the Top K algorithm can be understood as a rule for selecting the top K packet flows, such as selecting the top K packet flows in terms of at least one parameter among the bandwidth of the flow, the cumulative number of bytes of the flow, the duration of the flow, the number of packets in the cache queue of the flow, and the number of bytes in the cache queue of the flow.

[0022] Optionally, when the parameter includes two or more parameters of at least one of the above items, the two or more parameters can be used as the basis for the Top K algorithm to determine K message flows, or the weighted results of the two or more parameters can be used as the basis for the Top K algorithm to determine K message flows, which is not limited here.

[0023] Optionally, in addition to the at least one parameter mentioned above, the parameter may also include other parameters related to the possibility of congestion occurring during message flow (eg, positive correlation, negative correlation), which is not limited here.

[0024] In a possible implementation of the first aspect, before the first communication device determines K message streams from the N message streams, the method also includes: the first communication device receives first information, and the first information is used to indicate the K message streams; the first communication device determines the K message streams from the N message streams, including: the first communication device determines the K message streams from the N message streams based on the first information.

[0025] Based on the above technical solution, when the first communication device determines K message flows from the N message flows based on the Top K algorithm, the first communication device can use the received first information as the basis for determining the K message flows to save the computing overhead of the first communication device.

[0026] In a possible implementation manner of the first aspect, the method further includes: the first communication device determines not to perform speed reduction processing on other message flows among the N message flows except the K message flows.

[0027] Based on the above technical solution, in the process of forwarding N message flows, the first communication device can accurately identify the congested flow and reduce the speed of the congested flow through the K message flows determined by the Top K algorithm. In addition, the first communication device can also determine not to reduce the speed of other message flows except the K message flows in the N message flows. Therefore, compared with the implementation method of reducing the speed of the N message flows when any of the N message flows is congested, the above technical solution can avoid the impact of reducing the speed of the other message flows, so as to improve the service performance of the service to which the other message flows belong.

[0028] In a possible implementation manner of the first aspect, the bandwidth of any message flow among the K message flows is greater than or equal to a threshold; or, the bandwidth of any message flow among the K message flows is greater than or equal to the bandwidth of other message flows among the N message flows except the K message flows.

[0029] It should be understood that the bandwidth of any one of the K message flows is greater than or equal to the bandwidth of other message flows among the N message flows except the K message flows. It can be expressed as follows: the K message flows are message flows with larger bandwidths among the N message flows, the K message flows are message flows with the largest bandwidths among the N message flows, and the bandwidth of the K message flows is greater than or equal to the bandwidth of the other NK message flows among the N message flows.

[0030] Based on the above technical solution, among the K message flows determined from the N message flows by the Top K algorithm, the bandwidth of the K message flows is greater than or equal to the threshold, or the bandwidth of the K message flows is greater than or equal to the bandwidth of the other NK message flows in the N message flows. Among them, since the bandwidth size of the message flow is positively correlated with the possibility of congestion of the message flow, for this reason, through the above method, the Top K algorithm can be used to determine the message flows with larger bandwidth as the K message flows to perform speed reduction processing, so as to reduce the possibility of congestion as much as possible.

[0031] In a possible implementation manner of the first aspect, the destination addresses of the N message flows are destination addresses of terminals; or, the destination addresses of the N message flows are destination addresses of network devices.

[0032] Based on the above technical solution, when the first communication device is forwarding N message streams, the same network device exists on the forwarding path of the N message streams, or the terminals on the forwarding path of the N message streams are the same. In this way, the first communication device can determine that the destination addresses of the N message streams are the same.

[0033] The second aspect of the present application provides a communication method, which is executed by a second communication device, or the method is executed by some components (such as a processor, a chip or a chip system, etc.) in the second communication device, or the method can also be implemented by a logic module or software that can realize all or part of the functions of the second communication device. In the first aspect and its possible implementation, the method is described as being executed by the second communication device as an example, and the second communication device can be a communication device such as a router, a switch, a virtual switch, a virtual router, and an intelligent network card. Alternatively, the second communication device and the first communication device can be different hardware modules / software modules / logic modules / chips in the communication device, for example, the first communication device can be a switch buffer (SWB), a memory management unit (MMU), a message processing pipeline (Pipeline), a forwarding chip, and other modules in the communication device; the second communication device can be a forwarding chip in the communication device, a service co-processor (SCOP) external to the forwarding chip, and the like. In this method, the second communication device determines K message flows from N message flows based on the Top K algorithm, where N is an integer greater than 1 and K is an integer less than or equal to N; wherein the destination addresses of the N message flows are the same; the second communication device sends first information, and the first information is used to indicate that the K message flows are flows determined based on the Top K algorithm; the first information is used to slow down the K message flows.

[0034] Based on the above technical solution, after the second communication device determines K message flows from N message flows based on the Top K algorithm, the second communication device can send a first information indicating that the K message flows are flows determined based on the Top K algorithm. In addition, the first information is used to reduce the speed of the K message flows, so that the recipient of the first information (for example, the first communication device) can reduce the speed of the K message flows based on the first information. Thus, in the process of forwarding N message flows, the first communication device reduces the speed of the N message flows when any of the N message flows is congested, compared with the implementation method of reducing the speed of the N message flows in the case where any of the N message flows is congested. In the above technical solution, the first communication device receives the first information of the second communication device, so that the first communication device can accurately identify the congested flow and reduce the speed of the congested flow through the K message flows determined by the Top K algorithm indicated by the first information, so as to improve the message forwarding efficiency.

[0035] In a possible implementation manner of the second aspect, the bandwidth of any message flow among the K message flows is greater than or equal to a threshold; or, the bandwidth of any message flow among the K message flows is greater than or equal to the bandwidth of other message flows among the N message flows except the K message flows.

[0036] Based on the above technical solution, among the K message flows determined from the N message flows by the Top K algorithm, the bandwidth of the K message flows is greater than or equal to the threshold, or the bandwidth of the K message flows is greater than or equal to the bandwidth of the other NK message flows in the N message flows. Among them, since the bandwidth size of the message flow is positively correlated with the possibility of congestion of the message flow, for this reason, through the above method, the Top K algorithm can be used to determine the message flows with larger bandwidth as the K message flows to perform speed reduction processing, so as to reduce the possibility of congestion as much as possible.

[0037] In a possible implementation manner of the second aspect, the destination addresses of the N message flows are destination addresses of terminals; or, the destination addresses of the N message flows are destination addresses of network devices.

[0038] Based on the above technical solution, when the first communication device is forwarding N message streams, the same network device exists on the forwarding path of the N message streams, or the terminals on the forwarding path of the N message streams are the same. In this way, the first communication device can determine that the destination addresses of the N message streams are the same.

[0039] In a third aspect of the present application, a communication device is provided, which can implement the method in the first aspect or any possible implementation of the first aspect. The device includes corresponding units or modules for executing the above method. The units or modules included in the device can be implemented by software and / or hardware. For example, the device can be a first communication device, or the device can be a component in the first communication device (such as a processor, a chip or a chip system, etc.), or the device can also be a logic module or software that can implement all or part of the functions of the first communication device.

[0040] The device includes a transceiver unit and a processing unit; the transceiver unit is used to receive N message flows, N is an integer greater than 1; wherein the destination addresses of the N message flows are the same; the processing unit is used to determine K message flows from the N message flows, K is an integer less than or equal to N; wherein the K message flows are flows determined based on a Top K algorithm; the processing unit is also used to perform speed reduction processing on the K message flows.

[0041] In a possible implementation manner of the third aspect, the processing unit is used to determine K message flows from the N message flows, including: the processing unit is used to determine the K message flows from the N message flows based on the Top K algorithm.

[0042] In a possible implementation of the third aspect, the processing unit is used to determine K message flows from the N message flows based on the Top K algorithm, including: the processing unit is used to determine K message flows from the N message flows based on the Top K algorithm through parameters of the N message flows, and the parameters include at least one of the following: the bandwidth of the flow, the cumulative number of bytes of the flow, the duration of the flow, the number of messages in the cache queue of the flow, and the number of bytes in the cache queue of the flow.

[0043] In a possible implementation of the third aspect, the transceiver unit is also used to receive first information, and the first information is used to indicate the K message streams; the processing unit is used to determine the K message streams from the N message streams, including: the processing unit is used to determine the K message streams from the N message streams based on the first information.

[0044] In a possible implementation manner of the third aspect, the processing unit is further used to determine not to perform speed reduction processing on other message flows among the N message flows except the K message flows.

[0045] In a possible implementation manner of the third aspect, the bandwidth of any message flow among the K message flows is greater than or equal to a threshold; or, the bandwidth of any message flow among the K message flows is greater than or equal to the bandwidth of other message flows among the N message flows except the K message flows.

[0046] In a possible implementation manner of the third aspect, the destination addresses of the N message flows are destination addresses of terminals; or, the destination addresses of the N message flows are destination addresses of network devices.

[0047] In a fourth aspect of the present application, a communication device is provided, which can implement the method in the second aspect or any possible implementation of the second aspect. The device includes corresponding units or modules for executing the above method. The units or modules included in the device can be implemented by software and / or hardware. For example, the device can be a second communication device, or the device can be a component in the second communication device (such as a processor, a chip or a chip system, etc.), or the device can also be a logic module or software that can implement all or part of the functions of the second communication device.

[0048] The device includes a transceiver unit and a processing unit; the processing unit is used to determine K message flows from N message flows based on the Top K algorithm, N is an integer greater than 1, and K is an integer less than or equal to N; wherein the destination addresses of the N message flows are the same; the transceiver unit is used to send first information, the first information is used to indicate that the K message flows are flows determined based on the Top K algorithm; the first information is used to reduce the speed of the K message flows.

[0049] In a possible implementation manner of the fourth aspect, the bandwidth of any message flow among the K message flows is greater than or equal to a threshold; or, the bandwidth of any message flow among the K message flows is greater than or equal to the bandwidth of other message flows among the N message flows except the K message flows.

[0050] In a possible implementation manner of the fourth aspect, the destination addresses of the N message flows are destination addresses of terminals; or, the destination addresses of the N message flows are destination addresses of network devices.

[0051] In a fifth aspect, the present application provides a communication device, which includes at least one processor, and the at least one processor is used to execute a program or instruction stored in a memory, so that the device implements the method of the first aspect or any possible implementation of the first aspect.

[0052] In a sixth aspect, the present application provides a communication device, which includes at least one processor, and the at least one processor is used to execute a program or instruction stored in a memory, so that the device implements the method of the second aspect or any possible implementation of the second aspect.

[0053] In a seventh aspect, the present application provides a communication device, comprising at least one logic circuit and an input / output interface; the logic circuit is used to execute the method as described in the first aspect or any possible implementation of the first aspect.

[0054] In an eighth aspect, the present application provides a communication device, comprising at least one logic circuit and an input / output interface; the logic circuit is used to execute the method as described in the second aspect or any possible implementation of the second aspect.

[0055] In a ninth aspect of the present application, a computer-readable storage medium is provided for storing computer instructions; when the computer instructions are executed by a processor, the processor executes the method as described in the first aspect or any possible implementation of the first aspect, or the processor executes the method as described in the second aspect or any possible implementation of the second aspect.

[0056] The tenth aspect of the present application provides a computer program product (or computer program), which includes instructions. When the instructions in the computer program product are executed by a processor, the processor executes the method of the above-mentioned first aspect or any possible implementation of the first aspect, or the processor executes the above-mentioned second aspect or any possible implementation of the second aspect.

[0057] In the eleventh aspect of the present application, a chip system is provided, which includes a communication interface and a processor, wherein the communication interface and the processor are coupled to support a communication device to implement the functions involved in the above-mentioned first aspect or any possible implementation method of the first aspect, or to support a communication device to implement the functions involved in the above-mentioned second aspect or any possible implementation method of the second aspect.

[0058] In a possible design, the chip system may also include a memory for storing program instructions and data necessary for the communication device. The chip system may be composed of a chip, or may include a chip and other discrete devices. Optionally, the chip system also includes an interface circuit, which provides program instructions and / or data for the at least one processor.

[0059] The twelfth aspect of the present application provides a communication system, which includes the communication device of the third aspect and the communication device of the fourth aspect, or the communication system includes the communication device of the fifth aspect and the communication device of the sixth aspect, or the communication system includes the communication device of the seventh aspect and the communication device of the eighth aspect.

[0060] Optionally, the communication system further includes other devices in the above implementation manner, such as a device for sending N message streams, a device for receiving N message streams (such as a network device or a terminal), etc.

[0061] Among them, the technical effects brought about by any design method in the third aspect to the twelfth aspect can refer to the technical effects brought about by different implementation methods in the above-mentioned first aspect to the second aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Figure 1 A schematic diagram of a communication system provided for this application;

[0063] Figure 2a to Figure 2e This is a schematic diagram of the implementation of the ECN marking involved in this application;

[0064] Figure 3 A schematic diagram of an implementation of the communication method provided in this application;

[0065] Figure 4 Another implementation diagram of the communication method provided by the present application;

[0066] Figure 5 Another schematic diagram of a communication system provided for the present application;

[0067] Figure 6 A schematic diagram of a communication device provided by the present application;

[0068] Figure 7 Another schematic diagram of a communication device provided by the present application. DETAILED DESCRIPTION

[0069] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0070] The terms "system" and "network" in the embodiments of the present application can be used interchangeably. "At least one" refers to one or more, and "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B, which can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one of the following (single)" or its similar expression refers to any combination of these items, including any combination of single (single) or plural (single). For example, "at least one of A, B and C" includes A, B, C, AB, AC, BC or ABC. And, unless otherwise specified, the ordinal words such as "first" and "second" mentioned in the embodiments of the present application are used to distinguish multiple objects, and are not used to limit the order, timing, priority or importance of multiple objects.

[0071] It should be noted that, in this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0072] It should be understood that in the present application, "when", "if" and "if" all mean that the device will take corresponding actions under certain objective circumstances, and do not limit the time, nor do they require that the device must have a judgment action when it is implemented, nor do they mean that there are other limitations.

[0073] In this application, unless otherwise specified, the same or similar parts between various embodiments or implementations can refer to each other. In each embodiment of this application, and each implementation method / implementation method / implementation method in each embodiment, if there is no special explanation and logical conflict, the terms and / or descriptions between different embodiments and each implementation method / implementation method / implementation method in each embodiment are consistent and can be referenced to each other. The technical features in different embodiments and each implementation method / implementation method / implementation method in each embodiment can be combined to form new embodiments, implementation methods, implementation methods or implementation methods according to their inherent logical relationships. The implementation methods of this application described below do not constitute a limitation on the scope of protection of this application.

[0074] To facilitate understanding of the method provided in the embodiment of the present application, the system architecture of the method provided in the embodiment of the present application is described below. It is understandable that the system architecture described in the embodiment of the present application is to more clearly illustrate the technical solution of the embodiment of the present application, and does not constitute a limitation on the technical solution provided in the embodiment of the present application.

[0075] See also Figure 1 , is a schematic diagram of the architecture of the communication system provided in the embodiment of the present application. Figure 1 As shown, the system includes one or more source terminals (source terminal_1, source terminal_2, source terminal_3 and source terminal_4 are taken as examples in the figure), one or more destination terminals (one destination terminal is taken as an example in the figure), and a network device located between the source terminal and the destination terminal. The network device is used to receive a message flow from the source terminal and send the message flow to the destination terminal; in other words, the network device can be used to forward the message flow between the source terminal and the destination terminal.

[0076] It should be noted that in Figure 1 In the example, the source and destination are devices that need to communicate with each other in the network, such as personal computers, servers, virtual machines, switches, routers, etc. Figure 1In the present invention, the network device can be a router, a switch, a firewall, a virtual switch, a virtual router, a smart network card, etc.

[0077] In communication systems (such as Figure 1 In the communication system shown in FIG. 1 , different communication nodes (eg Figure 1 The source and destination in the Figure 1 For a forwarding node, the forwarding node can forward one or more message flows. Figure 1 In the example, for network device 1, the network device 1 can forward the message flows from source end_1, source end_2 and source end_3; for network device 104, the network device 104 can forward the message flows from source end_4; for network device 103, the network device 103 can forward the message flows from source end_1, source end_2, source end_3 and source end_4. It is worth noting that the message flows from any source end device can be one or more.

[0078] In addition, when the forwarding node is forwarding multiple message flows, the forwarding node can determine whether the multiple message flows are congested based on the information of the cache queue (such as the average queue length or instantaneous queue length of the cache queue, etc.). And, when the forwarding node determines that congestion occurs, the forwarding node will slow down the multiple message flows to reduce the impact of the congestion on the message flows. For example, in the process of network device 101 forwarding message flows from source end_1, source end_2, and source end_3, when the bandwidth of the message flow is large, the network device 101 may cache the message flows from the three source ends in the cache queue, wherein, when the average queue length or instantaneous queue length of the cache queue is greater than a threshold, the network device 101 may slow down the multiple message flows to reduce the impact of the congestion on the message flow. Generally, in the process of network devices slowing down message flows, this can be achieved through ECN marking, which will be combined with Figure 2a to Figure 2e The implementation process shown is an exemplary description of the implementation process of ECN marking.

[0079] For traditional transmission control protocol (TCP) or remote direct memory access over converged Ethernet version 2 (RoCEv2) applications, in order to avoid switch congestion and packet loss affecting service performance, ECN congestion marking can be turned on (or enabled) on the switch. According to the congestion level of the output queue of the egress port, the message is marked with ECN congestion according to probability. The destination end constructs a congestion notification message (CNM) for the message marked with ECN congestion to notify the source end to reduce the speed.

[0080] Exemplarily, for a message in the Internet Protocol (IP) format, the message header may carry an 8-bit Differentiated Services Code Point (DSCP) field, of which the highest 2 bits are represented as the ECN field. For example, the ECN field may be defined as: a value of "00" indicates that the message does not support ECN marking, a value of "01" or "10" indicates that the message supports ECN marking, and a value of "11" indicates message congestion. For a network device, if the value of the ECN field in the message header of the message received by the network device is "01" or "10", the network device may perform ECN congestion marking on the message according to probability, that is, when the message encounters queue congestion, the ECN header field of the message is modified to ECN=11. Generally, the network device generally provides a switch for this behavior, and the above behavior can be executed only when the switch is turned on; if the switch is turned off, the message with ECN=10 / 01 will not be marked with ECN congestion.

[0081] like Figure 2aIn the example shown, the network device can be any network device on the forwarding path between the source end and the destination end. Among them, the three-layer packet (i.e., IP packet) sent by the source end can carry "ECN = 10" in the packet header, indicating that the packet enables congestion marking. Thereafter, when the packet encounters queue congestion in this network device, the network device will, based on probability, update the ECN field in the packet header of the ECN-enabled packet to "ECN = 11", indicating that the packet is congested. Thereafter, when the destination end receives the packet with "ECN = 11", it will feedback CNM to the source end. Correspondingly, after receiving the CNM, the source end will start to throttle the packet flow corresponding to this packet. It can be seen that the network device triggers the destination end to send CNM to the source end through the value of the ECN field, and throttles the packet flow through the CNM indication, that is, the throttling is executed by the source end. Therefore, the throttling process implemented by the network device through the ECN marking method can be understood as an indirectly implemented throttling process.

[0082] In addition, the network device can, based on probability, mark the packets in the packet flow with ECN congestion marking (for example, modify the value of the ECN field from "10" or "01" to "11"). The following will be through Figure 2b and Figure 2c to make an exemplary description of the implementation of this "probability".

[0083] As Figure 2b shown in the example, when the network device marks the packet with ECN congestion marking, it can be based on the average length of the output queue of the panel port (that is, the number of congested packet bytes in the buffer queue), and perform the following ECN marking operations on the congested packets in the queue according to the curve probability shown in Figure 2b including the following process.

[0084] 1) When the average queue length of the buffer queue < Kmin, the network device determines not to mark the packet with ECN congestion marking, that is, the marking probability is 0.

[0085] 2) When the average queue length of the buffer queue is between (Kmin, Kmax), the network device marks the packet with ECN congestion marking according to the curve probability corresponding to this average queue length (for example, the range is 0 to Pmax).

[0086] 3) When the average queue length of the buffer queue > Kmax, the network device marks all the packets in this queue with ECN congestion marking, that is, the marking probability is 100%.

[0087] Generally, for traditional TCP applications, on the network device, the packets are marked with ECN congestion marking according to Figure 2b the average queue length of the buffer queue shown. In the scenario of instantaneous burst congestion, it may not be able to notify the source end to throttle in time.

[0088] To quickly alleviate queue congestion, a network device can perform ECN congestion marking on packets based on the instantaneous queue length of a buffer queue. For example, when the instantaneous queue length of the buffer queue exceeds a set threshold, 100% of the packets are marked to maintain a very low queue depth and achieve a very low forwarding delay.

[0089] As Figure 2c shown, when a network device performs ECN congestion marking on packets based on the instantaneous queue length of a buffer queue, the following implementation process can be included.

[0090] 1) When the instantaneous queue length of the buffer queue < Kmin, the network device determines not to perform ECN congestion marking on the packets, that is, the marking probability is 0.

[0091] 2) When the instantaneous queue length of the buffer queue >= Kmin, the network device performs ECN congestion marking on all packets in the queue, that is, the marking probability is 100%.

[0092] Optionally, in the above implementation process, any one of Kmin, Kmax, and Pmax can be pre-configured in the network device or configured through a controller / gateway device, which is not limited here.

[0093] Optionally, Figure 2c the shown method can be applied to the data center transmission control protocol (DCTCP) stack used in a data center network (DCN).

[0094] As Figure 2d shown in the example, the network device can determine the queue length at the moment when a packet enters the queue and mark the ECN of the packet entering the queue. Then the packet queues at the end of the queue waiting for scheduling. The deeper the queue length, the longer the delay for the packet to wait for scheduling to go out, and thus the later it can notify the source end to reduce the speed.

[0095] As Figure 2e shown in the example, to accelerate congestion notification, the current network device supports the Fast ECN marking method, that is, it determines the queue length at the moment when a packet in the queue exits the queue and performs ECN congestion marking on the packet exiting the queue, thereby accelerating the transmission of queue congestion messages and alleviating queue congestion as soon as possible.

[0096] It should be noted that in the process of slowing down the packet flow by the network device, in addition to achieving it through congestion, it can also achieve the slowing down of the packet flow through other methods. For example, the network device discards the packet based on probability, and the discarding mechanism can be based on a random early detection (RED) mechanism or a weighted random early detection (WRED) mechanism, etc., which is not limited here. Taking the packet discarding based on the WRED mechanism as an example, the WRED probability discard curve can be referred to in the previous article Figure 2b and Figure 2c The implementation process of the ECN probability marking curve shown in the figure is different in the action applied to the message. When the queue enables WRED probability drop, the message is dropped. Generally, for the same queue, WRED drop and ECN congestion marking are selected. For example, traditional TCP applications will turn on WRED and randomly drop messages when the cache queue is congested or about to be congested to prevent the global synchronization of the sliding windows of multiple TCP service flows.

[0097] In the above implementation process, the basis for the network device to perform message deceleration is the average queue length or instantaneous queue length in the cache queue, and the average queue length or instantaneous queue length in the cache queue is determined based on the cached messages of one or more message flows forwarded by the network device. In the case where the network device forwards multiple message flows, if any message flow is congested, it will cause the average queue length or instantaneous queue length in the cache queue to be too long, and the network device will further perform deceleration processing on the multiple message flows. This congestion identification and congestion processing method may lead to a reduction in message forwarding efficiency.

[0098] For example, Figure 1Taking the illustrated scenario as an example, source end_1, source end_2 and source end_3 can all communicate with the destination end through the network device 101, that is, the message flows sent by source end_1, source end_2 and source end_3 can all be transmitted through the network device 101. Taking the message flow of source end_1 as an example of congestion, the message flow of source end_1 will cause the queue length of the cache queue in the network device 101 to be greater than the threshold, and accordingly, the network device 101 will decelerate the message flows sent by source end_1, source end_2 and source end_3. In other words, even if the message flows sent by source end_2 and source end_3 are not congested (for example, the bandwidth is small or the cached messages are small), the network device 101 will still decelerate the message flows sent by source end_2 and source end_3, resulting in unnecessary deceleration of the message flows sent by source end_2 and source end_3, thereby reducing the message forwarding efficiency of the network device 101. Similarly, when WRED is enabled to randomly drop packets, it does not distinguish whether the packets are flows that cause queue congestion. This will cause all packet flows transmitted by the network device to be dropped with probability.

[0099] In order to solve the above problems, the present application provides a communication device and related equipment, which is used to determine K message flows through the Top K algorithm, and can accurately identify congested flows and slow down congested flows, so as to improve the efficiency of message forwarding.

[0100] See also Figure 3 , which is a schematic diagram of the communication method provided in this application.

[0101] It should be noted that in Figure 3 In the method shown, the first communication device can be a network device between the source end and the destination end (such as a router, a switch, a virtual switch, a virtual router, a smart network card, etc.), or the first communication device can be a partial component of the network device (such as a processor, a chip or a chip system, etc.), or the first communication device can be a logical module or software of the network device.

[0102] S301. One or more source terminals send N message streams, and correspondingly, a first communication device receives the N message streams, where N is an integer greater than 1. The destination addresses of the N message streams are the same.

[0103] In a possible implementation, the destination addresses of the N message flows are the destination addresses of the terminals; or, the destination addresses of the N message flows are the destination addresses of the network devices. Specifically, when the first communication device is forwarding the N message flows, the same network devices exist on the forwarding paths of the N message flows, or the terminals on the forwarding paths of the N message flows are the same. In this way, the first communication device can determine that the destination addresses of the N message flows are the same.

[0104] For example, in Figure 1 In the example, the communication process between source end_1, source end_2 and source end_3 and the destination end through network device 101, network device 102 and network device 103 is taken as an example. The set of one or more message flows sent by source end_1, source end_2 and source end_3 can be an implementation example of N message flows. Accordingly, the first communication device can be Figure 1 For the first communication device, the transmission paths of the N message streams from source end_1, source end_2 and source end_3 all include the same network device (i.e., network device 101, network device 102, network device 103). Therefore, the first communication device can determine that the destination addresses of the N message streams from source end_1, source end_2 and source end_3 are the same. Alternatively, the transmission paths of the N message streams sent from source end_1, source end_2 and source end_3 all include the same terminal device (e.g., Figure 1 For this purpose, the first communication device may determine that the destination addresses of the N message flows from source end_1, source end_2 and source end_3 are the same.

[0105] For example, in Figure 1 In the example, the communication process between source end_1 and the destination end through network device 101, network device 102 and network device 103, and the communication process between source end_4 and the destination end through network device 104 and network device 103 are taken as examples. The set of one or more message streams sent by source end_1 and one or more message streams sent by source end 4 can be an implementation example of N message streams. Accordingly, the first communication device can be Figure 1 For the first communication device, the transmission paths of the N message flows from source end_1 and source end_4 all include the same network device (i.e., network device 103). Therefore, the first communication device can determine that the destination addresses of the N message flows from source end_1 and source end_4 are the same. Alternatively, the transmission paths of the N message flows sent from source end_1 and source end_4 all include the same terminal device (e.g., Figure 1 For this purpose, the first communication device may determine that the destination addresses of the N message flows from the source end_1 and the source end_4 are the same.

[0106] S302. The first communication device determines K message flows from N message flows, where K is an integer less than or equal to N; wherein the K message flows are flows determined based on a Top K algorithm.

[0107] It should be noted that, in step S302, the first communication device may determine K message flows in a variety of ways, which will be described below respectively.

[0108] Implementation method 1: The first communication device determines K message flows from the N message flows based on the Top K algorithm.

[0109] In implementation mode 1, the first communication device may determine K message flows from the N message flows based on the Top K algorithm, so that the first communication device can determine the K message flows locally, in order to quickly determine the K message flows.

[0110] In a possible implementation of implementation method one, the first communication device determines K message flows from the N message flows based on the Top K algorithm, including: the first communication device determines K message flows from the N message flows based on the Top K algorithm through the parameters of the N message flows, and the parameters include at least one of the following: the bandwidth (bandwidth, BW) of the flow, the cumulative number of bytes of the flow, the duration of the flow, the number of messages in the cache queue of the flow, and the number of bytes in the cache queue of the flow. Specifically, in the process of the first communication device determining K message flows from the N message flows based on the Top K algorithm, the first communication device can use the above at least one parameter as the basis for determining the K message flows to improve the flexibility of the implementation of the solution.

[0111] It should be understood that the bandwidth of a flow can be replaced by other expressions, such as the throughput of a flow, the rate of a flow, etc.

[0112] It should be noted that, among the parameters of at least one of the above-mentioned message flows, the value of any parameter is positively correlated with the possibility of congestion in the message flow. In other words, the larger the bandwidth of a message flow (or the more cumulative bytes of the flow, the longer the duration of the flow, the more messages in the cache queue of the flow, the more bytes in the cache queue of the flow, etc.), the greater the possibility of congestion when the first communication device forwards the message flow; conversely, the smaller the bandwidth of a message flow (or the fewer cumulative bytes of the flow, the shorter the duration of the flow, the fewer messages in the cache queue of the flow, the fewer bytes in the cache queue of the flow, etc.), the smaller the possibility of congestion when the first communication device forwards the message flow. Therefore, the implementation method of using at least one of the above-mentioned parameters as one of the input parameters of the Top K algorithm can improve the accuracy of determining the K message flows that are congested based on the Top K algorithm.

[0113] Optionally, when the parameter includes two or more parameters of at least one of the above items, the two or more parameters can be used as the basis for the Top K algorithm to determine K message flows, or the weighted results of the two or more parameters can be used as the basis for the Top K algorithm to determine K message flows, which is not limited here.

[0114] Exemplarily, taking the parameter including the cumulative number of bytes of the flow and the duration of the flow as an example, in the process of the first communication device determining K message flows from the N message flows based on the Top K algorithm, the first communication device can determine whether each flow in the N message flows is the Top K K message flows, and the determination result can be expressed as Is Top K_x (x ranges from 1 to N). For example, when the value of the determination result is a first value, it indicates that the flow corresponding to the field belongs to the Top K flow, and when the value of the determination result is a second value, it indicates that the flow corresponding to the field does not belong to the Top K flow. Among them, the first value is 0 and the second value is 1, or the first value is 1 and the second value is 0. Optionally, for the xth flow among the N flows, the determination result satisfies:

[0115] Is Top_x=Func(ByteCount,Duration);

[0116] Wherein, ByteCount represents the cumulative number of bytes of the xth stream, Duration identifies the duration of the xth stream, and Func(ByteCount,Duration) represents a function associated with ByteCount and Duration. In this way, the first communication device can determine K message streams from the N message streams.

[0117] Optionally, in addition to the at least one parameter mentioned above, the parameter may also include other parameters related to the possibility of congestion occurring during message flow (eg, positive correlation, negative correlation), which is not limited here.

[0118] In one possible implementation, the bandwidth of any one of the K message flows determined by the first communication device in step S302 is greater than or equal to a threshold value; or, the bandwidth of any one of the K message flows determined by the first communication device in step S302 is greater than or equal to the bandwidth of other message flows among the N message flows except the K message flows. Specifically, among the K message flows determined from the N message flows by the Top K algorithm, the bandwidth of the K message flows is greater than or equal to a threshold value, or, the bandwidth of the K message flows is greater than or equal to the bandwidth of other NK message flows among the N message flows. Among them, since the bandwidth size of a message flow is positively correlated with the possibility of congestion of the message flow, for this reason, through the above method, the message flows with larger bandwidths can be determined by the Top K algorithm as the K message flows to perform speed reduction processing, so as to reduce the possibility of congestion as much as possible.

[0119] It should be understood that the bandwidth of any one of the K message flows is greater than or equal to the bandwidth of other message flows among the N message flows except the K message flows. It can be expressed as follows: the K message flows are message flows with larger bandwidths among the N message flows, the K message flows are message flows with the largest bandwidths among the N message flows, and the bandwidth of the K message flows is greater than or equal to the bandwidth of the other NK message flows among the N message flows.

[0120] As an implementation example, taking the case where the parameter includes bandwidth and N is greater than 2, the first communication device may locally maintain the following Table 1, and determine K message flows in Table 1 through a Top K algorithm.

[0121] Table 1

[0122] key bandwidth Stream_1 BW1 Flow_2 BW2 ... ... Flow_N BWN

[0123] For example, the first communication device can determine the message flows corresponding to K BWs with larger bandwidths (i.e., K message flows) based on the Top K algorithm and N BWs (i.e., BW 1, BW 2...BW N), wherein the bandwidth of any message flow of the K message flows is greater than or equal to a threshold; or, the bandwidth of any message flow among the K message flows determined by the first communication device in step S302 is greater than or equal to the bandwidth of other message flows among the N message flows except the K message flows.

[0124] Optionally, in Table 1, the information in the key column may be the identifier of the flow corresponding to the N flows, the index of the flow, etc. For example, the identification of the flow may be implemented by a five-tuple (i.e., source IP address, destination IP address, source port number, destination port number, transport layer protocol), a three-tuple (i.e., source IP address, destination IP address, transport layer protocol), etc.

[0125] As another implementation example, taking N greater than 2 as an example, the first communication device may locally maintain the following Table 2, where Table 2 may include indication information indicating whether it belongs to a Top K flow, and the indication information is determined based on a Top K algorithm.

[0126] Table 2

[0127]

[0128]

[0129] It should be noted that in Table 2, the indication information indicating whether it belongs to the Top K flow is represented by the "Is Top K_x (x ranges from 1 to N)" field. For example, when the value of this field is the first value, it indicates that the flow corresponding to the field belongs to the Top K flow, and when the value of this field is the second value, it indicates that the flow corresponding to the field does not belong to the Top K flow. The first value is 0 and the second value is 1, or the first value is 1 and the second value is 0. In other words, the first communication device can determine K message flows by the value of the "Is Top K_x" field.

[0130] It can be understood that, for the first communication device, after the first communication device receives the message, if the destination address of the message is the same as the N message flows in step S301, the first communication device can determine that the message belongs to a certain flow among the N flows based on the information in the first column of Table 2. In addition, the first communication device determines whether the message belongs to the Top K flow based on the information in the second column of Table 2. If not, the first communication device can determine not to reduce the speed of the message. If so, the first communication device can reduce the speed of the message (for example, by ECN congestion marking or discarding).

[0131] Optionally, when the first communication device includes multiple egress ports, since the sending queues of different egress ports may be independent of each other, the first communication device may maintain a flow table for each egress port (the flow table may refer to the method shown in Table 1 or Table 2), and then execute the following for each egress port: Figure 3 The method shown is used to improve the message forwarding efficiency of multiple outbound ports.

[0132] Optionally, in order to avoid expansion of flow table entries, when any of the N message flows ends or is inactive for a period of time, the first communication device may age and delete some or all of the entries in Table 1 or Table 2.

[0133] Implementation method 2: Figure 4 As shown, before step S302, step A is also included, in which the second communication device sends the first information in step S302, and correspondingly, the first communication device receives the first information in step A, and the first information is used to indicate the K message streams. Thereafter, in step S302, the first communication device determines K message streams from the N message streams, including: the first communication device determines the K message streams from the N message streams based on the first information.

[0134] The second communication device may be a communication device different from the first communication device. For example, the second communication device may be a communication device such as a router, a switch, a virtual switch, a virtual router, or a smart network card.

[0135] Alternatively, the second communication device and the first communication device may be different hardware modules / software modules / logic modules / chips, etc. in the communication device. For example, the first communication device may be a switch buffer (SWB), a memory management unit (MMU), a message processing pipeline (Pipeline), a forwarding chip, or other modules in the communication device; the second communication device may be a forwarding chip in the communication device, a service co-processor (SCOP) external to the forwarding chip, etc.

[0136] It should be noted that in Figure 4 In the embodiment, the execution order between step S301 and step A is not limited. For example, step S301 is executed first and step A is executed later. For another example, step A is executed first and step S301 is executed later. Exemplarily, the first communication device may include multiple input ports, one of which may receive the first information from the second communication device through step A, and the other input ports may receive N message streams from one or more source ends through step S301; in other words, the first communication device independently executes step S301 and step A at different input ports.

[0137] In implementation method 2, when the first communication device determines K message flows from the N message flows based on the Top K algorithm, the first communication device can use the received first information as the basis for determining the K message flows to save the computing overhead of the first communication device.

[0138] It should be understood that in the second implementation, the second communication device can determine K message flows from N message flows based on the Top K algorithm. The specific implementation process can refer to the aforementioned implementation first, which will not be repeated here.

[0139] As an implementation example, the first information sent by the second communication device in step A includes the information in Table 2 above.

[0140] As another implementation example, the first information sent by the second communication device in step A may include the information in Table 3 below.

[0141] Table 3

[0142] key value bandwidth Stream_1 IsTopK_1 BW1 Flow_2 IsTopK_2 BW2 ... ... Flow_N IsTopK_N BWN

[0143] In Table 3, compared with Table 2, the first information may also carry parameters (eg bandwidth) of each of the N streams.

[0144] Similarly, in Table 2 and Table 3, the information in the key column may be the identifier of the flow corresponding to the N flows, the index of the flow, etc. For example, the identification of the flow may be implemented by a five-tuple (i.e., source IP address, destination IP address, source port number, destination port number, transport layer protocol), a three-tuple (i.e., source IP address, destination IP address, transport layer protocol), etc.

[0145] In addition, in addition to the examples shown in Table 2 and Table 3, the first information may also be implemented in other ways. For example, the first information may include identifiers of the flows corresponding to the K flows, flow indexes, and the like.

[0146] Optionally, when the first communication device includes multiple egress ports, since the sending queues of different egress ports may be independent of each other, the second communication device may maintain a flow table for each egress port (the flow table may refer to the method shown in Table 2 or Table 3), and send the flow table to the first communication device through one or more first information, and then the first communication device may execute for each egress port Figure 3 The method shown is used to improve the message forwarding efficiency of multiple outbound ports.

[0147] In one possible implementation, Figure 3 In the method shown, after step S302, the method further includes: the first communication device determines not to slow down the message flows other than the K message flows among the N message flows. Specifically, in the process of forwarding the N message flows by the first communication device, the K message flows determined by the first communication device through the Top K algorithm can accurately realize the identification of congested flows and the speed reduction processing of congested flows, and the first communication device can also determine not to slow down the message flows other than the K message flows among the N message flows. Therefore, compared with the implementation method of slowing down the N message flows when any of the N message flows is congested, the above-mentioned technical solution can avoid the impact of the speed reduction on the other message flows, so as to improve the service performance of the service to which the other message flows belong.

[0148] S303. The first communication device reduces the speed of the K message flows.

[0149] It should be noted that, in step S303, when the first communication device performs the speed reduction processing on the K message flows, the first communication device may perform the speed reduction processing on the K message flows in a direct or indirect manner.

[0150] For example, in the process of the first communication device directly slowing down the K message flows, the first communication device may discard the messages of the K message flows based on the first probability. In addition, the discarding process will cause the source end of the K message flows to perceive packet loss, and the source end may perform speed reduction processing based on the perceived packet loss (for example, the protocol stack of the source end achieves speed reduction by lowering the sliding window). It should be understood that the above-mentioned first communication device discarding the messages of the K message flows will reduce the flow rate of the K message flows, and / or, the source end performing speed reduction processing based on the perceived packet loss will also reduce the flow rate of the K message flows.

[0151] Exemplarily, the discarding mechanism may be a mechanism based on random early detection (RED), or a mechanism based on weighted random early detection (WRED), etc., which is not limited here.

[0152] For another example, in the process of the first communication device slowing down the K message flows in an indirect manner, the first communication device may mark the messages of the K message flows based on the second probability and then forward the K message flows, and the mark is used to trigger the receiving direction of the K message flows to send indication information to the sender of the K message flows, so that when the sender subsequently transmits other messages of the K message flows, it can slow down the other messages of the K message flows based on the indication information. Exemplarily, the mark can be an explicit congestion notification (ECN) identifier, or a congestion indication (CI), etc., which is not limited here. Exemplarily, the indication information can be a congestion notification message (CNM), or a congestion notification packet (CNP), etc., which is not limited here.

[0153] It is understandable that the first probability or the second probability may be determined by the curve probability based on the average length of the buffer queue in the transmission control protocol (TCP), or by the curve probability based on the instantaneous length of the buffer queue in the data center transmission control protocol (DCTCP), or by other methods, which are not limited here. In addition, the speed reduction process in step S303 can also refer to the above Figure 2a to Figure 2e Description of the illustrated implementation example.

[0154] based on Figure 3 In the technical solution shown, after the first communication device receives N message flows with the same destination address in step S301, the first communication device determines K message flows from the N message flows in step S302, and performs speed reduction processing on the K message flows in step S303. Among them, the K message flows are flows determined based on the Top K algorithm. In other words, in the process of forwarding N message flows with the same destination address by the first communication device, the processing basis for the first communication device to perform speed reduction processing is the K message flows determined based on the Top K algorithm in N processes. And, the processing object of the first communication device to perform speed reduction processing is the K message flows. Therefore, in the process of forwarding N message flows by the first communication device, compared with the implementation method of performing speed reduction processing on the N message flows when any of the N message flows is congested, in the above technical solution, the K message flows determined by the Top K algorithm can accurately realize the identification of congested flows and the speed reduction processing of congested flows, so as to improve the message forwarding efficiency.

[0155] In addition, in the above technical solution, when K is less than N, the first communication device can reduce the impact of congestion on the message flow while avoiding the impact on other message flows as much as possible by accurately identifying the congested flow and slowing down the congested flow.

[0156] As an application example, Figure 5 As shown, Figure 3 An application example of the method shown. In this example, the servers connected to the leaf node (denoted as Leaf 1) include s11, s12...s17, s18, which can be connected to a port of Leaf 1 at a rate of 25GE, and the uplink port of Leaf 1 can be connected to the spine node with a 100GE link. Similarly, the downlink port of the spine node can also be connected to other leaf nodes, such as Leaf 2 in the figure, and the servers connected to Leaf 2 can include s21, s22...s27, s28.

[0157] Optionally, Figure 5 The scenario shown may be an application scenario such as TCP / DCTCP / RoCEv2.

[0158] exist Figure 5 In the example, multiple servers access another server across a switch. The upstream queue of the switch turns on differentiated congestion flow marking. Servers with large traffic are slowed down, while servers with small traffic are not affected.

[0159] For example, Leaf 1 can be Figure 3 In the first communication device in the method shown, the s11, s12, ..., s17 servers under Leaf 1 concurrently access the s21 server under Leaf 2, and the s18 server under Leaf 1 accesses the s22 server under Leaf 2, that is, the N message flows received by Leaf 1 in step S301 include the message flows of the servers s11, s12 ... s17, s18. Among them, the message flow bandwidth of the servers s11, s12, ..., s17 is large, while the message flow bandwidth of the server s18 is relatively small.

[0160] In step S302, Leaf 1 can determine K message flows from N message flows. In this example, the K message flows are the message flows of servers s11, s12, ..., s17. In other words, Leaf 1 can receive message flows from servers s11, s12, ..., s17, and s18, and calculate the bandwidth of the message flows, and use the bandwidth threshold to determine whether it is a TopN flow. When the bandwidth exceeds a certain threshold (for example, 1 Gbps), it is considered to be a TopN flow.

[0161] Among them, the message traffic bandwidth of s11, s12, ..., s17 servers all exceed 1Gbps, while the message traffic bandwidth of s18 server is below 1Gbps. The concurrent traffic of multiple servers causes the upstream port queue of Leaf 1 to be gradually congested. Accordingly, in step S303, the first communication device performs ECN congestion marking on the TopN flow, i.e., the message flow sent by s11, s12, ..., s17 servers according to the preconfigured (or configured) ECN probability curve and finally notifies its server to reduce the speed, while the message traffic between s18 and s22 servers is not reduced, ensuring that its application performance is not affected by the congested traffic of other servers.

[0162] Therefore, for Leaf 1, the upstream port queue opens differentiated congestion flow discarding, and the server with larger traffic is discarded with random probability, while the server with smaller traffic is not affected. Similarly, except for the congestion of the upstream port of Leaf 1, when the queue is congested, the congested flow is randomly discarded according to the configured WRED probability discard curve, while the non-congested flow is not discarded, so that the message traffic between s18 and s22 servers has no packet loss (or less packet loss), and the application performance is not affected by the congested traffic of other servers.

[0163] See also Figure 6 An embodiment of the present application provides a communication device, which can implement the functions of the communication device (ie, the first communication device or the second communication device) in the above method embodiment, and thus can also achieve the beneficial effects of the above method embodiment.

[0164] When the communication device 600 is used to implement the function of the aforementioned first communication device, the communication device includes a transceiver unit 601 and a processing unit 602; the transceiver unit 601 is used to receive N message streams, N is an integer greater than 1; wherein the destination addresses of the N message streams are the same; the processing unit 602 is used to determine K message streams from the N message streams, K is an integer less than or equal to N; wherein the K message streams are streams determined based on the Top K algorithm; the processing unit 602 is also used to slow down the K message streams.

[0165] When the communication device 600 is used to implement the function of the aforementioned first communication device, the communication device includes a transceiver unit 601 and a processing unit 602; the processing unit 602 is used to determine K message flows from N message flows based on the Top K algorithm, N is an integer greater than 1, and K is an integer less than or equal to N; wherein the destination addresses of the N message flows are the same; the transceiver unit 601 is used to send a first information, and the first information is used to indicate that the K message flows are flows determined based on the Top K algorithm; the first information is used to reduce the speed of the K message flows.

[0166] It should be noted that the information execution process and other contents of each unit of the above-mentioned communication device 600 can be specifically referred to the description in the method embodiment shown in the above-mentioned application, and will not be repeated here.

[0167] The present application also provides a communication device 700, see Figure 7 As shown, Figure 7 A schematic diagram of the structure of a communication device 700 provided in an embodiment of the present application.

[0168] Attached Figure 7 The communication device 700 shown includes a memory 702 and at least one processor 701 .

[0169] Optionally, the processor 701 implements the method in the above embodiment by reading instructions stored in the memory 702, or the processor 701 may also implement the method in the above embodiment through internally stored instructions. In the case where the processor 701 implements the method in the above embodiment by reading instructions stored in the memory 702, the memory 702 stores instructions for implementing the method provided in the above embodiment of the present application.

[0170] Optionally, the at least one processor 701 is one or more CPUs, or a single-core CPU or a multi-core CPU.

[0171] Further optionally, at least one processor 701 may also be configured to execute the aforementioned Figure 6 The corresponding implementation process of the processing unit 602 in the illustrated embodiment and the corresponding beneficial effects achieved are not described in detail here.

[0172] The memory 702 includes but is not limited to RAM, ROM, EPROM, flash memory, or optical memory, etc. The memory 702 stores operating system instructions.

[0173] After the program instructions stored in the memory 702 are read by the at least one processor 701, the communication device performs corresponding operations in the aforementioned embodiments.

[0174] Optionally, attach Figure 7 The communication device shown also includes a network interface 703. The network interface 703 may be a wired interface, such as an FDDI or GE interface; the network interface 703 may also be a wireless interface. The network interface 703 is used to connect to the attached Figure 3 And related embodiments perform data transmission and reception.

[0175] Further optionally, the network interface 703 can also be used to perform the aforementioned Figure 6 The corresponding implementation process of the transceiver unit 601 in the illustrated embodiment and the corresponding beneficial effects achieved are not described in detail here.

[0176] It should be understood that the network interface 703 has the functions of receiving data and sending data, and the functions of "receiving data" and "sending data" can be integrated in the same transceiver interface, or the functions of "receiving data" and "sending data" can be implemented in different interfaces respectively, which is not limited here. In other words, the network interface 703 may include one or more interfaces for implementing the functions of "receiving data" and "sending data".

[0177] After the processor 701 reads the program instructions in the memory 702 , other functions that the communication device 700 can execute are described in the above-mentioned method embodiments.

[0178] Optionally, the communication device 700 further includes a bus 704 , and the processor 701 and the memory 702 are usually connected to each other via the bus 704 , and may also be connected to each other in other ways.

[0179] Optionally, the communication device 700 further includes an input / output interface 705, which is used to connect to an input device and receive relevant configuration information input by a user or other devices that can be linked with the communication device 700 through the input device. The input device includes but is not limited to a keyboard, a touch screen, a microphone, and the like.

[0180] The communication device 700 provided in the embodiment of the present application is used to execute the methods performed by the communication devices (first communication device or second communication device) provided in the above-mentioned various method embodiments, and achieve corresponding beneficial effects.

[0181] As an implementation example, the communication device 700 executes the attached Figure 3 And the function of the first communication device in the related embodiments; wherein the communication device 800 performs the attached Figure 3 And the functions of other devices in related embodiments (such as one or more source ends corresponding to N message flows). The first communication device 700 is used to receive N message flows from the communication device 800, where N is an integer greater than 1; wherein the destination addresses of the N message flows are the same; the processing unit is used to determine K message flows from the N message flows, where K is an integer less than or equal to N; wherein the K message flows are flows determined based on the Top K algorithm; the first communication device 700 is also used to perform speed reduction processing on the K message flows.

[0182] As another implementation example, the communication device 700 executes the attached Figure 4 and the functions of the second communication device in the related embodiments; wherein the communication device 800 performs the attached Figure 4 And the functions of other devices (such as the first communication device) in the related embodiments. The communication device 700 is used to determine K message flows from N message flows based on the Top K algorithm, N is an integer greater than 1, and K is an integer less than or equal to N; wherein the destination addresses of the N message flows are the same; the communication device 700 is used to send first information to the communication device 800, the first information is used to indicate that the K message flows are flows determined based on the Top K algorithm; the first information is used to reduce the speed of the K message flows.

[0183] Figure 7 The specific implementation methods of the communication device shown can refer to the descriptions in the aforementioned method embodiments, which will not be repeated here.

[0184] An embodiment of the present application further provides a communication system, which at least includes a first communication device for executing the aforementioned method embodiment, or the communication system includes a first communication device and a second communication device for executing the aforementioned method embodiment.

[0185] It should be understood that in the communication system, each network device may also apply other methods involved in the aforementioned embodiments and achieve corresponding technical effects, which will not be elaborated here.

[0186] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the unit is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0187] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A communication method, characterized in that: include: Receive N message flows, where N is an integer greater than 1; wherein the destination addresses of the N message flows are the same; Determine K message flows from the N message flows, where K is an integer less than or equal to N; wherein the K message flows are flows determined based on a Top K algorithm; The K message flows are decelerated.

2. The method according to claim 1, characterized in that: The determining K message flows from the N message flows comprises: K message flows are determined from the N message flows based on the Top K algorithm.

3. The method according to claim 2, characterized in that The determining K message flows from the N message flows based on the Top K algorithm includes: Determine K message flows from the N message flows based on the Top K algorithm by using parameters of the N message flows, where the parameters include at least one of the following: The bandwidth of the flow, the cumulative number of bytes of the flow, the duration of the flow, the number of packets in the cache queue of the flow, and the number of bytes in the cache queue of the flow.

4. The method according to claim 1, characterized in that: Before determining K message flows from the N message flows, the method further includes: receiving first information, where the first information is used to indicate the K message flows; The determining K message flows from the N message flows comprises: The K message flows are determined from the N message flows based on the first information.

5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Determine not to perform speed reduction processing on other message flows among the N message flows except the K message flows.

6. The method according to any one of claims 1 to 5, characterized in that: The bandwidth of any message flow among the K message flows is greater than or equal to a threshold; or, The bandwidth of any message flow among the K message flows is greater than or equal to the bandwidth of other message flows among the N message flows except the K message flows.

7. The method according to any one of claims 1 to 6, characterized in that: The destination addresses of the N message flows are the destination addresses of the terminals; or, The destination addresses of the N message flows are destination addresses of network devices.

8. A communication method, characterized in that: include: Determine K message flows from N message flows based on the Top K algorithm, where N is an integer greater than 1 and K is an integer less than or equal to N; wherein the destination addresses of the N message flows are the same; Sending first information, where the first information is used to indicate that the K message flows are flows determined based on a Top K algorithm; the first information is used to reduce the speed of the K message flows.

9. The method according to claim 8, characterized in that The bandwidth of any message flow among the K message flows is greater than or equal to a threshold; or, The bandwidth of any message flow among the K message flows is greater than or equal to the bandwidth of other message flows among the N message flows except the K message flows.

10. The method according to claim 8 or 9, characterized in that: The destination addresses of the N message flows are the destination addresses of the terminals; or, The destination addresses of the N message flows are destination addresses of network devices.

11. A communication device, characterized in that: including a transceiver unit and a processing unit; The transceiver unit is used to receive N message streams, where N is an integer greater than 1; wherein the destination addresses of the N message streams are the same; The processing unit is used to determine K message flows from the N message flows, where K is an integer less than or equal to N; wherein the K message flows are flows determined based on a Top K algorithm; The processing unit is further configured to perform speed reduction processing on the K message flows.

12. The device according to claim 11, characterized in that The processing unit is used to determine K message flows from the N message flows, including: The processing unit is used to determine K message flows from the N message flows based on the Top K algorithm.

13. The device according to claim 12, characterized in that The processing unit is used to determine K message flows from the N message flows based on a Top K algorithm, including: The processing unit is used to determine K message flows from the N message flows based on the Top K algorithm by using parameters of the N message flows, where the parameters include at least one of the following: The bandwidth of the flow, the cumulative number of bytes of the flow, the duration of the flow, the number of packets in the cache queue of the flow, and the number of bytes in the cache queue of the flow.

14. The device according to claim 11, characterized in that The transceiver unit is further used to receive first information, where the first information is used to indicate the K message flows; The processing unit is used to determine K message flows from the N message flows, including: The processing unit is used to determine the K message flows from the N message flows based on the first information.

15. The device according to any one of claims 11 to 14, characterized in that The processing unit is further used to determine not to perform speed reduction processing on other message flows among the N message flows except the K message flows.

16. The device according to any one of claims 11 to 15, characterized in that The bandwidth of any message flow among the K message flows is greater than or equal to a threshold; or, The bandwidth of any message flow among the K message flows is greater than or equal to the bandwidth of other message flows among the N message flows except the K message flows.

17. The device according to any one of claims 11 to 16, characterized in that The destination addresses of the N message flows are the destination addresses of the terminals; or, The destination addresses of the N message flows are destination addresses of network devices.

18. A communication device, characterized in that: including a transceiver unit and a processing unit; The processing unit is used to determine K message flows from N message flows based on the Top K algorithm, where N is an integer greater than 1 and K is an integer less than or equal to N; wherein the destination addresses of the N message flows are the same; The transceiver unit is used to send first information, where the first information is used to indicate that the K message flows are flows determined based on a Top K algorithm; the first information is used to perform speed reduction processing on the K message flows.

19. The device according to claim 18, characterized in that The bandwidth of any message flow among the K message flows is greater than or equal to a threshold; or, The bandwidth of any message flow among the K message flows is greater than or equal to the bandwidth of other message flows among the N message flows except the K message flows.

20. The device according to claim 18 or 19, characterized in that The destination addresses of the N message flows are the destination addresses of the terminals; or, The destination addresses of the N message flows are destination addresses of network devices.

21. A communication system, characterized in that: comprising a first communication device and one or more devices; Wherein, the first communication device is used to execute the method according to any one of claims 1 to 7; wherein, the N message streams come from the one or more devices.

22. The system according to claim 21, characterized in that The system further includes a second communication device; Wherein, the second communication device is used to execute the method according to any one of claims 8 to 10.

23. A communication device, characterized in that: comprising at least one processor; The at least one processor is configured to execute the method of any one of claims 1 to 7, or the method of any one of claims 8 to 10.

24. The communication device according to claim 23, characterized in that The communication device is a chip or a chip system.

25. A computer-readable storage medium, characterized in that: The medium stores instructions, and when the instructions are executed by a processor, the method according to any one of claims 1 to 10 is implemented.

26. A computer program product, characterized in that The method comprises instructions, which, when executed on a processor, implement the method according to any one of claims 1 to 10.

27. A chip, characterized in that: The device comprises a processor, wherein the processor is used to support a communication device to implement the method according to any one of claims 1 to 10.