Congestion control method and related device

By sending messages carrying identification information to specific data streams in a wide area network (WAN) for congestion control, the network congestion problem of PFC in WAN scenarios is solved, achieving fine-grained traffic control and improved user experience.

CN121907773APending Publication Date: 2026-04-21HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing priority-based flow control (PFC) technology is not suitable for wide area network scenarios, which can lead to network congestion affecting the normal operation of non-congested data streams, causing problems such as head-of-line blockage, deadlock, and congestion propagation.

Method used

When the first device detects network congestion, it sends a message carrying data stream identification information to the upstream device, requesting congestion control processing for a specific data stream, including slowing down or buffering, to avoid stopping the transmission of the entire queue.

Benefits of technology

It enables fine-grained flow control at the data stream level, avoiding network underthrough and line-end congestion issues, and improving the correlation between user experience and congestion control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121907773A_ABST
    Figure CN121907773A_ABST
Patent Text Reader

Abstract

The congestion control method comprises the following steps: a first device determines that network congestion occurs when a first data stream is forwarded at an output port of the first device; in response to network congestion occurring in forwarding the first data stream at the output port, the first device sends a first message to a second device, the first message is used for requesting the second device to execute congestion control processing for the first data stream, and the second device is an upstream device of the first device in a transmission path of the first data stream. According to the scheme, the flow control of the data flow granularity is realized through the first message, the fineness of congestion control is improved, and the flow control in a wide area network scene becomes possible. And the problems of wire end blockage, deadlock, congestion diffusion and the like brought to the network by the traditional PFC technology are avoided. According to the embodiment of the invention, the congestion control processing is performed on the first data stream instead of performing the sending stop processing on the data of the whole queue, so that the network under-throughput can be effectively avoided, the association degree of the congestion control and the service is also improved, and the user experience is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a congestion control method and related apparatus. Background Technology

[0002] Priority-based flow control (PFC) is a commonly used congestion control algorithm in data center networks. It supports flow control based on traffic priority within the network, preventing packet loss under congestion conditions. The PFC mechanism primarily operates on the ingress ports of switches (or other network devices such as routers), controlling flow based on the queue length of the ingress port (or the length of the ingress queue). Specifically, it uses instruction messages (such as pause frames) to notify upstream ports to stop sending data.

[0003] Compared to data center networks, in wide area network (WAN) scenarios, due to the longer network transmission path between sending and receiving devices, tunneling is typically used to encapsulate the packets transmitted between them. Furthermore, PFC (Power Flow Control) technology performs flow control on inbound queues. Since a queue may carry multiple data streams, slowing down a particular queue causes all data streams carrying that queue to pause transmission, affecting the normal operation of non-congested data streams carried by that queue.

[0004] For the reasons mentioned above, PFC technology is not suitable for wide area network (WAN) scenarios. Therefore, there is an urgent need for a congestion control method applicable to WAN scenarios. Summary of the Invention

[0005] Firstly, this application proposes a congestion control method applied to a first device. First, the first device determines that network congestion has occurred while forwarding a first data stream at its egress port. Then, in response to the network congestion at the egress port, the first device sends a first message to a second device, requesting the second device to perform congestion control processing on the first data stream. The second device is an upstream device of the first device in the transmission path of the first data stream. Using this solution, flow control at the data stream granularity is achieved through the first message, improving the fineness of congestion control and making flow control possible in wide area network scenarios. This avoids the problems of line-end blocking, deadlock, and congestion propagation caused by traditional PFC technology. Furthermore, the first message requests the upstream device in the transmission path of the first data stream to perform congestion control processing on the first data stream, rather than stopping the transmission of the entire queue of data, thus effectively preventing network underthrough. Additionally, performing congestion control processing on the first data stream also improves the correlation between congestion control and services, effectively enhancing the user experience.

[0006] In one possible implementation, the first message carries the identification information of the first data stream. By carrying the identification information of the first data stream in the first message, the second device can perform congestion control processing on the first data stream based on the identification information of the first data stream.

[0007] In one possible implementation, the first device determines that network congestion has occurred when forwarding the first data stream at the egress port. Specifically, this includes determining that the usage of cache resources corresponding to the first data stream is greater than or equal to a preset threshold, wherein the first device allocates cache resources for the first data stream at the egress port. In other words, when the amount of cache resources allocated by the first device for the first data stream is relatively large, the first device determines that network congestion has occurred when forwarding the first data stream at the egress port.

[0008] In one possible implementation, congestion control processing includes any one or more of the following: performing rate reduction processing on the first data stream, caching the first data stream using the buffer space of the second device, or notifying the sender of the first data stream to perform rate reduction processing on the first data stream. In other words, congestion control processing on the first data stream can be performed in multiple ways, improving the flexibility of the solution implementation.

[0009] In one possible implementation, the first message further includes first rate-reduction information, which indicates the expected rate-reduction magnitude of the first data stream. In the above technical solution, the first message can also explicitly carry the first rate-reduction information, making it easier for the second device to know the expected rate-reduction magnitude of the data stream and simplifying the implementation of the second device. Furthermore, by explicitly carrying the first rate-reduction information, it is ensured that the second device appropriately reduces the data stream, alleviating network congestion while maintaining data throughput.

[0010] In one possible implementation, the first message further includes second rate-reduction information, which indicates the expected rate-reduction time for the first data stream. In the above technical solution, the first message can also explicitly carry the second rate-reduction information, making it easier for the second device to know the expected rate-reduction time for the first data stream and simplifying the implementation of the second device. Furthermore, by explicitly carrying the second rate-reduction information, it is ensured that the second device appropriately reduces the data stream, alleviating network congestion while maintaining data throughput.

[0011] In one possible implementation, the first message further includes a first performance metric, which is a performance metric introduced by performing congestion control processing on the first data stream, and the first performance metric includes latency and / or jitter. This approach allows the second device to determine the latency and / or jitter introduced by performing congestion control processing on the first data stream, so that the second device can combine the first performance metric to determine the next action to ensure the communication quality of the first forwarding path.

[0012] In one possible implementation, the first message further includes a first performance metric, which is the sum of a second performance metric and a third performance metric. The second performance metric is the performance metric introduced by performing congestion control processing on the first data stream based on the first message. The third performance metric is the performance metric introduced by the first device performing congestion control processing on the first data stream. Both the second and third performance metrics include latency and / or jitter. This approach allows the second device to determine the latency and / or jitter introduced into the first data stream after performing congestion control processing. This allows the second device to combine the first performance metric with the determination of the next action to ensure the quality of service provided to the first data stream.

[0013] In one possible implementation, before sending the first message to the second device, the first device may also receive a second message sent by a third device, the second message requesting the first device to perform congestion control processing on the first data stream. The third device is a downstream device of the first device on the transmission path of the first data stream. Additionally, the second message also includes the aforementioned third performance metric. Accordingly, the first device can combine the third performance metric and the second performance metric to obtain a first message including the first performance metric, and then send the first message to the second device.

[0014] In one possible implementation, the first device may also receive a third message sent by the fourth device. This third message carries a Priority-Based Flow Control (PFC) frame or a Remote Priority-Based Flow Control (RPFC) message, and includes identification information for the second data stream. The fourth device mentioned here could be, for example, a network device in a data center. When the first device receives a PFC frame or RPFC message containing the identification information of the second data stream, it can determine that congestion has occurred during forwarding of the second data stream in the network (e.g., the data center) to which the fourth device belongs. In this case, the first device can perform congestion control processing on the second data stream based on the received PFC frame or RPFC message, thereby alleviating network congestion for the second data stream and improving the quality of service provided to it.

[0015] In one possible implementation, the identification information of the second data stream is carried in the idle pad field of the PFC frame; or, the identification information of the second data stream is carried in the idle pad field of the RPFC message; or, the identification information of the second data stream is carried in the source Internet Protocol (IP) address and destination IP address fields of the RPFC message; or, the identification information of the second data stream is carried in the target field included in the UDP payload of the RPFC message, wherein the UDP payload includes the PFC frame and the target field. These methods improve the flexibility of the solution implementation.

[0016] In one possible implementation, the first message is carried as a Transmission Control Protocol (TCP) message, a User Datagram Protocol (UDP) message, or an Internet Control Message Protocol (ICMP) message; or, the first message is carried as an Internet Protocol (IP) message; or, the first message is carried as a Layer 2 message in the Open Systems Interconnection (OSI) model. These methods improve the flexibility of the solution implementation.

[0017] In one possible implementation, the payload field of a Transmission Control Protocol (TCP) message is used to carry the first message; alternatively, the payload field of a User Datagram Protocol (UDP) message is used to carry the first message; alternatively, the payload field of an Internet Control Message Protocol (ICMP) message is used to carry the first message; alternatively, the hop-by-hop (HBH) option header of an Internet Protocol (IP) message is used to carry the first message; alternatively, the Destination Option (DOH) header of an IP message is used to carry the first message; or alternatively, the optional field of an IP message is used to carry the first message. These methods improve the flexibility of the implementation.

[0018] In one possible implementation, when a User Datagram Protocol (UDP) message carries a first message, the UDP message also includes a first port number, which indicates that the UDP message is a congestion notification message carrying the first message; or, when an ICMP message carries the first message, the ICMP message also includes a first type or a first encoding, which indicates that the ICMP message is a congestion notification message carrying the first message; or, when a Layer 2 message carries the first message, the Layer 2 message also includes a first destination Media Access Control (MAC) address, which indicates that the Layer 2 message is a congestion notification message carrying the first message; or, when a Layer 2 message carries the first message, the Layer 2 message also includes a first Ethernet type field, which indicates that the Layer 2 message is a congestion notification message carrying the first message. These methods improve the implementation flexibility of the solution.

[0019] In one possible implementation, the first device can allocate buffer resources for the first data stream in a stream-driven manner. Specifically, the first device can receive a first packet, which belongs to the first data stream. The first device can receive the first packet from its upstream node. After receiving the first packet, the first device can determine the egress port for forwarding the first packet by querying its local routing table, so that the first packet can be forwarded through that egress port. After determining the egress port, buffer resources can be allocated for the first data stream from the forwarding resources corresponding to the egress port.

[0020] In one possible implementation, besides allocating buffer resources for the first data stream in a stream-driven manner, the first device can also generate first entry information for the first data stream in a stream-driven manner. This first entry information includes the identification information of the previous hop node of the first device in the transmission path, and / or the ingress port information of the first device receiving the first data stream. In this way, when the first device determines that there is network congestion when forwarding the first data stream at the outgress port, it queries the first entry information to send a first message to the second device.

[0021] In one possible implementation, if the outgoing port is enabled to automatically allocate resources for data streams forwarded through the outgoing port, then after the first device determines the outgoing port based on the first message, it can further allocate buffer resources for the first data stream from the forwarding resources corresponding to the outgoing port.

[0022] In one possible implementation, the first message carries first indication information, which indicates that resources should be automatically allocated to the first data stream to which the first message belongs. In this case, the first device can determine that resources need to be allocated to the first data stream after receiving the first message. Therefore, after determining the outgoing port based on the first message, the first device can further allocate buffer resources for the first data stream from the forwarding resources corresponding to the outgoing port.

[0023] In one possible implementation, if the first message is an IPv4 message, the first indication information can be carried in the header of the first message (i.e., the IPv4 header). For example, the first indication information can be carried in the type of service field, flag field, or options field in the IPv4 header.

[0024] In one possible implementation, if the first message is an IPv6 message, the first indication information can be carried in the message header (i.e., the IPv6 header). For example, the first indication information can be carried in the traffic class field of the IPv6 header. The first indication information can also be carried in the extended header of the first message.

[0025] In one possible implementation, the first device may also allocate buffer resources for the first data stream by receiving configuration information. This configuration information is used to instruct the allocation of buffer resources for the first data stream from the outgoing port that forwards the first data stream.

