Traffic control method, apparatus and system

By shaping the target service flow through upstream equipment and limiting its transmission rate, the problem of buffer overflow and packet loss caused by micro-burst traffic in the network is solved, and the transmission efficiency and stability of critical service flows are improved.

WO2024193427A1PCT designated stage expired Publication Date: 2024-09-26HUAWEI TECH CO LTD

Patent Information

Application Number
PCT/CN2024/081608
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-29
Filing Date
2024-03-14
Publication Date
2024-09-26

AI Technical Summary

Technical Problem

Micro-burst traffic in the network can cause buffer overflows, resulting in packet loss and affecting the efficiency and stability of business transmission, especially on devices with small buffers.

Method used

By obtaining traffic control requirements from upstream devices, traffic shaping is performed on the target service flow to limit its sending rate and prevent downstream device buffer overflow. Large buffer devices are used to perform rate limiting and shaping in advance to avoid packet loss on small buffer devices.

Benefits of technology

It improves the transmission efficiency and stability of critical service flows, avoids packet loss caused by micro-burst traffic in small buffer devices, reduces the risk of service traffic suppression, and improves the overall network transmission performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024081608_26092024_PF_FP
    Figure CN2024081608_26092024_PF_FP
Patent Text Reader

Abstract

The present application belongs to the technical field of networks. Disclosed are a traffic control method, apparatus and system. The method comprises: a first network device acquiring a traffic control requirement corresponding to a target service flow, wherein the traffic control requirement comprises the maximum receiving rate of a second network device in respect of the target service flow, both the first network device and the second network device are located in a transmission path of the target service flow, and the second network device is located downstream of the first network device; and the first network device performing traffic shaping on the target service flow according to the traffic control requirement, such that a sending rate of the first network device in respect of the target service flow is less than or equal to the maximum receiving rate. An upstream device limits the traffic rate of a service flow according to a traffic control requirement of a downstream device, so as to achieve the effect of traffic control, such that packet losses caused by buffer overflow of the downstream device due to micro bursts can be reduced. The stability of service transmission is improved by means of network-level collaborative traffic control, such that the efficiency of service transmission can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Flow control method, device and system

[0001] This application claims priority to Chinese patent application number 202310319186.6, filed on March 22, 2023, with the invention name “A solution for network-level flow control to solve packet loss of small buffer devices in micro-burst scenarios”, and application number 202310619163.7, filed on May 29, 2023, with the invention name “Flow control method, device and system”, all of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of network technology, and in particular to a flow control method, device and system. Background Art

[0003] Microbursts (short-term bursts or microbursts) are a common type of traffic on networks, typically referring to bursts of traffic of very short duration. For a detailed explanation of bursts, refer to Request for Comments (RFC) 8033 (RFC 8033). When microbursts occur on a network, they can cause buffer overflows on network devices, leading to packet loss and thus reducing service transmission efficiency.

[0004] Summary of the Invention

[0005] The present application provides a flow control method, device and system, which can solve the problem of service transmission efficiency being affected by the occurrence of micro-burst traffic in the network.

[0006] In a first aspect, a flow control method is provided. The method includes: a first network device obtaining a flow control requirement corresponding to a target service flow. The flow control requirement includes a maximum receive rate of a second network device for the target service flow. The first network device and the second network device are both located on a transmission path of the target service flow, with the second network device located downstream of the first network device. The first network device performs traffic shaping on the target service flow based on the flow control requirement, such that the send rate of the first network device for the target service flow is less than or equal to the maximum receive rate.

[0007] Optionally, the target service flow is a service flow that requires important protection (referred to as the important protection service flow), such as a high-priority service flow. In this application, the upstream device limits the flow rate of the important protection service flow according to the flow control requirements of the downstream device for the important protection service flow, thereby avoiding packet loss caused by buffer overflow of the downstream device due to micro-bursts of the important protection service flow, thereby ensuring the transmission efficiency of the important protection service flow.

[0008] Optionally, the target service flow is a service flow that does not require important protection (referred to as non-critical service flow), such as a low-priority service flow. In this application, the upstream device limits the flow rate of the non-critical service flow according to the flow control requirements of the downstream device for the non-critical service flow, thereby preventing the non-critical service flow from occupying too much bandwidth resources and cache resources of the downstream device, reserving more bandwidth resources and cache resources for the critical service flow, thereby ensuring the transmission efficiency of the critical service flow.

[0009] This application uses network-level collaborative flow control, where upstream equipment limits the flow of critical business flows or non-critical business flows, which can improve the transmission stability of critical business flows and thus improve the transmission efficiency of critical business flows.

[0010] Optionally, the available cache of the first port of the first network device is larger than the available cache of the second port of the second network device, the first port is the egress port on the first network device for forwarding the target business flow, and the second port is the egress port on the second network device for forwarding the target business flow.

[0011] Because large-cache devices can buffer more traffic than small-cache devices, upstream large-cache devices can smooth out traffic peaks and fill valleys. This, on the one hand, prevents drastic traffic fluctuations on downstream small-cache devices, reducing packet loss at these devices. This allows traffic to be pre-throttled and shaped by the large-cache devices before passing through the small-cache devices, thus avoiding or mitigating packet loss caused by microbursts on small-cache devices. Furthermore, upstream large-cache devices can buffer more traffic when rate limiting, making microbursts less likely to cause packet loss on large-cache devices. This avoids or reduces the risk of traffic suppression affecting service throughput, thereby improving the service experience.

[0012] Optionally, the traffic control requirement also includes an allocation cache requirement corresponding to the target business flow. The implementation method of the first network device for traffic shaping the target business flow according to the traffic control requirement includes: when the actual cache of the target business flow on the first network device exceeds the allocation cache requirement, the first network device drops packets for the target business flow.

[0013] In this application, the first network device drops packets for the target business flow when the actual cache of the target business flow exceeds the allocated cache requirement, which can reduce the impact of the delay and jitter of the target business flow due to excessive cache, and also avoid the target business flow from consuming too many cache resources.

[0014] In a first possible implementation, a first network device obtains a flow control requirement corresponding to a target service flow, including: the first network device receives a first message from a control device, the first message including an identifier of the target service flow and the flow control requirement, the first message instructing the first network device to perform traffic shaping on the target service flow. In this implementation, the flow control requirement obtained by the first network device comes from the control device, and the aforementioned flow control method is implemented through management plane collaboration.

[0015] Optionally, after the first network device receives the first message sent by the control device, the first network device receives a second message sent by the control device, where the second message is used to instruct the first network device to end traffic shaping for the target service flow.

[0016] In the present application, the first network device can passively end traffic shaping of the target service flow under the control of the control device.

[0017] Optionally, the first network device sends port information to the control device, where the port information includes port rates of one or more ports on the first network device. The port information may also include available buffers of one or more ports on the first network device. The one or more ports include a first port on the first network device used to forward the target service flow.

[0018] A second possible implementation method is that the first network device obtains the flow control requirements corresponding to the target business flow, including: the first network device receives a third message sent by the second network device, the third message includes the identifier and flow control requirements of the target business flow, and the third message is used to request the first network device to perform traffic shaping on the target business flow.

[0019] In this implementation, the flow control demand obtained by the first network device comes from the second network device, and the above flow control method is implemented through the control plane or the forwarding plane.

[0020] Optionally, the third message is a control message. The present application can implement the above-mentioned flow control method through control plane collaboration.

[0021] Optionally, the third message is a Border Gateway Protocol (BGP) update message, and the identifier and flow control requirements of the target service flow are in a path attribute field of the BGP update message.

[0022] In this application, network devices communicate the identifiers of service flows requiring traffic shaping and the corresponding flow control requirements via extended BGP update messages, eliminating the need to design new protocols and simplifying implementation. Alternatively, network devices can communicate the identifiers of service flows requiring traffic shaping and the corresponding flow control requirements based on a newly designed control protocol, resulting in greater protocol scalability and the flexibility to expand more policies.

[0023] Optionally, the third message is a service message, which includes an application-aware networking (APN) field. The APN field includes an APN identifier subfield and an APN parameter subfield. The identifier of the target service flow is in the APN identifier subfield and / or the APN parameter subfield, and the flow control requirement is in the APN parameter subfield. After receiving the third message, the first network device may delete the flow control requirement in the APN parameter subfield of the third message to obtain a fourth message. The first network device then forwards the fourth message.

[0024] The present application can realize the above-mentioned flow control method through the collaboration of the forwarding plane. The network device transmits the identifier of the business flow that needs to be traffic shaped and the flow control requirement corresponding to the business flow in the business message. For example, if the business flow that needs to be traffic shaped is a downstream flow, the network device can carry the identifier of the business flow and the flow control requirement corresponding to the business flow in the upstream business message. In this way, there is no need to transmit additional messages in the communication network to transmit information, which can save network transmission resources. In addition, after the network device determines that it meets the flow control requirement corresponding to the target business flow, it deletes the flow control requirement in the APN parameter subfield of the received business message and then forwards it, which can avoid the subsequent network devices from misidentifying the flow control requirement.

[0025] Optionally, the APN field further carries a target indication, where the target indication is used to indicate that the APN parameter subfield includes a flow control requirement.

[0026] Optionally, the APN field further includes a flag subfield and an APN parameter type subfield, and the target is indicated in the flag subfield and / or the APN parameter type subfield.

[0027] In a third possible implementation, the first network device obtains a flow control requirement corresponding to a target business flow, including: the first network device receives a fifth message sent by the second network device. The fifth message includes an identifier of the target business flow and a port rate of a second port of the second network device. The second port is an egress port on the second network device for forwarding the target business flow. The fifth message is used to request the first network device to perform traffic shaping on the target business flow. The first network device determines the flow control requirement based on the business requirement of the target business flow and the port rate of the second port. The maximum receiving rate of the second network device for the target business flow is less than or equal to the port rate of the second port.

[0028] In this implementation, the flow control requirement obtained by the first network device is determined by the first network device based on information provided by the second network device. The above flow control method is implemented through collaboration between the control plane or the forwarding plane.

[0029] Optionally, the business requirements of the target business flow include the transmission rate requirements of the target business flow. The first network device determines the implementation method of the flow control requirements based on the business requirements of the target business flow and the port rate of the second port, including: the first network device determines the maximum receiving rate based on the smaller value of the transmission rate requirement and the port rate of the second port.

[0030] When the target service flow is a security-critical service flow, the first network device may use the smaller value of the transmission rate requirement and the port rate of the second port as the maximum receiving rate of the second network device for the target service flow. In the present application, the sending rate of the second network device for the target service flow may be used as the maximum receiving rate of the second network device for the target service flow. This allows the first network device to limit the target service flow to a maximum of the sending rate of the second network device for the target service flow, thereby making the receiving rate of the second network device for the target service flow less than or equal to the sending rate, thereby avoiding packet loss of the target service flow on the second network device.

[0031] Optionally, the flow control requirement corresponding to the target business flow also includes the allocation cache requirement corresponding to the target business flow, and the business requirement includes the delay requirement of the target business flow. The first network device determines the implementation method of the flow control requirement based on the business requirement of the target business flow and the port rate of the second port, including: the first network device determines the allocation cache requirement based on the round-trip delay between the sending end of the target business flow and the receiving end of the target business flow, the maximum receiving rate and the delay requirement.

[0032] Optionally, the flow control requirement corresponding to the target business flow includes an allocation buffer requirement corresponding to the target business flow, and the implementation method of the first network device performing traffic shaping on the target business flow according to the flow control requirement includes: when the available buffer of the egress port on the first network device used to forward the target business flow is greater than or equal to the allocation buffer requirement, the first network device performs traffic shaping on the target business flow according to the flow control requirement.

[0033] Since in the distributed control scheme, it may happen that the upstream device requested by the downstream device for collaborative traffic shaping cannot meet the traffic control requirements of the downstream device, after the upstream device receives the traffic shaping request, it can first determine whether it meets the traffic control requirements.

[0034] Optionally, when the available buffer of the egress port on the first network device for forwarding the target service flow is less than the allocated buffer requirement, the first network device sends a third message to a third network device, where the third network device is located on a transmission path of the target service flow and the first network device is located downstream of the third network device.

[0035] In the present application, when the upstream device cannot meet the flow control requirements of the downstream device, the upstream device can continue to forward the message for requesting traffic shaping to the upstream device to achieve the diffusion transmission of the traffic shaping requirements.

[0036] Alternatively, when the available cache of the egress port on the first network device used to forward the target service flow is less than the allocated cache requirement, the first network device sends a request response message to the second network device, which is used to indicate that the first network device cannot perform traffic shaping on the target service flow.

[0037] Optionally, the first network device receives a sixth message sent by the second network device, where the sixth message is used to instruct the first network device to end traffic shaping for the target service flow.

[0038] In the present application, the first network device may passively end traffic shaping for the target service flow under the instruction of the second network device.

[0039] Optionally, when the first network device does not receive a message belonging to the target service flow within a target duration, the first network device ends traffic shaping for the target service flow. The target duration may be an aging duration set in the first network device.

[0040] In this application, the first network device can proactively terminate traffic shaping for the target service flow. By setting an aging timer in the first network device, when the first network device does not receive a message belonging to the target service flow within the aging timer, the first network device terminates the identification and processing of the target service flow, thereby releasing processing resources in a timely manner.

[0041] In a second aspect, a flow control method is provided. The method includes: a control device obtaining port information of multiple network devices. The multiple network devices include a first network device and a second network device located on a transmission path of a target service flow, with the second network device located downstream of the first network device. The port information of the first network device includes the port rate of a first port of the first network device. The port information of the second network device includes the port rate of a second port of the second network device. The first port is an egress port on the first network device used to forward the target service flow. The second port is an egress port on the second network device used to forward the target service flow. Based on the port rate of the second port being lower than the port rate of the first port, the control device determines a flow control requirement corresponding to the target service flow based on the service requirement of the target service flow and the port rate of the second port. The flow control requirement includes a maximum receive rate of the second network device for the target service flow, where the maximum receive rate is lower than or equal to the port rate of the second port. The control device sends a first message to the first network device. The first message includes an identifier of the target service flow and a flow control requirement. The first message instructs the first network device to perform traffic shaping on the target service flow.

[0042] In the present application, the control device selects the upstream device to perform traffic shaping on the target business flow. In the case that the target business flow is a re-secured business flow, the upstream device performs traffic speed limiting on the re-secured business flow according to the traffic control requirements of the downstream device for the re-secured business flow, which can avoid packet loss caused by the buffer overflow of the downstream device due to micro-bursts of the re-secured business flow, thereby ensuring the transmission efficiency of the re-secured business flow. In the case that the target business flow is a non-re-secured business flow, the upstream device performs traffic speed limiting on the non-re-secured business flow according to the traffic control requirements of the downstream device for the non-re-secured business flow, which can avoid the non-re-secured business flow occupying too many bandwidth resources and cache resources of the downstream device, and reserve more bandwidth resources and cache resources for the re-secured business flow, thereby ensuring the transmission efficiency of the re-secured business flow. The present application realizes traffic control through the collaboration between the control device and multiple network devices in the communication network, which can improve the transmission stability of the re-secured business flow, thereby improving the transmission efficiency of the re-secured business flow.

[0043] Optionally, the service requirement includes a transmission rate requirement of the target service flow. The control device determines, based on the service requirement of the target service flow and the port rate of the second port, a method for implementing the flow control requirement corresponding to the target service flow, including: the control device determines, based on the smaller value of the transmission rate requirement and the port rate of the second port, a maximum receiving rate.

[0044] In the case where the target service flow is a security-critical service flow, the control device may use the smaller value of the transmission rate requirement and the port rate of the second port as the maximum receiving rate of the second network device for the target service flow. In the present application, the sending rate of the second network device for the target service flow may be used as the maximum receiving rate of the second network device for the target service flow. This allows the first network device to limit the target service flow to a maximum of the sending rate of the second network device for the target service flow, thereby making the receiving rate of the second network device for the target service flow less than or equal to the sending rate, thereby avoiding packet loss of the target service flow on the second network device.

[0045] Optionally, the port information of the first network device further includes available buffer memory of the first port, and the port information of the second network device further includes available buffer memory of the second port. The control device sending the first message to the first network device may be implemented by: when the available buffer memory of the first port is greater than the available buffer memory of the second port, the control device sending the first message to the first network device.

[0046] In this application, the control device selects the upstream large cache device to perform traffic shaping on the service flow, which can avoid drastic changes in traffic on the downstream small cache device and reduce packet loss on the downstream small cache device. In other words, before the service flow passes through the small cache device, it is pre-speed-limited and shaped by the large cache device when passing through the large cache device, thereby avoiding or alleviating packet loss caused by micro-bursts on the small cache device. In addition, because the large cache device can cache more messages, it can better cope with burst traffic. Compared with the small cache device, the large cache device has a lower risk of packet loss when dealing with burst traffic and a smaller amount of packet loss, thereby improving the stability of service transmission.

[0047] Optionally, the flow control requirement also includes an allocation buffer requirement corresponding to the target business flow. The business requirement of the target business flow includes the delay requirement of the target business flow. The control device determines the implementation method of the flow control requirement corresponding to the target business flow based on the business requirement of the target business flow and the port rate of the second port, including: the control device determines the allocation buffer requirement corresponding to the target business flow based on the round-trip delay between the sending end of the target business flow and the receiving end of the target business flow, the maximum receiving rate of the second network device for the target business flow, and the delay requirement of the target business flow. The allocation buffer requirement is used by the first network device to drop packets for the target business flow when the actual buffer of the target business flow exceeds the allocation buffer requirement.

[0048] In this application, by setting the allocated cache requirement corresponding to the target business flow, the first network device will drop packets for the target business flow when the actual cache of the target business flow exceeds the allocated cache requirement. This can reduce the impact of the delay and jitter of the target business flow due to excessive cache, and can also avoid the target business flow from consuming too many cache resources.

[0049] In the first possible implementation, the second network device is an access layer device, and the first network device is an aggregation or core layer device. Because access layer devices in communication networks often have smaller port buffers than aggregation and core layer devices, access layer devices typically require flow control in downlink communication scenarios. This implementation preconfigures a policy in the control device to select an upstream device for access layer devices to perform traffic shaping, essentially meeting the flow control requirements in communication networks.

[0050] In a second possible implementation, the first network device is preconfigured to perform traffic shaping on the service flows passing through it. This implementation involves pre-determining a network device in the communications network that will perform traffic shaping for downstream devices and configuring that network device in advance. For example, configuring the network device with a dedicated port buffering board allows the network device to have as much buffer space as possible to buffer bursts during traffic shaping, thereby reducing the risk of packet loss.

[0051] In a third possible implementation, the first network device is the network device on the transmission path with the largest available buffer space for the egress port used to forward the target service flow. In this implementation, the control device performs traffic shaping by selecting the network device with more buffer space to buffer burst traffic, thereby reducing the risk of packet loss.

[0052] Optionally, the second network device is a pre-configured network device with a flow control requirement, and / or the second port is a pre-configured egress port with a flow control requirement.

[0053] In the present application, the control device may proactively select an upstream device for the second network device to perform traffic shaping.

[0054] Optionally, before the control device sends the first message to the first network device, the control device receives a traffic shaping request sent by the second network device. The traffic shaping request includes an identifier of a target service flow. The traffic shaping request is used to request traffic shaping of the target service flow.

[0055] In the present application, the control device can passively select an upstream device for the second network device to perform traffic shaping on the target service flow when triggered by the traffic shaping request sent by the second network device.

[0056] Optionally, the control device receives a traffic shaping cancellation request sent by the second network device, the traffic shaping cancellation request being used to request termination of traffic shaping for the target service flow. The control device sends a second message to the first network device, the second message being used to instruct the first network device to terminate traffic shaping for the target service flow.

[0057] In the present application, the control device may passively send an instruction to end traffic shaping of the target service flow to the first network device under the triggering of the traffic shaping cancellation request sent by the second network device.

[0058] In a third aspect, a flow control method is provided. The method is applied to a network device or a control device. The method includes: obtaining port information of a first network device. The first network device is located on the transmission path of a target service flow. The port information includes the port rate of the target port. The target port is the egress port on the first network device used to forward the target service flow. Based on the service requirements and port rate of the target service flow, a flow control requirement corresponding to the target service flow is determined. The flow control requirement includes a maximum receive rate of the first network device for the target service flow, where the maximum receive rate is less than or equal to the port rate.

[0059] In the present application, the downstream device provides the flow control requirements corresponding to the service flow to the upstream device, so as to trigger the upstream device to perform flow shaping on the service flow according to the flow control requirements. In the case where the target service flow is a re-secure service flow, the upstream device performs flow rate limiting on the re-secure service flow according to the flow control requirements of the downstream device for the re-secure service flow, which can avoid packet loss caused by the buffer overflow of the downstream device due to micro-bursts of the re-secure service flow, thereby ensuring the transmission efficiency of the re-secure service flow. In the case where the target service flow is a non-re-secure service flow, the upstream device performs flow rate limiting on the non-re-secure service flow according to the flow control requirements of the downstream device for the non-re-secure service flow, which can avoid the non-re-secure service flow occupying too many bandwidth resources and cache resources of the downstream device, and reserve more bandwidth resources and cache resources for the re-secure service flow, thereby ensuring the transmission efficiency of the re-secure service flow. The present application realizes flow control through the collaboration between the control device and multiple network devices in the communication network, which can improve the transmission stability of the re-secure service flow, thereby improving the transmission efficiency of the re-secure service flow.

[0060] Optionally, the business requirements of the target business flow include the transmission rate requirements of the target business flow. Based on the business requirements and port rate of the target business flow, the implementation method of the flow control requirements corresponding to the target business flow is determined, including: determining the maximum receiving rate based on the smaller value of the transmission rate requirement of the target business flow and the port rate.