[0026] In one possible implementation, the configuration information is further used to configure first entry information, which includes ingress port information for the first device to receive the first data stream, and / or the identification information of the previous hop node of the first device in the transmission path. In this case, through this configuration information, the first device can either allocate buffer resources for the first data stream from the egress port that forwards the first data stream, or generate and save the aforementioned first entry information.

[0027] In one possible implementation, in response to network congestion occurring during the forwarding of the first data stream at the egress port, the first device sends the first message to the second device based on the first entry information. As a specific example, when the first device determines that congestion has occurred during the forwarding of the first data stream through the egress port, it queries the first entry information to obtain the identification information of the previous hop node, generates the first message based on the identification information of the previous hop node, and further sends the first message to the second device. As another example, when the first device determines that congestion has occurred during the forwarding of the first data stream through the egress port, it queries the first entry information to obtain the ingress port information, uses the interface indicated by the ingress port information as the egress interface for forwarding the first message, and sends the first message to the second device.

[0028] Secondly, this application provides a congestion control method applied to a second device. The second device can receive a first message sent by a first device, which requests the second device to perform congestion control processing on a first data stream. The second device is an upstream device of the first device on the transmission path of the first data stream. After receiving the first message, the second device can perform congestion control processing on the first data stream according to the first message. Using this solution, flow control at the data stream granularity is achieved through the first message, improving the fineness of congestion control and making flow control possible in wide area network scenarios. This avoids the problems of line-end blocking, deadlock, and congestion propagation caused by traditional PFC technology. Furthermore, the first message requests the upstream device on the transmission path of the first data stream to perform congestion control processing on the first data stream, rather than stopping the transmission of the entire queue of data, thus effectively avoiding network underthrough. In addition, performing congestion control processing on the first data stream also improves the correlation between congestion control and services, effectively improving the user experience.

[0029] In one possible implementation, the first message carries identification information of the first data stream.

[0030] In one possible implementation, the congestion control processing of the first data stream includes any one or more of the following: performing a rate-down process on the first data stream, caching the first data stream using the cache space of the second device, and notifying the sender of the first data stream to perform a rate-down process on the first data stream.

[0031] In one possible implementation, the first message further includes first deceleration information, which indicates the expected deceleration magnitude of the first data stream.

[0032] In one possible implementation, the first message further includes second deceleration information, which indicates the expected deceleration time of the first data stream.

[0033] In one possible implementation, the first message further includes a first performance metric, which is a performance metric introduced by performing congestion control processing on the first data stream, and the first performance metric includes latency and / or jitter.

[0034] In one possible implementation, the first message further includes a first performance metric, which is the sum of a second performance metric and a third performance metric. The second performance metric is the performance metric introduced by performing congestion control processing on the first data stream based on the first message. The third performance metric is the performance metric introduced by the first device performing congestion control processing on the first data stream. Both the second and third performance metrics include latency and / or jitter.

[0035] In one possible implementation, after receiving the first message, the second device can determine whether the first performance metric is greater than or equal to the upper limit of the performance metric. If it is determined that the first performance metric is greater than or equal to the upper limit of the performance metric, the second device can forward the first message to the head node of the transmission path of the first data stream, so that the head node of the transmission path of the first data stream can perform corresponding congestion control measures. For example, the head node can trigger adaptive routing to adjust some of the traffic corresponding to the first data stream to other adaptive routing paths, thereby alleviating the congestion of the first data stream.

[0036] In one possible implementation, if the first performance metric is greater than or equal to the upper limit of the performance metric, the second device can also use a multi-hop backpressure approach to send the first message to the head node of the transmission path of the first data stream. In a specific example, the second device can forward the first message to the previous hop node of the second device on the transmission path of the first data stream. Correspondingly, the previous hop node of the second device on the transmission path of the first data stream also passes the first message to its own previous hop node on the transmission path of the first data stream, and so on, until the first message is sent to the head node of the transmission path of the first data stream.

[0037] In one possible implementation, the first message may include second indication information, which instructs the device receiving the first message to pass it to its upstream node on the transmission path of the first data stream. In this manner, the node receiving the first message no longer needs to compare the first performance metric value and the upper limit of the performance metric value carried in the first message; it can directly pass the first message to its upstream node on the transmission path of the first data stream based on the second indication information.

[0038] In one possible implementation, the controller issues the aforementioned performance metric upper limit through the Netconf configuration model. Alternatively, the controller issues the aforementioned performance metric upper limit through the command-line configuration model. Alternatively, the controller issues the aforementioned performance metric upper limit through the YANG configuration model.

[0039] In one possible implementation, the first message is carried in a Transmission Control Protocol (TCP) message, a User Datagram Protocol (UDP) message, or an Internet Control Message Protocol (ICMP) message; or, the first message is carried in an Internet Protocol (IP) message; or, the first message is carried in a Layer 2 message in the Open Systems Interconnection (OSI) model.

[0040] In one possible implementation, the payload field of the Transmission Control Protocol (TCP) message is used to carry the first message; or, the payload field of the User Datagram Protocol (UDP) message is used to carry the first message; or, the payload field of the Internet Control Message Protocol (ICMP) message is used to carry the first message; or, the hop-by-hop (HBH) option header of the Internet Protocol (IP) message is used to carry the first message; or, the Destination Option (DOH) header of the IP message is used to carry the first message; or, the optional field of the IP message is used to carry the first message.

[0041] In one possible implementation, when the User Datagram Protocol (UDP) message carries the first message, the UDP message further includes a first port number, which indicates that the UDP message is a congestion notification message carrying the first message; or, when the ICMP message carries the first message, the ICMP message further includes a first type or a first encoding, which indicates that the ICMP message is a congestion notification message carrying the first message; or, when the Layer 2 message carries the first message, the Layer 2 message further includes a first destination Media Access Control (MAC) address, which indicates that the Layer 2 message is a congestion notification message carrying the first message; or, when the Layer 2 message carries the first message, the Layer 2 message further includes a first Ethertype field, which indicates that the Layer 2 message is a congestion notification message carrying the first message.

[0042] Thirdly, this application provides a congestion control device applied to a first device, the device comprising: a processing unit configured to determine that network congestion occurs when forwarding a first data stream at the output port of the first device; and a sending unit configured to send a first message to a second device in response to the network congestion occurring when forwarding the first data stream at the output port, the first message being used to request the second device to perform congestion control processing for the first data stream, the second device being an upstream device of the first device on the transmission path of the first data stream.

[0043] In one possible implementation, the first message carries identification information of the first data stream.

[0044] In one possible implementation, the processing unit is configured to: determine that the usage of the cache resource corresponding to the first data stream is greater than or equal to a preset threshold, wherein the cache resource is the cache resource allocated by the first device for the first data stream at the output port.

[0045] In one possible implementation, the congestion control process includes any one or more of the following: performing a rate-down process on the first data stream, caching the first data stream using the cache space of the second device, and notifying the sender of the first data stream to perform a rate-down process on the first data stream.

[0046] In one possible implementation, the first message further includes first deceleration information, which indicates the expected deceleration magnitude of the first data stream.

[0047] In one possible implementation, the first message further includes second deceleration information, which indicates the expected deceleration time of the first data stream.

[0048] In one possible implementation, the first message further includes a first performance metric, which is a performance metric introduced by performing congestion control processing on the first data stream, and the first performance metric includes latency and / or jitter.

[0049] In one possible implementation, the first message further includes a first performance metric, which is the sum of a second performance metric and a third performance metric. The second performance metric is the performance metric introduced by performing congestion control processing on the first data stream based on the first message. The third performance metric is the performance metric introduced by the first device performing congestion control processing on the first data stream. Both the second and third performance metrics include latency and / or jitter.

[0050] In one possible implementation, the apparatus further includes: a receiving unit for receiving a second message sent by a third device, the second message requesting the first device to perform congestion control processing on the first data stream, the third device being a downstream device of the first device on the transmission path, the second message including the third performance metric.

[0051] In one possible implementation, the apparatus further includes: a receiving unit, configured to receive a third message sent by a fourth device, the third message being carried on a priority-based flow control (PFC) frame or a remote priority-based flow control (RPFC) message, the third message including identification information of a second data stream; and the processing unit, further configured to perform congestion control processing on the second data stream based on the third message.

[0052] In one possible implementation, the identification information of the second data stream is carried in the idle pad field of the PFC frame; or, the identification information of the second data stream is carried in the idle pad field of the RPFC message; or, the identification information of the second data stream is carried in the source Internet Protocol IP address and destination IP address fields of the RPFC message; or, the identification information of the second data stream is carried in the target field included in the User Datagram Protocol (UDP) payload of the RPFC message, wherein the UDP payload includes the PFC frame and the target field.

[0053] In one possible implementation, the first message is carried in a Transmission Control Protocol (TCP) message, a User Datagram Protocol (UDP) message, or an Internet Control Message Protocol (ICMP) message; or, the first message is carried in an Internet Protocol (IP) message; or, the first message is carried in a Layer 2 message in the Open Systems Interconnection (OSI) model.

[0054] In one possible implementation, the payload field of the Transmission Control Protocol (TCP) message is used to carry the first message; or, the payload field of the User Datagram Protocol (UDP) message is used to carry the first message; or, the payload field of the Internet Control Message Protocol (ICMP) message is used to carry the first message; or, the hop-by-hop (HBH) option header of the Internet Protocol (IP) message is used to carry the first message; or, the Destination Option (DOH) header of the IP message is used to carry the first message; or, the optional field of the IP message is used to carry the first message.

[0055] In one possible implementation, when the User Datagram Protocol (UDP) message carries the first message, the UDP message further includes a first port number, which indicates that the UDP message is a congestion notification message carrying the first message; or, when the ICMP message carries the first message, the ICMP message further includes a first type or a first encoding, which indicates that the ICMP message is a congestion notification message carrying the first message; or, when the Layer 2 message carries the first message, the Layer 2 message further includes a first destination Media Access Control (MAC) address, which indicates that the Layer 2 message is a congestion notification message carrying the first message; or, when the Layer 2 message carries the first message, the Layer 2 message further includes a first Ethertype field, which indicates that the Layer 2 message is a congestion notification message carrying the first message.

[0056] In one possible implementation, the receiving unit of the apparatus is further configured to: receive a first message, the first message belonging to the first data stream; the processing unit is further configured to: determine an output port for forwarding the first message; and allocate buffer resources for the first data stream from the forwarding resources corresponding to the output port.

[0057] In one possible implementation, the processing unit is further configured to: generate first entry information, the first entry information including: ingress port information of the first device receiving the first data stream, and / or, identification information of the previous hop node of the first device in the transmission path.

[0058] In one possible implementation, the first device enables the function of automatically allocating resources for data streams forwarded through the outgoing port.

[0059] In one possible implementation, the first message includes first indication information, which indicates that resources are automatically allocated for the first data stream to which the first message belongs.

[0060] In one possible implementation, the first message is an Internet Protocol version 4 (IPv4) message, and the first indication information is carried in the header of the first message; or, the first message is an Internet Protocol version 6 (IPv6) message, and the first indication information is carried in the IPv6 header or extension header of the first message.

[0061] In one possible implementation, the receiving unit of the apparatus is further configured to: receive configuration information for allocating cache resources for the first data stream.

[0062] In one possible implementation, the configuration information is further used to configure first entry information, which includes ingress port information for the first device to receive the first data stream, and / or identification information of the previous hop node of the first device in the transmission path.

[0063] In one possible implementation, the sending unit is configured to: in response to network congestion occurring while forwarding the first data stream at the output port, send the first message to the second device based on the first entry information.

[0064] Fourthly, this application provides a congestion control device applied to a second device. The device includes: a receiving unit for receiving a first message sent by a first device, the first message being for requesting the second device to perform congestion control processing on a first data stream, the second device being an upstream device of the first device on the transmission path of the first data stream; and a processing unit for performing congestion control processing on the first data stream according to the first message.

[0065] In one possible implementation, the first message carries identification information of the first data stream.

[0066] In one possible implementation, the processing unit is configured to perform any one or more of the following: perform speed-down processing on the first data stream, cache the first data stream using the cache space of the second device, and notify the sender of the first data stream to perform speed-down processing on the first data stream.

[0067] In one possible implementation, the first message further includes first deceleration information, which indicates the expected deceleration magnitude of the first data stream.

[0068] In one possible implementation, the first message further includes second deceleration information, which indicates the expected deceleration time of the first data stream.

[0069] In one possible implementation, the first message further includes a first performance metric, which is a performance metric introduced by performing congestion control processing on the first data stream, and the first performance metric includes latency and / or jitter.

[0070] In one possible implementation, the first message further includes a first performance metric, which is the sum of a second performance metric and a third performance metric. The second performance metric is the performance metric introduced by performing congestion control processing on the first data stream based on the first message. The third performance metric is the performance metric introduced by the first device performing congestion control processing on the first data stream. Both the second and third performance metrics include latency and / or jitter.

[0071] In one possible implementation, the apparatus further includes: a sending unit, configured to send the first message to the head node of the transmission path if the first performance metric is greater than or equal to the upper limit of the performance metric corresponding to the first data stream, wherein the upper limit of the performance metric includes: a latency upper limit and / or a jitter upper limit.

[0072] In one possible implementation, the apparatus further includes: a sending unit, configured to send the first message to the previous hop node of the second device in the transmission path if the first performance metric is greater than or equal to the upper limit of the performance metric corresponding to the first data stream, wherein the upper limit of the performance metric includes: a latency upper limit and / or a jitter upper limit.

[0073] In one possible implementation, the first message includes second indication information, which instructs the device receiving the first message to pass the first message to its previous hop node in the transmission path.

[0074] In one possible implementation, the receiving unit is further configured to: receive a configuration model of a network configuration protocol netconf, the configuration model of the network configuration protocol including the upper limit of the performance metric value; or, receive a configuration model of a command line, the configuration model of the command line including the upper limit of the performance metric value; or, receive a configuration model of YANG, the configuration model of YANG including the upper limit of the performance metric value.

[0075] In one possible implementation, the first message is carried in a Transmission Control Protocol (TCP) message, a User Datagram Protocol (UDP) message, or an Internet Control Message Protocol (ICMP) message; or, the first message is carried in an Internet Protocol (IP) message; or, the first message is carried in a Layer 2 message in the Open Systems Interconnection (OSI) model.

[0076] In one possible implementation, the payload field of the Transmission Control Protocol (TCP) message is used to carry the first message; or, the payload field of the User Datagram Protocol (UDP) message is used to carry the first message; or, the payload field of the Internet Control Message Protocol (ICMP) message is used to carry the first message; or, the hop-by-hop (HBH) option header of the Internet Protocol (IP) message is used to carry the first message; or, the Destination Option (DOH) header of the IP message is used to carry the first message; or, the optional field of the IP message is used to carry the first message.

[0077] In one possible implementation, when the User Datagram Protocol (UDP) message carries the first message, the UDP message further includes a first port number, which indicates that the UDP message is a congestion notification message carrying the first message; or, when the ICMP message carries the first message, the ICMP message further includes a first type or a first encoding, which indicates that the ICMP message is a congestion notification message carrying the first message; or, when the Layer 2 message carries the first message, the Layer 2 message further includes a first destination Media Access Control (MAC) address, which indicates that the Layer 2 message is a congestion notification message carrying the first message; or, when the Layer 2 message carries the first message, the Layer 2 message further includes a first Ethertype field, which indicates that the Layer 2 message is a congestion notification message carrying the first message.

[0078] Fifthly, embodiments of this application provide an apparatus, including: a processor and a memory; the memory being used to store instructions or computer programs; the processor being used to execute the instructions or computer programs to perform the methods described in the first aspect above and any one of the first aspects above; or, the processor being used to execute the instructions or computer programs to perform the methods described in the second aspect above and any one of the second aspects above.

[0079] Sixthly, embodiments of this application provide a computer-readable storage medium, including instructions or a computer program that, when run on a computer, causes the computer to perform the methods described in the first aspect and any one of the first aspects above, or, when run on a computer, causes the computer to perform the methods described in the second aspect and any one of the second aspects above.

[0080] In a seventh aspect, embodiments of this application provide a computer program product comprising instructions or a computer program, which, when run on a computer, causes the computer to perform the methods described in the first aspect and any one of the first aspects above, or, when run on a computer, causes the computer to perform the methods described in the second aspect and any one of the second aspects above.

[0081] Eighthly, this application provides a communication system comprising: a controller for performing the method described in the first aspect and any one of the first aspects above, and a first network device for performing the method described in the second aspect and any one of the second aspects above. Attached Figure Description

[0082] Figure 1 This is a schematic diagram of a PFC scenario;

[0083] Figure 2 This is a schematic diagram of the structure of a communication system according to an embodiment of this application;

[0084] Figure 3 A flowchart illustrating a congestion control method provided in an embodiment of this application;

[0085] Figure 4a A schematic diagram of the structure of a PFC frame is shown;

[0086] Figure 4b A schematic diagram of the structure of an RPFC message is shown;

[0087] Figure 5a This is a schematic diagram of the structure of the first message in an embodiment of this application;

[0088] Figure 5b This is a schematic diagram of another structure of the first message in an embodiment of this application;

[0089] Figure 5c This is a schematic diagram of the structure of the first message in an embodiment of this application;

[0090] Figure 5d This is a schematic diagram of the structure of the first message in an embodiment of this application;

[0091] Figure 6 This is a schematic diagram illustrating an exemplary application scenario provided in an embodiment of this application;

[0092] Figure 7 This is a schematic diagram of the structure of a congestion control device provided in an embodiment of this application;

[0093] Figure 8 A schematic diagram of another congestion control device provided in the embodiments of this application;

[0094] Figure 9 This is a schematic diagram of the structure of a device provided in an embodiment of this application. Detailed Implementation

[0095] This application provides a congestion control method and device that can perform congestion control processing based on data stream granularity, thereby improving the correlation between congestion control and services and effectively enhancing user experience.

[0096] First, let's introduce the traditional PFC.

[0097] For easier understanding, please refer to Figure 1 , Figure 1 This is a schematic diagram of a PFC scenario. An Ethernet link is established between Device A and Device B. Device A's transmitting interface is divided into 8 priority queues, and Device B's receiving interface includes 8 corresponding receive buffers, with a one-to-one correspondence. When forwarding packets, Device A determines the queue to use based on the service class carried in the packet. For example, if the service class value is 0, queue 1 is used; if the service class value is 1, queue 2 is used; and so on, up to queue i+1. The value of i ranges from 0 to 7. When congestion occurs in a receive buffer on Device B's receiving interface, a backpressure signal "STOP" is sent to Device A, and Device A stops transmitting traffic from the corresponding priority queue.

[0098] The congestion control methods described above, such as PFC, are typically suitable for short-distance data center networks. In wide area network (WAN) scenarios, the network transmission path between the sender and receiver is much longer. While PFC alleviates network congestion by stopping traffic in the sending queue, the long path in a WAN means the receiver or network device may not be able to promptly notify the sender of this relief. Therefore, the sender's queue may continue to stop sending traffic. Furthermore, PFC controls traffic at the ingress queue. Since there are many data streams transmitted in the network, but the service level (SLS) only has eight values ​​(0 to 7), different data streams may have the same SLS. In other words, for device A, the same queue may carry multiple data streams. Therefore, slowing down a particular queue causes multiple data streams carried by that queue to be suspended, affecting the normal forwarding of non-congested data streams carried by that queue. Therefore, using PFC for congestion control has led to problems such as head-of-line blocking, deadlock, congestion propagation, and insufficient network throughput.

[0099] Based on this, this application proposes a congestion control method and related apparatus. When a first device determines that network congestion has occurred during the forwarding of a first data stream at its output port, the first device sends a first message to a second device. This first message requests the second device to perform congestion control processing on the first data stream. The second device is an upstream device of the first device in the transmission path of the first data stream. Through the first message, flow control at the data stream granularity is achieved, improving the fineness of congestion control and avoiding problems such as head-of-line blocking, deadlock, and congestion propagation. Furthermore, the first message requests the upstream device in the transmission path of the first data stream to perform congestion control processing on that first data stream, rather than stopping transmission for the entire queue of data, thus effectively preventing insufficient network throughput. Additionally, performing congestion control processing on the first data stream also enhances the correlation between congestion control and services, effectively improving the user experience.

[0100] Next, the solutions provided in the embodiments of this application will be briefly introduced.

[0101] First, some communication systems used in the embodiments of this application are introduced. Please refer to... Figure 2 , Figure 2 This is a schematic diagram of the structure of a communication system according to an embodiment of this application.

[0102] A communication system according to an embodiment of this application includes: a network 100, a data center (DC) 200, and a data center 300. The network 100 includes multiple network devices. Figure 2 Three network devices are shown: network device A, network device B, and network device C.

[0103] exist Figure 2 In the scenario shown, network devices A and C can be provider edge (PE) devices. Network device B is a provider backbone (P) device.

[0104] Network device A is used to connect to network devices in data center 200, and network device C is used to connect to network devices in data center 300. The network devices mentioned in this application include, but are not limited to, routers or switches. The network devices in data centers 200 and 300 may include, for example, spine devices and leaf devices.

[0105] In combination with the above Figure 2 Next, we will introduce the first device and the second device according to the embodiments of this application.

[0106] In one possible implementation, both the first device and the second device are devices on the transmission path of the first data stream, and the second device is an upstream device of the first device. In another possible implementation, the second device is the previous hop node of the first device on the transmission path of the first data stream; in yet another possible implementation, the second device is the head node of the transmission path of the first data stream.

[0107] For example: The transmission path of the first data stream includes: network device A → network device B → network device C. Then: In one example, the first device is... Figure 2 Network device C in the middle, the second device is Figure 2 In one example, the first device is either network device B or network device A; in another example, the first device is... Figure 2 Network device B in the middle, the second device is Figure 2 Network device A in the middle.

[0108] In one example, the transmission path of the first data stream can be a strict path, which refers to a path that strictly defines each node it passes through. For example, there are two paths between network device B and network device C: network device B → network device D → network device C, and network device B → network device E → network device C. Here, network device D and network device E... Figure 2 The path is not shown in the diagram. For example, this strict path indicates the transmission path of the first data stream through: network device A, network device B, network device D, and network device C.

[0109] In another example, the transmission path of the first data stream can also be a loose path, which means a path that specifies only the head node and the tail node, or a path that specifies one or more nodes in addition to the head node and the tail node. For example, the transmission path of the first data stream passes through: network device A, network device B, and network device C.

[0110] In yet another example, the transmission path of the first data stream could be a transmission path based on native Internet Protocol (native IP) forwarding.

[0111] The transmission path of the first data stream in this embodiment of the application can be implemented in various ways, including but not limited to: tunnel, path, or network slice.

[0112] Next, combined Figure 3 This application introduces a congestion control method provided in its embodiments. Figure 3 This is a flowchart illustrating a congestion control method provided in an embodiment of this application. Figure 3The congestion control methods shown include: G1-G3.

[0113] G1. The first device determines that network congestion occurs when forwarding the first data stream at the output port of the first device.

[0114] In one example, the first device may receive a notification message sent by the controller and determine, based on the notification message, that there is congestion when forwarding the first data stream at the outgoing port. For example, when the controller monitors the forwarding performance of the first data stream in the network, it determines that the first device has high latency in forwarding the first data stream, or that the first device has significant packet loss when forwarding the first data stream. Therefore, the controller determines that the first device is experiencing congestion when forwarding the first data stream at the outgoing port and sends the aforementioned notification message to the first device.