[0061] In the case where the target service flow is a security-critical service flow, the first network device may use the smaller value of the transmission rate requirement and the port rate of the second port as the maximum receiving rate of the second network device for the target service flow. In the present application, the sending rate of the first network device for the target service flow may be used as the maximum receiving rate of the first network device for the target service flow. This allows the upstream device to limit the target service flow to a maximum of the sending rate of the first network device for the target service flow, thereby making the receiving rate of the first network device for the target service flow less than or equal to the sending rate, thereby avoiding packet loss of the target service flow on the first network device.

[0062] Optionally, the flow control requirements corresponding to the target service flow also include an allocation buffer requirement corresponding to the target service flow, and the service requirements include a latency requirement of the target service flow. Based on the service requirements and port rate of the target service flow, a method for implementing the flow control requirements corresponding to the target service flow is determined, including: determining an allocation buffer requirement based on the round-trip delay between the target service flow's transmitter and receiver, the maximum receive rate, and the latency requirement. The allocation buffer requirement is used to discard packets from the target service flow when the target service flow's actual buffer exceeds the allocation buffer requirement.

[0063] Optionally, the above method is applied to a first network device. After determining a flow control requirement corresponding to a target service flow based on the service requirements and port rate of the target service flow, the first network device sends a first message to a second network device, the first message including an identifier of the target service flow and the flow control requirement. The second network device is located on a transmission path of the target service flow, and the first network device is located downstream of the second network device. The first message is used to request the second network device to perform traffic shaping on the target service flow.

[0064] In this application, a network device with flow control requirements determines the flow control requirements corresponding to the business flow, and then provides the flow control requirements corresponding to the business flow to the upstream device to trigger the upstream device to perform flow shaping on the business flow according to the flow control requirements.

[0065] Optionally, the implementation method of the first network device sending the first message to the second network device includes: sending the first message to the second network device in response to the first network device receiving a message belonging to the target business flow, or the target business flow losing packets on the first network device.

[0066] In the present application, the first network device may send the first message to the second network device when triggered by the first packet of the target service flow, or the first network device may send the first message to the second network device when triggered by packet loss of the target service flow.

[0067] Optionally, the first message is a control message.

[0068] Optionally, the first message is a BGP update message, and the identifier and flow control requirements of the target service flow are in a path attribute field of the BGP update message.

[0069] Optionally, the first message is a service message, the service message includes an APN field, the APN field includes an APN identification subfield and an APN parameter subfield, the identifier of the target service flow is in the APN identification subfield and / or the APN parameter subfield, and the flow control requirement is in the APN parameter subfield.

[0070] Optionally, the APN field further carries an indication, which is used to indicate that the APN parameter subfield includes a flow control requirement.

[0071] Optionally, the APN field further includes a flag subfield and an APN parameter type subfield, and the indication is in the flag subfield and / or the APN parameter type subfield.

[0072] Optionally, the first network device receives a request response message corresponding to the first message sent by the second network device, where the request response message indicates that the second network device is unable to perform traffic shaping on the target service flow. The first network device sends a second message to a third network device, where the second message includes an identifier of the target service flow and a traffic control requirement corresponding to the target service flow. The third network device is located on the transmission path of the target service flow, and the first network device is located downstream of the third network device. The second message is used to request the first network device to perform traffic shaping on the target service flow.

[0073] In the present application, when a downstream device fails to request an upstream device to perform traffic shaping on a service flow, the downstream device may select other upstream devices on the transmission path of the service flow to perform traffic shaping on the service flow.

[0074] Optionally, when the first network device does not receive a message belonging to the target service flow within the target time period, the first network device sends a third message to the second network device, and the third message is used to instruct the second network device to end traffic shaping for the target service flow.

[0075] In the present application, the first network device may proactively send a message to the second network device to end traffic shaping of the target service flow, thereby instructing the second network device to end traffic shaping of the target service flow.

[0076] In a fourth aspect, a traffic control method is provided. The method includes: a first network device obtaining port information of the first network device. The first network device is located on the transmission path of a target service flow. The port information includes the port rate of the target port. The target port is the egress port on the first network device used to forward the target service flow. The first network device sends a target message to a second network device. The target message includes an identifier and port information of the target service flow. The second network device is located on the transmission path of the target service flow, and the first network device is downstream of the second network device. The target message is used to request the second network device to perform traffic shaping on the target service flow.

[0077] In the present application, the downstream device provides the upstream device with port information for calculating the flow control requirements corresponding to the service flow, so as to trigger the upstream device to calculate the flow control requirements corresponding to the service flow, and further perform flow shaping on the service flow according to the flow control requirements. In the case where the target service flow is a re-secure service flow, the upstream device performs flow rate limiting on the re-secure service flow according to the flow control requirements of the downstream device for the re-secure service flow, which can avoid packet loss caused by the buffer overflow of the downstream device due to micro-bursts of the re-secure service flow, thereby ensuring the transmission efficiency of the re-secure service flow. In the case where the target service flow is a non-re-secure service flow, the upstream device performs flow rate limiting on the non-re-secure service flow according to the flow control requirements of the downstream device for the non-re-secure service flow, which can avoid the non-re-secure service flow occupying too much bandwidth resources and cache resources of the downstream device, and reserve more bandwidth resources and cache resources for the re-secure service flow, thereby ensuring the transmission efficiency of the re-secure service flow. The present application realizes flow control by collaboration between the control device and multiple network devices in the communication network, which can improve the transmission stability of the re-secure service flow, thereby improving the transmission efficiency of the re-secure service flow.

[0078] Optionally, the target message is a control message.

[0079] Optionally, the target message is a BGP update message, and the identifier and port information of the target service flow are in a path attribute field of the BGP update message.

[0080] Optionally, the target message is a service message, the service message includes an APN field, the APN field includes an APN identification subfield and an APN parameter subfield, the identifier of the target service flow is in the APN identification subfield and / or APN parameter subfield, and the port information is in the APN parameter subfield.

[0081] Optionally, the APN field further carries a target indication, where the target indication is used to indicate that the APN parameter subfield includes port information.

[0082] Optionally, the APN field further includes a flag subfield and an APN parameter type subfield, and the target is indicated in the flag subfield and / or the APN parameter type subfield.

[0083] In a fifth aspect, a flow control device is provided, which is applied to a first network device, and includes: an acquisition module for acquiring a flow control requirement corresponding to a target service flow, the flow control requirement including a maximum receiving rate of a second network device for the target service flow, the first network device and the second network device both being located on a transmission path for the target service flow, and the second network device being located downstream of the first network device; and a traffic shaping module for performing flow shaping on the target service flow according to the flow control requirement so that the sending rate of the first network device for the target service flow is less than or equal to the maximum receiving rate.

[0084] Optionally, the available cache of the first port of the first network device is larger than the available cache of the second port of the second network device, the first port is the egress port on the first network device used to forward the target business flow, and the second port is the egress port on the second network device used to forward the target business flow.

[0085] Optionally, the traffic control requirement also includes an allocation buffer requirement corresponding to the target service flow, and the traffic shaping module is used to: when the actual buffer of the target service flow on the first network device exceeds the allocation buffer requirement, drop packets of the target service flow.

[0086] Optionally, the acquisition module includes a receiving module, which is used to receive a first message sent by the control device, the first message including the identifier of the target business flow and the flow control requirement, and the first message is used to instruct the first network device to perform traffic shaping on the target business flow.

[0087] Optionally, the receiving module is further used to receive a second message sent by the control device, where the second message is used to instruct the first network device to end traffic shaping for the target service flow.

[0088] Optionally, the apparatus further includes: a sending module; the sending module is configured to send port information to the control device, where the port information includes port rates of one or more ports on the first network device.

[0089] Optionally, the acquisition module includes a receiving module, which is used to receive a third message sent by the second network device, the third message including the identifier of the target business flow and the flow control requirement, and the third message is used to request the first network device to perform traffic shaping on the target business flow.

[0090] Optionally, the third message is a control message.

[0091] Optionally, the third message is a BGP update message, and the identifier of the target service flow and the flow control requirement are in a path attribute field of the BGP update message.

[0092] Optionally, the third message is a service message, the service message includes an APN field, the APN field includes an APN identification subfield and an APN parameter subfield, the identifier of the target service flow is in the APN identification subfield and / or the APN parameter subfield, and the flow control requirement is in the APN parameter subfield; the device also includes: a deletion module and a sending module; the deletion module is used to delete the flow control requirement in the APN parameter subfield of the third message to obtain a fourth message; the sending module is used to forward the fourth message.

[0093] Optionally, the APN field further carries a target indication, where the target indication is used to indicate that the APN parameter subfield includes the flow control requirement.

[0094] Optionally, the APN field further includes a flag subfield and an APN parameter type subfield, and the target indication is in the flag subfield and / or the APN parameter type subfield.

[0095] Optionally, the acquisition module includes a receiving module and a determination module; the receiving module is used to receive a fifth message sent by the second network device, the fifth message including the identifier of the target business flow and the port rate of the second port of the second network device, the second port is the egress port on the second network device for forwarding the target business flow, and the fifth message is used to request the first network device to perform traffic shaping on the target business flow; the determination module is used to determine the flow control requirement based on the business requirement of the target business flow and the port rate of the second port, and the maximum receiving rate is less than or equal to the port rate of the second port.

[0096] Optionally, the service requirement includes a transmission rate requirement of the target service flow, and the determination module is configured to determine the maximum receiving rate according to a smaller value between the transmission rate requirement and a port rate of the second port.

[0097] Optionally, the flow control requirement also includes an allocation buffer requirement corresponding to the target business flow, and the business requirement includes a delay requirement of the target business flow. The determination module is used to determine the allocation buffer requirement based on the round-trip delay between the sending end of the target business flow and the receiving end of the target business flow, the maximum receiving rate and the delay requirement.

[0098] Optionally, the flow control requirement includes an allocation buffer requirement corresponding to the target business flow, and the traffic shaping module is used to perform traffic shaping on the target business flow according to the flow control requirement when the available buffer of the egress port on the first network device used to forward the target business flow is greater than or equal to the allocation buffer requirement.

[0099] Optionally, the device also includes: a sending module; the sending module is used to send the third message to a third network device when the available cache of the egress port on the first network device for forwarding the target business flow is less than the allocated cache requirement, the third network device is located on the transmission path of the target business flow, and the first network device is located downstream of the third network device.

[0100] Optionally, the device also includes: a sending module; the sending module is used to send a request response message to the second network device when the available cache of the egress port on the first network device used to forward the target business flow is less than the allocated cache requirement, and the request response message is used to indicate that the first network device cannot perform traffic shaping on the target business flow.

[0101] Optionally, the receiving module is further used to receive a sixth message sent by the second network device, where the sixth message is used to instruct the first network device to end traffic shaping for the target service flow.

[0102] Optionally, the traffic shaping module is further used to end traffic shaping of the target service flow when the first network device does not receive a message belonging to the target service flow within a target time period.

[0103] In a sixth aspect, a flow control device is provided, which is applied to a control device, and the device includes: an acquisition module for acquiring port information of multiple network devices, the multiple network devices including a first network device and a second network device located on the transmission path of the target business flow, and the second network device is located downstream of the first network device, the port information of the first network device includes the port rate of the first port of the first network device, the port information of the second network device includes the port rate of the second port of the second network device, the first port is the egress port on the first network device for forwarding the target business flow, and the second port is the egress port on the second network device for forwarding the target business flow; a determination module for determining the flow control requirement corresponding to the target business flow based on the port rate of the second port being less than the port rate of the first port, according to the business requirements of the target business flow and the port rate of the second port, the flow control requirement including the maximum receiving rate of the second network device for the target business flow, and the maximum receiving rate being less than or equal to the port rate of the second port; a sending module for sending a first message to the first network device, the first message including the identifier of the target business flow and the flow control requirement, and the first message being used to instruct the first network device to perform traffic shaping on the target business flow.

[0104] Optionally, the service requirement includes a transmission rate requirement of the target service flow, and the determination module is configured to determine the maximum receiving rate according to a smaller value between the transmission rate requirement and a port rate of the second port.

[0105] Optionally, the port information of the first network device also includes the available cache of the first port, and the port information of the second network device also includes the available cache of the second port. The sending module is used to send the first message to the first network device when the available cache of the first port is greater than the available cache of the second port.

[0106] Optionally, the flow control requirement also includes an allocation buffer requirement corresponding to the target business flow, and the business requirement includes a delay requirement of the target business flow. The determination module is used to determine the allocation buffer requirement based on the round-trip delay between the sending end of the target business flow and the receiving end of the target business flow, the maximum receiving rate and the delay requirement. The allocation buffer requirement is used by the first network device to drop packets for the target business flow when the actual cache of the target business flow exceeds the allocation buffer requirement.

[0107] Optionally, the second network device is an access layer device, and the first network device is a convergence layer device or a core layer device.

[0108] Optionally, the first network device is a pre-configured network device for performing traffic shaping on a service flow passing through the first network device.

[0109] Optionally, the first network device is a network device on the transmission path having the largest available buffer memory at an egress port for forwarding the target service flow.

[0110] Optionally, the second network device is a pre-configured network device with a flow control requirement, and / or the second port is a pre-configured egress port with a flow control requirement.

[0111] Optionally, the device also includes: a receiving module, used to receive a traffic shaping request sent by the second network device before the control device sends the first message to the first network device, the traffic shaping request includes the identifier of the target business flow, and the traffic shaping request is used to request traffic shaping of the target business flow.

[0112] Optionally, the receiving module is also used to receive a traffic shaping cancellation request sent by the second network device, and the traffic shaping cancellation request is used to request to end traffic shaping of the target business flow; the sending module is also used to send a second message to the first network device, and the second message is used to instruct the first network device to end traffic shaping of the target business flow.

[0113] In the seventh aspect, a flow control device is provided, which includes: an acquisition module for acquiring port information of a first network device, where the first network device is located on the transmission path of a target business flow, and the port information includes the port rate of the target port, where the target port is the egress port on the first network device used to forward the target business flow; a determination module for determining the flow control requirement corresponding to the target business flow based on the business requirements of the target business flow and the port rate, where the flow control requirement includes the maximum receiving rate of the first network device for the target business flow, and the maximum receiving rate is less than or equal to the port rate.

[0114] Optionally, the service requirement includes a transmission rate requirement of the target service flow, and the determination module is configured to determine the maximum receiving rate according to a smaller value between the transmission rate requirement and the port rate.

[0115] Optionally, the flow control requirement also includes an allocation buffer requirement corresponding to the target business flow, and the business requirement includes a delay requirement of the target business flow. The determination module is used to determine the allocation buffer requirement based on the round-trip delay between the sending end of the target business flow and the receiving end of the target business flow, the maximum receiving rate and the delay requirement. The allocation buffer requirement is used to drop packets for the target business flow when the actual cache of the target business flow exceeds the allocation buffer requirement.

[0116] Optionally, the device is applied to the first network device, and the device also includes: a sending module; the sending module is used to send a first message to the second network device after determining the flow control requirements corresponding to the target business flow based on the business requirements of the target business flow and the port rate, the first message including the identifier of the target business flow and the flow control requirements, the second network device is located on the transmission path of the target business flow, and the first network device is located downstream of the second network device, and the first message is used to request the second network device to perform traffic shaping on the target business flow.

[0117] Optionally, the sending module is configured to send the first message to the second network device in response to the first network device receiving a message belonging to the target service flow, or packet loss occurring in the target service flow on the first network device.

[0118] Optionally, the first message is a control message.

[0119] Optionally, the first message is a BGP update message, and the identifier of the target service flow and the flow control requirement are in a path attribute field of the BGP update message.

[0120] Optionally, the first message is a service message, the service message includes an APN field, the APN field includes an APN identification subfield and an APN parameter subfield, the identifier of the target service flow is in the APN identification subfield and / or the APN parameter subfield, and the flow control requirement is in the APN parameter subfield.

[0121] Optionally, the APN field further carries an indication, where the indication is used to indicate that the APN parameter subfield includes the flow control requirement.

[0122] Optionally, the APN field further includes a flag subfield and an APN parameter type subfield, and the indication is in the flag subfield and / or the APN parameter type subfield.

[0123] Optionally, the device also includes: a receiving module; the receiving module is used to receive a request response message corresponding to the first message sent by the second network device, and the request response message is used to indicate that the second network device cannot perform traffic shaping on the target business flow; the sending module is also used to send a second message to a third network device, and the second message includes the identifier of the target business flow and the traffic control requirement. The third network device is located on the transmission path of the target business flow, and the first network device is located downstream of the third network device. The second message is used to request the first network device to perform traffic shaping on the target business flow.

[0124] Optionally, the sending module is also used to send a third message to the second network device when the first network device does not receive a message belonging to the target business flow within the target time period, and the third message is used to instruct the second network device to end traffic shaping for the target business flow.

[0125] In the eighth aspect, a flow control device is provided, which is applied to a first network device, and the device includes: an acquisition module for acquiring port information of the first network device, the first network device is located on the transmission path of the target business flow, the port information includes the port rate of the target port, and the target port is the egress port on the first network device for forwarding the target business flow; a sending module for sending a target message to a second network device, the target message including the identifier of the target business flow and the port information, the second network device is located on the transmission path of the target business flow, and the first network device is located downstream of the second network device, and the target message is used to request the second network device to perform traffic shaping on the target business flow.

[0126] Optionally, the sending module is configured to send the target message to the second network device in response to the first network device receiving a message belonging to the target service flow, or packet loss occurring in the target service flow on the first network device.

[0127] Optionally, the target message is a BGP update message, and the identifier of the target service flow and the port information are in a path attribute field of the BGP update message.

[0128] Optionally, the target message is a service message, the service message includes an APN field, the APN field includes an APN identification subfield and an APN parameter subfield, the identifier of the target service flow is in the APN identification subfield and / or the APN parameter subfield, and the port information is in the APN parameter subfield.

[0129] Optionally, the APN field further carries a target indication, where the target indication is used to indicate that the APN parameter subfield includes the port information.

[0130] Optionally, the APN field further includes a flag subfield and an APN parameter type subfield, and the target indication is in the flag subfield and / or the APN parameter type subfield.

[0131] The modules in the fifth to eighth aspects mentioned above can be implemented based on software, hardware or a combination of software and hardware, and the modules can be arbitrarily combined or divided based on the specific implementation.

[0132] In a ninth aspect, a flow control system is provided, comprising: a control device and a plurality of network devices;

[0133] The control device is configured to obtain port information of the multiple network devices, where the multiple network devices include a first network device and a second network device located on a transmission path of a target service flow, and the second network device is located downstream of the first network device; the port information of the first network device includes a port rate of a first port of the first network device; the port information of the second network device includes a port rate of a second port of the second network device; the first port is an egress port on the first network device used to forward the target service flow; and the second port is an egress port on the second network device used to forward the target service flow;

[0134] The control device is further configured to, when the port rate of the second port is lower than the port rate of the first port, determine a flow control requirement corresponding to the target service flow based on the service demand of the target service flow and the port rate of the second port, wherein the flow control requirement includes a maximum receiving rate of the second network device for the target service flow, and the maximum receiving rate is lower than or equal to the port rate of the second port;

[0135] The control device is further configured to send a message to the first network device, where the message includes an identifier of the target service flow and the flow control requirement, and the message is configured to instruct the first network device to perform flow shaping on the target service flow;

[0136] The first network device is used to perform traffic shaping on the target service flow according to the traffic control requirement, so that the sending rate of the first network device for the target service flow is less than or equal to the maximum receiving rate.

[0137] Optionally, the flow control device provided in the fifth aspect can serve as the first network device in the flow control system, and the flow control device provided in the sixth aspect can serve as the control device in the flow control system.

[0138] In a tenth aspect, a traffic control system is provided, comprising: a plurality of network devices, the plurality of network devices comprising a first network device and a second network device, the first network device and the second network device both being located on a transmission path of a target service flow, and the second network device being located downstream of the first network device;

[0139] The second network device is used to obtain port information of the second network device, where the port information includes a port rate of a target port, and the target port is an egress port on the second network device used to forward the target service flow;

[0140] The second network device is further configured to determine a flow control requirement corresponding to the target service flow based on the service requirement of the target service flow and the port rate, wherein the flow control requirement includes a maximum receiving rate of the second network device for the target service flow, where the maximum receiving rate is less than or equal to the port rate;

[0141] The second network device is further configured to send a message to the first network device, where the message includes an identifier of the target service flow and the flow control requirement, and the message is configured to request the first network device to perform traffic shaping on the target service flow;

[0142] The first network device is used to perform traffic shaping on the target service flow according to the traffic control requirement, so that the sending rate of the first network device for the target service flow is less than or equal to the maximum receiving rate.

[0143] Optionally, the flow control device provided in the fifth aspect can serve as the first network device in the flow control system, and the flow control device provided in the seventh aspect can serve as the second network device in the flow control system.

[0144] In an eleventh aspect, a traffic control system is provided, comprising: a plurality of network devices, the plurality of network devices comprising a first network device and a second network device, the first network device and the second network device both being located on a transmission path of a target service flow, and the second network device being located downstream of the first network device;

[0145] The second network device is used to obtain port information of the second network device, where the port information includes a port rate of a target port, and the target port is an egress port on the second network device used to forward the target service flow;

[0146] The second network device is further configured to send a message to the first network device, where the message includes an identifier of the target service flow and the port information, and the message is configured to request the first network device to perform traffic shaping on the target service flow;

[0147] The first network device is configured to determine a flow control requirement corresponding to the target service flow based on the service requirement of the target service flow and the port rate, the flow control requirement including a maximum receiving rate of the second network device for the target service flow, the maximum receiving rate being less than or equal to the port rate;

[0148] The first network device is further configured to perform traffic shaping on the target service flow according to the traffic control requirement, so that a sending rate of the first network device for the target service flow is less than or equal to the maximum receiving rate.

[0149] Optionally, the flow control device provided in the fifth aspect can serve as the first network device in the flow control system, and the flow control device provided in the eighth aspect can serve as the second network device in the flow control system.

[0150] In a twelfth aspect, a flow control device is provided, comprising: a memory and a processor;

[0151] The memory is used to store computer programs;

[0152] The processor is configured to execute the computer program stored in the memory so that the flow control device executes the flow control method provided in the first aspect or any optional manner of the first aspect.

[0153] In a thirteenth aspect, a flow control device is provided, comprising: a memory and a processor;

[0154] The memory is used to store computer programs;

[0155] The processor is configured to execute the computer program stored in the memory so that the flow control device executes the flow control method provided in the second aspect or any optional manner of the second aspect.

[0156] In a fourteenth aspect, a flow control device is provided, comprising: a memory and a processor;

[0157] The memory is used to store computer programs;

[0158] The processor is used to execute the computer program stored in the memory so that the flow control device performs the flow control method provided by the third aspect or any optional manner of the third aspect.

[0159] In a fifteenth aspect, a flow control device is provided, comprising: a memory and a processor;

[0160] The memory is used to store computer programs;

[0161] The processor is used to execute the computer program stored in the memory so that the flow control device performs the flow control method provided by the fourth aspect or any optional manner of the fourth aspect.

[0162] In the sixteenth aspect, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed, the flow control method provided in the first aspect or any optional method of the first aspect is implemented, or the flow control method provided in the second aspect or any optional method of the second aspect is implemented, or the flow control method provided in the third aspect or any optional method of the third aspect is implemented, or the flow control method provided in the fourth aspect or any optional method of the fourth aspect is implemented.

[0163] In the seventeenth aspect, a computer program product is provided, which includes a program or code. When the program or code is executed, it implements the flow control method provided by the first aspect or any optional method of the first aspect, or implements the flow control method provided by the second aspect or any optional method of the second aspect, or implements the flow control method provided by the third aspect or any optional method of the third aspect, or implements the flow control method provided by the fourth aspect or any optional method of the fourth aspect.

[0164] In the eighteenth aspect, a chip is provided, which includes a programmable logic circuit and / or program instructions. When the chip is running, it implements the flow control method provided by the first aspect or any optional method of the first aspect, or implements the flow control method provided by the second aspect or any optional method of the second aspect, or implements the flow control method provided by the third aspect or any optional method of the third aspect, or implements the flow control method provided by the fourth aspect or any optional method of the fourth aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0165] FIG1 is a schematic diagram showing a flow rate of network traffic varying over time, provided by an embodiment of the present application;

[0166] FIG2 is a schematic diagram showing how the flow rate of another type of network traffic varies over time, provided by an embodiment of the present application;

[0167] FIG3 is a schematic diagram showing how the flow rate of another network flow varies over time, provided in an embodiment of the present application;

[0168] FIG4 is a schematic diagram of an application scenario provided by an embodiment of the present application;

[0169] FIG5 is a schematic diagram of an implementation flow of a flow control method provided in an embodiment of the present application;

[0170] FIG6 is a schematic diagram of an implementation flow of another flow control method provided in an embodiment of the present application;

[0171] FIG7 is a schematic diagram of the structure of a BGP update message provided in an embodiment of the present application;

[0172] FIG8 is a schematic diagram of the structure of another BGP update message provided in an embodiment of the present application;

[0173] FIG9 is a schematic diagram of the structure of a control message provided in an embodiment of the present application;

[0174] FIG10 is a schematic diagram of the structure of an APN field provided in an embodiment of the present application;

[0175] FIG11 is a schematic diagram of a flow chart of another flow control method according to an embodiment of the present application;

[0176] FIG12 is a flow chart of a flow control method provided in another embodiment of the present application;

[0177] FIG13 is a flow chart of another flow control method provided in another embodiment of the present application;

[0178] FIG14 is a flow chart of another flow control method provided in another embodiment of the present application;

[0179] FIG15 is a flow chart of another flow control method provided in another embodiment of the present application;

[0180] FIG16 is a schematic structural diagram of a flow control device provided in an embodiment of the present application;

[0181] FIG17 is a schematic structural diagram of another flow control device provided in an embodiment of the present application;

[0182] FIG18 is a schematic structural diagram of another flow control device provided in an embodiment of the present application;

[0183] FIG19 is a schematic structural diagram of another flow control device provided in an embodiment of the present application;

[0184] FIG20 is a schematic diagram of the hardware structure of a network device provided in an embodiment of the present application;

[0185] Figure 21 is a schematic diagram of the hardware structure of a control device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0186] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0187] Due to the bursty nature of the business and the Transmission Control Protocol (TCP) sliding window mechanism (sending messages as quickly as possible), the traffic in the network is usually not uniform. If you increase the magnification of the network traffic observation magnifying glass, from minute level to second level and then to millisecond level, you will find that: at the minute level, the network traffic tends to be uniform; at the second level, the network traffic has certain fluctuations; at the millisecond level, the network traffic fluctuates violently. For example, Figures 1 to 3 are schematic diagrams of the flow rate of a network traffic provided by an embodiment of the present application over time. Among them, the ordinate represents the flow rate, the unit is million bits per second (Mbps), and the abscissa represents time. The time unit of the abscissa in Figure 1 is minutes. As shown in Figure 1, the flow rate-time change curve looks flat, indicating that the network traffic tends to be uniform. The time unit of the abscissa in Figure 2 is seconds. As shown in Figure 2, the flow rate-time change curve looks like there are obvious peaks and troughs, indicating that there are certain fluctuations in network traffic. The time unit on the horizontal axis in Figure 3 is milliseconds. As shown in Figure 3, the traffic rate-time curve appears to fluctuate violently with peaks and troughs, indicating that network traffic fluctuates violently. Each peak represents a microburst of network traffic, which means that microburst traffic is common in the network.

[0188] A network device has multiple ports. The network device forwards messages through the ports. The ports of the network device are usually configured with a cache, which is used to store messages received by the network device. The port on the network device used to receive messages is an ingress port, and the port on the network device used to send messages is an egress port. In the embodiment of the present application, the port cache of the network device refers to the port cache of the port. Optionally, the port cache of the network device can be statically configured. For example, if the network device has an 8G (gigabyte) cache and the network device has 8 ports, and the cache allocated to each port is 1G, then for a port, the available cache of the port is the remaining cache in the allocated cache. Alternatively, the port cache of the network device can also be dynamically configured. For example, if the network device has an 8G cache and the network device has 8 ports, and the initial cache allocated to each port is 512M (megabytes), and the remaining 4G cache is the shared cache of the 8 ports, then for a port, the available cache of the port is the sum of the remaining cache in the allocated cache and the remaining cache in the shared cache.

[0189] Optionally, the port cache of a network device includes multiple egress port queues (also known as forwarding queues). After receiving a message, the network device caches the message in the corresponding egress port queue and then forwards the messages in the egress port queue in sequence. When micro-burst traffic occurs in the network, it may cause the port cache of the network device to overflow instantaneously, resulting in packet loss. For example, the bandwidth of the ingress port of the network device is greater than the bandwidth of the egress port, and network traffic flows from the high-bandwidth ingress port to the low-bandwidth egress port (large hitting small); or, the number of ingress ports of the network device is greater than the number of egress ports, and network traffic flows from multiple ingress ports to one egress port (many hitting few). When the micro-burst of traffic is superimposed, if the egress port cache is small and cannot cache the peak traffic, packet loss will occur on the network device. Once packet loss occurs in the network device, retransmission may be triggered. The service delay caused by retransmission is much greater than the round-trip time (RTT), which in turn affects service transmission efficiency. In addition, since microburst traffic may cause congestion in a very short period of time, leading to misjudgment of congestion, the sender triggers a rapid deceleration through the TCP sliding window, suppressing business traffic, resulting in insufficient utilization of network bandwidth resources and reduced business throughput.

[0190] Due to the hardware cost of network deployment, some network devices in the network have small port caches. For example, the port caches of access layer devices are usually smaller than those of aggregation layer devices and core layer devices. For network devices with small port caches, the occurrence of micro-burst traffic is more likely to cause packet loss. For example, unlike operator routers, campus access switches generally have small overall caches, with the cache allocated to each port being less than 2M or 2G. Packet loss caused by micro-burst traffic is more common, especially in scenarios where an access switch with a small cache is connected to multiple access points (APs). According to statistics from a certain campus, when the bandwidth utilization rate was 30%, the proportion of ports with packet loss was 63.3%. The root cause was that the access switch with a small cache was connected to an AP, which exacerbated the micro-burst packet loss.

[0191] Currently, the industry has many approaches to reducing packet loss and ensuring high-priority services in response to network congestion or microbursts. For example, the explicit congestion notification (ECN) mechanism can reduce packet loss, while slicing and smart application control (SAC) technologies can ensure high-priority services. However, these approaches all have drawbacks or shortcomings.

[0192] For example, there are two implementations of the ECN mechanism. One is to apply back pressure when congestion occurs, notifying the source to control the sending speed. However, since this implementation only applies back pressure after congestion and packet loss have occurred, it not only causes service losses but also lacks timeliness. The other approach predicts congestion in advance based on queue and latency factors and applies back pressure in advance. However, the congestion prediction algorithm is more complex and its accuracy is difficult to guarantee.

[0193] For example, slicing technology can only ensure that services outside the slice cannot preempt bandwidth and forwarding resources from services within the slice, but it cannot solve the problem of packet loss caused by traffic bursts within the slice. Furthermore, because slicing technology allocates the entire network device's cache to different slices, each slice has independent cache resources and the caches of different slices cannot be shared. This reduces the network device's ability to smooth out network traffic peaks and fill valleys.

[0194] For example, SAC technology enables intelligent application identification and classification, using deep packet inspection to identify and parse packets, and then performs refined quality of service (QoS) control for high-priority services, thereby ensuring high-priority services. However, because SAC requires deep packet analysis, it cannot be performed if the packets are encrypted. This means that SAC technology cannot be applied in encrypted scenarios, resulting in significant application limitations.

[0195] Based on this, an embodiment of the present application provides a technical solution, in which an upstream device located on the transmission path of a service flow obtains the flow control requirement corresponding to the service flow, and performs traffic shaping on the service flow according to the flow control requirement, so that the sending rate of the upstream device for the service flow is less than or equal to the maximum receiving rate of the downstream device located on the transmission path of the service flow for the service flow, that is, the flow rate is limited by the upstream device to achieve the flow control effect. By the upstream device limiting the flow rate of the re-secured service flow according to the flow control requirement of the downstream device for the re-secured service flow, the packet loss caused by the buffer overflow of the downstream device due to the micro-burst of the re-secured service flow can be avoided, thereby ensuring the transmission efficiency of the re-secured service flow. By the upstream device limiting the flow rate of the non-re-secured service flow according to the flow control requirement of the downstream device for the non-re-secured service flow, the non-re-secured service flow can be avoided from occupying too many bandwidth resources and cache resources of the downstream device, and more bandwidth resources and cache resources can be reserved for the re-secured service flow, thereby ensuring the transmission efficiency of the re-secured service flow. This application achieves flow control through collaboration between a control device and multiple network devices in a communication network, thereby improving the transmission stability of the critical service flow and thus improving the transmission efficiency of the critical service flow. In addition, since the technical solution provided by the embodiments of this application does not require the replacement of network device hardware, flow control is achieved through network collaboration. On the one hand, it can solve the problem of network device packet loss due to microbursts, and on the other hand, it can achieve low-cost network construction.

[0196] In one possible implementation, the available cache of the egress port for forwarding the service flow on the upstream device located on the transmission path of the service flow is larger than the available cache of the egress port for forwarding the service flow on the downstream device, that is, the upstream device is a large cache device and the downstream device is a small cache device. Since the large cache device can cache more traffic than the small cache device, the upstream large cache device can smooth the peaks and fill the valleys of the service flow. On the one hand, it can avoid drastic changes in traffic on the downstream small cache device and reduce packet loss on the downstream small cache device, so that the service flow is pre-speed-limited and shaped by the large cache device before passing through the small cache device, thereby avoiding or alleviating packet loss on the small cache device due to micro-bursts. On the other hand, the upstream large cache device can cache more traffic when performing traffic speed limiting, and the possibility of micro-bursts causing packet loss on the large cache device is relatively small. Therefore, the risk of service traffic suppression affecting service throughput can be avoided or reduced, thereby improving service experience.

[0197] The following is a detailed introduction to the technical solution of this application from multiple perspectives, including application scenarios, method flow, virtual devices, physical devices, and systems.

[0198] The following examples illustrate the application scenarios involved in the embodiments of the present application.

[0199] The flow control method provided in the embodiments of the present application can be applied to various types of communication networks, including but not limited to radio access networks (RAN), Internet Protocol (IP)-based (IP RAN) networks, data center networks (DCN), metropolitan area networks, wide area networks, or campus networks.

[0200] Optionally, the communication network can adopt a three-layer network architecture, that is, the communication network can be a three-layer network, including a core layer, a convergence layer and an access layer. The core layer is the high-speed switching backbone of the communication network, which is connected to the backbone network (also called the core network), for example, it can be connected to the controller in the backbone network. The convergence layer is used to provide convergence connection (connecting the access layer and the core layer). The access layer is used to connect workstations to the communication network. Among them, the workstation can be a base station, AP, server or terminal, etc. In the embodiment of the present application, the network device located in the access layer is referred to as the access layer device, the network device located in the convergence layer is referred to as the convergence layer device, and the network device located in the core layer is referred to as the core layer device. Alternatively, the communication network can also adopt a two-layer network architecture, that is, the communication network can be a two-layer network, including a core layer and an access layer, the core layer is the high-speed switching backbone of the communication network, and the access layer is used to connect workstations to the communication network. The embodiment of the present application does not limit the network architecture adopted by the communication network.

[0201] The communication network provided in the following embodiments of the present application is obtained based on an abstract generalization of the communication network in the related art and is only used as an illustrative illustration and is not intended to limit the communication scenario.

[0202] For example, Figure 4 is a schematic diagram of an application scenario provided by an embodiment of the present application. As shown in Figure 4, the application scenario includes multiple network devices 401A-401C (collectively referred to as network device 401) in a communication network. Among them, network device 401A is a core layer device. Network device 401B is a convergence layer device. Network device 401C is an access layer device. The number and type of network devices in this application scenario are for illustrative purposes only and are not intended to limit the application scenarios involved in the embodiments of the present application.

[0203] Optionally, network device 401 is, for example, a router or a switch. Referring to Figure 4 , network device 401A, network device 401B, and network device 401C are connected in sequence. Network device 401A is connected to the backbone network. Network device 401C is connected to a workstation. Each network device 401 includes an uplink port and a downlink port. Network device 401A is connected to the backbone network via the uplink port and to network device 401B via the downlink port. Network device 401B is connected to network device 401A via the uplink port and to network device 401C via the downlink port. Network device 401C is connected to network device 401B via the uplink port and to the workstation via the downlink port. In an uplink communication scenario, the uplink port of network device 401 is an ingress port, and the downlink port is an egress port. That is, network device 401 receives packets via the downlink port and sends the packets via the uplink port. For example, an access layer device can receive packets sent by a workstation via the downlink port and send the packets to a convergence layer device via the uplink port. In a downlink communication scenario, the downlink port of network device 401 is the ingress port, and the uplink port is the egress port. That is, network device 401 receives packets through the uplink port and sends them through the downlink port. For example, an access layer device can receive packets from an aggregation layer device through its uplink port and send them through its downlink port.

[0204] The port rate of the uplink port of network device 401 is typically greater than the port rate of the downlink port. For example, the port rates of the uplink port and downlink port of network device 401A are 100 Gbps and 40 Gbps, respectively. The port rates of the uplink port and downlink port of network device 401B are 40 Gbps and 10 Gbps, respectively. The port rates of the uplink port and downlink port of network device 401C are 10 Gbps and 1 Gbps, respectively. When the port rate of the uplink port of network device 401 is greater than the port rate of the downlink port, a situation in which network traffic is greater than that of the downlink port may occur in the downlink communication scenario, and the aggregation layer devices and / or access layer devices may experience packet loss due to microburst traffic. Therefore, the flow control method provided in the embodiments of the present application can be applied to downlink communication scenarios. Of course, this flow control method is applicable to uplink communication scenarios or other communication scenarios.

[0205] Optionally, please continue to refer to Figure 4. The application scenario also includes a control device 402. The control device 402 can be a server, or a server cluster composed of several servers, or a cloud computing center. The control device 402 is connected to the network device 401 in the communication network through a wired network or a wireless network. The control device 402 is used to manage and control the network device 401, such as issuing configurations to the network device, collecting information about the network device, and issuing instructions to the network device. The control device 402 is also called a network management device or a network controller, for example, it can be a cloud management and control platform, a software defined network (SDN) controller, or a network control engine (NCE).

[0206] The following is an example of the method flow involved in the embodiments of the present application.

[0207] The flow control method provided in the embodiment of the present application can be implemented collaboratively based on the management plane, the control plane or the forwarding plane. The flow control method implemented collaboratively based on the management plane belongs to a centralized control solution. When the solution is implemented, the control device selects a network device that performs traffic shaping on the business flow, and sends the flow control requirements corresponding to the business flow to the network device. The flow control method implemented collaboratively based on the control plane or the forwarding plane belongs to a distributed control solution. When the solution is implemented, the downstream device with traffic shaping requirements selects an upstream device that performs traffic shaping on the business flow, and sends the flow control requirements corresponding to the business flow or information for determining the flow control requirements to the upstream device. The main difference between the flow control method implemented collaboratively based on the control plane and the flow control method implemented collaboratively based on the forwarding plane is that in the flow control method implemented collaboratively based on the control plane, the downstream device transmits the flow control requirements corresponding to the business flow or information for determining the flow control requirements to the upstream device through a control message; in the flow control method implemented collaboratively based on the forwarding plane, the downstream device transmits the flow control requirements corresponding to the business flow or information for determining the flow control requirements to the upstream device through a business message. The following embodiments of the present application respectively illustrate the specific implementation methods of the flow control method based on the collaborative implementation of the management plane, control plane and forwarding plane.

[0208] For example, Figure 5 is a schematic diagram of the implementation flow of a flow control method provided in an embodiment of the present application. As shown in Figure 5, method 500 includes but is not limited to steps 501 to 504. The method 500 is implemented based on management plane collaboration and can be applied to the application scenario shown in Figure 4. The control device in the method 500 is, for example, the control device 402 shown in Figure 4. The network device 2 in the method 500 is, for example, the network device 401C shown in Figure 4, and the network device 1 is, for example, the network device 401B or the network device 401A shown in Figure 4. Alternatively, the network device 2 in the method 500 is, for example, the network device 401B shown in Figure 4, and the network device 1 is, for example, the network device 401A shown in Figure 4.

[0209] Step 501: A control device obtains port information of multiple network devices.

[0210] The multiple network devices include network device 1 and network device 2, which are located on the transmission path of service flow 1. Network device 2 is located downstream of network device 1 on the transmission path of service flow 1. That is, when service flow 1 is transmitted in the communication network, it reaches network device 1 first and then network device 2. In other words, network device 1 is the upstream device on the transmission path of service flow 1, and network device 2 is the downstream device on the transmission path of service flow 1.

[0211] The port information of a network device includes the port rate. For example, the port information of network device 1 includes the port rates of one or more ports on network device 1, including port 1. Port 1 is the egress port on network device 1 used to forward service flow 1. The port information of network device 2 includes the port rates of one or more ports on the network device, including port 2. Port 2 is the egress port on network device 2 used to forward service flow 1.

[0212] Optionally, the port information of a network device also includes the available cache of the port. For example, the port information of network device 1 includes the available cache of one or more ports on network device 1, where the one or more ports include the aforementioned port 1. That is, the port information of network device 1 may include the port rate and available cache of port 1 of network device 1. The port information of network device 2 includes the available cache of one or more ports on the network device, where the one or more ports include the aforementioned port 2. That is, the port information of network device 2 may include the port rate and available cache of port 2 of network device 2. The available cache of the ports on the network device may come from the network device's own memory and / or additionally configured on-board memory.

[0213] In the embodiment of the present application, network device 1 is a network device for performing traffic shaping on service flow 1. Network device 2 is a network device that has traffic control requirements for service flow 1.

[0214] Optionally, service flow 1 is any service flow flowing through the communication network managed by the control device. Alternatively, service flow 1 is a designated service flow flowing through the communication network managed by the control device. Service flow 1 may be a re-secured service flow. A re-secured service flow may be a high-priority service flow, including but not limited to a service flow with a high service level agreement (SLA) level or a high user service level. Alternatively, a re-secured service flow may also be a service flow that accesses the communication network through a designated port or a designated access device. For example, the conference equipment in an important conference room communicates with the network through a designated port or a designated access device, and the re-secured service flow may be a service flow flowing through the designated port or the designated access device, that is, the re-secured service flow may be a service flow whose sending end or receiving end is the conference equipment in the important conference room. Alternatively, service flow 1 may also be a non-re-secured service flow. A non-re-secured service flow may be a low-priority service flow, including but not limited to a service flow with a low SLA level or a low user service level.

[0215] Optionally, network device 1 is located upstream of network device 2 on the transmission path of service flow 1 and has traffic shaping capabilities for service flow 1. There are multiple strategies for the control device to determine network device 1 for performing traffic shaping on service flow 1. This embodiment of the present application uses the following three strategies as examples for illustration.

[0216] In the first strategy, network device 2 is an access layer device, and network device 1 is an aggregation layer device or a core layer device. Alternatively, network device 2 is an aggregation layer device, and network device 1 is a core layer device. The control device may be configured with a strategy: for access layer devices with flow control requirements, select an aggregation layer device or a core layer device for traffic shaping; for aggregation layer devices with flow control requirements, select a core layer device for traffic shaping. For example, in the case where network device 2 with flow control requirements for service flow 1 is an access layer device, the control device automatically selects an aggregation layer device or a core layer device on the transmission path of service flow 1 to perform traffic shaping on service flow 1. Optionally, the control device stores the network topology of the communication network and the transmission path of the security service flow, so that the control device selects a suitable network device for traffic shaping.