[0115] In another example, the first device pre-allocates cache resources for the first data stream at the output port, and these cache resources are used to cache the first data stream to be stored. The cache resources mentioned here are different from... Figure 1 The eight receive buffers of device B, as mentioned here, refer to the buffer resources corresponding to the first data stream, not the buffer resources corresponding to the queues at the output port of the sending device (i.e., device B). Accordingly, in this scenario, the first device can determine that network congestion has occurred when forwarding the first data stream at the output port if the usage of the buffer resources corresponding to the first data stream is greater than or equal to a preset threshold. This application embodiment does not specifically limit the preset threshold; the preset threshold can be set by the first device according to actual conditions or configured by the controller, and is not limited here.

[0116] In this application, the cache resources pre-allocated for the first data stream can be a subscriber queue (SQ), a virtual output queue (VOQ), a Flexible Ethernet (FlexE) interface, or a channelized sub-interface, or a portion of the queues in the SQ or VOQ. This application does not specifically limit the specific allocation. As an example, the first device can allocate cache resources for the first data stream in a stream-driven manner. Specifically, the first device can receive a first packet belonging to the first data stream. The first device can receive the first packet from its upstream node. After receiving the first packet, the first device can determine the output port for forwarding the first packet by querying its local routing table, so as to forward the first packet through that output port.

[0117] In one example, if the outgoing port is enabled to automatically allocate resources for data streams forwarded through the outgoing port, then after the first device determines the outgoing port based on the first message, it can further allocate buffer resources for the first data stream from the forwarding resources corresponding to the outgoing port.

[0118] In another example, the first message carries first indication information, which indicates that resources should be automatically allocated to the first data stream to which the first message belongs. In this case, the first device can determine that resources need to be allocated to the first data stream after receiving the first message. Therefore, after determining the outgoing port based on the first message, the first device can further allocate buffer resources for the first data stream from the forwarding resources corresponding to the outgoing port.

[0119] The embodiments of this application do not specifically limit the location of the first instruction information in the first message.

[0120] In one example, if the first message is an Internet Protocol version 4 (IPv4) message, the first indication information can be carried in the header of the first message (i.e., the IPv4 header). For example, the first indication information can be carried in the Type of Service field, the flags field, or the options field in the IPv4 header.

[0121] In another example, if the first message is an Internet Protocol version 6 (IPv6) message, the first indication information can be carried in the header of the first message (i.e., the IPv6 header). For example, the first indication information can be carried in the Traffic Class field of the IPv6 header. The first indication information can also be carried in the extension header of the first message. As a specific example, the first indication information can be carried in the hop-by-hop (HBH) option header, for example, by extending the first indication information in the HBH with a new flags field. As another specific example, the first indication information can be carried in the destination option header (DOH).

[0122] It should be noted that before allocating buffer resources for the first data stream from the forwarding resources corresponding to the outgoing port, the first device may first determine whether it has already allocated buffer resources for the first data stream from the forwarding resources corresponding to the outgoing port. If the first device determines that it has not yet allocated buffer resources for the first data stream from the forwarding resources corresponding to the outgoing port, then it will further allocate buffer resources for the first data stream from the forwarding resources corresponding to the outgoing port. If the first device has already allocated buffer resources for the first data stream from the forwarding resources corresponding to the outgoing port, then the first device will not allocate buffer resources for the first data stream again.

[0123] In one example, the first device allocates buffer resources for the first data stream using a stream-driven approach. Specifically, this can involve allocating resource objects for the first data stream and generating a mapping between the first data stream's identification information and the resource objects. These resource objects include, but are not limited to, the SQ, VOQ, FlexE interface, channelization sub-interface, a portion of the queues in the SQ, or a portion of the queues in the VOQ mentioned earlier. The mapping between the first data stream's identification information and the resource objects can, for example, be a mapping between the first data stream's identification information and the resource object's identification information.

[0124] Specifically, when the resource object is an SQ, the identification information of the resource object may be, for example, the SQ's identifier (e.g., number). When the resource object is a VOQ, the identification information of the resource object may be, for example, the VOQ's identifier (e.g., number). When the resource object is a FlexE interface, the identification information of the resource object may be, for example, the FlexE interface's identifier (e.g., the FlexE group to which the FlexE interface belongs and the FlexE interface's number). When the resource object is a channelized sub-interface, the identification information of the resource object may be, for example, the channelized sub-interface's identifier (e.g., the channelized sub-interface's number). When the resource object is a portion of queues within an SQ, the identification information of the resource object may be, for example, the identifier of a portion of queues within the SQ (e.g., the SQ's identifier and the queue's number). When the resource object is a portion of queues within a VOQ, the identification information of the resource object may be, for example, the identifier of a portion of queues within the VOQ (e.g., the VOQ's identifier and the queue's number).

[0125] After the first device allocates a resource object to the first data stream, it further creates two attributes for the resource object. These two attributes are cache and the waterline threshold corresponding to the cache. The cache mentioned here refers to the cache resource allocated by the first device to the first data stream, and the waterline threshold mentioned here corresponds to the aforementioned preset threshold.

[0126] In addition to allocating buffer resources for the first data stream in a stream-driven manner, the first device can also generate first entry information for the first data stream in a stream-driven manner. This first entry information includes the identification information of the previous hop node of the first device in the transmission path, and / or the ingress port information of the first device receiving the first data stream. The identification information of the previous hop node includes, but is not limited to, the identifier of the local lookback interface, the endpoint SID, or the MAC address. When the first device determines that there is network congestion when forwarding the first data stream at its outgoing port, it queries the first entry information to send a first message to the second device. Specifically, when the first device's ingress port receives the first packet, it can obtain the ingress port information of the receiving first packet, and can also learn the identification information of the previous hop node of the first device in the transmission path based on the received first packet, thereby generating the aforementioned first entry information.

[0127] In one example, after the first device allocates cache resources for the first data stream and generates the first table entry information in a stream-driven manner, it can also perform traffic statistics on the first data stream it receives. If no first data stream is received within a certain period of time, or if the traffic of the first data stream received within a certain period of time is very small (e.g., less than or equal to a first threshold), the cache resources allocated to the first data stream can be released, and the aforementioned first table entry information can be deleted. Specifically, releasing the cache resources allocated to the first data stream can be implemented by deleting the mapping relationship between the identifier information of the first data stream and the resource object. In this way, the released cache resources can be used to cache other data streams, reducing packet loss at the first device and improving the forwarding performance of the first device.

[0128] As another example, the first device can also allocate cache resources for the first data stream by receiving configuration information. This configuration information instructs the allocation of cache resources for the first data stream from the outgoing port forwarding the first data stream. Specifically, allocating cache resources for the first data stream based on the configuration information can involve allocating a resource object for the first data stream based on the configuration information and generating a mapping relationship between the identification information of the first data stream and the resource object. Furthermore, two attributes are created for the resource object: cache and the corresponding waterline threshold. For details regarding the mapping relationship between the identification information of the first data stream and the resource object, and the two attributes created for the resource object, please refer to the preceding descriptions; they will not be repeated here. Note that this configuration information can be issued by the controller or uploaded by network administrators; this is not limited here. In this scenario, in one example, the configuration information can also be used to configure the aforementioned first table entry information. That is, through this configuration information, the first device can both allocate cache resources for the first data stream from the outgoing port forwarding the first data stream and generate and save the aforementioned first table entry information.

[0129] G2. In response to network congestion occurring when forwarding the first data stream at the outgoing port, the first device sends a first message to the second device, which requests the second device to perform congestion control processing on the first data stream.

[0130] In step G2, after the first device determines that network congestion has occurred when forwarding the first data stream at the outgoing port, it further sends a first message to the second device. The first message is used to request the second device to perform congestion control processing for the first data stream.

[0131] In one example, the first message carries identification information of the first data stream, which is used to identify the first data stream. This application embodiment does not specifically limit the identification information of the first data stream.

[0132] As an example, the identification information of the first data stream can be determined based on the binary information of the first data stream. For example, the identification information of the first data stream is the binary information of the first data stream, or the identification information of the first data stream is calculated from the binary information using a corresponding algorithm. The binary information of the first data stream may include, for example, the source address (e.g., the source Internet Protocol (IP) address) and the destination address (e.g., the destination IP address). As another example, the identification information of the first data stream can be determined based on the triple information of the first data stream. For example, the identification information of the first data stream is the triple information of the first data stream, or the identification information of the first data stream is calculated from the triple information using a corresponding algorithm. The triple information of the first data stream may be the source address, the destination address, and the protocol number. As yet another example, the identification information of the first data stream can be determined based on the quintuple information of the first data stream. For example, the identification information of the first data stream may be the five-tuple information of the first data stream, or the identification information of the first data stream may be calculated from the five-tuple information using a corresponding algorithm. The five-tuple of the first data stream may include the source address, destination address, source port number, destination port number, and protocol number of the first data stream. As another example, the identification information of the first data stream may be determined based on the seven-tuple information of the first data stream. For example, the identification information of the first data stream may be the seven-tuple information of the first data stream, or the identification information of the first data stream may be calculated from the seven-tuple information using a corresponding algorithm. The seven-tuple of the first data stream may include the five-tuple of the first data stream, as well as the service type and interface index of the first data stream.

[0133] Optionally, the first message may also carry information instructing the second device to perform congestion control processing on the first data stream. For example, the first message may also include first rate-reduction information, which indicates the expected rate-reduction magnitude of the first data stream. As another example, the first message may also include second rate-reduction information, which indicates the expected rate-reduction time of the first data stream.

[0134] Optionally, the first message may further include a first performance metric. This first performance metric is the performance metric introduced by performing slowdown processing on the first data stream. In this application, the performance metric includes, but is not limited to, latency and / or jitter.

[0135] In one example, the first performance metric may be the latency and / or jitter introduced by performing congestion control processing on the first data stream. In a specific example, the first performance metric may be the latency and / or jitter introduced by performing speed-down processing on the first data stream based on the aforementioned first speed-down information and / or second speed-down information.

[0136] In yet another example, before executing step G1, the first device may also receive a second message from the third device requesting the first device to perform congestion control processing on the first data stream. The third device is a downstream device of the first device in the transmission path of the first data stream. For example, the first device corresponds to... Figure 2 Network device B in the middle, the third device corresponds to Figure 2 Network device C is mentioned in the context of the first device. For example, a third device might send the second message to the first device if it determines that its own outgoing port is congested while forwarding the first data stream. Accordingly, after receiving the second message, the first device can perform congestion control processing on the first data stream, for example, by slowing down the first data stream. In one example, the first device's congestion control processing on the first data stream introduces a certain delay and / or jitter. For ease of description, the delay and / or jitter introduced by the first device's congestion control processing on the first data stream is referred to as the "third performance metric." In this scenario, the second message includes the aforementioned third performance metric. Correspondingly, the first performance metric can be the sum of the second and third performance metrics. The second performance metric is the delay and / or jitter introduced by performing congestion control processing on the first data stream based on the first message. In a specific example, the second performance metric mentioned here can be the delay and / or jitter introduced by slowing down the first data stream based on the aforementioned first and / or second slowdown information.

[0137] In one example, the first device can also receive a third message sent by the fourth device. This third message can be a PFC frame or a remote priority-based flow control (RPFC) message, and it includes identification information for the second data flow. The fourth device mentioned here could be, for example, a network device in a data center. For instance, when the first device corresponds to… Figure 2 When the first device is network device C, the fourth device can be a network device in data center 300. In one example, when the first device receives a PFC frame or RPFC message containing identification information of the second data flow, it can determine that the second data flow is congested when forwarded in the network (e.g., data center) to which the fourth device belongs. In this case, the first device can perform congestion control processing on the second data flow based on the received PFC frame or RPFC message.

[0138] The principle of congestion control processing for the second data stream is the same as that for the first data stream. Therefore, for the specific implementation of congestion control processing for the second data stream, please refer to the description of congestion control processing for the first data stream below. It will not be repeated here.

[0139] For information on the identification information of the second data stream, please refer to the description of the identification information of the first data stream above; it will not be repeated here.

[0140] In one example, if the third message is a PFC frame, the structure of the third message can be referred to Figure 4a As shown, Figure 4a A schematic diagram of the structure of a PFC frame is shown.