[0217] Because the port caches of access layer devices in a communication network are often smaller than those of aggregation layer devices and core layer devices, access layer devices typically have flow control requirements in downlink communication scenarios. This strategy can basically meet the flow control requirements in the communication network by pre-configuring a policy in the control device to select an upstream device for access layer devices to perform traffic shaping. Similarly, the port caches of aggregation layer devices are often smaller than those of core layer devices. Therefore, in downlink communication scenarios, aggregation layer devices may also have flow control requirements. In embodiments of the present application, a policy can also be pre-configured in the control device to select an upstream device for aggregation layer devices to perform traffic shaping.

[0218] In the second strategy, network device 1 is preconfigured to perform traffic shaping on service flows passing through it. For example, network device 1 is equipped with a dedicated port buffer board. Under this strategy, when a downstream device of network device 1 requires traffic control, the control device automatically selects network device 1 for traffic shaping.

[0219] Under this strategy, the network device used to perform traffic shaping for downstream devices in the communication network is pre-determined, and some configurations are made in advance for the network device. For example, a single board is configured for the network device, which is dedicated to port caching. In this way, when the network device performs traffic shaping, it can have as much cache space as possible to cache burst traffic, thereby reducing the risk of packet loss.

[0220] In the third strategy, network device 1 is the network device with the largest available buffer memory among the network devices on the transmission path of service flow 1, used to forward service flow 1's egress port. If there are multiple network devices upstream of network device 2 on the transmission path of service flow 1 that have traffic shaping capabilities for service flow 1, the control device may select the network device with the largest available buffer memory on the egress port used to forward service flow 1 to perform traffic shaping on service flow 1. When this network device is selected for traffic shaping of service flow 1, it has more buffer memory to store packets belonging to service flow 1, reducing the risk of packet loss for service flow 1.

[0221] Optionally, network device 2 is a bandwidth bottleneck device on the transmission path of service flow 1. For example, network device 2 is a network device on the transmission path of service flow 1 whose egress port for forwarding service flow 1 has the lowest port rate.

[0222] In one possible implementation, service flow 1 is a statically arranged service flow, and the destination address and / or destination port of service flow 1 are pre-configured. The destination address may be a destination IP address or a destination Media Access Control (MAC) address. For example, service flow 1 is a security service flow sent to conference equipment in an important conference room. Under this implementation, the bandwidth bottleneck device on the transmission path of service flow 1 can be predetermined, so network device 2 can be a pre-configured network device with flow control requirements, and / or port 2 on network device 2 is a pre-configured output port with flow control requirements. For example, network device 2 is an access device for accessing conference equipment in an important conference room, or port 2 on network device 2 is a port for accessing conference equipment in an important conference room, and network device 2 has flow control requirements for service flow 1 sent to the conference equipment. Accordingly, the destination address of service flow 1 is the conference equipment, and / or the destination port of service flow 1 is port 2 on network device 2.

[0223] In this implementation mode, the control device can actively select an upstream device for network device 2 to perform traffic shaping.

[0224] In another possible implementation, service flow 1 is a dynamically orchestrated service flow. A network administrator can input a command line into the control device, which dynamically identifies service flows requiring flow control. For example, if the command line input into the control device indicates that flow control is required for a critical service flow destined for a certain important user, service flow 1 is the critical service flow destined for this important user. The control device can store a correspondence between the device address of this important user and the login device. The control device identifies a service flow with a destination address corresponding to the device address of this important user as a critical service flow and sends a notification to network devices in the communication network to detect whether the critical service flow exists in the communication network. When the network device detects the passage of the critical service flow or packet loss in the critical service flow, it can send a traffic shaping request to the control device, requesting that the control device perform traffic shaping on the critical service flow. In this implementation, the control device can receive a traffic shaping request from network device 2, the traffic shaping request including an identifier for service flow 1, and the traffic shaping request is used to request traffic shaping for service flow 1. After receiving the traffic shaping request sent by network device 2 , the control device determines that network device 2 is a network device that has a traffic control requirement for service flow 1 .

[0225] In this implementation, the control device can passively select an upstream device for network device 2 to perform traffic shaping on service flow 1 when triggered by the traffic shaping request sent by network device 2.

[0226] Optionally, the multiple network devices in step 501 above include network devices within the management domain of the control device, such as network device 1 within the management domain of the control device. The multiple network devices may also include network devices not within the management domain of the control device, such as network device 2 which may or may not be within the management domain of the control device.

[0227] For network devices within the management domain of the control device, the control device may obtain the port information of the network device by receiving the port information sent by the network device. For example, if network device 1 is within the management domain of the control device, network device 1 may send the port information of network device 1 to the control device, and the control device receives and stores the port information of network device 1. The control device may actively collect the port information of network devices within the management domain. For example, the control device may periodically collect the port information of network devices within the management domain, including but not limited to querying the network device for port information through the network configuration protocol (NetConf), telemetry technology, or simple network management protocol (SNMP). Alternatively, the network device may also actively send port information to the control device. For example, when the port information of the network device changes, the network device actively reports the changed port information to the control device.

[0228] For network devices that are not within the management domain of the control device, the control device may obtain the port information of the network device by receiving the port information sent by another control device that is within the management domain of the other control device. For example, if network device 2 is within the management domain of another control device, network device 2 may send its port information to the other control device, which then sends the port information of network device 2 to the control device. The other control device may obtain the port information of network device 2 by referring to the method described above for the control device to obtain the port information of network device 1, and will not be further described in detail in this embodiment of the present application.

[0229] Step 502: Based on the fact that the port rate of port 2 on network device 2 for forwarding service flow 1 is less than the port rate of port 1 on network device 1 for forwarding service flow 1, the control device determines the flow control requirement corresponding to service flow 1 according to the service requirements of service flow 1 and the port rate of port 2. The flow control requirement includes the maximum receiving rate of network device 2 for service flow 1.

[0230] The maximum receiving rate of network device 2 for service flow 1 is less than or equal to the port rate of port 2 of network device 2. The maximum receiving rate of network device 2 for service flow 1 may be the maximum sending rate of network device 2 for service flow 1, for example, the port bandwidth allocated by network device 2 to service flow 1. Optionally, the service requirements of service flow 1 include, but are not limited to, a latency requirement, a transmission rate requirement, or a jitter requirement.

[0231] Optionally, the service requirement of service flow 1 includes a transmission rate requirement of service flow 1. The control device determines, based on the service requirement of service flow 1 and the port rate of port 2, a method for implementing the flow control requirement corresponding to service flow 1, including: the control device determines, by network device 2, a maximum receiving rate for service flow 1 based on the smaller value of the transmission rate requirement of service flow 1 and the port rate of port 2.

[0232] If service flow 1 is a high-security service flow, the control device may use the smaller of the required transmission rate of service flow 1 and the port rate of port 2 as the maximum receiving rate of network device 2 for service flow 1. For example, if the required transmission rate of service flow 1 is 50 Mbps and the port rate of port 2 of network device 2 is 100 Mbps, the control device will determine that the maximum receiving rate of network device 2 for service flow 1 is 50 Mbps. For another example, if the required transmission rate of service flow 1 is 10 Gbps, or the higher the transmission rate, the better, and the port rate of port 2 of network device 2 is 1 Gbps, the control device will determine that the maximum receiving rate of network device 2 for service flow 1 is 1 Gbps.

[0233] For the security service flow, the principle followed by the network device when forwarding the service flow should be to meet the business requirements of the service flow as much as possible within the device's capabilities. Some security service flows may have clear transmission rate requirements, such as important conference audio and video streams. Some security service flows may not have clear transmission rate requirements or achieve the maximum transmission rate that the communication network can meet by setting a larger transmission rate requirement, such as important file services. When the network device forwards the security service flow, if the transmission rate requirement of the security service flow is less than the port rate of the network device, the transmission rate requirement of the security service flow is used as the sending rate to send the security service flow. In this way, the port bandwidth resources of the network device can be saved as much as possible while meeting the transmission efficiency of the security service, so that the remaining port bandwidth resources of the network device can be allocated to other services, thereby maximizing network benefits. In the case that the transmission rate requirement of the security service flow is greater than the port rate of the network device, the port rate (i.e., the maximum sending rate supported by the network device) is used as the sending rate to send the security service flow. In this way, the network device can meet the transmission rate requirement of the security service as much as possible under the condition of limited port bandwidth resources. Correspondingly, the control device uses the smaller value of the transmission rate requirement of business flow 1 and the port rate of port 2 as the maximum receiving rate of network device 2 for business flow 1. It can be understood that the sending rate of network device 2 for business flow 1 is used as the maximum receiving rate of network device 2 for business flow 1. In this way, the upstream device can limit the speed of business flow 1 to a maximum of the sending rate of network device 2 for business flow 1, so that the receiving rate of network device 2 for business flow 1 is less than or equal to the sending rate, so as to avoid packet loss of business flow 1 on network device 2.

[0234] If service flow 1 is a non-re-protected service flow, the control device can determine that the maximum receive rate of network device 2 for service flow 1 is less than or equal to the smaller value of the transmission rate requirement of service flow 1 and the port rate of port 2. By minimizing the transmission rate of non-re-protected service flows, the bandwidth and cache resources occupied by non-re-protected service flows on small cache devices can be reduced, thereby freeing up more bandwidth and cache resources for re-protected service flows, thereby ensuring the transmission efficiency of re-protected service flows.

[0235] Optionally, the flow control requirement corresponding to service flow 1 also includes an allocation buffer requirement corresponding to service flow 1. The service requirement of service flow 1 includes the delay requirement of service flow 1. The control device determines the implementation method of the flow control requirement corresponding to service flow 1 based on the service requirement of service flow 1 and the port rate of port 2, including: the control device determines the allocation buffer requirement corresponding to service flow 1 based on the round trip time (RTT) between the sending end of service flow 1 and the receiving end of service flow 1, the maximum receiving rate of network device 2 for service flow 1, and the delay requirement of service flow 1. The allocation buffer requirement is used by network device 1 to drop packets for service flow 1 when the actual cache of service flow 1 exceeds the allocation buffer requirement. For example, the allocation buffer requirement ≤ RTT*maximum receiving rate / delay requirement.

[0236] For latency-sensitive services, such as audio and video conferencing, the above method can be used to calculate and allocate cache requirements. For latency-insensitive services, such as file transfer protocol (FTP) downloads, the above method can be used to calculate and allocate cache requirements, or cache requirements can be set directly. The cache allocation principle can be to allocate as much cache as possible when the network device's port cache resources are sufficient.

[0237] Optionally, when determining the allocated buffer requirements for a service flow, the control device may also comprehensively consider other factors, such as the burst characteristics of the service flow. Burst characteristics include, but are not limited to, burst traffic size, burst duration, interval between adjacent bursts, or burst rate. The embodiments of the present application do not limit the manner in which the control device determines the allocated buffer requirements for a service flow.

[0238] Furthermore, after determining the allocated buffer requirement corresponding to service flow 1, the control device may determine whether the available buffer of port 2 on network device 2 meets the allocated buffer requirement corresponding to service flow 1. After determining that the available buffer of port 2 on network device 2 does not meet the allocated buffer requirement corresponding to service flow 1, the control device may proceed to the following step 503.

[0239] Alternatively, after determining the flow control requirement corresponding to service flow 1, the control device executes the following step 503 without determining whether the available buffer of port 2 on network device 2 meets the allocated buffer requirement corresponding to service flow 1. For example, if network device 2 is a pre-configured network device with flow control requirements, and / or port 2 on network device 2 is a pre-configured egress port with flow control requirements, the control device can directly execute the following step 503 after determining the flow control requirement corresponding to service flow 1.

[0240] Step 503 : The control device sends a message 11 to the network device 1 . The message 11 includes the identifier of the service flow 1 and the flow control requirement corresponding to the service flow 1 . The message 11 is used to instruct the network device 1 to perform flow shaping on the service flow 1 .

[0241] The identifier of service flow 1 can be represented by one or more of the five-tuple of service flow 1, or can be represented by an IPv4 flow identifier or an IPv6 flow identifier, or can be represented by an APN identifier. The five-tuple includes the source IP address, destination IP address, source port, destination port, and transport layer protocol. Optionally, message 11 can be derived by expanding existing management messages. For example, the management message can carry an indication for traffic shaping. Alternatively, message 11 can be a customized management message that itself has the function of indicating traffic shaping.

[0242] Optionally, the port information of network device 1 includes the available buffer of port 1. The port information of network device 2 includes the available buffer of port 2. Step 503 is performed when the available buffer of port 1 of network device 1 is greater than the available buffer of port 2 of network device 2. That is, after determining that the available buffer of port 1 of network device 1 is greater than the available buffer of port 2 of network device 2, the control device sends message 11 to network device 1. In other words, network device 1, which is used to perform traffic shaping on service flow 1, is a large-buffer device, and network device 2, which has traffic control requirements for service flow 1, is a small-buffer device.

[0243] In the embodiment of the present application, the control device selects the upstream large cache device to perform traffic shaping on the service flow, which can avoid drastic changes in traffic on the downstream small cache device and reduce packet loss on the downstream small cache device. In other words, before the service flow passes through the small cache device, it is pre-speed-limited and shaped by the large cache device when passing through the large cache device, thereby avoiding or alleviating packet loss caused by micro-bursts on the small cache device. In addition, because the large cache device can cache more packets, it can better handle burst traffic. Compared with small cache devices, the large cache device has a lower risk of packet loss when handling burst traffic and a smaller amount of packet loss, thereby improving service transmission stability.

[0244] Step 504 : Network device 1 performs traffic shaping on service flow 1 according to the traffic control requirement corresponding to service flow 1 , so that the sending rate of network device 1 for service flow 1 is less than or equal to the maximum receiving rate of network device 2 for service flow 1 .

[0245] Optionally, when the flow control requirement corresponding to service flow 1 includes an allocated buffer requirement corresponding to service flow 1, network device 1 performs traffic shaping on service flow 1 according to the flow control requirement corresponding to service flow 1, including: when the actual buffer of service flow 1 on network device 1 exceeds the allocated buffer requirement corresponding to service flow 1, network device 1 drops packets for service flow 1. In the embodiment of the present application, by setting the allocated buffer requirement corresponding to the service flow, the impact of excessive buffer size on the latency and jitter of the service flow can be reduced, and excessive consumption of buffer resources by a single service flow can be avoided.

[0246] After receiving the message 11 sent by the control device, the network device 1 can locally store the correspondence between the identifier of the service flow 1 and the flow control requirement. For example, the network device 1 can establish a flow control coordination requirement table, which is used to store the correspondence between the identifier of the service flow and the flow control requirement. Then, the network device 1 performs traffic shaping on the corresponding service flow based on the flow control coordination requirement table. For example, Table 1 shows the flow control coordination requirement table stored in the network device 1. Referring to Table 1, the flow control coordination requirement table includes the service flow identifier, the maximum receiving rate of the downstream device for the service flow, and the allocation buffer requirement corresponding to the service flow.

[0247] Table 1

[0248] Referring to Table 1, network device 1 stores flow control requirements corresponding to n business flows, where n is a positive integer. Among them, the maximum receiving rate of network device 2 for business flow 1 is R1, and the allocation buffer requirement corresponding to business flow 1 is C1. The forwarding rules of network device 1 for business flow 1 based on the flow control collaborative requirement table are as follows: If the receiving rate of network device 1 for business flow 1 is greater than R1, network device 1 will use R1 as the sending rate to send business flow 1 to the downstream device, and cache the remaining messages of business flow 1 locally. In addition, if the actual cache of business flow 1 on network device 1 exceeds C1, network device 1 discards the messages in business flow 1 that exceed C1. If the receiving rate of network device 1 for business flow 1 is less than or equal to R1, network device 1 will use the receiving rate of business flow 1 as the sending rate to send business flow 1 to the downstream device.

[0249] In an embodiment of the present application, an upstream device located on the transmission path of a service flow obtains the flow control requirement corresponding to the service flow, and performs flow shaping on the service flow according to the flow control requirement, so that the sending rate of the upstream device for the service flow is less than or equal to the maximum receiving rate of the downstream device for the service flow located on the transmission path of the service flow, that is, flow rate limiting is performed. Specifically, by the upstream device performing flow rate limiting on the re-secured service flow according to the flow control requirement of the downstream device for the re-secured service flow, packet loss caused by the buffer overflow of the downstream device due to micro-bursts of the re-secured service flow can be avoided, thereby ensuring the transmission efficiency of the re-secured service flow. By the upstream device performing flow rate limiting on the non-re-secured service flow according to the flow control requirement of the downstream device for the non-re-secured service flow, non-re-secured service flow can be avoided from occupying too much bandwidth resources and cache resources of the downstream device, and more bandwidth resources and cache resources can be reserved for the re-secured service flow, thereby ensuring the transmission efficiency of the re-secured service flow. The present application realizes flow control by collaboration between a control device and multiple network devices in a communication network, which can improve the transmission stability of the re-secured service flow, thereby improving the transmission efficiency of the re-secured service flow.

[0250] Furthermore, when the service flow 1 does not exist in the communication network, the network device 1 ends traffic shaping for the service flow 1. There are multiple ways to trigger the network device 1 to end traffic shaping for the service flow 1.

[0251] In the first implementation, network device 1 proactively terminates traffic shaping for service flow 1. When network device 1 does not receive any packets from service flow 1 within a target duration, network device 1 terminates traffic shaping for service flow 1. This target duration can be an aging timer configured on network device 1.

[0252] In the embodiment of the present application, by setting an aging time in network device 1, when network device 1 does not receive a message belonging to service flow 1 within the aging time, it ends the identification and processing of service flow 1, thereby releasing processing resources in a timely manner. In addition, network device 1 can also delete the stored correspondence between the identifier of service flow 1 and the flow control requirement to release storage resources.

[0253] In a second implementation, the control device controls network device 1 to terminate traffic shaping for service flow 1. Network device 1 receives message 12 sent by the control device. Message 12 instructs network device 1 to terminate traffic shaping for service flow 1. Optionally, message 12 may carry an identifier for service flow 1, thereby instructing network device 1 to terminate traffic shaping for service flow 1. Alternatively, if network device 1 is currently only performing traffic shaping on service flow 1, message 12 may not carry the identifier for service flow 1. In this case, upon receiving message 12 instructing the termination of traffic shaping, network device 1 assumes that message 12 indicates the termination of traffic shaping for service flow 1, thus also construing this as instructing network device 1 to terminate traffic shaping for service flow 1. Optionally, message 12 may be derived by extending existing management messages. For example, a management message may carry an indication for terminating traffic shaping. The indication for terminating traffic shaping is different from the indication for initiating traffic shaping. Alternatively, the message 12 may also be a user-defined management message, which itself has the function of indicating the end of traffic shaping.

[0254] Optionally, a second implementation may be that the control device receives a traffic shaping cancellation request from network device 2, requesting to terminate traffic shaping for service flow 1. The control device then sends message 12 to network device 1. Optionally, the traffic shaping cancellation request may include the identifier of service flow 1. Alternatively, if only one service flow is undergoing traffic shaping on network device 2, the traffic shaping cancellation request may not include the identifier of service flow 1. After receiving the traffic shaping cancellation request from network device 2, the control device may determine, based on the flow control coordination requirement table, that the service flow for which network device 2 is requesting to terminate traffic shaping is service flow 1.

[0255] In the flow control method provided in the embodiment of the present application, the control device selects the upstream device to perform flow shaping on the target service flow. In the case that the above-mentioned service flow 1 is a re-protected service flow, the upstream device performs flow rate limiting on the re-protected service flow according to the flow control requirements of the downstream device for the re-protected service flow, which can avoid packet loss caused by the buffer overflow of the downstream device due to the micro-burst of the re-protected service flow, thereby ensuring the transmission efficiency of the re-protected service flow. In the case that the above-mentioned service flow 1 is a non-re-protected service flow, the upstream device performs flow rate limiting on the non-re-protected service flow according to the flow control requirements of the downstream device for the non-re-protected service flow, which can avoid the non-re-protected service flow occupying too many bandwidth resources and cache resources of the downstream device, and reserve more bandwidth resources and cache resources for the re-protected service flow, thereby ensuring the transmission efficiency of the re-protected service flow. The present application realizes flow control through the collaboration between the control device and multiple network devices in the communication network, which can improve the transmission stability of the re-protected service flow, thereby improving the transmission efficiency of the re-protected service flow. When implementing the solution provided by the embodiment of the present application, most of the development work is completed on the control device, which can minimize the development and upgrade of network equipment and reduce the workload of upgrading and transforming the existing network.

[0256] In some implementation scenarios, if there are multiple control devices in the communication network, and the downstream device with traffic control requirements and the upstream device with traffic shaping capabilities are located in the management domains of different control devices, then the different control devices can collaborate with each other, and the control device that manages the downstream device provides the port information of the downstream device to the control device that manages the upstream device, and then the control device that manages the upstream device executes the above method 500 to achieve collaborative control of business traffic by multiple network devices.

[0257] For another example, Figure 6 is a schematic diagram of the implementation flow of another flow control method provided in an embodiment of the present application. As shown in Figure 6, method 600 includes but is not limited to steps 601 to 604. The method 600 is implemented based on the collaboration of the control plane or the forwarding plane, and can be applied to the application scenario shown in Figure 4. In this implementation, a control device may not be set in the application scenario. The network device 3 in the method 600 is, for example, the network device 401C shown in Figure 4, and the network device 4 is, for example, the network device 401B or the network device 401A shown in Figure 4. Alternatively, the network device 3 in the method 600 is, for example, the network device 401B shown in Figure 4, and the network device 4 is, for example, the network device 401A shown in Figure 4.