[0141] like Figure 4a As shown, the PFC frame includes: a destination media access control (MAC) address field, a source MAC address field, an Ethernet type (ethertype) field, a control opcode field, a priority achievable vector field, eight time fields (time)(0) to time(7), a 26-byte pad field, and a cyclic redundancy check (CRC) field. The identification information of the second data stream can be carried through the pad field in the PFC frame. Other fields in the PFC frame are not described in detail here.

[0142] In another example, if the third message is an RPFC message, the structure of the RPFC message can be referred to Figure 4b , Figure 4b A schematic diagram of the structure of an RPFC message is shown.

[0143] like Figure 4bAs shown, the RPFC message, based on the PFC frame structure, encapsulates an IP header and a User Datagram Protocol (UDP) header, with the PFC frame serving as the UDP payload of the RPFC message. In one example, the identification information of the second data stream can be carried through the pad field of the RPFC message. In another example, if the identification information of the second data stream is the source IP address and destination IP address of the second data stream, then the identification information of the second data stream can be carried through the source address and destination address in the IP header of the RPFC message. In yet another example, the identification information of the second data stream can be carried by extending the target field, which is different from that of the PFC frame, into the payload of the RPFC message. In other words, the UDP payload of the RPFC message includes a target field and a PFC frame, and the target field is used to carry the identification information of the second data stream.

[0144] In this application, the first data stream and the second data stream can be the same data stream or different data streams. The embodiments of this application do not make specific limitations.

[0145] Optionally, the first message may further include the identification information of the previous hop node of the first device. This previous hop node refers to the node preceding the first device in the transmission path of the first data stream. The identification information of the previous hop node includes, but is not limited to, the identifier of the local lookback interface, the endpoint SID, or the MAC address. The first device may use the identification information of its previous hop node as the destination address of the first message. The first device looks up the routing table based on the identification information of the previous hop node, then determines the corresponding outgoing port and guides the forwarding of the first message according to the outgoing port. The first device may obtain the identification information of the previous hop node based on the packet carried in the transmission path of the first data stream, for example, by using the source address of the packet as the identification information of the previous hop node. In one example, the aforementioned identification information of the previous hop node may be obtained by the first device querying the first table entry information. That is, when the first device determines that congestion occurs when forwarding the first data stream through the outgoing port, it queries the first table entry information to obtain the identification information of the previous hop node, generates the first message based on the identification information of the previous hop node, and further sends the first message to the second device.

[0146] Optionally, the first message may further include the transmission path of the first data stream at the ingress port of the first device, i.e., the ingress port information of the first device receiving the first data stream. In this case, the first device does not need to look up a table; it can directly forward the first message from the ingress port based on the ingress port information. In one example, the aforementioned ingress port information may be obtained by the first device querying the first table entry information. That is, when the first device determines that there is congestion when forwarding the first data stream through the egress port, it queries the first table entry information to obtain the ingress port information and uses the interface indicated by the ingress port information as the egress port for forwarding the first message to send the first message to the second device.

[0147] Optionally, the first message may also include first status information, which instructs the second device to perform congestion control processing. For example, the first status information may be carried in a field of length 1 bit. When the value of this field is "1", the field carries the first status information.

[0148] The first message in this application embodiment has several possible implementations, which will be described below.

[0149] Implementation method 1:

[0150] The first message is carried in a Transmission Control Protocol (TCP) message, a UDP message, or an Internet Control Message Protocol (ICMP) message.

[0151] For example, the payload field of a TCP packet, the payload field of a UDP packet, or the payload field of an ICMP packet may all carry the first message. It is understood that, in the aforementioned TCP, UDP, or ICMP packets, the first message can also be carried using fields other than the payload field. Furthermore, since the first message may include various types of information, different fields can be used to carry various types of information within the first message in the aforementioned TCP, UDP, or ICMP packets; this application does not impose any limitations on this.

[0152] For example, please refer to Figure 5a , Figure 5aThis is a schematic diagram of the structure of the first message in an embodiment of this application. Taking a UDP packet carrying the first message as an example, the UDP packet includes: an IPv4 / IPv6 destination address, an IPv4 / IPv6 source address, a source port, a destination port, a length, a checksum, and a payload field. The destination port carries a first port number, which indicates that the UDP packet is a congestion notification message carrying the first message. The payload field carries the content of the first message, such as: identification information of the first data stream, first status information, first rate-reduction information, second rate-reduction information, and a first performance metric.

[0153] For example, please refer to Figure 5b , Figure 5b This is another structural diagram of the first message in an embodiment of this application. Taking an ICMPv6 message carrying the first message as an example, the ICMPv6 message includes an IPv6 header and a payload field. The payload field includes a type field, a code field, a length field, and the content included in the first message. The type field carries a first type, which indicates that the ICMPv6 message is a congestion notification message carrying the first message. Alternatively, the code field carries a first code, which indicates that the ICMPv6 message is a congestion notification message carrying the first message. The content included in the first message may include, for example, identification information of a first data stream, first status information, first rate-reduction information, second rate-reduction information, and a first performance metric. The ICMPv6 message is an IPv6-based ICMP message.

[0154] Implementation Method Two:

[0155] The first message is carried in an IP packet, or an IPv6 packet.

[0156] For example, the first message may be carried in the HBH option header of an IPv6 packet, or in the DOH header of an IPv6 packet. Another example is that the first message may be carried in the option field of an IP packet.

[0157] Please see Figure 5c , Figure 5cThis is a schematic diagram of the structure of the first message in an embodiment of this application. Taking an IPv6 packet as an example, the IPv6 packet includes: IPv6 destination address, IPv6 source address, SRH header, type, and length fields. The SRH header is an optional field. The HBH or DOH of the IPv6 packet carries the content of the first message, such as: identification information of the first data flow, first status information, first rate reduction information, second rate reduction information, and a first performance metric.

[0158] Implementation method three:

[0159] The first message is carried in Layer 2 packets within the Open Systems Interconnection (OSI) model. The OSI model defines a seven-layer model: Physical Layer, Data Link Layer, Network Layer, Transport Layer, Session Layer, Presentation Layer, and Application Layer. Layer 2 packets in the OSI model specifically refer to Data Link Layer packets.

[0160] Please see Figure 5d , Figure 5d This is a schematic diagram of the structure of the first message in an embodiment of this application. Taking a Layer 2 message as an example, the Layer 2 message includes fields such as: destination MAC, source MAC, ethertype, and path count. The destination MAC field can carry a first destination MAC address, which is a newly defined MAC address used to indicate that the Layer 2 message is a congestion notification message carrying the first message. Alternatively, the ethertype field can carry a first ethertype field, which is a newly defined ethertype, indicating that the Layer 2 message is a congestion notification message carrying the first message. In this case, the first message is similar to a PFC anti-pressure frame. After receiving the Layer 2 message carrying the first message, the second device identifies the Layer 2 message as a congestion notification message carrying the first message based on the first MAC address or the first ethertype field. Then, the second device reads the first message carried by the Layer 2 message and performs congestion control processing on the first data stream.

[0161] G3, the second device performs congestion control processing on the first data stream based on the first message.

[0162] In step G3, after receiving the first message, the second device can perform congestion control processing on the first data stream. In this embodiment, the congestion control processing performed by the second device on the first data stream includes, but is not limited to, one or more of the following: performing speed-down processing on the first data stream, using the second device's cache space to cache the first data stream, and notifying the sender of the first data stream to perform speed-down processing on the first data stream.

[0163] Specifically, when the second device is the head node of the transmission path of the first data stream, the second device can also notify the sender of the first data stream to perform a speed reduction process on the first data stream.

[0164] In one example, the sender and the corresponding receiver can be hosts with communication needs. These hosts can be implemented in various ways, including but not limited to: computing devices, computing units, cloud devices, virtual machines, or physical machines. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center.

[0165] In another example, the sending end is a remote direct memory access (RDMA) network card, and the corresponding receiving end is another RDMA network card.

[0166] In another example, the sender is the core network, and the receiver is the access network device.

[0167] In another example, the sender is a device in a data center; for example, it could be... Figure 2 The network devices in data center 200 shown are not limited here.

[0168] As mentioned above, the second device can be the previous hop node of the first device on the transmission path of the first data stream, or the second device can be the head node of the transmission path of the first data stream.

[0169] In one possible implementation, when the second device is the upstream node of the first device on the transmission path of the first data stream: the first device sends a first message to the second device, and after the second device performs congestion control processing on the transmission path of the first data stream based on the first message, it can discard the first message. In this case, the above technical solution can also be called hop-by-hop backpressure. This solution dilutes the traffic of the first data stream at the nodes along its transmission path, thereby alleviating network congestion of the first data stream.

[0170] In another possible implementation, when the second device is the head node of the transmission path of the first data stream: during the process of the first device sending the first message to the second device, other nodes that receive the first message only forward it. In this case, the above technical solution can also be called one-hop backpressure, which allows the second device to quickly learn that the first data stream has experienced network congestion and achieve rapid relief of network congestion.

[0171] In one example, after step G3, the second device can perform congestion relief processing on the first data stream through several methods, as follows:

[0172] Option 1:

[0173] G4, The first device determines to resolve network congestion.

[0174] In step G4, the first device can determine whether to relieve network congestion based on the usage of cache resources corresponding to the aforementioned first data stream. For example, if the usage of cache resources corresponding to the aforementioned first data stream is less than a preset threshold, it is determined to relieve network congestion, that is, it is determined to relieve network congestion by forwarding the first data stream at the outgoing port.

[0175] G5. In response to relieving network congestion, the first device sends a fourth message to the second device, which requests the second device to perform congestion relief control processing on the first data stream.

[0176] In step G5, the fourth message is similar to the first message described above. The fourth message is carried in a TCP packet, a UDP packet, or an ICMP packet; or it is carried in an IP packet; or it is carried in a Layer 2 packet according to the OSI model. Specifically, the payload field of the TCP packet is used to carry the fourth message; or the payload field of the UDP packet is used to carry the fourth message; or the payload field of the ICMP packet is used to carry the fourth message; or the HBH option header of the IP packet is used to carry the fourth message; or the DOH header of the IP packet is used to carry the fourth message; or the option field of the IP packet is used to carry the fourth message.

[0177] The fourth message includes any one or more of the following: identification information of the first data stream, identification information of the previous hop node of the first device, the transmission path of the first data stream corresponding to the ingress port information of the first device, or, second status information, the second status information instructing the second device to perform congestion relief processing.

[0178] Specifically: the field carrying the second status information in the fourth message can be the same field carrying the first status information in the first message. When the value of this field is "1", the field carries the first status information; when the value of this field is "0", the field carries the second status information.

[0179] G6. The second device performs congestion relief processing on the first data stream based on the fourth message.

[0180] In step G6, the second device performs congestion control decongestion control processing on the first data stream according to the fourth message, including increasing the transmission rate of the first data stream. If the second device is the head node of the transmission path of the first data stream, the second device can also notify the sender of the first data stream to increase the transmission rate of the first data stream.

[0181] In the above technical solution, after the first device determines that the first data stream has been cleared of network congestion, it can notify the upstream device to perform congestion control processing on the first data stream via a fourth message, thereby improving network throughput. Furthermore, it avoids prematurely clearing congestion control processing, which could further exacerbate network congestion and improve communication quality.

[0182] Option 2:

[0183] G7. After a period of time, the second device releases the congestion control processing of the first data stream.

[0184] In step G7, after performing congestion control processing on the first data stream, the second device sets a timer. When the timer expires, the second device automatically releases the congestion control processing on the first data stream. For example, the second device gradually increases the transmission rate of the first data stream using a slow-increase method. The duration of this timer can be, for example, the expected reduction time indicated by the second reduction information carried in the aforementioned first message.

[0185] In this embodiment, a first message is used to achieve data stream-level flow control, improving the granularity of congestion control and making flow control possible in wide area network scenarios. This avoids network problems such as line-end congestion, deadlock, and congestion propagation. This embodiment provides multiple possible implementation schemes for the first message, improving the flexibility of the implementation. Furthermore, the first message requests upstream devices on the data stream's transmission path to perform congestion control processing on the data stream, rather than stopping the transmission of the entire queue of data, thus effectively preventing network underthrough. By performing congestion control on the data stream, the correlation between congestion control and services is improved, effectively enhancing the user experience.

[0186] Furthermore, the solutions provided in this application are not limited to wide area network scenarios, but can also be applied to other scenarios, such as data centers, which will not be listed here.

[0187] In one example, each node on the transmission path of the first data stream, except for the head node, can execute the method steps described above performed by the first device. For example, if the second device is an intermediate node on the transmission path of the first data stream, such as the previous hop node of the first device on the transmission path of the first data stream, then the second device can also execute the method steps described above performed by the first device. That is, the second device can also send a fifth message to the fifth device requesting congestion control processing for the first data stream when it determines that network congestion has occurred at its own outgoing port forwarding the first data stream. The fifth device can be the previous hop node of the second device on the transmission path of the first data stream, or the fifth device can be the head node on the transmission path of the first data stream.

[0188] As mentioned earlier, the first message may also include a first performance metric. In one example, considering that the transmission path of the first data stream may traverse a large number of nodes, for example, the transmission path of the first data stream is between customer-premises equipment (CPE) 1 and CPE 2, where CPE 1 connects to metropolitan area network 1 and CPE 2 connects to metropolitan area network 2, and a backbone network is included between metropolitan area network 1 and metropolitan area network 2. Therefore, the transmission path of the first data stream includes devices in three networks: metropolitan area network 1, the backbone network, and metropolitan area network 2. If multiple nodes execute the aforementioned method steps performed by the first device, the latency and / or jitter introduced by each device executing the aforementioned method steps will result in a large latency and / or jitter in the transmission of the first data stream throughout the network, failing to meet business requirements. Therefore, in one example, at least one device (e.g., each device) on the transmission path of the first data stream can maintain an upper limit for the performance metric corresponding to the first data stream, which includes a latency upper limit and / or a jitter upper limit. In this scenario:

[0189] After receiving the first message, the second device can determine whether the first performance metric is greater than or equal to the upper limit of the performance metric. For example, it can determine whether the latency in the first performance metric is greater than or equal to the upper limit of latency, and / or whether the jitter in the first performance metric is greater than or equal to the upper limit of jitter. If the latency in the first performance metric is greater than or equal to the upper limit of latency, and / or the jitter in the first performance metric is greater than or equal to the upper limit of jitter, then it is determined that the first performance metric is greater than or equal to the upper limit of the performance metric. Further, the second device can forward the first message to the head node of the transmission path of the first data stream, so that the head node of the transmission path of the first data stream can perform corresponding congestion control measures. For example, the head node can trigger adaptive routing to adjust some of the traffic corresponding to the first data stream to other adaptive routing paths, thereby alleviating the congestion of the first data stream. In this scenario, the second device directly sends the first message to the head node of the transmission path of the first data stream, which can be called "one-hop backpressure".

[0190] In one example, if the first performance metric is greater than or equal to the upper limit of the performance metric, the second device can also use a multi-hop backpressure approach to send the first message to the head node of the transmission path of the first data stream. In a specific example, the second device can forward the first message to the previous hop node of the second device on the transmission path of the first data stream. Correspondingly, the previous hop node of the second device on the transmission path of the first data stream will also pass the first message to its own previous hop node on the transmission path of the first data stream, and so on, until the first message is sent to the head node of the transmission path of the first data stream.

[0191] As an example, each node on the transmission path of the first data stream can maintain the aforementioned upper limit of the performance metric. Accordingly, for a node that receives the first message, it can compare the first performance metric carried in the first message with the upper limit of the performance metric. If it determines that the upper limit of the first performance metric is greater than or equal to the aforementioned upper limit of the performance metric, it can then pass the first message to its previous hop node on the transmission path of the first data stream.

[0192] As another example, the first message may include second indication information, which instructs the device receiving the first message to pass it to its upstream node on the transmission path of the first data stream. In this way, the node receiving the first message does not need to compare the first performance metric value and the upper limit of the performance metric value carried in the first message; it can directly pass the first message to its upstream node on the transmission path of the first data stream based on the second indication information. In a specific example, the second device may add the second indication information to the first message after determining that the first performance metric value is greater than or equal to the upper limit of the performance metric value, and then further forward the first message with the added second indication information to the upstream node of the second device on the transmission path of the first data stream.

[0193] As mentioned above, each node on the transmission path of the first data stream can maintain the aforementioned performance metric upper limit. In one example, the performance metric upper limit can be issued by the controller to each node on the transmission path of the first data stream. Accordingly, each node on the transmission path of the first data stream can receive and save the performance metric upper limit issued by the controller.

[0194] In one possible implementation, the controller issues the aforementioned performance metric upper limit through the Network Configuration Protocol (Netconf) configuration model. Alternatively, the controller issues the aforementioned performance metric upper limit through the command-line interface (CLI) configuration model. Or, the controller issues the aforementioned performance metric upper limit through the YANG configuration model.

[0195] In another possible implementation, the controller sends the aforementioned performance metric upper limit to the communication device via a First Border Gateway Protocol (BGP) update message.

[0196] In another possible implementation, the controller sends the first information to the communication device via the Path Computation Element Protocol (PCEP). For example, the path computation element (PCE) included in the controller sends the aforementioned performance metric upper limit to the second device via PCEP.

[0197] In some examples, the first and second messages mentioned in the above embodiments may be referred to as subscriber priority-based flow control (SPFC) messages.

[0198] The solutions provided by the embodiments of this application have been described above. Next, the solutions provided by the embodiments of this application will be described in conjunction with specific scenarios.

[0199] See Figure 6 This figure is a schematic diagram of an exemplary application scenario provided by an embodiment of this application. About Figure 6 The application scenarios shown can be referenced in the previous text. Figure 2 The description of that section will not be repeated here.

[0200] exist Figure 6 In the scenario shown, during the forwarding phase of the first data stream:

[0201] 1. Network device A sends message 1 to network device B. Message 1 belongs to the first data stream and carries first indication information, instructing the network device to automatically allocate resources for the first data stream.

[0202] 2. Network device B receives packet 1 and learns forwarding information 1. After receiving packet 1, network device B determines the outgoing port for forwarding packet 1. Assuming the outgoing port determined by network device B is port 1 on network device B, network device B allocates a resource object for the first data stream from the forwarding resources of port 1. Assuming the identifier information of the allocated resource object is resource1, network device B can save the correspondence between the identifier information of the first data stream (e.g., stream1) and resource1. In addition, network device B sets a buffer and a corresponding waterline threshold (i.e., waterline threshold 1) for this resource object. Furthermore, network device B further generates entry information 1, which includes resource1 and forwarding information 1. Forwarding information 1 includes the identifier information of network device A and / or the ingoing port information of network device B for receiving packet 1. Figure 6 In this context, A_id represents the identification information of network device A, and "ingress port information 1" represents the ingress port information of network device B receiving packet 1.

[0203] Specifically, network device B allocates buffer resources for the first data stream to cache the first data stream to be sent. Network device B can also allocate bandwidth resources for the first data stream to ensure that the first data stream can be forwarded in real time at network device B.

[0204] In addition, although Figure 6In the above, the correspondence between the identification information of the first data stream and resource1, as well as the table entry information 1, are displayed separately. However, in practice, the correspondence between the identification information of the first data stream and resource1, as well as the table entry information 1, can also be in the same table entry information. That is, the table entry information includes 3 pieces of information, namely: the identification information of the first data stream, resource1, and forwarding information 1.

[0205] The table entry information 1 mentioned here can correspond to the first table entry information in the above embodiments, and the message 1 mentioned here can correspond to the first message in the above embodiments.

[0206] 3. Network device B continues to forward message 1 to network device C.

[0207] 4. Network device C receives packet 1 and learns forwarding information 2. After receiving packet 1, network device C determines the outgoing port for forwarding packet 1. Assuming the outgoing port determined by network device C is port 2 on network device C, network device C allocates a resource object for the first data stream from the forwarding resources of port 2. Assuming the identifier information of the allocated resource object is resource2, network device C can save the correspondence between the identifier information of the first data stream (e.g., stream1) and resource2. In addition, network device C sets a buffer and a corresponding waterline threshold (i.e., waterline threshold 2) for this resource object. Furthermore, network device C further generates table entry information 2, which includes resource2 and forwarding information 2. Forwarding information 2 includes the identifier information of network device B and / or the ingoing port information of network device C for receiving packet 1.

[0208] exist Figure 6 In this context, B_id represents the identification information of network device B, and "ingress port information 2" represents the ingress port information of network device C receiving packet 1.

[0209] Similar to how network device B allocates resources for the first data stream, network device C allocates buffer resources for the first data stream to buffer the data stream to be sent. Network device C can also allocate bandwidth resources for the first data stream to ensure that the first data stream can be forwarded in real time at network device C.

[0210] In addition, although Figure 6 In the above, the correspondence between the identification information of the first data stream and resource2, as well as the table entry information 2, are displayed separately. However, in practice, the correspondence between the identification information of the first data stream and resource2, as well as the table entry information 2, can also be in the same table entry information. That is, the table entry information includes 3 pieces of information, namely: the identification information of the first data stream, resource2, and forwarding information 2.

[0211] The table entry information 2 mentioned here can correspond to the first table entry information in the above embodiments.

[0212] exist Figure 6 In the scenario shown, during the congestion control processing phase:

[0213] 1. Network device C monitors the usage of the cache resources allocated to the first data stream. When it determines that the usage of the cache resources allocated to the first data stream is greater than or equal to the waterline threshold 1 (i.e., the preset threshold), it queries table entry information 2 to obtain forwarding information 2. Furthermore, it generates message 1 based on forwarding information 2 and sends message 1 to network device B.

[0214] The message 1 mentioned here is equivalent to the first message in the above embodiments.

[0215] 2. Network device B receives message 1 and performs congestion control processing on the first data stream based on message 1. Additionally, network device B can monitor the usage of its allocated buffer resources for the first data stream. When it determines that the usage of its allocated buffer resources for the first data stream is greater than or equal to the waterline threshold 1 (i.e., the preset threshold), it queries table entry information 1 to obtain forwarding information 1. Furthermore, based on forwarding information 1, it generates message 2 and sends message 2 to network device A.

[0216] The message 2 mentioned here is equivalent to the first message in the above embodiments.

[0217] 3. Network device A receives message 2 and performs congestion control processing on the first data stream based on message 2.

[0218] Optionally, network device C can also receive PFC frames or RPFC messages sent by network devices in data center 300. The PFC frame or RPFC message includes identification information of the first data stream. After receiving the PFC frame or RPFC message, network device C can perform congestion control processing on the first data stream based on the identification information of the first data stream included in the PFC frame or RPFC message.

[0219] Based on the congestion control method provided in the above embodiments, this application also provides a corresponding device, which will be described below with reference to the accompanying drawings.

[0220] See Figure 7 The figure is a schematic diagram of the structure of a congestion control device provided in an embodiment of this application. Figure 7 The congestion control device shown is applied to the first device to perform the method steps provided in the above method embodiments, for example, to perform... Figure 3 The steps performed by the first device.

[0221] like Figure 7 As shown, the device 700 includes a processing unit 701 and a sending unit 702.

[0222] The processing unit 701 is used to determine that network congestion occurs when forwarding the first data stream at the output port of the first device.

[0223] The sending unit 702 is configured to send a first message to a second device in response to network congestion occurring during the forwarding of the first data stream at the output port. The first message is configured to request the second device to perform congestion control processing for the first data stream. The second device is an upstream device of the first device on the transmission path of the first data stream.

[0224] In one possible implementation, the first message carries identification information of the first data stream.