[0258] Step 601 : Network device 3 obtains port information of network device 3 , where network device 3 is located on the transmission path of service flow 2 .

[0259] The port information of the network device 3 includes the port rate of the port 3. The port 3 is an egress port on the network device 3 for forwarding the service flow 2. Optionally, the port information of the network device 3 also includes the available buffer of the port 3.

[0260] Optionally, service flow 2 is any service flow in the communication network. Alternatively, service flow 2 is a designated service flow in the communication network. Service flow 2 may be a re-protected service flow, or a non-re-protected service flow. A detailed explanation of service flow 2 can be found in the explanation of service flow 1 in step 501 above, and will not be repeated here in this embodiment of the present application.

[0261] Optionally, network device 3 is an access layer device or an aggregation layer device. Alternatively, network device 3 is a pre-configured network device that has flow control requirements for service flow 2. In one implementation, service flow 2 is a statically orchestrated service flow. The network device 3 may store an identifier of service flow 2. When the network device 3 detects service flow 2, the port information of the port on the network device 3 used to forward service flow 2 is obtained. In another implementation, service flow 2 is a dynamically orchestrated service flow. The network device 3 may pre-store a correspondence between a user and the device address of the login device. The network device 3 identifies the service flow whose destination address is the device address corresponding to the user as service flow 2, and after detecting service flow 2, obtains the port information of the port on the network device 3 used to forward service flow 2. Service flow 2 is any service flow identified by the network device 3 as being sent to the user.

[0262] Step 602: Network device 3 determines the flow control requirement corresponding to service flow 2 based on the service requirement of service flow 2 and the port rate of port 3 on network device 3 used to forward service flow 2. The flow control requirement includes the maximum receiving rate of network device 3 for service flow 2.

[0263] The maximum receiving rate of network device 3 for service flow 2 is less than or equal to the port rate of port 3 of network device 3. The maximum receiving rate of network device 3 for service flow 2 may be the maximum sending rate of network device 3 for service flow 2, for example, the port bandwidth allocated by network device 3 to service flow 2. Optionally, the service requirements of service flow 2 include, but are not limited to, latency requirements, transmission rate requirements, or jitter requirements.

[0264] Optionally, the service requirement of service flow 2 includes a transmission rate requirement of service flow 2. Network device 3 determines, based on the service requirement of service flow 2 and the port rate of port 3, a method for implementing the flow control requirement corresponding to service flow 3, including: network device 3 determines, based on the smaller value of the transmission rate requirement of service flow 2 and the port rate of port 2, a maximum receiving rate of network device 3 for service flow 2.

[0265] Optionally, the flow control requirement corresponding to service flow 2 also includes an allocation buffer requirement corresponding to service flow 2. The service requirement of service flow 2 includes the delay requirement of service flow 2. Network device 3 determines the implementation method of the flow control requirement corresponding to service flow 2 based on the service requirement of service flow 2 and the port rate of port 2, including: network device 3 determines the allocation buffer requirement corresponding to service flow 2 based on the round-trip delay between the sending end of service flow 2 and the receiving end of service flow 2, the maximum receiving rate of network device 3 for service flow 2, and the delay requirement of service flow 2. The allocation buffer requirement is used to drop packets for service flow 2 when the actual buffer of service flow 2 exceeds the allocation buffer requirement.

[0266] In this step 602, the network device 3 determines the implementation method of the flow control requirements corresponding to the business flow 2 based on the business requirements of the business flow 2 and the port rate of the port 3. You can refer to the above step 502 in which the control device determines the implementation method of the flow control requirements corresponding to the business flow 1 based on the business requirements of the business flow 1 and the port rate of the port 2. The embodiments of this application will not be repeated here.

[0267] Furthermore, after determining the allocated buffer requirement corresponding to service flow 2, network device 3 may determine whether the available buffer of port 3 on network device 3 meets the allocated buffer requirement corresponding to service flow 2. After determining that the available buffer of port 3 on network device 3 does not meet the allocated buffer requirement corresponding to service flow 2, network device 3 may continue to perform the following step 603.

[0268] Alternatively, after detecting service flow 2, network device 3 executes step 603 without determining whether the available buffer of port 3 on network device 3 meets the allocated buffer requirement corresponding to service flow 2. For example, after network device 3 receives the first packet of service flow 2, or detects that service flow 2 has experienced packet loss or the number of packet losses has reached a certain threshold on network device 2, it requests network device 4 to perform traffic shaping on service flow 2, i.e., execute step 603.

[0269] Step 603 : Network device 3 sends message 21 to network device 4 . Message 21 includes the identifier of service flow 2 and the flow control requirement corresponding to service flow 2 . Message 21 is used to request network device 4 to perform flow shaping on service flow 2 .

[0270] Among them, network device 4 is located on the transmission path of service flow 2, and network device 3 is located downstream of network device 4, that is, when service flow 2 is transmitted in the communication network, it first reaches network device 4 and then reaches network device 3. In other words, network device 4 is an upstream device located on the transmission path of service flow 2, and network device 3 is a downstream device located on the transmission path of service flow 2. Among them, the identifier of service flow 2 can be represented by one or more of the five-tuple of service flow 2, or can be represented by an IPv4 flow identifier or an IPv6 flow identifier, or can be represented by an APN identifier. When network device 3 is an access layer device, network device 4 is a convergence layer device or a core layer device. Optionally, service flow 2 is a downstream flow, and message 21 is an upstream message.

[0271] In a first possible implementation, method 600 is implemented based on control plane collaboration, and message 21 is a control message.

[0272] Optionally, the message 21 can be implemented based on an existing control protocol. For example, the control message 21 is a BGP update message, and the identifier of the service flow 2 and the flow control requirement corresponding to the service flow 2 are in the path attribute field of the BGP update message.

[0273] For example, Figures 7 and 8 are schematic diagrams of the structure of a BGP update message provided in an embodiment of the present application. As shown in Figures 7 and 8, the BGP update message includes an Ethernet header, an IP header, a Transmission Control Protocol (TCP) header, a BGP data packet, and a frame check sequence (FCS). Among them, the BGP data packet includes a BGP header and a BGP message field. The BGP header includes a maker field, a length field, and a type field (not shown in the figure). Figure 7 shows the format of the BGP message field defined in the RFC 4271 document. As shown in Figure 7, the BGP message field includes an unreachable route length field, an unreachable route field, a total path attribute length field, a path attribute field, and a network layer reachability information (NLRI) field. Figure 8 shows the format of the BGP message field defined in the RFC 4760 document. As shown in Figure 8, the BGP message field includes an address family identifier field, a subsequent address family identifier field, a next hop network address length field, a next hop network address field, a reserved field, an NLRI field, and a path attribute field. As shown in Figure 7 or Figure 8, in an embodiment of the present application, the path attribute field in the BGP message field can be extended, and the service flow identifier and the flow control requirements corresponding to the service flow can be carried as extended attributes in the path attribute field.

[0274] In this implementation mode, network device 3 can first establish a BGP Ethernet virtual private network (EVPN) neighbor relationship with network device 4, and then transmit the identifier of the business flow that needs to be traffic shaped and the traffic control requirements corresponding to the business flow through an extended BGP update message. The establishment of a BGP EVPN neighbor relationship between network device 3 and network device 4 can be that network device 3 directly establishes a BGP EVPN peer relationship with network device 4. Alternatively, the communication network also includes a route reflector, and a BGP EVPN neighbor relationship is established between network device 3 and network device 4, or network device 3 and network device 4 respectively establish a BGP peer relationship with the route reflector, that is, network device 3 and network device 4 are indirectly connected in communication through the route reflector. Among them, the route reflector is used to forward messages transmitted between different network devices, and the route reflector does not modify the received messages during the forwarding process.

[0275] In the embodiments of the present application, network devices communicate the identifiers of service flows requiring traffic shaping and the corresponding traffic control requirements via extended BGP update messages, eliminating the need to design new protocols and simplifying implementation. Furthermore, because BGP EVPN neighbors are based on TCP persistent connections, leveraging EVPN's security mechanisms, information transmission can be securely transmitted without requiring additional security considerations.

[0276] Alternatively, the embodiment of the present application may also design a new control protocol, and message 21 may be implemented based on the new control protocol. The new control protocol may be an overlay protocol for transmitting network cooperation information between network devices, for example, it may be called a network cooperation protocol (NCP). For example, Figure 9 is a schematic diagram of the structure of a control message provided in an embodiment of the present application. The control message may be called an NCP message. As shown in Figure 9, the control message includes an Ethernet header, an IP header, a TCP header or a User Datagram Protocol (UDP) header (TCP / UDP header) and network-level flow control information. Among them, the network-level flow control information includes a flow type (flow type) or bitmap field (flow type / bitmap field), a service identifier field and a flow control information field. The value of the flow type or bitmap field is used to indicate which flow identifier is carried in the service identifier field, including but not limited to an IPv4 flow identifier, an IPv6 flow identifier or an APN identifier. The service identifier field is used to carry the flow identifier of the service flow. The flow control information field is used to carry the flow control requirements corresponding to the service flow.

[0277] When implementing message 21 using the NCP protocol, network device 3 can first establish a UDP or TCP neighbor relationship with network device 4, and then transmit the identifier of service flow 2 and the corresponding flow control requirements of service flow 2 via the NCP message shown in Figure 9. If a UDP neighbor relationship is established between network device 3 and network device 4, the transport layer protocol header of the NCP message is a UDP header. This implementation method has lower resource overhead than TCP, allowing aggregation layer devices or core layer devices to listen to more access layer devices or provide traffic shaping services for more access layer devices. For example, aggregation layer devices or core layer devices can listen to 2,000 to 6,000 access layer devices. If a TCP neighbor relationship is established between network device 3 and network device 4, the transport layer protocol header of the NCP message is a TCP header. This implementation method can refer to the BGP protocol.

[0278] In an embodiment of the present application, network devices transmit the identifier of the business flow that needs traffic shaping and the traffic control requirements corresponding to the business flow based on the new control protocol. The protocol has better scalability and can flexibly expand more strategies.

[0279] In a second possible implementation, method 600 is implemented based on forwarding plane collaboration, and message 21 is a service message. The service message includes an APN field. The APN field includes an APN identifier (APN ID) subfield and an APN parameter subfield. The identifier of service flow 2 is in the APN identifier subfield and / or the APN parameter subfield. The flow control requirement corresponding to service flow 2 is in the APN parameter subfield. The identifier of service flow 2 is in the APN identifier subfield and / or the APN parameter subfield, including three situations: the identifier of service flow 2 is only in the APN identifier subfield, the identifier of service flow 2 is only in the APN parameter subfield, or the identifier of service flow 2 is in both the APN identifier subfield and the APN parameter subfield. The scenario where the identifier of service flow 2 is only in the APN identifier subfield is that the APN identifier of service flow 2 is the same as the APN identifier of the service flow to which message 21 belongs. In this case, the identifier of service flow 2 does not need to be additionally carried in the APN parameter subfield. After network device 4 receives message 21, it parses and finds that the APN parameter subfield does not carry the service flow identifier. In this case, the APN identifier in the APN identifier subfield is used as the identifier of the service flow requiring traffic shaping by default. The scenario where the identifier of service flow 2 is only in the APN parameter subfield is that the APN identifier of service flow 2 is different from the APN identifier of the service flow to which message 21 belongs. In this case, the identifier of service flow 2 needs to be additionally carried in the APN parameter subfield. After network device 4 receives message 21, it parses and obtains the service flow identifier carried in the APN parameter subfield and uses the service flow identifier carried in the APN parameter subfield as the identifier of the service flow requiring traffic shaping. The scenario in which the identifier of service flow 2 is in the APN identifier subfield and the APN parameter subfield is that the APN identifier of service flow 2 is the same as the APN identifier of the service flow to which message 21 belongs. In this case, the identifier of service flow 2 can be additionally carried in the APN parameter subfield. After network device 4 receives message 21, it parses and finds that the APN parameter subfield carries a service flow identifier. The service flow identifier carried in the APN parameter subfield can then be used as the identifier of the service flow that requires traffic shaping.

[0280] In the embodiments of the present application, the network device transmits the identifier of the service flow requiring traffic shaping and the corresponding flow control requirements of the service flow in the service message. For example, if the service flow requiring traffic shaping is a downstream flow, the network device can carry the identifier of the service flow and the corresponding flow control requirements of the service flow in the upstream service message. This eliminates the need to transmit additional messages in the communication network to convey information, thereby saving network transmission resources.

[0281] Optionally, the APN field also carries a target indication, which is used to indicate that the APN parameter subfield includes flow control requirements. Optionally, the APN field also includes a flag subfield and an APN parameter type subfield. The target indication is in the flag subfield and / or the APN parameter type subfield.

[0282] For example, Figure 10 is a schematic diagram of the structure of an APN field provided by an embodiment of the present application. As shown in Figure 10, the APN field includes an APN identification type subfield, a flag subfield, an APN parameter type subfield, an APN ID subfield, an intent subfield, and an APN parameter subfield. The length of the APN identification type subfield and the length of the flag subfield are both 8 bits, and the length of the APN parameter type subfield is 16 bits. Among them, the APN parameter subfield is used to carry the identification of the service flow that requires traffic shaping and the flow control requirements corresponding to the service flow. The flag subfield can be used to indicate the type of APN parameter carried in the APN parameter subfield, such as the flag subfield is set to "V", indicating that the APN parameter subfield includes flow control requirements. The APN parameter type subfield can also be used to indicate the type of APN parameter carried in the APN parameter subfield, such as pre-defining or pre-negotiating that the APN parameter subfield is set to a specific value to indicate that the APN parameter subfield includes flow control requirements. The definitions and explanations of other subfields in the APN field can be found in the relevant document (draft-li-apn-header-03-Application-aware Networking (APN) Header), and the embodiments of this application will not be repeated here.

[0283] Optionally, the implementation of network device 3 sending message 21 to network device 4 includes: in response to network device 3 receiving a message belonging to service flow 2, or service flow 2 experiencing packet loss on network device 3, network device 3 sending message 21 to network device 4. In other words, network device 3 may send message 21 to network device 4 when triggered by the first packet of service flow 2, or network device 3 may send message 21 to network device 4 when triggered by packet loss of service flow 2.

[0284] Step 604 : Network device 4 performs traffic shaping on service flow 2 according to the traffic control requirement corresponding to service flow 2 , so that the sending rate of network device 4 for service flow 2 is less than or equal to the maximum receiving rate of network device 3 for service flow 2 .

[0285] Optionally, the available buffer of port 4 of network device 4 is greater than the available buffer of port 3 of network device 3. Port 4 is the egress port on network device 4 for forwarding service flow 2. In the case where the flow control requirement corresponding to service flow 2 includes the allocation buffer requirement corresponding to service flow 2, one implementation method for network device 4 to perform traffic shaping on service flow 2 according to the flow control requirement corresponding to service flow 2 is that when the available buffer of the egress port on network device 4 for forwarding service flow 2 is greater than or equal to the allocation buffer requirement corresponding to service flow 2, network device 4 performs traffic shaping on service flow 2 according to the flow control requirement corresponding to service flow 2. The implementation method for network device 4 to perform traffic shaping on service flow 2 according to the flow control requirement corresponding to service flow 2 in this step 604 can refer to the implementation method for network device 1 to perform traffic shaping on service flow 1 according to the flow control requirement corresponding to service flow 1 in the above-mentioned step 504, and the embodiments of the present application will not be repeated here.

[0286] Because in a distributed control solution, a situation may arise where the upstream device requested by a downstream device for collaborative traffic shaping cannot meet the downstream device's traffic control requirements. Therefore, after receiving the traffic shaping request, the upstream device can first determine whether it itself meets the traffic control requirements. Optionally, in conjunction with the second possible implementation of step 603 above, message 21 is a service message. After receiving message 21, network device 4, if it determines that it meets the downstream device's traffic control requirements for service flow 2, deletes the traffic control requirement corresponding to service flow 2 from the APN parameter subfield of message 21, obtaining message 22. Network device 4 then continues to forward message 22. This prevents subsequent network devices from misidentifying the traffic control requirements.

[0287] Furthermore, after network device 4 performs traffic shaping on service flow 2 according to the flow control requirements corresponding to service flow 2, when service flow 2 no longer exists in the communication network, network device 4 terminates traffic shaping on service flow 2. There are multiple ways to trigger network device 4 to terminate traffic shaping on service flow 2.

[0288] In the first implementation, network device 4 proactively terminates traffic shaping for service flow 2. When network device 4 does not receive any packets from service flow 2 within a target duration, network device 4 terminates traffic shaping for service flow 2. This target duration can be an aging timer configured in network device 4.

[0289] In this embodiment of the present application, by setting an aging time in network device 4, when network device 4 does not receive a message belonging to service flow 2 within the aging time, it ends the identification and processing of service flow 2, thereby releasing processing resources in a timely manner. In addition, network device 2 can also delete the stored correspondence between the identifier of service flow 2 and the flow control requirement to release storage resources.

[0290] In the second implementation, network device 3 triggers network device 4 to terminate traffic shaping for service flow 2. When network device 3 does not receive any packets belonging to service flow 2 within a target duration, network device 3 sends message 23 to network device 4. Message 23 instructs network device 4 to terminate traffic shaping for service flow 2. Message 23 can optionally be a control message or a service message. The implementation of message 23 can be referenced to the implementation of message 21 and will not be further described in this embodiment.

[0291] Optionally, when the flow control requirement corresponding to service flow 2 includes an allocation buffer requirement corresponding to service flow 2, when the available buffer of the egress port on network device 4 for forwarding service flow 2 is less than the allocation buffer requirement corresponding to service flow 2, network device 4 sends packet 21 to network device 5. Network device 5 is located on the transmission path of service flow 2, and network device 4 is located downstream of network device 5. For example, network device 3 is an access layer device, network device 4 is an aggregation layer device, and network device 5 is a core layer device.

[0292] In an embodiment of the present application, when an upstream device cannot meet the flow control requirements of a downstream device, the upstream device may continue to forward messages requesting traffic shaping to the upstream device to achieve diffusion transmission of the traffic shaping requirements.

[0293] Alternatively, when the flow control requirement corresponding to service flow 2 includes the allocation buffer requirement corresponding to service flow 2, when the available buffer of the egress port on network device 4 for forwarding service flow 2 is less than the allocation buffer requirement corresponding to service flow 2, network device 4 sends a request response message to network device 3, and the request response message is used to indicate that network device 4 cannot perform traffic shaping on service flow 2. For example, network device 4 only has 100M buffer for collaborative flow control, and has now helped 50 re-secured service flows to perform collaborative flow control. On average, each re-secured service flow consumes 2M buffer. If a new flow control collaborative request comes in, network device 4 may reject it. Considering the convergence ratio, if the buffer convergence ratio on network device 4 is 2:1, then network device 4 can also accept multiple re-secured service flows with a total buffer consumption of no more than 100M.

[0294] Furthermore, after receiving the request-response message indicating that network device 4 is unable to perform traffic shaping on service flow 2, network device 3 may send message 24 to network device 6. Message 24 includes the identifier of service flow 2 and the corresponding flow control requirements for service flow 2. Network device 6 is located on the transmission path of service flow 2, and network device 3 is located downstream of network device 6. Message 24 is used to request network device 6 to perform traffic shaping on service flow 2. Optionally, message 24 is a control message or a service message. The implementation of message 24 can refer to the implementation of message 21 and will not be further described in this embodiment of the present application.

[0295] In an embodiment of the present application, when a downstream device fails to request an upstream device to perform traffic shaping on a service flow, the downstream device may select other upstream devices on the transmission path of the service flow to perform traffic shaping on the service flow. For example, a primary collaborative flow control device and a backup collaborative flow control device may be configured in the downstream device. In a scenario where the downstream device is an access layer device, the convergence layer device may be configured as the primary collaborative flow control device, and the core layer device may be configured as the backup collaborative flow control device. After the downstream device fails to request flow control collaboration from the primary collaborative flow control device, it may request flow control collaboration from the backup collaborative flow control device.

[0296] In the flow control method provided in the embodiment of the present application, the downstream device provides the flow control demand corresponding to the service flow to the upstream device to trigger the upstream device to perform flow shaping on the service flow according to the flow control demand. In the case where the above-mentioned service flow 2 is a re-protected service flow, the upstream device performs flow rate limiting on the re-protected service flow according to the flow control demand of the downstream device for the re-protected service flow, which can avoid packet loss caused by the buffer overflow of the downstream device due to micro-bursts of the re-protected service flow, thereby ensuring the transmission efficiency of the re-protected service flow. In the case where the above-mentioned service flow 2 is a non-re-protected service flow, the upstream device performs flow rate limiting on the non-re-protected service flow according to the flow control demand of the downstream device for the non-re-protected service flow, which can avoid the non-re-protected service flow occupying too much bandwidth resources and cache resources of the downstream device, and reserve more bandwidth resources and cache resources for the re-protected service flow, thereby ensuring the transmission efficiency of the re-protected service flow. The present application realizes flow control by collaboration between the control device and multiple network devices in the communication network, which can improve the transmission stability of the re-protected service flow, thereby improving the transmission efficiency of the re-protected service flow. The solution provided in the embodiment of the present application does not require management involvement during implementation and has high application flexibility.

[0297] For another example, Figure 11 is a schematic diagram of the implementation flow of another flow control method provided in an embodiment of the present application. As shown in Figure 11, method 1100 includes but is not limited to steps 1101 to 1104. The method 1100 is implemented based on the collaboration of the control plane or the forwarding plane, and can be applied to the application scenario shown in Figure 4. Under this implementation, a control device may not be set in the application scenario. The network device 7 in the method 1100 is, for example, the network device 401C shown in Figure 4, and the network device 8 is, for example, the network device 401B or the network device 401A shown in Figure 4. Alternatively, the network device 7 in the method 1100 is, for example, the network device 401B shown in Figure 4, and the network device 8 is, for example, the network device 401A shown in Figure 4.