[0225] In one possible implementation, the processing unit 701 is configured to: determine that the usage of the cache resource corresponding to the first data stream is greater than or equal to a preset threshold, wherein the cache resource is the cache resource allocated by the first device for the first data stream at the output port.

[0226] In one possible implementation, the congestion control process includes any one or more of the following: performing a rate-down process on the first data stream, caching the first data stream using the cache space of the second device, and notifying the sender of the first data stream to perform a rate-down process on the first data stream.

[0227] In one possible implementation, the first message further includes first deceleration information, which indicates the expected deceleration magnitude of the first data stream.

[0228] In one possible implementation, the first message further includes second deceleration information, which indicates the expected deceleration time of the first data stream.

[0229] In one possible implementation, the first message further includes a first performance metric, which is a performance metric introduced by performing congestion control processing on the first data stream, and the first performance metric includes latency and / or jitter.

[0230] In one possible implementation, the first message further includes a first performance metric, which is the sum of a second performance metric and a third performance metric. The second performance metric is the performance metric introduced by performing congestion control processing on the first data stream based on the first message. The third performance metric is the performance metric introduced by the first device performing congestion control processing on the first data stream. Both the second and third performance metrics include latency and / or jitter.

[0231] In one possible implementation, the apparatus further includes: a receiving unit for receiving a second message sent by a third device, the second message requesting the first device to perform congestion control processing on the first data stream, the third device being a downstream device of the first device on the transmission path, the second message including the third performance metric.

[0232] 10. The apparatus according to any one of claims 1-7, characterized in that the apparatus further comprises:

[0233] The receiving unit is configured to receive a third message sent by a fourth device, the third message being carried in a priority-based flow control (PFC) frame or a remote priority-based flow control (RPFC) message, the third message including identification information of the second data stream; the processing unit 701 is further configured to perform congestion control processing on the second data stream based on the third message.

[0234] In one possible implementation, the identification information of the second data stream is carried in the idle pad field of the PFC frame; or, the identification information of the second data stream is carried in the idle pad field of the RPFC message; or, the identification information of the second data stream is carried in the source Internet Protocol IP address and destination IP address fields of the RPFC message; or, the identification information of the second data stream is carried in the target field included in the User Datagram Protocol (UDP) payload of the RPFC message, wherein the UDP payload includes the PFC frame and the target field.

[0235] In one possible implementation, the first message is carried in a Transmission Control Protocol (TCP) message, a User Datagram Protocol (UDP) message, or an Internet Control Message Protocol (ICMP) message; or, the first message is carried in an Internet Protocol (IP) message; or, the first message is carried in a Layer 2 message in the Open Systems Interconnection (OSI) model.

[0236] In one possible implementation, the payload field of the Transmission Control Protocol (TCP) message is used to carry the first message; or, the payload field of the User Datagram Protocol (UDP) message is used to carry the first message; or, the payload field of the Internet Control Message Protocol (ICMP) message is used to carry the first message; or, the hop-by-hop (HBH) option header of the Internet Protocol (IP) message is used to carry the first message; or, the Destination Option (DOH) header of the IP message is used to carry the first message; or, the optional field of the IP message is used to carry the first message.

[0237] In one possible implementation, when the User Datagram Protocol (UDP) message carries the first message, the UDP message further includes a first port number, which indicates that the UDP message is a congestion notification message carrying the first message; or, when the ICMP message carries the first message, the ICMP message further includes a first type or a first encoding, which indicates that the ICMP message is a congestion notification message carrying the first message; or, when the Layer 2 message carries the first message, the Layer 2 message further includes a first destination Media Access Control (MAC) address, which indicates that the Layer 2 message is a congestion notification message carrying the first message; or, when the Layer 2 message carries the first message, the Layer 2 message further includes a first Ethertype field, which indicates that the Layer 2 message is a congestion notification message carrying the first message.

[0238] In one possible implementation, the receiving unit of the apparatus is further configured to: receive a first message, the first message belonging to the first data stream; the processing unit 701 is further configured to: determine an output port for forwarding the first message; and allocate buffer resources for the first data stream from the forwarding resources corresponding to the output port.

[0239] In one possible implementation, the processing unit 701 is further configured to: generate first entry information, the first entry information including: ingress port information of the first device receiving the first data stream, and / or, identification information of the previous hop node of the first device in the transmission path.

[0240] In one possible implementation, the first device enables the function of automatically allocating resources for data streams forwarded through the outgoing port.

[0241] In one possible implementation, the first message includes first indication information, which indicates that resources are automatically allocated for the first data stream to which the first message belongs.

[0242] In one possible implementation, the first message is an Internet Protocol version 4 (IPv4) message, and the first indication information is carried in the header of the first message; or, the first message is an Internet Protocol version 6 (IPv6) message, and the first indication information is carried in the IPv6 header or extension header of the first message.

[0243] In one possible implementation, the receiving unit of the apparatus is further configured to: receive configuration information for allocating cache resources for the first data stream.

[0244] In one possible implementation, the configuration information is further used to configure first entry information, which includes ingress port information for the first device to receive the first data stream, and / or identification information of the previous hop node of the first device in the transmission path.

[0245] In one possible implementation, the sending unit 702 is configured to: in response to network congestion occurring while forwarding the first data stream at the output port, send the first message to the second device based on the first entry information.

[0246] See Figure 8 The figure is a schematic diagram of another congestion control device provided in the embodiments of this application. Figure 8 The congestion control device shown is applied to the second device to perform the method steps provided in the above method embodiments, for example, to perform... Figure 3 The steps are performed by the second device.

[0247] like Figure 8 As shown, the device 800 includes a receiving unit 801 and a processing unit 802.

[0248] The receiving unit 801 is used to receive a first message sent by the first device. The first message is used to request the second device to perform congestion control processing on the first data stream. The second device is an upstream device of the first device on the transmission path of the first data stream.

[0249] The processing unit 802 is configured to perform congestion control processing on the first data stream according to the first message.

[0250] In one possible implementation, the first message carries identification information of the first data stream.

[0251] In one possible implementation, the processing unit 802 is configured to perform any one or more of the following: perform speed-down processing on the first data stream, cache the first data stream using the cache space of the second device, and notify the sender of the first data stream to perform speed-down processing on the first data stream.

[0252] In one possible implementation, the first message further includes first deceleration information, which indicates the expected deceleration magnitude of the first data stream.

[0253] In one possible implementation, the first message further includes second deceleration information, which indicates the expected deceleration time of the first data stream.

[0254] In one possible implementation, the first message further includes a first performance metric, which is a performance metric introduced by performing congestion control processing on the first data stream, and the first performance metric includes latency and / or jitter.

[0255] In one possible implementation, the first message further includes a first performance metric, which is the sum of a second performance metric and a third performance metric. The second performance metric is the performance metric introduced by performing congestion control processing on the first data stream based on the first message. The third performance metric is the performance metric introduced by the first device performing congestion control processing on the first data stream. Both the second and third performance metrics include latency and / or jitter.

[0256] In one possible implementation, the apparatus further includes: a sending unit, configured to send the first message to the head node of the transmission path if the first performance metric is greater than or equal to the upper limit of the performance metric corresponding to the first data stream, wherein the upper limit of the performance metric includes: a latency upper limit and / or a jitter upper limit.

[0257] In one possible implementation, the apparatus further includes: a sending unit, configured to send the first message to the previous hop node of the second device in the transmission path if the first performance metric is greater than or equal to the upper limit of the performance metric corresponding to the first data stream, wherein the upper limit of the performance metric includes: a latency upper limit and / or a jitter upper limit.

[0258] In one possible implementation, the first message includes second indication information, which instructs the device receiving the first message to pass the first message to its previous hop node in the transmission path.

[0259] In one possible implementation, the receiving unit 801 is further configured to: receive a configuration model of a network configuration protocol netconf, the configuration model of the network configuration protocol including the upper limit of the performance metric value; or, receive a configuration model of a command line, the configuration model of the command line including the upper limit of the performance metric value; or, receive a configuration model of YANG, the configuration model of YANG including the upper limit of the performance metric value.

[0260] In one possible implementation, the first message is carried in a Transmission Control Protocol (TCP) message, a User Datagram Protocol (UDP) message, or an Internet Control Message Protocol (ICMP) message; or, the first message is carried in an Internet Protocol (IP) message; or, the first message is carried in a Layer 2 message in the Open Systems Interconnection (OSI) model.

[0261] In one possible implementation, the payload field of the Transmission Control Protocol (TCP) message is used to carry the first message; or, the payload field of the User Datagram Protocol (UDP) message is used to carry the first message; or, the payload field of the Internet Control Message Protocol (ICMP) message is used to carry the first message; or, the hop-by-hop (HBH) option header of the Internet Protocol (IP) message is used to carry the first message; or, the Destination Option (DOH) header of the IP message is used to carry the first message; or, the optional field of the IP message is used to carry the first message.

[0262] In one possible implementation, when the User Datagram Protocol (UDP) message carries the first message, the UDP message further includes a first port number, which indicates that the UDP message is a congestion notification message carrying the first message; or, when the ICMP message carries the first message, the ICMP message further includes a first type or a first encoding, which indicates that the ICMP message is a congestion notification message carrying the first message; or, when the Layer 2 message carries the first message, the Layer 2 message further includes a first destination Media Access Control (MAC) address, which indicates that the Layer 2 message is a congestion notification message carrying the first message; or, when the Layer 2 message carries the first message, the Layer 2 message further includes a first Ethertype field, which indicates that the Layer 2 message is a congestion notification message carrying the first message.

[0263] For details on the implementation of the above devices 700 and 800, please refer to the relevant descriptions in the above method embodiments; they will not be repeated here.

[0264] For the specific implementation of each unit of the devices 700 and 800, please refer to the relevant descriptions in the above method embodiments, which will not be repeated here.

[0265] Please see Figure 9 As shown, Figure 9 This is a schematic diagram of the structure of a device provided in an embodiment of this application. Figure 9 The device 900 shown includes a processor 910, a communication interface 920, and a memory 930. The number of processors 910 in the device 900 can be one or more. Figure 9 Taking a processor as an example. In this embodiment, the processor 910, communication interface 920, and memory 930 can be connected via a bus system or other means. Figure 9 Taking the connection between China and Israel via the 940 bus system as an example.

[0266] Processor 910 may be a CPU, NP, or a combination of CPU and NP. Processor 910 may further include hardware chips. The aforementioned hardware chips may be ASICs, programmable logic devices (PLDs), or combinations thereof. The aforementioned PLDs may be complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), generic array logic (GALs), or any combination thereof.

[0267] The memory 930 may include volatile memory, such as random-access memory (RAM); the memory 930 may also include non-volatile memory, such as flash memory, hard disk drive (HDD), or solid-state drive (SSD); the memory 930 may also include combinations of the above types of memory. For example, the aforementioned preset threshold may be stored in the memory 930.

[0268] Optionally, the memory 930 stores an operating system and programs, executable modules, or data structures, or subsets thereof, or extended sets thereof. The programs may include various operation instructions for implementing various operations. The operating system may include various system programs for implementing various basic services and processing hardware-based tasks. The processor 910 can read the programs from the memory 930 to implement the methods provided in the embodiments of this application, for example, implementing... Figure 3 The steps performed by the first device or the second device.

[0269] The bus system 940 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus system 940 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 9 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0270] This application provides a computer-readable storage medium, including instructions or a computer program, which, when run on a computer, causes the computer to perform the methods described in the above-described method embodiments. For example, causing the computer to execute... Figure 3 The steps performed by the first device or the second device.

[0271] This application provides a computer program product containing instructions or a computer program, which, when run on a computer, causes the computer to perform the methods described in the above-described method embodiments. For example, it causes the computer to execute... Figure 3 The steps performed by the first device or the second device.

[0272] This application also provides a communication system, which can include the functions described above. Figure 3 The method shown includes a first device and a second device.