[0298] Step 1101 : Network device 7 obtains port information of network device 7 , where network device 7 is located on the transmission path of service flow 3 .

[0299] The port information of the network device 7 includes the port rate of the port 7. The port 7 is the egress port on the network device 7 for forwarding the service flow 3. Optionally, the port information of the network device 7 also includes the available buffer of the port 7.

[0300] Optionally, service flow 3 is any service flow in the communication network. Alternatively, service flow 3 is a designated service flow in the communication network. Service flow 3 may be a re-protected service flow, or service flow 2 may be a non-re-protected service flow. A detailed explanation of service flow 3 can be found in the explanation of service flow 1 in step 501 above, and will not be repeated here in this embodiment of the present application.

[0301] The implementation method of this step 1101 can refer to the implementation method of the above-mentioned step 601, and will not be repeated here in this embodiment of the present application.

[0302] Step 1102, network device 7 sends message 31 to network device 8, message 31 includes the identifier of service flow 3 and port information of network device 7, the port information includes the port rate of port 7 on network device 7 used to forward service flow 3, and message 31 is used to request network device 8 to perform traffic shaping on service flow 3.

[0303] Among them, network device 8 is located on the transmission path of service flow 3, and network device 7 is located downstream of network device 8, that is, when service flow 3 is transmitted in the communication network, it first reaches network device 8 and then reaches network device 7. In other words, network device 8 is an upstream device located on the transmission path of service flow 3, and network device 7 is a downstream device located on the transmission path of service flow 3. Among them, the identifier of service flow 3 can be represented by one or more of the five-tuple of service flow 3, or can be represented by an IPv4 flow identifier or an IPv6 flow identifier, or can be represented by an APN identifier. In the case where network device 7 is an access layer device, network device 8 is a convergence layer device or a core layer device. Optionally, service flow 3 is a downstream flow, and message 31 is an upstream message.

[0304] Optionally, message 31 is a control message or a service message. The implementation of message 31 can refer to the implementation of message 21, and the present embodiment will not be repeated here. The difference between message 31 and message 21 is that message 31 carries the port information of network device 7, replacing the flow control requirements corresponding to service flow 2 carried in message 21.

[0305] Step 1103 , network device 8 determines the flow control requirement corresponding to service flow 3 based on the service requirement of service flow 3 and the port rate of port 7 on network device 7 used to forward service flow 3 , and the flow control requirement includes the maximum receiving rate of network device 7 for service flow 3 .

[0306] The maximum receiving rate of network device 7 for service flow 3 is less than or equal to the port rate of port 7 of network device 7. Optionally, the service requirements of service flow 3 can be carried in message 31 and sent by network device 7 to network device 8. Alternatively, network device 8 can obtain the service requirements of service flow 3 through other means. For example, a message belonging to service flow 3 can carry the service requirements.

[0307] The implementation method of this step 1103 can refer to the implementation method of the above-mentioned step 602, and will not be repeated here in this embodiment of the present application.

[0308] Step 1104 , network device 8 performs traffic shaping on service flow 3 according to the traffic control requirements corresponding to service flow 3 , so that the sending rate of network device 8 for service flow 3 is less than or equal to the maximum receiving rate of network device 7 for service flow 3 .

[0309] The implementation of this step 1104 can refer to the implementation of the above-mentioned step 604, and will not be repeated here in this embodiment of the present application.

[0310] Optionally, when the flow control requirement corresponding to service flow 3 includes an allocated buffer requirement corresponding to service flow 3, and when the available buffer of the egress port on network device 8 used to forward service flow 3 is less than the allocated buffer requirement corresponding to service flow 3, network device 8 may forward message 31 to network device 9. Alternatively, network device 8 may send message 32 to network device 9, where message 32 includes an identifier of service flow 3 and the flow control requirement corresponding to service flow 3. This eliminates the need for network device 9 to recalculate the flow control requirement corresponding to service flow 3, thereby conserving processing resources of the network device. Network device 9 is located on the transmission path of service flow 3, and network device 8 is located downstream of network device 9.

[0311] In the flow control method provided in the embodiment of the present application, the downstream device provides the port information for calculating the flow control demand corresponding to the service flow to the upstream device, so as to trigger the upstream device to calculate the flow control demand corresponding to the service flow, and further perform flow shaping on the service flow according to the flow control demand. In the case where the above-mentioned service flow 3 is a heavy-duty service flow, the upstream device performs flow rate limiting on the heavy-duty service flow according to the flow control demand of the downstream device for the heavy-duty service flow, which can avoid packet loss caused by the buffer overflow of the downstream device due to micro-bursts of the heavy-duty service flow, thereby ensuring the transmission efficiency of the heavy-duty service flow. In the case where the above-mentioned service flow 3 is a non-heavy-duty service flow, the upstream device performs flow rate limiting on the non-heavy-duty service flow according to the flow control demand of the downstream device for the non-heavy-duty service flow, which can avoid the non-heavy-duty service flow occupying too much bandwidth resources and cache resources of the downstream device, and reserve more bandwidth resources and cache resources for the heavy-duty service flow, thereby ensuring the transmission efficiency of the heavy-duty service flow. The present application realizes flow control by coordinating between the control device and multiple network devices in the communication network, which can improve the transmission stability of the heavy-duty service flow, thereby improving the transmission efficiency of the heavy-duty service flow. The solution provided in the embodiment of the present application does not require management involvement during implementation and has high application flexibility.

[0312] FIG12 is a flow chart of a flow control method provided in another embodiment of the present application. The method can be used to implement the above-mentioned method 500, method 600 or method 1100. As shown in FIG12, the method includes the following steps 1201 to 1202.

[0313] Step 1201: The first network device obtains the flow control requirement corresponding to the target business flow, which flow control requirement includes the maximum receiving rate of the second network device for the target business flow. The first network device and the second network device are both located on the transmission path of the target business flow, and the second network device is located downstream of the first network device.

[0314] Step 1202: The first network device performs traffic shaping on the target service flow according to the traffic control requirement, so that the sending rate of the first network device for the target service flow is less than or equal to the maximum receiving rate.

[0315] When the method is specifically used to implement the aforementioned method 500, the first network device may be, for example, network device 1, the second network device may be, for example, network device 2, and the target service flow may be, for example, service flow 1. When the method is specifically used to implement the aforementioned method 600, the first network device may be, for example, network device 4, the second network device may be, for example, network device 3, and the target service flow may be, for example, service flow 2. When the method is specifically used to implement the aforementioned method 1100, the first network device may be, for example, network device 8, the second network device may be, for example, network device 7, and the target service flow may be, for example, service flow 3.

[0316] Optionally, the available cache of the first port of the first network device is larger than the available cache of the second port of the second network device, the first port is the egress port on the first network device for forwarding the target business flow, and the second port is the egress port on the second network device for forwarding the target business flow.

[0317] Optionally, the flow control requirement corresponding to the target business flow also includes the allocation cache requirement corresponding to the target business flow. The implementation method of the first network device for performing traffic shaping on the target business flow according to the flow control requirement includes: when the actual cache of the target business flow on the first network device exceeds the allocation cache requirement, the first network device drops packets for the target business flow.

[0318] Optionally, one implementation of a first network device obtaining a flow control requirement corresponding to a target service flow includes: the first network device receiving a first message sent by a control device, the first message including an identifier of the target service flow and the flow control requirement, the first message being used to instruct the first network device to perform traffic shaping on the target service flow. This implementation is specifically used to implement the above-described method 500. The first network device may be, for example, network device 1, the target service flow may be, for example, service flow 1, and the first message may be, for example, message 11.

[0319] Optionally, the method further includes: the first network device receiving a second message sent by the control device, where the second message is used to instruct the first network device to end traffic shaping for the target service flow. This implementation is specifically used to implement method 500. The first network device may be, for example, network device 1, the target service flow may be, for example, service flow 1, and the second message may be, for example, message 12.

[0320] Optionally, the method further includes: the first network device sending port information to the control device, where the port information includes port rates of one or more ports on the first network device. This implementation is specifically used to implement the method 500, where the first network device may be, for example, network device 1.

[0321] Optionally, another implementation of the first network device obtaining a flow control requirement corresponding to a target service flow includes: the first network device receiving a third message sent by the second network device, the third message including an identifier of the target service flow and the flow control requirement, the third message being used to request the first network device to perform traffic shaping on the target service flow. This implementation is specifically used to implement the above-described method 600. The first network device may be, for example, network device 4, the second network device may be, for example, network device 3, the target service flow may be, for example, service flow 2, and the third message may be, for example, message 21.

[0322] Optionally, the third message is a control message.

[0323] Optionally, the third message is a BGP update message, and the identifier and flow control requirements of the target service flow are in a path attribute field of the BGP update message.

[0324] Optionally, the third message is a service message, the service message includes an APN field, the APN field includes an APN identifier subfield and an APN parameter subfield, the identifier of the target service flow is in the APN identifier subfield and / or the APN parameter subfield, and the flow control requirement is in the APN parameter subfield. The above method further includes: the first network device deleting the flow control requirement in the APN parameter subfield of the third message to obtain a fourth message; and the first network device forwarding the fourth message. This implementation is specifically used to implement the above method 600, where the first network device can be, for example, network device 4, the third message can be, for example, message 21, and the fourth message can be, for example, message 22.

[0325] Optionally, the APN field further carries a target indication, where the target indication is used to indicate that the APN parameter subfield includes a flow control requirement.

[0326] Optionally, the APN field further includes a flag subfield and an APN parameter type subfield, and the target is indicated in the flag subfield and / or the APN parameter type subfield.

[0327] Optionally, another implementation method for the first network device to obtain the flow control requirements corresponding to the target business flow includes: the first network device receives a fifth message sent by the second network device, the fifth message includes an identifier of the target business flow and the port rate of the second port of the second network device, the second port is the egress port on the second network device used to forward the target business flow, and the fifth message is used to request the first network device to perform traffic shaping on the target business flow; the first network device determines the flow control requirements based on the business requirements of the target business flow and the port rate of the second port, and the maximum receiving rate is less than or equal to the port rate of the second port. This implementation method is specifically used to implement the above-mentioned method 1100, the first network device can be, for example, network device 8, the second network device can be, for example, network device 7, the target business flow can be, for example, business flow 3, and the fifth message can be, for example, message 31.

[0328] Optionally, the business requirements include the transmission rate requirements of the target business flow, and the first network device determines the implementation method of the flow control requirements based on the business requirements of the target business flow and the port rate of the second port, including: the first network device determines the maximum receiving rate based on the smaller value of the transmission rate requirement and the port rate of the second port.

[0329] Optionally, the flow control requirement also includes an allocation cache requirement corresponding to the target business flow, and the business requirement includes the delay requirement of the target business flow. The first network device determines the implementation method of the flow control requirement based on the business requirement of the target business flow and the port rate of the second port, including: the first network device determines the allocation cache requirement based on the round-trip delay between the sending end of the target business flow and the receiving end of the target business flow, the maximum receiving rate and the delay requirement.

[0330] Optionally, the flow control requirement includes an allocation buffer requirement corresponding to the target business flow, and the implementation method of the first network device performing traffic shaping on the target business flow according to the flow control requirement includes: when the available buffer of the egress port on the first network device used to forward the target business flow is greater than or equal to the allocation buffer requirement, the first network device performs traffic shaping on the target business flow according to the flow control requirement.

[0331] Optionally, the method further includes: when the available buffer of the egress port on the first network device used to forward the target service flow is less than the allocated buffer requirement, the first network device sending a third message to a third network device, the third network device being located on the transmission path of the target service flow, and the first network device being located downstream of the third network device. This implementation is specifically used to implement the above-mentioned method 600 or method 1100. When this implementation is used to implement the above-mentioned method 600, the first network device may be, for example, network device 4, the second network device may be, for example, network device 3, the third network device may be, for example, network device 5, the target service flow may be, for example, service flow 2, and the third message may be, for example, message 21.

[0332] Optionally, the method further includes: when the available buffer of the egress port on the first network device used to forward the target service flow is less than the allocated buffer requirement, the first network device sending a request response message to the second network device, the request response message being used to indicate that the first network device is unable to perform traffic shaping on the target service flow. This implementation is specifically used to implement the above-mentioned method 600 or method 1100. When this implementation is used to implement the above-mentioned method 600, the first network device may be, for example, network device 4, the second network device may be, for example, network device 3, and the target service flow may be, for example, service flow 2. When this implementation is used to implement the above-mentioned method 1100, the first network device may be, for example, network device 8, the second network device may be, for example, network device 7, and the target service flow may be, for example, service flow 3.

[0333] Optionally, the method further includes: the first network device receiving a sixth message sent by the second network device, the sixth message being used to instruct the first network device to end traffic shaping for the target service flow. This implementation is specifically used to implement method 600 or method 1100. When this implementation is used to implement method 600, the first network device may be, for example, network device 4, the second network device may be, for example, network device 3, the target service flow may be, for example, service flow 2, and the sixth message may be, for example, message 23.

[0334] Optionally, the above method further includes: when the first network device does not receive a message belonging to the target service flow within the target time period, the first network device ends traffic shaping for the target service flow.

[0335] FIG13 is a flow chart of another flow control method provided by another embodiment of the present application. This method can be used to implement the above method 500. As shown in FIG13, the method includes the following steps 1301 to 1303.

[0336] Step 1301: The control device obtains port information of multiple network devices, where the multiple network devices include a first network device and a second network device located on a transmission path of a target service flow, and the second network device is located downstream of the first network device. The port information of the first network device includes a port rate of a first port of the first network device, and the port information of the second network device includes a port rate of a second port of the second network device. The first port is an egress port on the first network device for forwarding the target service flow, and the second port is an egress port on the second network device for forwarding the target service flow.

[0337] Step 1302: Based on the fact that the port rate of the second port is less than the port rate of the first port, the control device determines the flow control requirement corresponding to the target business flow according to the business requirements of the target business flow and the port rate of the second port. The flow control requirement includes the maximum receiving rate of the second network device for the target business flow, and the maximum receiving rate is less than or equal to the port rate of the second port.

[0338] Step 1303: The control device sends a first message to the first network device. The first message includes an identifier of the target service flow and a flow control requirement. The first message is used to instruct the first network device to perform flow shaping on the target service flow.

[0339] This method is specifically used to implement the above method 500. The first network device may be, for example, network device 1, the second network device may be, for example, network device 2, the target service flow may be, for example, service flow 1, and the first message may be, for example, message 11.

[0340] Optionally, the business requirements include the transmission rate requirements of the target business flow. The control device determines the implementation method of the flow control requirements corresponding to the target business flow based on the business requirements of the target business flow and the port rate of the second port, including: the control device determines the maximum receiving rate based on the smaller value of the transmission rate requirement and the port rate of the second port.

[0341] Optionally, the port information of the first network device also includes the available cache of the first port, and the port information of the second network device also includes the available cache of the second port. The implementation method of the control device sending the first message to the first network device includes: when the available cache of the first port is greater than the available cache of the second port, the control device sends the first message to the first network device.

[0342] Optionally, the flow control requirement also includes an allocation buffer requirement corresponding to the target business flow, and the business requirement includes the delay requirement of the target business flow. The control device determines the implementation method of the flow control requirement corresponding to the target business flow based on the business requirement of the target business flow and the port rate of the second port, including: the control device determines the allocation buffer requirement based on the round-trip delay, maximum receiving rate and delay requirement between the sending end of the target business flow and the receiving end of the target business flow. The allocation buffer requirement is used by the first network device to drop packets for the target business flow when the actual cache of the target business flow exceeds the allocation buffer requirement.

[0343] Optionally, the second network device is an access layer device, and the first network device is a convergence layer device or a core layer device.

[0344] Optionally, the first network device is a pre-configured network device for performing traffic shaping on a service flow passing through the first network device.

[0345] Optionally, the first network device is a network device on the transmission path having the largest available buffer memory at an egress port for forwarding the target service flow.

[0346] Optionally, the second network device is a pre-configured network device with a flow control requirement, and / or the second port is a pre-configured egress port with a flow control requirement.

[0347] Optionally, before the control device sends the first message to the first network device, the above method also includes: the control device receives a traffic shaping request sent by the second network device, the traffic shaping request includes an identifier of the target service flow, and the traffic shaping request is used to request traffic shaping of the target service flow.

[0348] Optionally, the method further includes: the control device receiving a traffic shaping cancellation request sent by the second network device, the traffic shaping cancellation request being used to request termination of traffic shaping for the target service flow; and the control device sending a second message to the first network device, the second message being used to instruct the first network device to terminate traffic shaping for the target service flow. This method is specifically used to implement method 500, and the second message may be, for example, message 12.

[0349] FIG14 is a flow chart of another flow control method provided by another embodiment of the present application. This method can be used to implement the above-mentioned method 500, method 600 or method 1100. As shown in FIG14, the method includes the following steps 1401 to 1402.

[0350] Step 1401: Acquire port information of a first network device, where the first network device is located on a transmission path of a target service flow. The port information includes a port rate of a target port, where the target port is an egress port on the first network device used to forward the target service flow.

[0351] Step 1402: Determine the flow control requirement corresponding to the target business flow based on the business requirements and port rate of the target business flow. The flow control requirement includes the maximum receiving rate of the first network device for the target business flow, which is less than or equal to the port rate.

[0352] When the method is specifically used to implement the aforementioned method 500, the method can be applied to a control device, where the first network device can be, for example, network device 2, and the target service flow can be, for example, service flow 1. When the method is specifically used to implement the aforementioned method 600, the method can be applied to network device 3, where the first network device can be, for example, network device 3, and the target service flow can be, for example, service flow 2. When the method is specifically used to implement the aforementioned method 1100, the method can be applied to network device 8, where the first network device can be, for example, network device 7, and the target service flow can be, for example, service flow 3.

[0353] Optionally, the business requirements include the transmission rate requirements of the target business flow. Based on the business requirements and port rate of the target business flow, the implementation method of the flow control requirements corresponding to the target business flow is determined, including: determining the maximum receiving rate based on the smaller value of the transmission rate requirement and the port rate.

[0354] Optionally, the flow control requirement also includes an allocation buffer requirement corresponding to the target business flow, and the business requirement includes the delay requirement of the target business flow. The implementation method of the flow control requirement corresponding to the target business flow is determined based on the business requirement and port rate of the target business flow, including: determining the allocation buffer requirement based on the round-trip delay between the sending end of the target business flow and the receiving end of the target business flow, the maximum receiving rate and the delay requirement. The allocation buffer requirement is used to drop packets for the target business flow when the actual cache of the target business flow exceeds the allocation buffer requirement.

[0355] Optionally, the method is applied to a first network device. After determining the flow control requirements corresponding to the target service flow based on the service requirements and port rate of the target service flow, the method further includes: sending a first message to a second network device, the first message including an identifier of the target service flow and the flow control requirements. The second network device is located on the transmission path of the target service flow, and the first network device is located downstream of the second network device. The first message is used to request the second network device to perform traffic shaping on the target service flow. The method is specifically used to implement the above-mentioned method 600. The first network device can be, for example, network device 3, the second network device can be, for example, network device 4, the target service flow can be, for example, service flow 2, and the first message can be, for example, message 21.

[0356] Optionally, the implementation method of the first network device sending the first message to the second network device includes: in response to the first network device receiving a message belonging to the target business flow, or the target business flow losing packets on the first network device, the first network device sends the first message to the second network device.

[0357] Optionally, the first message is a control message.

[0358] Optionally, the first message is a BGP update message, and the identifier and flow control requirements of the target service flow are in a path attribute field of the BGP update message.

[0359] Optionally, the first message is a service message, the service message includes an APN field, the APN field includes an APN identification subfield and an APN parameter subfield, the identifier of the target service flow is in the APN identification subfield and / or the APN parameter subfield, and the flow control requirement is in the APN parameter subfield.

[0360] Optionally, the APN field further carries an indication, which is used to indicate that the APN parameter subfield includes a flow control requirement.

[0361] Optionally, the APN field further includes a flag subfield and an APN parameter type subfield, which is indicated in the flag subfield and / or the APN parameter type subfield.

[0362] Optionally, the method further includes: the first network device receiving a request-response message corresponding to the first message sent by the second network device, the request-response message being used to indicate that the second network device is unable to perform traffic shaping on the target service flow; the first network device sending a second message to a third network device, the second message including an identifier of the target service flow and a traffic control requirement, the third network device being located on the transmission path of the target service flow, and the first network device being located downstream of the third network device, the second message being used to request the first network device to perform traffic shaping on the target service flow. This method is specifically used to implement method 600, where the first network device may be, for example, network device 3, the second network device may be, for example, network device 4, the third network device may be, for example, network device 6, the target service flow may be, for example, service flow 2, and the second message may be, for example, message 24.

[0363] Optionally, the method further includes: when the first network device does not receive a message belonging to the target service flow within a target duration, the first network device sending a third message to the second network device, the third message being used to instruct the second network device to end traffic shaping for the target service flow. Specifically, this method is used to implement method 600. For example, the first network device may be network device 3, the second network device may be network device 4, the target service flow may be service flow 2, and the third message may be message 23.

[0364] FIG15 is a flow chart of another flow control method provided by another embodiment of the present application. This method can be used to implement the above method 1100. As shown in FIG15, the method includes the following steps 1501 to 1502.

[0365] Step 1501: The first network device obtains port information of the first network device, which is located on the transmission path of the target service flow. The port information includes the port rate of the target port, which is the egress port on the first network device used to forward the target service flow.

[0366] Step 1502: The first network device sends a target message to the second network device. The target message includes the identifier of the target business flow and the port information. The second network device is located on the transmission path of the target business flow, and the first network device is located downstream of the second network device. The target message is used to request the second network device to perform traffic shaping on the target business flow.

[0367] This method is specifically used to implement the above-mentioned method 1100. The first network device may be, for example, network device 7, the second network device may be, for example, network device 8, the target service flow may be, for example, service flow 3, and the target message may be, for example, message 31.

[0368] Optionally, the target message is a BGP update message, and the identifier and port information of the target service flow are in a path attribute field of the BGP update message.

[0369] Optionally, the target message is a service message, the service message includes an APN field, the APN field includes an APN identification subfield and an APN parameter subfield, the identifier of the target service flow is in the APN identification subfield and / or APN parameter subfield, and the port information is in the APN parameter subfield.

[0370] Optionally, the APN field further carries a target indication, where the target indication is used to indicate that the APN parameter subfield includes port information.

[0371] Optionally, the APN field further includes a flag subfield and an APN parameter type subfield, and the target is indicated in the flag subfield and / or the APN parameter type subfield.

[0372] The following describes the virtual device according to the embodiment of the present application by way of example.

[0373] Figure 16 is a schematic diagram of the structure of a traffic control device provided in an embodiment of the present application. The device is applied to a first network device. As shown in Figure 16 , device 1600 includes, but is not limited to, an acquisition module 1601 and a traffic shaping module 1602. Optionally, device 1600 also includes a sending module 1603 and / or a deleting module 1604. Optionally, acquisition module 1601 includes a receiving module, and acquisition module 1601 may also include a determining module.

[0374] Acquisition module 1601 is configured to acquire a flow control requirement corresponding to a target service flow, where the flow control requirement includes a maximum receive rate of the second network device for the target service flow, wherein both the first network device and the second network device are located on the transmission path of the target service flow, with the second network device being located downstream of the first network device. For a specific implementation process, reference may be made to the detailed description of step 503 in method 500, or the detailed description of step 603 in method 600, or the detailed description of steps 1102 to 1103 in method 1100, and will not be repeated here.

[0375] Traffic shaping module 1602 is configured to perform traffic shaping on the target service flow based on the traffic control requirement, so that the transmission rate of the target service flow by the first network device is less than or equal to the maximum reception rate. For a detailed implementation process, reference may be made to the detailed description of step 504 in method 500, or to the detailed description of step 604 in method 600, or to the detailed description of step 1104 in method 1100, and will not be repeated here.

[0376] Optionally, the available cache of the first port of the first network device is larger than the available cache of the second port of the second network device, the first port is the egress port on the first network device for forwarding the target business flow, and the second port is the egress port on the second network device for forwarding the target business flow.

[0377] Optionally, the traffic control requirement also includes an allocation buffer requirement corresponding to the target service flow, and the traffic shaping module 1602 is used to: when the actual buffer of the target service flow on the first network device exceeds the allocation buffer requirement, drop packets of the target service flow.

[0378] Optionally, the receiving module is used to receive a first message sent by the control device, where the first message includes an identifier of a target service flow and a flow control requirement, and the first message is used to instruct the first network device to perform flow shaping on the target service flow.

[0379] Optionally, the receiving module is further used to receive a second message sent by the control device, where the second message is used to instruct the first network device to end traffic shaping of the target service flow.

[0380] Optionally, the sending module 1603 is configured to send port information to the control device, where the port information includes port rates of one or more ports on the first network device.

[0381] Optionally, the receiving module is used to receive a third message sent by the second network device, where the third message includes an identifier of the target service flow and a flow control requirement, and the third message is used to request the first network device to perform flow shaping on the target service flow.

[0382] Optionally, the third message is a control message.

[0383] Optionally, the third message is a BGP update message, and the identifier and flow control requirements of the target service flow are in a path attribute field of the BGP update message.

[0384] Optionally, the third message is a service message, the service message includes an APN field, the APN field includes an APN identifier subfield and an APN parameter subfield, the identifier of the target service flow is in the APN identifier subfield and / or the APN parameter subfield, and the flow control requirement is in the APN parameter subfield. Deletion module 1604 is configured to delete the flow control requirement in the APN parameter subfield of the third message to obtain a fourth message; and sending module 1603 is configured to forward the fourth message.

[0385] Optionally, the APN field further carries a target indication, where the target indication is used to indicate that the APN parameter subfield includes a flow control requirement.

[0386] Optionally, the APN field further includes a flag subfield and an APN parameter type subfield, and the target is indicated in the flag subfield and / or the APN parameter type subfield.

[0387] Optionally, the receiving module is used to receive a fifth message sent by the second network device, the fifth message includes an identifier of the target business flow and the port rate of the second port of the second network device, the second port is the egress port on the second network device for forwarding the target business flow, and the fifth message is used to request the first network device to perform traffic shaping on the target business flow; the determination module is used to determine the flow control requirements based on the business requirements of the target business flow and the port rate of the second port, and the maximum receiving rate is less than or equal to the port rate of the second port.

[0388] Optionally, the service requirement includes a transmission rate requirement of the target service flow, and the determination module is configured to determine the maximum receiving rate according to a smaller value between the transmission rate requirement and a port rate of the second port.

[0389] Optionally, the flow control requirement also includes the allocation buffer requirement corresponding to the target business flow, and the business requirement includes the delay requirement of the target business flow. The determination module is used to determine the allocation buffer requirement based on the round-trip delay, maximum receiving rate and delay requirement between the sending end of the target business flow and the receiving end of the target business flow.

[0390] Optionally, the flow control requirement includes an allocation buffer requirement corresponding to the target business flow, and the traffic shaping module 1602 is used to shape the target business flow according to the flow control requirement when the available buffer of the egress port used to forward the target business flow on the first network device is greater than or equal to the allocation buffer requirement.

[0391] Optionally, the sending module 1603 is used to send a third message to a third network device when the available cache of the egress port on the first network device for forwarding the target business flow is less than the allocated cache requirement, and the third network device is located on the transmission path of the target business flow and the first network device is located downstream of the third network device.

[0392] Optionally, the sending module 1603 is used to send a request response message to the second network device when the available cache of the egress port on the first network device used to forward the target business flow is less than the allocated cache requirement. The request response message is used to indicate that the first network device cannot perform traffic shaping on the target business flow.

[0393] Optionally, the receiving module is further used to receive a sixth message sent by the second network device, where the sixth message is used to instruct the first network device to end traffic shaping for the target service flow.

[0394] Optionally, the traffic shaping module 1602 is further configured to terminate traffic shaping of the target service flow when the first network device does not receive a message belonging to the target service flow within a target time period.

[0395] FIG17 is a schematic diagram of the structure of another flow control device provided in an embodiment of the present application. The device is applied to a control device. As shown in FIG17 , device 1700 includes, but is not limited to, an acquisition module 1701, a determination module 1702, and a sending module 1703. Optionally, device 1700 also includes a receiving module 1704.

[0396] Acquisition module 1701 is configured to acquire port information of multiple network devices, the multiple network devices including a first network device and a second network device located on a transmission path of a target service flow, with the second network device located downstream of the first network device. The port information of the first network device includes the port rate of a first port of the first network device, the port information of the second network device includes the port rate of a second port of the second network device, the first port being the egress port on the first network device used to forward the target service flow, and the second port being the egress port on the second network device used to forward the target service flow. For the specific implementation process, reference may be made to the detailed description of step 501 in method 500 and will not be repeated here.

[0397] Determining module 1702 is configured to determine a flow control requirement corresponding to the target service flow based on the service requirement of the target service flow and the port rate of the second port, based on the port rate of the second port being less than the port rate of the first port. The flow control requirement includes a maximum receive rate of the second network device for the target service flow, where the maximum receive rate is less than or equal to the port rate of the second port. For a detailed implementation of this process, reference may be made to the detailed description of step 502 in method 500 and will not be repeated here.

[0398] Transmitting module 1703 is configured to transmit a first message to the first network device. The first message includes an identifier of the target service flow and a flow control requirement. The first message is used to instruct the first network device to perform traffic shaping on the target service flow. The specific implementation process can be found in the detailed description of step 503 in method 500 and is not further described here.

[0399] Optionally, the service requirement includes a transmission rate requirement of the target service flow, and the determination module 1702 is configured to determine the maximum receiving rate according to a smaller value between the transmission rate requirement and the port rate of the second port.

[0400] Optionally, the port information of the first network device also includes the available cache of the first port, and the port information of the second network device also includes the available cache of the second port. The sending module 1703 is used to send the first message to the first network device when the available cache of the first port is greater than the available cache of the second port.

[0401] Optionally, the flow control requirement also includes an allocation buffer requirement corresponding to the target business flow, and the business requirement includes the delay requirement of the target business flow. The determination module 1702 is used to: determine the allocation buffer requirement based on the round-trip delay, maximum receiving rate and delay requirement between the sending end of the target business flow and the receiving end of the target business flow. The allocation buffer requirement is used by the first network device to drop packets for the target business flow when the actual cache of the target business flow exceeds the allocation buffer requirement.

[0402] Optionally, the second network device is an access layer device, and the first network device is a convergence layer device or a core layer device.

[0403] Optionally, the first network device is a pre-configured network device for performing traffic shaping on a service flow passing through the first network device.

[0404] Optionally, the first network device is a network device on the transmission path having the largest available buffer memory at an egress port for forwarding the target service flow.

[0405] Optionally, the second network device is a pre-configured network device with a flow control requirement, and / or the second port is a pre-configured egress port with a flow control requirement.

[0406] Optionally, the receiving module 1704 is used to receive a traffic shaping request sent by the second network device before the control device sends the first message to the first network device. The traffic shaping request includes an identifier of the target service flow, and the traffic shaping request is used to request traffic shaping of the target service flow.

[0407] Optionally, the receiving module 1704 is also used to receive a traffic shaping cancellation request sent by the second network device, and the traffic shaping cancellation request is used to request to end traffic shaping of the target business flow; the sending module is also used to send a second message to the first network device, and the second message is used to instruct the first network device to end traffic shaping of the target business flow.

[0408] FIG18 is a schematic diagram of the structure of another flow control device provided in an embodiment of the present application. As shown in FIG18 , the device 1800 includes but is not limited to: an acquisition module 1801 and a determination module 1802. Optionally, the device 1800 also includes a sending module 1803 and a receiving module 1804.

[0409] Acquisition module 1801 is configured to acquire port information of a first network device located on the transmission path of a target service flow. The port information includes the port rate of a target port, which is the egress port on the first network device used to forward the target service flow. For a detailed implementation of this process, reference may be made to the detailed description of step 501 in method 500, or to the detailed description of step 601 in method 600, or to the detailed description of step 1101 in method 1100, and will not be repeated here.

[0410] Determination module 1802 is configured to determine a flow control requirement corresponding to the target service flow based on the service requirement and port rate of the target service flow. The flow control requirement includes a maximum receive rate of the first network device for the target service flow, where the maximum receive rate is less than or equal to the port rate. For a specific implementation process, reference may be made to the detailed description of step 502 in method 500, or to the detailed description of step 602 in method 600, or to the detailed description of step 1103 in method 1100, and will not be repeated here.

[0411] Optionally, the service requirement includes a transmission rate requirement of the target service flow, and the determination module 1802 is configured to determine the maximum receiving rate according to a smaller value between the transmission rate requirement and the port rate.

[0412] Optionally, the flow control requirement also includes an allocation buffer requirement corresponding to the target business flow, and the business requirement includes the delay requirement of the target business flow. The determination module 1802 is used to determine the allocation buffer requirement based on the round-trip delay, maximum receiving rate and delay requirement between the sending end of the target business flow and the receiving end of the target business flow. The allocation buffer requirement is used to drop packets for the target business flow when the actual cache of the target business flow exceeds the allocation buffer requirement.

[0413] Optionally, the apparatus is applied to a first network device, wherein the sending module 1803 is configured to, after determining a flow control requirement corresponding to the target service flow based on the service requirements and port rate of the target service flow, send a first message to a second network device, the first message including an identifier of the target service flow and the flow control requirement. The second network device is located on the transmission path of the target service flow, and the first network device is located downstream of the second network device. The first message is configured to request the second network device to perform traffic shaping on the target service flow. The specific implementation process can be referred to the detailed description of step 603 in method 600 and will not be repeated here.

[0414] Optionally, the sending module 1803 is configured to send a first message to the second network device in response to the first network device receiving a message belonging to the target service flow, or packet loss occurring in the target service flow on the first network device.

[0415] Optionally, the first message is a control message.

[0416] Optionally, the first message is a BGP update message, and the identifier and flow control requirements of the target service flow are in a path attribute field of the BGP update message.

[0417] Optionally, the first message is a service message, the service message includes an APN field, the APN field includes an APN identification subfield and an APN parameter subfield, the identifier of the target service flow is in the APN identification subfield and / or the APN parameter subfield, and the flow control requirement is in the APN parameter subfield.

[0418] Optionally, the APN field further carries an indication, which is used to indicate that the APN parameter subfield includes a flow control requirement.

[0419] Optionally, the APN field further includes a flag subfield and an APN parameter type subfield, which is indicated in the flag subfield and / or the APN parameter type subfield.

[0420] Optionally, the receiving module 1804 is used to receive a request response message corresponding to the first message sent by the second network device, and the request response message is used to indicate that the second network device cannot perform traffic shaping on the target business flow; the sending module 1803 is also used to send a second message to the third network device, and the second message includes the identification and flow control requirements of the target business flow. The third network device is located on the transmission path of the target business flow, and the first network device is located downstream of the third network device. The second message is used to request the first network device to perform traffic shaping on the target business flow.

[0421] Optionally, the sending module 1803 is also used to send a third message to the second network device when the first network device does not receive a message belonging to the target business flow within the target time period, and the third message is used to instruct the second network device to end traffic shaping of the target business flow.

[0422] FIG19 is a schematic diagram of the structure of another flow control device provided by an embodiment of the present application. As shown in FIG19 , the device 1900 includes but is not limited to: an acquisition module 1901 and a sending module 1902 .

[0423] Acquisition module 1901 is configured to acquire port information of a first network device located on the transmission path of a target service flow. The port information includes the port rate of a target port, which is the egress port on the first network device used to forward the target service flow. The detailed implementation of this process can be found in the detailed description of step 1101 in method 1100 and is not further described here.

[0424] Sending module 1902 is configured to send a target message to a second network device. The target message includes an identifier and port information for a target service flow. The second network device is located in the transmission path of the target service flow, and the first network device is located downstream of the second network device. The target message is used to request the second network device to perform traffic shaping on the target service flow. The specific implementation process can be found in the detailed description of step 1102 in method 1100 and will not be repeated here.

[0425] Optionally, the sending module 1902 is configured to send a target message to the second network device in response to the first network device receiving a message belonging to the target service flow, or packet loss occurring in the target service flow on the first network device.

[0426] Optionally, the target message is a BGP update message, and the identifier and port information of the target service flow are in a path attribute field of the BGP update message.

[0427] Optionally, the target message is a service message, the service message includes an APN field, the APN field includes an APN identification subfield and an APN parameter subfield, the identifier of the target service flow is in the APN identification subfield and / or APN parameter subfield, and the port information is in the APN parameter subfield.

[0428] Optionally, the APN field further carries a target indication, where the target indication is used to indicate that the APN parameter subfield includes port information.

[0429] Optionally, the APN field further includes a flag subfield and an APN parameter type subfield, and the target is indicated in the flag subfield and / or the APN parameter type subfield.

[0430] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0431] The following is an example of the hardware structure involved in the embodiments of the present application.

[0432] Figure 20 is a schematic diagram of the hardware structure of a network device provided in an embodiment of the present application. As shown in Figure 20, network device 2000 includes a processor 2001, a forwarding chip 2002, and at least one network interface 2003. Optionally, in conjunction with Figure 4, network device 2000 in Figure 20 is any network device 401 shown in Figure 4.

[0433] Optionally, the processor 2001 includes a central processing unit (CPU) and / or a dedicated hardware chip. The CPU refers to a general-purpose CPU with high scalability and flexibility. The CPU is, for example, a single-core processor (single-CPU) or a multi-core processor (multi-CPU). The dedicated hardware chip is a high-performance processing hardware module. The dedicated hardware chip includes at least one of an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or a network processor (NP).

[0434] The forwarding chip 2002 is used to forward requests and data. For example, the forwarding chip 2002 is used for the network device 2000 to send and receive messages.

[0435] At least one network interface 2003 includes, for example, network interface 1, network interface 2, network interface 3, ..., network interface n in FIG20 . The network interface 2003 uses any transceiver-like device for communicating with other devices or communication networks. For example, the network interface 1 in FIG20 communicates with the control device, and the network interface 2 in FIG20 communicates with other network devices. Optionally, the network interface 2003 includes at least one of a wired network interface or a wireless network interface. The wired network interface is, for example, an Ethernet interface. The Ethernet interface is, for example, an optical interface, an electrical interface, or a combination thereof. The wireless network interface is, for example, a wireless local area network (WLAN) interface, a cellular network interface, or a combination thereof.

[0436] At least one network interface 2003 is connected to the forwarding chip 2002, and the forwarding chip 2002 is connected to the processor 2001 via an internal connection 2004. The internal connection 2004 includes a path for transmitting data between the network interface 2003, the forwarding chip 2002, and the processor 2001. Optionally, the internal connection 2004 is a single board or a bus. For example, the internal connection 2004 is Ethernet, fiber channel, PCI-E (Peripheral Component Interconnect Express, PCI Express, a high-speed serial computer bus), RapidIO (a high-performance, low-pin-count, packet-switching-based interconnect architecture), InfiniBand, or a XAUI bus (an interface extender characterized by connecting the Ethernet Media Access Control (MAC) layer to the physical layer).

[0437] Optionally, network device 2000 further includes a content addressable memory (CAM) 2005. CAM 2005 is, for example, a ternary content addressable memory (TCAM). CAM 2005 is used to store and record the correspondence between service flow identifiers and flow control requirements. Optionally, CAM 2005 exists independently and is connected to forwarding chip 2002 via the aforementioned internal connection 2004. Alternatively, CAM 2005 and forwarding chip 2002 are integrated, i.e., CAM 2005 functions as memory within forwarding chip 2002.