[0273] The embodiments of this application have been described in detail above. The steps in the method of the embodiments of this application can be scheduled, merged or deleted in sequence according to actual needs; the modules in the device of the embodiments of this application can be divided, merged or deleted according to actual needs.

[0274] It should be understood that the phrase "an embodiment" or "one embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in one embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence number of the above-described processes does not imply a sequential order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0275] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0276] It should be understood that in the embodiments of this application, "B corresponding to A" means that B is associated with A, and B can be determined based on A. However, it should also be understood that determining B based on A does not mean that B is determined solely based on A; B can also be determined based on A and / or other information.

[0277] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0278] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.

[0279] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0280] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

Claims

1. A congestion control method, characterized in that, The method is applied to a first device, and the method includes: It is determined that network congestion occurred when forwarding the first data stream at the output port of the first device; In response to network congestion occurring during the forwarding of the first data stream at the outgoing port, a first message is sent to a second device, the first message being a request for the second device to perform congestion control processing on the first data stream, the second device being an upstream device of the first device on the transmission path of the first data stream.

2. The method according to claim 1, characterized in that, The first message carries the identification information of the first data stream.

3. The method according to claim 1 or 2, characterized in that, The determination that network congestion occurred during the forwarding of the first data stream at the output port of the first device includes: The usage of cache resources corresponding to the first data stream is determined to be greater than or equal to a preset threshold, wherein the cache resources are the cache resources allocated by the first device for the first data stream at the output port.

4. The method according to any one of claims 1-3, characterized in that, The congestion control process includes any one or more of the following: The system performs a speed-down process on the first data stream, caches the first data stream using the cache space of the second device, and notifies the sender of the first data stream to perform a speed-down process on the first data stream.

5. The method according to any one of claims 1-4, characterized in that, The first message also includes first rate reduction information, which indicates the expected rate reduction of the first data stream.

6. The method according to any one of claims 1-5, characterized in that, The first message also includes second deceleration information, which indicates the expected deceleration time of the first data stream.

7. The method according to any one of claims 1-6, characterized in that, The first message also includes a first performance metric, which is a performance metric introduced by performing congestion control processing on the first data stream, and the first performance metric includes latency and / or jitter.

8. The method according to any one of claims 1-7, characterized in that, The first message also includes a first performance metric, which is the sum of a second performance metric and a third performance metric. The second performance metric is the performance metric introduced by performing congestion control processing on the first data stream based on the first message. The third performance metric is the performance metric introduced by the first device performing congestion control processing on the first data stream. Both the second and third performance metrics include latency and / or jitter.

9. The method according to claim 8, characterized in that, The method further includes: The first device receives a second message from a third device, the second message requesting the first device to perform congestion control processing on the first data stream, the third device being a downstream device of the first device on the transmission path, and the second message including the third performance metric.

10. The method according to any one of claims 1-7, characterized in that, The method further includes: Receive a third message sent by a fourth device, the third message being carried in a priority-based flow control (PFC) frame or a remote priority-based flow control (RPFC) message, the third message including identification information of the second data stream; Based on the third message, congestion control processing is performed on the second data stream.

11. The method according to claim 10, characterized in that, The identification information of the second data stream is carried through the idle pad field of the PFC frame; or, The identification information of the second data stream is carried through the idle pad field of the RPFC message; or, The identification information of the second data stream is carried through the source Internet Protocol IP address and destination IP address fields of the RPFC message; or, The identification information of the second data stream is carried by the target field included in the User Datagram Protocol (UDP) payload of the RPFC message, and the UDP payload includes the PFC frame and the target field.

12. The method according to any one of claims 1-11, characterized in that, The first message is carried in a Transmission Control Protocol (TCP) message, a User Datagram Protocol (UDP) message, or an Internet Control Message Protocol (ICMP) message; Alternatively, the first message may be carried in an Internet Protocol (IP) packet; Alternatively, the first message may be carried as a Layer 2 message in the Open Systems Interconnection (OSI) model.

13. The method according to claim 12, characterized in that, The payload field of the Transmission Control Protocol (TCP) message is used to carry the first message; Alternatively, the payload field of the User Datagram Protocol (UDP) message may be used to carry the first message; Alternatively, the payload field of the Internet Control Message Protocol (ICMP) message may be used to carry the first message; Alternatively, the hop-by-hop HBH option header of the Internet Protocol (IP) packet may be used to carry the first message; Alternatively, the Destination Options (DOH) header of the Internet Protocol (IP) packet may be used to carry the first message; Alternatively, the optional field of the Internet Protocol (IP) packet may be used to carry the first message.

14. The method according to claim 12 or 13, characterized in that, When the User Datagram Protocol (UDP) message carries the first message, the UDP message also includes a first port number, which is used to indicate that the UDP message is a congestion notification message carrying the first message. Alternatively, when the ICMP message carries the first message, the ICMP message may further include a first type or a first code, wherein the first type or the first code indicates that the ICMP message is a congestion notification message carrying the first message; Alternatively, when the Layer 2 message carries the first message, the Layer 2 message also includes a first destination Media Access Control (MAC) address, the first destination MAC address indicating that the Layer 2 message is a congestion notification message carrying the first message; Alternatively, when the Layer 2 message carries the first message, the Layer 2 message may also include a first Ethertype field, which indicates that the Layer 2 message is a congestion notification message carrying the first message.

15. The method according to any one of claims 1-14, characterized in that, The method further includes: Receive the first message, which belongs to the first data stream; Determine the output port used to forward the first message; Buffer resources are allocated for the first data stream from the forwarding resources corresponding to the outgoing port.

16. The method according to claim 15, characterized in that, The method further includes: Generate first table entry information, which includes: the ingress port information of the first device receiving the first data stream, and / or the identification information of the previous hop node of the first device in the transmission path.

17. The method according to claim 15 or 16, characterized in that, The first device has enabled the function of automatically allocating resources for data streams forwarded through the outgoing port.

18. The method according to claim 15 or 16, characterized in that, The first message includes first indication information, which indicates that resources are automatically allocated to the first data stream to which the first message belongs.

19. The method according to claim 18, characterized in that, The first message is an Internet Protocol version 4 (IPv4) message, and the first indication information is carried in the header of the first message; or, The first message is an Internet Protocol version 6 (IPv6) message, and the first indication information is carried in the IPv6 header or extension header of the first message.

20. The method according to any one of claims 1-14, characterized in that, The method further includes: Receive configuration information, which is used to allocate cache resources for the first data stream.

21. The method according to claim 20, characterized in that, The configuration information is also used to configure first entry information, which includes the ingress port information of the first device receiving the first data stream, and / or the identification information of the previous hop node of the first device in the transmission path.

22. The method according to claim 16 or 21, characterized in that, The step of sending a first message to the second device in response to network congestion occurring during the forwarding of the first data stream at the output port of the first device includes: In response to network congestion occurring during the forwarding of the first data stream at the outgoing port, the first message is sent to the second device based on the first entry information.

23. A congestion control method, characterized in that, The method is applied to a second device, and the method includes: The device receives a first message from a first device, the first message being used to request the second device to perform congestion control processing on the first data stream, the second device being an upstream device of the first device on the transmission path of the first data stream; Based on the first message, congestion control processing is performed on the first data stream.

24. The method according to claim 23, characterized in that, The first message carries the identification information of the first data stream.

25. The method according to claim 23 or 24, characterized in that, The congestion control process performed on the first data stream includes any one or more of the following: The system performs a speed-down process on the first data stream, caches the first data stream using the cache space of the second device, and notifies the sender of the first data stream to perform a speed-down process on the first data stream.

26. The method according to any one of claims 22-25, characterized in that, The first message also includes first rate reduction information, which indicates the expected rate reduction of the first data stream.

27. The method according to any one of claims 22-26, characterized in that, The first message also includes second deceleration information, which indicates the expected deceleration time of the first data stream.

28. The method according to any one of claims 22-27, characterized in that, The first message also includes a first performance metric, which is a performance metric introduced by performing congestion control processing on the first data stream, and the first performance metric includes latency and / or jitter.

29. The method according to any one of claims 22-28, characterized in that, The first message also includes a first performance metric, which is the sum of a second performance metric and a third performance metric. The second performance metric is the performance metric introduced by performing congestion control processing on the first data stream based on the first message. The third performance metric is the performance metric introduced by the first device performing congestion control processing on the first data stream. Both the second and third performance metrics include latency and / or jitter.

30. The method according to claim 28 or 29, characterized in that, The method further includes: If the first performance metric is greater than or equal to the upper limit of the performance metric corresponding to the first data stream, the first message is sent to the head node of the transmission path, wherein the upper limit of the performance metric includes: a latency upper limit and / or a jitter upper limit.

31. The method according to claim 28 or 29, characterized in that, The method further includes: If the first performance metric is greater than or equal to the upper limit of the performance metric corresponding to the first data stream, the first message is sent to the previous hop node of the second device in the transmission path, wherein the upper limit of the performance metric includes: a latency upper limit and / or a jitter upper limit.

32. The method according to claim 31, characterized in that, The first message includes second indication information, which instructs the device receiving the first message to pass the first message to its previous hop node in the transmission path.

33. The method according to any one of claims 30-32, characterized in that, The method further includes: Receive the configuration model of the network configuration protocol netconf, wherein the configuration model of the network configuration protocol includes the upper limit of the performance metric value; Alternatively, a configuration model for receiving command lines, wherein the configuration model for the command lines includes the upper limit of the performance metric value; Alternatively, receive a configuration model of YANG, wherein the configuration model of YANG includes the upper limit of the performance metric.

34. The method according to any one of claims 23-33, characterized in that, The first message is carried in a Transmission Control Protocol (TCP) message, a User Datagram Protocol (UDP) message, or an Internet Control Message Protocol (ICMP) message; Alternatively, the first message may be carried in an Internet Protocol (IP) packet; Alternatively, the first message may be carried as a Layer 2 message in the Open Systems Interconnection (OSI) model.

35. The method according to claim 34, characterized in that, The payload field of the Transmission Control Protocol (TCP) message is used to carry the first message; Alternatively, the payload field of the User Datagram Protocol (UDP) message may be used to carry the first message; Alternatively, the payload field of the Internet Control Message Protocol (ICMP) message may be used to carry the first message; Alternatively, the hop-by-hop HBH option header of the Internet Protocol (IP) packet may be used to carry the first message; Alternatively, the Destination Options (DOH) header of the Internet Protocol (IP) packet may be used to carry the first message; Alternatively, the optional field of the Internet Protocol (IP) packet may be used to carry the first message.

36. The method according to claim 34 or 35, characterized in that, When the User Datagram Protocol (UDP) message carries the first message, the UDP message also includes a first port number, which is used to indicate that the UDP message is a congestion notification message carrying the first message. Alternatively, when the ICMP message carries the first message, the ICMP message may further include a first type or a first code, wherein the first type or the first code indicates that the ICMP message is a congestion notification message carrying the first message; Alternatively, when the Layer 2 message carries the first message, the Layer 2 message also includes a first destination Media Access Control (MAC) address, the first destination MAC address indicating that the Layer 2 message is a congestion notification message carrying the first message; Alternatively, when the Layer 2 message carries the first message, the Layer 2 message may also include a first Ethertype field, which indicates that the Layer 2 message is a congestion notification message carrying the first message.

37. A communication device, characterized in that, The device includes multiple functional modules that interact with each other to implement the method as described in any one of claims 1-36.

38. A communication system, characterized in that, The communication system includes a first device and / or a second device, wherein the first device is used to perform the method described in any one of the preceding claims 1-22, and the second device is used to perform the method described in any one of the preceding claims 23-36.

39. A communication device comprising a processor and a memory, the memory for storing program code, the processor for calling the program code in the memory to cause the communication device to perform the method as claimed in any one of claims 1-36.

40. A computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1-36.

41. A computer program product, characterized in that, Includes program code that, when a computer runs the computer program product, causes the computer to perform the method as described in any one of claims 1-36.