[0438] Optionally, the network device 2000 further includes a memory 2006. The memory 2006 may be, for example, a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, a random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, an optical disc storage (including a compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium capable of carrying or storing the desired program code 2008 in the form of instructions or data structures and accessible by a computer, but is not limited thereto. The memory 2006 may be, for example, independent and connected to the processor 2001 via the internal connection 2004. Alternatively, the memory 2006 and the processor 2001 may be integrated together.

[0439] The memory 2006 stores an operating system 2007 and a program code 2008. Optionally, the processor 2001 reads the operating system 2007 from the memory 2006 and runs the operating system 2007. The processor 2001 also reads the program code 2008 from the memory 2006, and implements the actions performed by any network device in the above method provided in the embodiment of the present application by running the program code 2008 on the operating system 2007.

[0440] Optionally, the above-mentioned devices are respectively provided on independent chips, or at least partially or entirely provided on the same chip. Whether each device is provided independently on different chips or integrated on one or more chips often depends on the needs of product design. The embodiments of the present application do not limit the specific implementation of the above-mentioned devices.

[0441] For example, Figure 21 is a schematic diagram of the hardware structure of a control device provided in an embodiment of the present application. As shown in Figure 21, the control device 2100 includes a processor 2101 and a memory 2102, and the memory 2101 and the memory 2102 are connected via a bus 2103. Figure 21 illustrates the processor 2101 and the memory 2102 as being independent of each other. Optionally, the processor 2101 and the memory 2102 are integrated together. Optionally, in conjunction with Figure 4, the control device 2100 in Figure 21 is the control device 402 shown in Figure 4.

[0442] Memory 2102 is used to store computer programs, including operating systems and program code. Memory 2102 can be any type of storage medium, such as ROM, RAM, EEPROM, CD-ROM, flash memory, optical storage, registers, optical disk storage, optical disc storage, magnetic disk, or other magnetic storage device.

[0443] The processor 2101 is a general-purpose processor or a dedicated processor. The processor 2101 may be a single-core processor or a multi-core processor. The processor 2101 includes at least one circuit to execute the actions executed by the control device in the above method 500 provided in the embodiment of the present application.

[0444] Optionally, the control device 2100 further includes a network interface 2104, which is connected to the processor 2101 and the memory 2102 via the bus 2103. The network interface 2104 enables communication between the control device 2100 and the network device. The processor 2101 can interact with the network device through the network interface 2104 to control and manage the network device.

[0445] Optionally, the control device 2100 further includes an input / output (I / O) interface 2105, which is connected to the processor 2101 and the memory 2102 via the bus 2103. The processor 2101 can receive input commands or data through the I / O interface 2105. The I / O interface 2105 is used to connect the control device 2100 to input devices, such as a keyboard and a mouse. Optionally, in some possible scenarios, the network interface 2104 and the I / O interface 2105 are collectively referred to as a communication interface.

[0446] Optionally, the control device 2100 further includes a display 2106, which is connected to the processor 2101 and the memory 2102 via the bus 2103. The display 2106 can be used to display intermediate results and / or final results generated by the processor 2101 executing the above method. In one possible implementation, the display 2106 is a touch screen display to provide a human-computer interaction interface.

[0447] The bus 2103 is any type of communication bus for interconnecting the internal components of the control device 2100, such as a system bus. The embodiments of the present application illustrate the interconnection of the aforementioned components within the control device 2100 via the bus 2103. Alternatively, the aforementioned components within the control device 2100 may be communicatively connected to each other using other connection methods besides the bus 2103, such as interconnecting the aforementioned components within the control device 2100 via a logical interface within the control device 2100.

[0448] The above-mentioned devices can be provided on separate chips, or at least partially or entirely on the same chip. Whether to provide each device independently on different chips or to integrate them on one or more chips often depends on the product design requirements. The embodiments of this application do not limit the specific implementation of the above-mentioned devices.

[0449] The control device 2100 shown in Figure 21 is merely exemplary. During implementation, the control device 2100 includes other components, which are not listed here. The control device 2100 shown in Figure 21 can implement flow control by executing steps 501 to 503 of the method 500 provided in the above embodiment.

[0450] The following is an example of the system structure involved in the embodiments of the present application.

[0451] An embodiment of the present application provides a flow control system, comprising: a control device and multiple network devices. The control device is configured to obtain port information of the multiple network devices, wherein the multiple network devices include a first network device and a second network device located on a transmission path of a target service flow, with the second network device located downstream of the first network device. The port information of the first network device includes the port rate of a first port of the first network device, and the port information of the second network device includes the port rate of a second port of the second network device. The first port is an egress port on the first network device for forwarding the target service flow, and the second port is an egress port on the second network device for forwarding the target service flow. The control device is further configured to, when the port rate of the second port is less than the port rate of the first port, determine a flow control requirement corresponding to the target service flow based on the service requirement of the target service flow and the port rate of the second port. The flow control requirement includes a maximum receive rate of the second network device for the target service flow, wherein the maximum receive rate is less than or equal to the port rate of the second port. The control device is further configured to send a message to the first network device, the message including an identifier of the target service flow and the flow control requirement, and the message is configured to instruct the first network device to perform traffic shaping on the target service flow. The first network device is used to perform traffic shaping on the target service flow according to the traffic control requirement, so that the sending rate of the first network device for the target service flow is less than or equal to the maximum receiving rate.

[0452] Optionally, the control device in the traffic control system may be the control device in the above method 500 , the first network device may be the network device 1 in the above method 500 , and the second network device may be the network device 2 in the above method 500 .

[0453] An embodiment of the present application also provides another flow control system, comprising: multiple network devices, the multiple network devices including a first network device and a second network device, the first network device and the second network device both being located on the transmission path of the target service flow, and the second network device being located downstream of the first network device. The second network device is configured to obtain port information of the second network device, the port information including the port rate of the target port, the target port being the egress port on the second network device used to forward the target service flow. The second network device is further configured to determine the flow control requirements corresponding to the target service flow based on the service requirements and port rate of the target service flow, the flow control requirements including the maximum receiving rate of the second network device for the target service flow, the maximum receiving rate being less than or equal to the port rate. The second network device is further configured to send a message to the first network device, the message including an identifier of the target service flow and the flow control requirements, the message being configured to request the first network device to perform flow shaping on the target service flow. The first network device is configured to perform flow shaping on the target service flow based on the flow control requirements, so that the sending rate of the first network device for the target service flow is less than or equal to the maximum receiving rate.

[0454] Optionally, the first network device in the traffic control system may be the network device 4 in the above method 600 , and the second network device may be the network device 3 in the above method 600 .

[0455] An embodiment of the present application also provides another flow control system, comprising: multiple network devices, the multiple network devices including a first network device and a second network device, the first network device and the second network device are both located on the transmission path of the target business flow, and the second network device is located downstream of the first network device. The second network device is used to obtain port information of the second network device, the port information including the port rate of the target port, and the target port is the egress port on the second network device used to forward the target business flow. The second network device is also used to send a message to the first network device, the message including the identifier and port information of the target business flow, and the message is used to request the first network device to perform traffic shaping on the target business flow. The first network device is used to determine the flow control requirement corresponding to the target business flow based on the business requirements and port rate of the target business flow, the flow control requirement including the maximum receiving rate of the second network device for the target business flow, and the maximum receiving rate is less than or equal to the port rate. The first network device is also used to perform traffic shaping on the target business flow based on the flow control requirement, so that the sending rate of the first network device for the target business flow is less than or equal to the maximum receiving rate.

[0456] Optionally, the first network device in the traffic control system may be the network device 8 in the above method 1100 , and the second network device may be the network device 7 in the above method 1100 .

[0457] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.

[0458] In the embodiments of the present application, the terms “first”, “second” and “third” are used for descriptive purposes only and should not be understood as indicating or implying relative importance.

[0459] In this application, the term "and / or" simply describes an association between related objects, indicating that three possible relationships exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this document generally indicates that the related objects are in an "or" relationship.

[0460] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions.

[0461] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the concepts and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A flow control method, characterized in that: The method comprises: The first network device obtains a flow control requirement corresponding to a target service flow, where the flow control requirement includes a maximum receiving rate of the second network device for the target service flow, the first network device and the second network device are both located on a transmission path of the target service flow, and the second network device is located downstream of the first network device; The first network device performs traffic shaping on the target service flow according to the traffic control requirement so that a sending rate of the first network device for the target service flow is less than or equal to the maximum receiving rate.

2. The method according to claim 1, characterized in that The available cache of the first port of the first network device is greater than the available cache of the second port of the second network device, the first port is the egress port on the first network device used to forward the target service flow, and the second port is the egress port on the second network device used to forward the target service flow.

3. The method according to claim 1 or 2, characterized in that: The traffic control requirement also includes an allocation buffer requirement corresponding to the target service flow, and the first network device performs traffic shaping on the target service flow according to the traffic control requirement, including: When the actual buffer of the target service flow on the first network device exceeds the allocated buffer requirement, the first network device drops packets of the target service flow.

4. The method according to any one of claims 1 to 3, characterized in that: The first network device obtains a flow control requirement corresponding to a target service flow, including: The first network device receives a first message sent by a control device, wherein the first message includes an identifier of the target service flow and the flow control requirement, and the first message is used to instruct the first network device to perform flow shaping on the target service flow.

5. The method according to claim 4, characterized in that After the first network device receives the first message sent by the control device, the method further includes: The first network device receives a second message sent by the control device, where the second message is used to instruct the first network device to end traffic shaping for the target service flow.

6. The method according to claim 4 or 5, characterized in that: The method further comprises: The first network device sends port information to the control device, where the port information includes port rates of one or more ports on the first network device.

7. The method according to any one of claims 1 to 3, characterized in that: The first network device obtains a flow control requirement corresponding to a target service flow, including: The first network device receives a third message sent by the second network device, wherein the third message includes an identifier of the target service flow and the flow control requirement, and the third message is used to request the first network device to perform flow shaping on the target service flow.

8. The method according to claim 7, characterized in that The third message is a control message.

9. The method according to claim 8, characterized in that The third message is a Border Gateway Protocol BGP update message, and the identifier of the target service flow and the flow control requirement are in the path attribute field of the BGP update message.

10. The method according to any one of claims 7 to 9, characterized in that: The third message is a service message, the service message includes an application-aware network APN field, the APN field includes an APN identifier subfield and an APN parameter subfield, the identifier of the target service flow is in the APN identifier subfield and / or the APN parameter subfield, and the flow control requirement is in the APN parameter subfield; the method further includes: The first network device deletes the flow control requirement in the APN parameter subfield of the third message to obtain a fourth message; The first network device forwards the fourth message.

11. The method according to claim 10, characterized in that The APN field also carries a target indication, where the target indication is used to indicate that the APN parameter subfield includes the flow control requirement.

12. The method according to claim 11, characterized in that The APN field further includes a flag subfield and an APN parameter type subfield, and the target indication is in the flag subfield and / or the APN parameter type subfield.

13. The method according to any one of claims 1 to 3, characterized in that: The first network device obtains a flow control requirement corresponding to a target service flow, including: The first network device receives a fifth message sent by the second network device, where the fifth message includes an identifier of the target service flow and a port rate of a second port of the second network device, where the second port is an egress port on the second network device for forwarding the target service flow, and the fifth message is used to request the first network device to perform traffic shaping on the target service flow; The first network device determines the flow control requirement according to the service requirement of the target service flow and the port rate of the second port, and the maximum receiving rate is less than or equal to the port rate of the second port.

14. The method according to claim 13, characterized in that The service requirement includes a transmission rate requirement of the target service flow, and the first network device determines the flow control requirement according to the service requirement of the target service flow and the port rate of the second port, including: The first network device determines the maximum receiving rate according to a smaller value between the transmission rate requirement and the port rate of the second port.

15. The method according to claim 13 or 14, characterized in that The flow control requirement further includes an allocation buffer requirement corresponding to the target service flow, the service requirement includes a delay requirement of the target service flow, and the first network device determines the flow control requirement according to the service requirement of the target service flow and the port rate of the second port, including: The first network device determines the allocation buffer requirement based on the round-trip delay between the sending end of the target service flow and the receiving end of the target service flow, the maximum receiving rate, and the delay requirement.

16. The method according to any one of claims 7 to 15, characterized in that: The traffic control requirement includes an allocation buffer requirement corresponding to the target service flow, and the first network device performs traffic shaping on the target service flow according to the traffic control requirement, including: When the available buffer of the egress port on the first network device for forwarding the target service flow is greater than or equal to the allocated buffer requirement, the first network device performs traffic shaping on the target service flow according to the traffic control requirement.

17. The method according to claim 16, characterized in that The method further comprises: When the available cache of the egress port on the first network device for forwarding the target service flow is less than the allocated cache requirement, the first network device sends the third message to a third network device, the third network device is located on the transmission path of the target service flow, and the first network device is located downstream of the third network device.

18. The method according to claim 16, characterized in that The method further comprises: When the available buffer of the egress port on the first network device for forwarding the target service flow is less than the allocated buffer requirement, the first network device sends a request response message to the second network device, where the request response message is used to indicate that the first network device cannot perform traffic shaping on the target service flow.

19. The method according to any one of claims 7 to 18, characterized in that: The method further comprises: The first network device receives a sixth message sent by the second network device, where the sixth message is used to instruct the first network device to end traffic shaping for the target service flow.

20. The method according to any one of claims 1 to 19, characterized in that: The method further comprises: When the first network device does not receive a message belonging to the target service flow within a target time period, the first network device ends traffic shaping for the target service flow.

21. A flow control method, characterized in that: The method comprises: The control device acquires port information of multiple network devices, wherein the multiple network devices include a first network device and a second network device located on a transmission path of a target service flow, and the second network device is located downstream of the first network device, the port information of the first network device includes a port rate of a first port of the first network device, the port information of the second network device includes a port rate of a second port of the second network device, the first port is an egress port on the first network device for forwarding the target service flow, and the second port is an egress port on the second network device for forwarding the target service flow; Based on the port rate of the second port being less than the port rate of the first port, the control device determines, according to the service demand of the target service flow and the port rate of the second port, a flow control demand corresponding to the target service flow, wherein the flow control demand includes a maximum receiving rate of the second network device for the target service flow, and the maximum receiving rate is less than or equal to the port rate of the second port; The control device sends a first message to the first network device, where the first message includes an identifier of the target service flow and the flow control requirement, and the first message is used to instruct the first network device to perform flow shaping on the target service flow.

22. The method according to claim 21, characterized in that The service requirement includes a transmission rate requirement of the target service flow, and the control device determines a flow control requirement corresponding to the target service flow according to the service requirement of the target service flow and the port rate of the second port, including: The control device determines the maximum receiving rate according to a smaller value between the transmission rate requirement and the port rate of the second port.

23. The method according to claim 21 or 22, characterized in that The port information of the first network device further includes available buffer of the first port, the port information of the second network device further includes available buffer of the second port, and the control device sends a first message to the first network device, including: When the available buffer of the first port is greater than the available buffer of the second port, the control device sends the first message to the first network device.

24. The method according to any one of claims 21 to 23, characterized in that: The flow control requirement also includes an allocation buffer requirement corresponding to the target service flow, the service requirement includes a delay requirement of the target service flow, and the control device determines the flow control requirement corresponding to the target service flow according to the service requirement of the target service flow and the port rate of the second port, including: The control device determines the allocation buffer requirement based on the round-trip delay between the sending end of the target service flow and the receiving end of the target service flow, the maximum receiving rate and the delay requirement. The allocation buffer requirement is used by the first network device to drop packets for the target service flow when the actual cache of the target service flow exceeds the allocation buffer requirement.

25. The method according to any one of claims 21 to 24, characterized in that: The second network device is an access layer device, and the first network device is a convergence layer device or a core layer device.

26. The method according to any one of claims 21 to 25, characterized in that: The first network device is a pre-configured network device for performing traffic shaping on a service flow passing through the first network device.

27. The method according to any one of claims 21 to 25, characterized in that: The first network device is a network device on the transmission path having the largest available buffer memory at an egress port for forwarding the target service flow.

28. The method according to any one of claims 21 to 27, characterized in that: The second network device is a pre-configured network device with a flow control requirement, and / or the second port is a pre-configured egress port with a flow control requirement.

29. The method according to any one of claims 21 to 27, characterized in that: Before the control device sends the first message to the first network device, the method further includes: The control device receives a traffic shaping request sent by the second network device, where the traffic shaping request includes an identifier of the target service flow, and the traffic shaping request is used to request traffic shaping for the target service flow.

30. The method according to claim 29, characterized in that The method further comprises: The control device receives a traffic shaping cancellation request sent by the second network device, where the traffic shaping cancellation request is used to request to end traffic shaping of the target service flow; The control device sends a second message to the first network device, where the second message is used to instruct the first network device to end traffic shaping for the target service flow.

31. A flow control method, characterized in that: The method comprises: Acquire port information of a first network device, where the first network device is located on a transmission path of a target service flow, the port information including a port rate of a target port, where the target port is an egress port on the first network device for forwarding the target service flow; According to the service requirements of the target service flow and the port rate, the flow control requirements corresponding to the target service flow are determined, and the flow control requirements include the maximum receiving rate of the first network device for the target service flow, and the maximum receiving rate is less than or equal to the port rate.

32. The method according to claim 31, characterized in that The service requirement includes a transmission rate requirement of the target service flow, and determining a flow control requirement corresponding to the target service flow according to the service requirement of the target service flow and the port rate includes: The maximum receiving rate is determined according to a smaller value between the transmission rate requirement and the port rate.

33. The method according to claim 31 or 32, characterized in that The flow control requirement also includes an allocation buffer requirement corresponding to the target service flow, the service requirement includes a delay requirement of the target service flow, and determining the flow control requirement corresponding to the target service flow according to the service requirement of the target service flow and the port rate includes: The allocation buffer requirement is determined based on the round-trip delay between the sending end of the target business flow and the receiving end of the target business flow, the maximum receiving rate and the delay requirement. The allocation buffer requirement is used to drop packets for the target business flow when the actual cache of the target business flow exceeds the allocation buffer requirement.

34. The method according to any one of claims 31 to 33, characterized in that: The method is applied to the first network device, and after determining the flow control requirement corresponding to the target service flow according to the service requirement of the target service flow and the port rate, the method further includes: A first message is sent to a second network device, wherein the first message includes an identifier of the target service flow and the flow control requirement, the second network device is located on a transmission path of the target service flow, and the first network device is located downstream of the second network device, and the first message is used to request the second network device to perform flow shaping on the target service flow.

35. The method according to claim 34, characterized in that The sending of the first message to the second network device includes: In response to the first network device receiving a message belonging to the target service flow, or packet loss occurring in the target service flow on the first network device, the first message is sent to the second network device.

36. The method according to claim 34 or 35, characterized in that The first message is a control message.

37. The method according to claim 36, characterized in that The first message is a Border Gateway Protocol BGP update message, and the identifier of the target service flow and the flow control requirement are in the path attribute field of the BGP update message.

38. The method according to claim 34 or 35, characterized in that The first message is a service message, which includes an application-aware network APN field. The APN field includes an APN identification subfield and an APN parameter subfield. The identifier of the target service flow is in the APN identification subfield and / or the APN parameter subfield, and the traffic control requirement is in the APN parameter subfield.

39. The method according to claim 38, characterized in that The APN field also carries an indication, where the indication is used to indicate that the APN parameter subfield includes the flow control requirement.

40. The method according to claim 39, characterized in that The APN field further includes a flag subfield and an APN parameter type subfield, and the indication is in the flag subfield and / or the APN parameter type subfield.

41. The method according to any one of claims 34 to 40, characterized in that The method further comprises: Receiving a request response message corresponding to the first message sent by the second network device, wherein the request response message is used to indicate that the second network device cannot perform traffic shaping on the target service flow; A second message is sent to a third network device, wherein the second message includes an identifier of the target service flow and the flow control requirement, the third network device is located on a transmission path of the target service flow, and the first network device is located downstream of the third network device, and the second message is used to request the first network device to perform flow shaping on the target service flow.

42. The method according to any one of claims 34 to 40, characterized in that The method further comprises: When the first network device does not receive a message belonging to the target service flow within a target time period, a third message is sent to the second network device, where the third message is used to instruct the second network device to end traffic shaping for the target service flow.

43. A flow control method, characterized in that: The method comprises: The first network device acquires the port information of the first network device, where the first network device is located on a transmission path of a target service flow, the port information includes a port rate of a target port, and the target port is an egress port on the first network device for forwarding the target service flow; The first network device sends a target message to the second network device, wherein the target message includes an identifier of the target service flow and the port information. The second network device is located on a transmission path of the target service flow, and the first network device is located downstream of the second network device. The target message is used to request the second network device to perform traffic shaping on the target service flow.

44. The method according to claim 43, characterized in that The target message is a Border Gateway Protocol (BGP) update message, and the identifier of the target service flow and the port information are in the path attribute field of the BGP update message.

45. The method according to claim 43, characterized in that The target message is a service message, which includes an application-aware network APN field. The APN field includes an APN identification subfield and an APN parameter subfield. The identifier of the target service flow is in the APN identification subfield and / or the APN parameter subfield, and the port information is in the APN parameter subfield.

46. ​​The method according to claim 45, characterized in that The APN field also carries a target indication, where the target indication is used to indicate that the APN parameter subfield includes the port information.

47. The method according to claim 46, characterized in that The APN field further includes a flag subfield and an APN parameter type subfield, and the target indication is in the flag subfield and / or the APN parameter type subfield.

48. A flow control system, characterized in that: include: Control devices and multiple network devices; The control device is used to obtain port information of the multiple network devices, the multiple network devices include a first network device and a second network device located on a transmission path of a target service flow, and the second network device is located downstream of the first network device, the port information of the first network device includes a port rate of a first port of the first network device, the port information of the second network device includes a port rate of a second port of the second network device, the first port is an egress port on the first network device for forwarding the target service flow, and the second port is an egress port on the second network device for forwarding the target service flow; The control device is further configured to determine, when the port rate of the second port is less than the port rate of the first port, a flow control requirement corresponding to the target service flow according to the service requirement of the target service flow and the port rate of the second port, wherein the flow control requirement includes a maximum receiving rate of the second network device for the target service flow, and the maximum receiving rate is less than or equal to the port rate of the second port; The control device is further used to send a message to the first network device, where the message includes an identifier of the target service flow and the flow control requirement, and the message is used to instruct the first network device to perform flow shaping on the target service flow; The first network device is used to perform traffic shaping on the target service flow according to the traffic control requirement, so that the sending rate of the first network device for the target service flow is less than or equal to the maximum receiving rate.

49. A flow control system, characterized in that: include: A plurality of network devices, the plurality of network devices comprising a first network device and a second network device, the first network device and the second network device are both located on a transmission path of a target service flow, and the second network device is located downstream of the first network device; The second network device is used to obtain port information of the second network device, where the port information includes a port rate of a target port, and the target port is an egress port on the second network device used to forward the target service flow; The second network device is further used to determine the flow control requirement corresponding to the target service flow according to the service requirement of the target service flow and the port rate, wherein the flow control requirement includes a maximum receiving rate of the second network device for the target service flow, and the maximum receiving rate is less than or equal to the port rate; The second network device is further used to send a message to the first network device, where the message includes an identifier of the target service flow and the flow control requirement, and the message is used to request the first network device to perform flow shaping on the target service flow; The first network device is used to perform traffic shaping on the target service flow according to the traffic control requirement, so that the sending rate of the first network device for the target service flow is less than or equal to the maximum receiving rate.

50. A flow control system, characterized in that: include: A plurality of network devices, the plurality of network devices comprising a first network device and a second network device, the first network device and the second network device are both located on a transmission path of a target service flow, and the second network device is located downstream of the first network device; The second network device is used to obtain port information of the second network device, where the port information includes a port rate of a target port, and the target port is an egress port on the second network device used to forward the target service flow; The second network device is further used to send a message to the first network device, where the message includes the identifier of the target service flow and the port information, and the message is used to request the first network device to perform traffic shaping on the target service flow; The first network device is used to determine the flow control requirement corresponding to the target service flow according to the service requirement of the target service flow and the port rate, wherein the flow control requirement includes a maximum receiving rate of the second network device for the target service flow, and the maximum receiving rate is less than or equal to the port rate; The first network device is further used to perform traffic shaping on the target service flow according to the traffic control requirement, so that the sending rate of the first network device for the target service flow is less than or equal to the maximum receiving rate.

51. A flow control device, characterized in that: include: Transceiver module and processing module; The transceiver module is used to perform the transceiver operation in the method according to any one of claims 1 to 47, and the processing module is used to perform the operations in the method according to any one of claims 1 to 47 except the transceiver operation.

52. A flow control device, characterized in that: include: Memory and processor; The memory is used to store computer programs; The processor is used to execute the computer program stored in the memory so that the flow control device performs the method according to any one of claims 1 to 47.

53. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed, the method according to any one of claims 1 to 47 is implemented.

54. A computer program product, characterized in that The computer program product comprises a program or code, and when the program or code is executed, the method according to any one of claims 1 to 47 is implemented.

Citation Information

Patent Citations

  • Flow control method and device, network equipment and storage medium

    CN110290072A

  • Message transmission method and device, network node and storage medium

    CN113382442A

  • Data transmission method and device, electronic equipment and storage medium

    CN115037694A

  • Smart Ethernet edge networking system

    US20080062876A1

  • Traffic shaping methods and apparatus for providing wireless contention reduction and airtime fairness for multimedia traffic flows in a wireless network

    US20200100143A1

Cited By

  • Chip control method and chip

    CN122093319A

  • Congestion control method and related apparatus

    WO2026194410A1