技术领域Technical Field
本申请涉及流量控制技术领域,涉及一种网络流量控制方法、装置、设备和存储介质。The present application relates to the technical field of flow control, and more particularly to a network flow control method, apparatus, device and storage medium.
背景技术Background Art
PFC(Priority-based Flow Control,基于优先级的流量控制)是现有技术中的一种流量控制的方法,是影响和生效在交换机上的行为。PFC允许在一条以太网链路上创建多个虚拟通道,即不同的优先级队列。每条虚拟通道都被指定一个优先级,并且基于同一优先级的数据包或数据流会在同一个优先级队列中传输。每个虚拟通道都实现了独立的流量控制机制。PFC的核心原理是下游设备控制上游设备某个优先级的虚拟通道开启或停止发送数据包,控制触发时机是下游设备的入口的队列数量达到某个阈值,控制方式是通过发送PFC的Pause帧(流量暂停帧)和Resume帧(暂停恢复帧)来控制上游设备暂停发送数据包或恢复发送数据包。PFC (Priority-based Flow Control) is a flow control method in the prior art, which affects and takes effect on the switch. PFC allows the creation of multiple virtual channels, that is, queues with different priorities, on an Ethernet link. Each virtual channel is assigned a priority, and data packets or data streams based on the same priority are transmitted in the same priority queue. Each virtual channel implements an independent flow control mechanism. The core principle of PFC is that the downstream device controls the virtual channel of a certain priority of the upstream device to start or stop sending data packets. The control trigger timing is when the number of queues at the entrance of the downstream device reaches a certain threshold. The control method is to control the upstream device to pause or resume sending data packets by sending PFC Pause frames (traffic pause frames) and Resume frames (pause resume frames).
随着网络设备(如网卡、交换机等)的发展,其缓冲区容量不断增大。在这种背景下,尽管现有技术中的PFC方法仍能有效控制上游流量的开关,但其直接暂停和恢复上游设备的数据包发送,会导致上游流量出现断断续续的情况,并且未能充分利用网络设备的缓冲区,无法平缓地控制网络中传输的数据流量。With the development of network devices (such as network cards, switches, etc.), their buffer capacity is increasing. In this context, although the PFC method in the prior art can still effectively control the switch of upstream traffic, it directly suspends and resumes the data packet sending of the upstream device, which will cause the upstream traffic to be intermittent, and fails to make full use of the buffer of the network device, and cannot smoothly control the data traffic transmitted in the network.
发明内容Summary of the invention
本申请实施例提供了一种网络流量控制方法,以解决或至少部分地解决上述问题。The embodiment of the present application provides a network traffic control method to solve or at least partially solve the above-mentioned problem.
相应的,本申请实施例还提供了一种网络流量控制装置、一种电子设备、一种存储介质以及一种计算机程序产品,用以保证上述方法的实现及应用。Correspondingly, an embodiment of the present application also provides a network traffic control device, an electronic device, a storage medium and a computer program product to ensure the implementation and application of the above method.
为了解决上述问题,本申请实施例公开了一种网络流量控制方法,应用于网络设备,所述网络设备包括网口设备、上游设备以及下游设备,所述上游设备与所述下游设备之间通过所述网口设备传输数据包,所述网口设备设置有缓冲区,所述方法包括:In order to solve the above problems, an embodiment of the present application discloses a network traffic control method, which is applied to a network device, wherein the network device includes a network port device, an upstream device, and a downstream device, wherein data packets are transmitted between the upstream device and the downstream device through the network port device, and the network port device is provided with a buffer. The method includes:
控制所述下游设备统计所述缓冲区的占用率和缓存增加率,所述缓冲区中保存有所述上游设备发送的所述数据包;Controlling the downstream device to count the occupancy rate and cache increase rate of the buffer, wherein the buffer stores the data packets sent by the upstream device;
当所述占用率在预设时间内持续高于第一预设阈值,且所述缓存增加率为正值时,控制所述下游设备向所述上游设备发送流量预警帧,所述流量预警帧中至少包括下游当前处理能力;When the occupancy rate is continuously higher than a first preset threshold within a preset time, and the cache increase rate is a positive value, controlling the downstream device to send a traffic warning frame to the upstream device, wherein the traffic warning frame includes at least the current downstream processing capacity;
在所述上游设备接收到所述流量预警帧时,控制所述上游设备按照所述下游当前处理能力调整发送所述数据包的速率;When the upstream device receives the traffic warning frame, controlling the upstream device to adjust the rate of sending the data packet according to the current processing capacity of the downstream device;
检测到所述缓冲区的所述占用率低于所述第一预设阈值时,控制所述下游设备向所述上游设备发送限速解除帧,所述限速解除帧用于使所述上游设备恢复所述发送所述数据包的速率。When it is detected that the occupancy rate of the buffer is lower than the first preset threshold, the downstream device is controlled to send a rate limit release frame to the upstream device, and the rate limit release frame is used to enable the upstream device to restore the rate of sending the data packet.
在本申请的一种可选的实施例中,所述控制所述下游设备统计所述缓冲区的占用率和缓存增加率,包括:In an optional embodiment of the present application, controlling the downstream device to count the occupancy rate and cache increase rate of the buffer zone includes:
控制所述下游设备统计窗口时间内所述缓冲区的新增数据包数量以及消耗数据包数量;Control the number of newly added data packets and the number of consumed data packets in the buffer within the statistical window time of the downstream device;
根据所述窗口时间内所述缓冲区的所述新增数据包数量以及所述消耗数据包数量计算得到所述缓存增加率,并根据所述窗口时间内所述缓冲区的所述消耗数据包数量计算得到所述下游当前处理能力;The cache increase rate is calculated based on the number of newly added data packets and the number of consumed data packets in the buffer within the window time, and the downstream current processing capacity is calculated based on the number of consumed data packets in the buffer within the window time;
根据所述占用率和所述缓存增加率判断是否需要控制所述下游设备向所述上游设备发送所述流量预警帧;Determining whether it is necessary to control the downstream device to send the traffic warning frame to the upstream device according to the occupancy rate and the cache increase rate;
若需要控制所述下游设备向所述上游设备发送所述流量预警帧,则将所述下游当前处理能力设置为所述流量预警帧中的第一预设字节。If it is necessary to control the downstream device to send the traffic warning frame to the upstream device, the downstream current processing capacity is set to the first preset byte in the traffic warning frame.
在本申请的一种可选的实施例中,所述控制所述上游设备按照所述下游当前处理能力调整发送所述数据包的速率,包括:In an optional embodiment of the present application, controlling the upstream device to adjust the rate of sending the data packet according to the current processing capability of the downstream device includes:
若所述缓冲区的所述占用率高于所述第一预设阈值,则控制所述下游设备统计当前缓存增加率与所述下游当前处理能力;If the occupancy rate of the buffer is higher than the first preset threshold, controlling the downstream device to count the current cache increase rate and the current downstream processing capacity;
当所述当前缓存增加率为正值时,定时将所述下游当前处理能力发送至所述上游设备;When the current cache increase rate is a positive value, the downstream current processing capacity is sent to the upstream device at a regular interval;
控制所述上游设备按照所述下游当前处理能力调整所述发送所述数据包的速率。The upstream device is controlled to adjust the rate of sending the data packet according to the current processing capability of the downstream device.
在本申请的一种可选的实施例中,所述控制所述上游设备按照所述下游当前处理能力调整发送所述数据包的速率,包括:In an optional embodiment of the present application, controlling the upstream device to adjust the rate of sending the data packet according to the current processing capability of the downstream device includes:
控制所述上游设备将所述发送所述数据包的速率调整至所述下游当前处理能力对应的处理速率的第一预设百分比。The upstream device is controlled to adjust the rate of sending the data packet to a first preset percentage of the processing rate corresponding to the current processing capacity of the downstream.
在本申请的一种可选的实施例中,所述检测到所述缓冲区的所述占用率低于所述第一预设阈值时,控制所述下游设备向所述上游设备发送限速解除帧,包括:In an optional embodiment of the present application, when detecting that the occupancy rate of the buffer is lower than the first preset threshold, controlling the downstream device to send a rate limit release frame to the upstream device includes:
检测到所述缓冲区的所述占用率低于所述第一预设阈值的第二预设百分比时,控制所述下游设备向所述上游设备发送限速解除帧。When it is detected that the occupancy rate of the buffer is lower than a second preset percentage of the first preset threshold, the downstream device is controlled to send a rate limit release frame to the upstream device.
在本申请的一种可选的实施例中,所述检测到所述缓冲区的所述占用率低于所述第一预设阈值的第二预设百分比,还包括:In an optional embodiment of the present application, the detecting that the occupancy rate of the buffer is lower than a second preset percentage of the first preset threshold further includes:
若控制所述上游设备按照所述下游当前处理能力调整发送所述数据包的速率后,所述缓冲区的所述占用率高于第一预设阈值,且所述缓存增加率为负值,则检测到所述缓冲区的所述占用率逐渐降低至所述第一预设阈值的所述第二预设百分比。If after controlling the upstream device to adjust the rate of sending the data packets according to the current processing capacity of the downstream, the occupancy rate of the buffer is higher than the first preset threshold and the cache increase rate is a negative value, it is detected that the occupancy rate of the buffer gradually decreases to the second preset percentage of the first preset threshold.
在本申请的一种可选的实施例中,在所述控制所述下游设备向所述上游设备发送流量预警帧之后,所述方法还包括:In an optional embodiment of the present application, after controlling the downstream device to send a traffic warning frame to the upstream device, the method further includes:
若所述上游设备未及时响应流量预警帧,或,所述上游设备不具备识别所述流量预警帧的能力,则在检测到所述缓冲区的所述占用率高于第二预设阈值后,控制所述下游设备向所述上游设备发送流量暂停帧,所述流量暂停帧用于暂停所述上游设备发送所述数据包;If the upstream device does not respond to the traffic warning frame in time, or the upstream device does not have the ability to identify the traffic warning frame, after detecting that the occupancy rate of the buffer is higher than the second preset threshold, control the downstream device to send a traffic pause frame to the upstream device, wherein the traffic pause frame is used to pause the upstream device from sending the data packet;
在所述上游设备接收到所述流量暂停帧时,控制所述上游设备暂停发送所述数据包。When the upstream device receives the traffic pause frame, the upstream device is controlled to pause sending the data packet.
在本申请的一种可选的实施例中,所述方法还包括:In an optional embodiment of the present application, the method further includes:
检测到所述缓冲区的所述占用率低于所述第一预设阈值的第二预设百分比时,控制所述下游设备向所述上游设备发送暂停恢复帧,所述暂停恢复帧用于使所述上游设备恢复发送所述数据包。When it is detected that the occupancy rate of the buffer is lower than a second preset percentage of the first preset threshold, the downstream device is controlled to send a pause resume frame to the upstream device, wherein the pause resume frame is used to enable the upstream device to resume sending the data packet.
在本申请的一种可选的实施例中,所述控制所述下游设备向所述上游设备发送限速解除帧,还包括:In an optional embodiment of the present application, the controlling the downstream device to send a rate limit release frame to the upstream device further includes:
在所述上游设备未正常接收所述限速解除帧,且所述缓冲区的所述占用率低于所述第一预设阈值的情况下,控制所述下游设备定时向所述上游设备发送所述限速解除帧。When the upstream device fails to normally receive the speed limit release frame and the occupancy rate of the buffer is lower than the first preset threshold, the downstream device is controlled to periodically send the speed limit release frame to the upstream device.
在本申请的一种可选的实施例中,所述控制所述下游设备向所述上游设备发送暂停恢复帧,还包括:In an optional embodiment of the present application, the controlling the downstream device to send a pause resume frame to the upstream device further includes:
在所述上游设备未正常接收所述暂停恢复帧,且所述缓冲区的所述占用率低于所述第一预设阈值的情况下,控制所述下游设备定时向所述上游设备发送所述暂停恢复帧。When the upstream device fails to normally receive the pause resume frame and the occupancy rate of the buffer is lower than the first preset threshold, the downstream device is controlled to periodically send the pause resume frame to the upstream device.
在本申请的一种可选的实施例中,所述网口设备具有多个虚拟通道,每个所述虚拟通道具有对应的优先级,所述上游设备与所述下游设备之间通过所述虚拟通道传输数据包,所述方法还包括:In an optional embodiment of the present application, the network port device has multiple virtual channels, each of the virtual channels has a corresponding priority, and the upstream device and the downstream device transmit data packets through the virtual channels. The method also includes:
控制所述下游设备统计所述多个虚拟通道的所述缓冲区的占用率和缓存增加率;Controlling the downstream device to count the occupancy rate and cache increase rate of the buffers of the multiple virtual channels;
当目标虚拟通道的所述占用率在预设时间内持续高于第一预设阈值,且所述缓存增加率为正值时,控制所述下游设备向所述上游设备发送流量预警帧,所述流量预警帧中至少包括下游当前处理能力与所述目标虚拟通道的通道标识;When the occupancy rate of the target virtual channel is continuously higher than a first preset threshold value within a preset time, and the cache increase rate is a positive value, controlling the downstream device to send a traffic warning frame to the upstream device, wherein the traffic warning frame includes at least the current downstream processing capacity and the channel identifier of the target virtual channel;
在所述上游设备接收到所述流量预警帧时,根据所述通道标识控制所述上游设备按照所述下游当前处理能力调整向所述目标虚拟通道发送所述数据包的速率;When the upstream device receives the traffic warning frame, controlling the upstream device to adjust the rate of sending the data packet to the target virtual channel according to the current processing capacity of the downstream according to the channel identifier;
检测到所述目标虚拟通道的所述缓冲区的所述占用率低于所述第一预设阈值时,控制所述下游设备向所述上游设备发送限速解除帧,所述限速解除帧中至少包括所述目标虚拟通道的所述通道标识。When it is detected that the occupancy rate of the buffer of the target virtual channel is lower than the first preset threshold, the downstream device is controlled to send a rate limit release frame to the upstream device, wherein the rate limit release frame includes at least the channel identifier of the target virtual channel.
在本申请的一种可选的实施例中,所述流量预警帧的第二预设字节为区别标识,所述区别标识用于区别所述流量预警帧与所述流量暂停帧,以及标识所述流量预警帧的流量限速能力。In an optional embodiment of the present application, the second preset byte of the traffic warning frame is a distinguishing mark, and the distinguishing mark is used to distinguish the traffic warning frame from the traffic pause frame, and to identify the traffic speed limiting capability of the traffic warning frame.
本申请实施例还公开了一种网络流量控制装置,应用于网络设备,所述网络设备包括网口设备、上游设备以及下游设备,所述上游设备与所述下游设备之间通过所述网口设备传输数据包,所述网口设备设置有缓冲区,所述装置包括:The embodiment of the present application further discloses a network traffic control device, which is applied to a network device, wherein the network device includes a network port device, an upstream device, and a downstream device, wherein data packets are transmitted between the upstream device and the downstream device via the network port device, and the network port device is provided with a buffer. The device includes:
数据统计模块,用于控制所述下游设备统计所述缓冲区的占用率和缓存增加率,所述缓冲区中保存有所述上游设备发送的所述数据包;A data statistics module, used to control the downstream device to count the occupancy rate and cache increase rate of the buffer, in which the data packets sent by the upstream device are stored;
流量预警模块,用于当所述占用率在预设时间内持续高于第一预设阈值,且所述缓存增加率为正值时,控制所述下游设备向所述上游设备发送流量预警帧,所述流量预警帧中至少包括下游当前处理能力;A traffic warning module, configured to control the downstream device to send a traffic warning frame to the upstream device when the occupancy rate is continuously higher than a first preset threshold within a preset time and the cache increase rate is a positive value, wherein the traffic warning frame includes at least the current processing capacity of the downstream device;
流量限速模块,用于在所述上游设备接收到所述流量预警帧时,控制所述上游设备按照所述下游当前处理能力调整发送所述数据包的速率;A traffic rate limiting module, used for controlling the upstream device to adjust the rate of sending the data packet according to the current processing capacity of the downstream device when the upstream device receives the traffic warning frame;
限速解除模块,用于检测到所述缓冲区的所述占用率低于所述第一预设阈值时,控制所述下游设备向所述上游设备发送限速解除帧,所述限速解除帧用于使所述上游设备恢复所述发送所述数据包的速率。The speed limit release module is used to control the downstream device to send a speed limit release frame to the upstream device when it detects that the occupancy rate of the buffer is lower than the first preset threshold, and the speed limit release frame is used to enable the upstream device to restore the rate of sending the data packet.
本申请实施例还公开了一种电子设备,包括:处理器;和存储器,其上存储有可执行代码,当所述可执行代码被执行时,使得所述处理器执行如本申请实施例中一个或多个所述的网络流量控制方法。An embodiment of the present application also discloses an electronic device, including: a processor; and a memory, on which executable code is stored. When the executable code is executed, the processor executes the network traffic control method as described in one or more of the embodiments of the present application.
本申请实施例还公开了一个或多个机器可读介质,其上存储有可执行代码,当所述可执行代码被执行时,使得处理器执行如本申请实施例中一个或多个所述的网络流量控制方法。The embodiments of the present application also disclose one or more machine-readable media on which executable codes are stored. When the executable codes are executed, the processor executes the network traffic control method as described in one or more of the embodiments of the present application.
本申请实施例还公开了一种计算机程序产品,包括计算机程序/指令,该计算机程序/指令被处理器执行时实现如本申请实施例中一个或多个所述的网络流量控制方法。The embodiments of the present application also disclose a computer program product, including a computer program/instruction, which, when executed by a processor, implements the network traffic control method as described in one or more of the embodiments of the present application.
与现有技术相比,本申请实施例包括以下优点:Compared with the prior art, the embodiments of the present application have the following advantages:
在本申请实施例中,控制下游设备统计缓冲区的占用率和缓存增加率,缓冲区中保存有上游设备发送的数据包;当占用率在预设时间内持续高于第一预设阈值,且缓存增加率为正值时,控制下游设备向上游设备发送流量预警帧,流量预警帧中至少包括下游当前处理能力;在上游设备接收到流量预警帧时,控制上游设备按照下游当前处理能力调整发送数据包的速率;检测到缓冲区的占用率低于第一预设阈值时,控制下游设备向上游设备发送限速解除帧,限速解除帧用于使上游设备恢复发送数据包的速率。本申请实施例通过引入流量预警帧,有效应对下游设备处理能力受限的情况。一旦检测到缓冲区占用率过高,将提前发出流量预警帧,确保在实施流量控制时能够平稳降速,同时维持网络的连续性,避免突然的网络中断。此外,本申请实施例还能在拥塞发生之前,及时降低上游设备的发送速度,防止过度拥塞导致断流,从而以一种更为温和的方式保障网络传输的连续性,避免因突然停止传输而引发的网络暂停。In an embodiment of the present application, the downstream device is controlled to count the occupancy rate and cache increase rate of the buffer, and the buffer stores the data packets sent by the upstream device; when the occupancy rate is continuously higher than the first preset threshold value within the preset time, and the cache increase rate is a positive value, the downstream device is controlled to send a traffic warning frame to the upstream device, and the traffic warning frame includes at least the current downstream processing capacity; when the upstream device receives the traffic warning frame, the upstream device is controlled to adjust the rate of sending data packets according to the current downstream processing capacity; when the occupancy rate of the buffer is detected to be lower than the first preset threshold value, the downstream device is controlled to send a speed limit release frame to the upstream device, and the speed limit release frame is used to restore the rate of sending data packets by the upstream device. The embodiment of the present application effectively responds to the situation where the processing capacity of the downstream device is limited by introducing a traffic warning frame. Once it is detected that the buffer occupancy rate is too high, a traffic warning frame will be issued in advance to ensure that the speed can be smoothly reduced when the flow control is implemented, while maintaining the continuity of the network and avoiding sudden network interruption. In addition, the embodiment of the present application can also reduce the sending speed of the upstream device in time before congestion occurs, prevent excessive congestion from causing interruption, thereby ensuring the continuity of network transmission in a more gentle way and avoiding network suspension caused by sudden cessation of transmission.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是本申请的一种网络流量控制方法实施例的步骤流程图;FIG1 is a flowchart of a method for controlling network traffic according to an embodiment of the present invention;
图2是本申请的又一种网络流量控制方法实施例的状态切换示意图;FIG2 is a schematic diagram of state switching of another network traffic control method embodiment of the present application;
图3是本申请的一种网络流量控制装置实施例的结构框图;FIG3 is a structural block diagram of an embodiment of a network traffic control device of the present application;
图4是本申请一实施例提供的装置的结构示意图。FIG. 4 is a schematic diagram of the structure of a device provided in an embodiment of the present application.
具体实施方式DETAILED DESCRIPTION
为使本申请的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本申请作进一步详细的说明。In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
参照图1,是本申请的一种网络流量控制方法实施例的步骤流程图,包括如下步骤:1 is a flowchart of a method for controlling network traffic according to an embodiment of the present invention, which includes the following steps:
步骤101、控制所述下游设备统计所述缓冲区的占用率和缓存增加率,所述缓冲区中保存有所述上游设备发送的所述数据包。Step 101: Control the downstream device to count the occupancy rate and cache increase rate of the buffer, in which the data packets sent by the upstream device are stored.
本申请的一些实施例所示的一种网络流量控制方法应用于网络设备,其中网络设备包括网口设备、上游设备以及下游设备,网口设备设置有缓冲区,上游设备与下游设备之间通过网口设备传输数据包,即上游设备(发送端)通过网口设备将数据包发送到下游设备(接收端),而下游设备通过网口设备接收来自上游设备的数据包。A network traffic control method shown in some embodiments of the present application is applied to a network device, wherein the network device includes a network port device, an upstream device and a downstream device, the network port device is provided with a buffer, and data packets are transmitted between the upstream device and the downstream device through the network port device, that is, the upstream device (sending end) sends the data packet to the downstream device (receiving end) through the network port device, and the downstream device receives the data packet from the upstream device through the network port device.
在步骤101中,上游设备发送的数据包首先达到网口设备的缓冲区处,由下游设备统计网口设备缓冲区的占用率与缓存增加率。在一种可选的实施例中,可通过公式(1)计算窗口时间内缓冲区的缓存增加率。In step 101, the data packet sent by the upstream device first reaches the buffer of the network port device, and the downstream device counts the occupancy rate and cache increase rate of the network port device buffer. In an optional embodiment, the cache increase rate of the buffer within the window time can be calculated by formula (1).
(1) (1)
其中,A为缓存增加率;T为窗口时间,单位一般为ns(纳秒,nanosecond);Rn为窗口时间内网口设备接收到的新数据包的数量;Ru为窗口时间内后端消耗掉的网口设备缓冲区数据包的数量。在一种可选的实施例中,窗口时间可根据缓冲区大小和网口设备的处理能力设置。Wherein, A is the cache increase rate; T is the window time, the unit is generally ns (nanosecond);Rn is the number of new data packets received by the network port device within the window time;Ru is the number of data packets in the network port device buffer consumed by the back end within the window time. In an optional embodiment, the window time can be set according to the buffer size and the processing capacity of the network port device.
步骤102、当所述占用率在预设时间内持续高于第一预设阈值,且所述缓存增加率为正值时,控制所述下游设备向所述上游设备发送流量预警帧,所述流量预警帧中至少包括下游当前处理能力。Step 102: When the occupancy rate is continuously higher than a first preset threshold within a preset time and the cache increase rate is a positive value, control the downstream device to send a traffic warning frame to the upstream device, wherein the traffic warning frame includes at least the current downstream processing capacity.
在步骤102中,若缓冲区的占用率在预设时间内持续高于第一预设阈值,且缓存增加率A为正值时,下游设备会向上游设备发送一个流量预警帧。流量预警帧中至少包括下游当前处理能力,在一种实施例中,流量预警帧还可以包括用于与流量暂停帧区分开的区别标识。在一种可选的实施例中,可通过公式(2)计算窗口时间内的下游当前处理能力。In step 102, if the occupancy rate of the buffer zone is continuously higher than the first preset threshold value within the preset time, and the buffer increase rate A is a positive value, the downstream device will send a traffic warning frame to the upstream device. The traffic warning frame includes at least the current downstream processing capacity. In one embodiment, the traffic warning frame may also include a distinguishing mark for distinguishing from the traffic pause frame. In an optional embodiment, the current downstream processing capacity within the window time may be calculated by formula (2).
(2) (2)
其中,V为下游当前处理能力;T为窗口时间,单位一般为ns(纳秒,nanosecond);Ru为窗口时间内后端消耗掉的网口设备缓冲区数据包的数量。在一种可选的实施例中,下游设备可以计算预设次数的窗口时间内的占用率、缓存增加率与下游当前处理能力,若在预设次数的计算中,占用率持续高于第一预设阈值,且缓存增加率为正值,则将包括下游当前处理能力的流量预警帧发送至上游设备。在一种可选的实施例中,第一预设阈值可以为事先设置的缓冲区占用率预警值Py的80%,本申请实施例不对第一预设阈值的具体设置作任何限制,本领域技术人员可按需进行相应的设置。Wherein, V is the current downstream processing capacity; T is the window time, the unit is generally ns (nanosecond);Ru is the number of network port device buffer data packets consumed by the backend within the window time. In an optional embodiment, the downstream device can calculate the occupancy rate, cache increase rate and downstream current processing capacity within the window time for a preset number of times. If the occupancy rate is continuously higher than the first preset threshold value in the calculation of the preset number of times, and the cache increase rate is a positive value, then the traffic warning frame including the current downstream processing capacity is sent to the upstream device. In an optional embodiment, the first preset threshold value can be 80% of the pre-set buffer occupancy rate warning valuePy . The embodiment of the present application does not impose any restrictions on the specific setting of the first preset threshold value, and those skilled in the art can make corresponding settings as needed.
步骤103、在所述上游设备接收到所述流量预警帧时,控制所述上游设备按照所述下游当前处理能力调整发送所述数据包的速率。Step 103: When the upstream device receives the traffic warning frame, control the upstream device to adjust the rate of sending the data packet according to the current processing capacity of the downstream.
在步骤103中,上游设备接收到流量预警帧后,根据流量预警帧中携带的下游当前处理能力V降低发送数据包的速率。在一种示例中,上游设备可将发送数据包的速率降低至下游当前处理能力对应的处理速率的90%,该值仅为示例而言,本申请实施例不对具体的上游设备降低的发送速率作任何限制。In step 103, after receiving the traffic warning frame, the upstream device reduces the rate of sending data packets according to the downstream current processing capacity V carried in the traffic warning frame. In an example, the upstream device can reduce the rate of sending data packets to 90% of the processing rate corresponding to the downstream current processing capacity. This value is only for example, and the embodiment of the present application does not impose any restrictions on the specific upstream device's reduced sending rate.
步骤104、检测到所述缓冲区的所述占用率低于所述第一预设阈值时,控制所述下游设备向所述上游设备发送限速解除帧,所述限速解除帧用于使所述上游设备恢复所述发送所述数据包的速率。Step 104: When it is detected that the occupancy rate of the buffer is lower than the first preset threshold, control the downstream device to send a rate limit release frame to the upstream device, wherein the rate limit release frame is used to enable the upstream device to restore the rate of sending the data packet.
在步骤104中,由于上游设备降低了发送速率,缓冲区的空间被逐渐释放。当检测到缓冲区的占用率降低至低于所述第一预设阈值时,下游设备向上游设备发送限速解除帧,上游设备接收到限速解除帧后,恢复接收流量预警帧前的发送数据包的速率。在一种示例中,缓冲区的占用率降低至缓冲区占用率预警值Py的80%后,下游设备向上游设备发送限速解除帧,该第一预设阈值的设置仅为示例而言,本申请实施例不对第一预设阈值的具体设置作任何限制。In step 104, as the upstream device reduces the sending rate, the space in the buffer is gradually released. When it is detected that the occupancy rate of the buffer drops below the first preset threshold, the downstream device sends a speed limit release frame to the upstream device. After the upstream device receives the speed limit release frame, it restores the rate of sending data packets before receiving the traffic warning frame. In one example, after the occupancy rate of the buffer drops to 80% of the buffer occupancy warning value Py , the downstream device sends a speed limit release frame to the upstream device. The setting of the first preset threshold is only for example, and the embodiment of the present application does not impose any restrictions on the specific setting of the first preset threshold.
在本申请实施例中,控制下游设备统计缓冲区的占用率和缓存增加率,缓冲区中保存有上游设备发送的数据包;当占用率在预设时间内持续高于第一预设阈值,且缓存增加率为正值时,控制下游设备向上游设备发送流量预警帧,流量预警帧中至少包括下游当前处理能力;在上游设备接收到流量预警帧时,控制上游设备按照下游当前处理能力调整发送数据包的速率;检测到缓冲区的占用率低于第一预设阈值时,控制下游设备向上游设备发送限速解除帧,限速解除帧用于使上游设备恢复发送数据包的速率。本申请实施例通过引入流量预警帧,有效应对下游设备处理能力受限的情况。一旦检测到缓冲区占用率过高,将提前发出流量预警帧,确保在实施流量控制时能够平稳降速,同时维持网络的连续性,避免突然的网络中断。此外,本申请实施例还能在拥塞发生之前,及时降低上游设备的发送速度,防止过度拥塞导致断流,从而以一种更为温和的方式保障网络传输的连续性,避免因突然停止传输而引发的网络暂停。In an embodiment of the present application, the downstream device is controlled to count the occupancy rate and cache increase rate of the buffer, and the buffer stores the data packets sent by the upstream device; when the occupancy rate is continuously higher than the first preset threshold value within the preset time, and the cache increase rate is a positive value, the downstream device is controlled to send a traffic warning frame to the upstream device, and the traffic warning frame includes at least the current downstream processing capacity; when the upstream device receives the traffic warning frame, the upstream device is controlled to adjust the rate of sending data packets according to the current downstream processing capacity; when the occupancy rate of the buffer is detected to be lower than the first preset threshold value, the downstream device is controlled to send a speed limit release frame to the upstream device, and the speed limit release frame is used to restore the rate of sending data packets by the upstream device. The embodiment of the present application effectively responds to the situation where the processing capacity of the downstream device is limited by introducing a traffic warning frame. Once it is detected that the buffer occupancy rate is too high, a traffic warning frame will be issued in advance to ensure that the speed can be smoothly reduced when the flow control is implemented, while maintaining the continuity of the network and avoiding sudden network interruption. In addition, the embodiment of the present application can also reduce the sending speed of the upstream device in time before congestion occurs, prevent excessive congestion from causing interruption, thereby ensuring the continuity of network transmission in a more gentle way and avoiding network suspension caused by sudden cessation of transmission.
在本申请的一种可选的实施例中,所述控制所述下游设备统计所述缓冲区的占用率和缓存增加率,包括:In an optional embodiment of the present application, controlling the downstream device to count the occupancy rate and cache increase rate of the buffer zone includes:
控制所述下游设备统计窗口时间内所述缓冲区的新增数据包数量以及消耗数据包数量;Control the number of newly added data packets and the number of consumed data packets in the buffer within the statistical window time of the downstream device;
根据所述窗口时间内所述缓冲区的所述新增数据包数量以及所述消耗数据包数量计算得到所述缓存增加率,并根据所述窗口时间内所述缓冲区的所述消耗数据包数量计算得到所述下游当前处理能力;The cache increase rate is calculated based on the number of newly added data packets and the number of consumed data packets in the buffer within the window time, and the downstream current processing capacity is calculated based on the number of consumed data packets in the buffer within the window time;
根据所述占用率和所述缓存增加率判断是否需要控制所述下游设备向所述上游设备发送所述流量预警帧;Determining whether it is necessary to control the downstream device to send the traffic warning frame to the upstream device according to the occupancy rate and the cache increase rate;
若需要控制所述下游设备向所述上游设备发送所述流量预警帧,则将所述下游当前处理能力设置为所述流量预警帧中的第一预设字节。If it is necessary to control the downstream device to send the traffic warning frame to the upstream device, the downstream current processing capacity is set to the first preset byte in the traffic warning frame.
在本实施例中,下游设备需要统计窗口时间内缓冲区的新增数据包数量以及消耗数据包数量,并根据窗口时间内缓冲区的新增数据包数量以及消耗数据包数量计算缓存增加率。在本申请一种可选的实施例中,窗口时间可根据缓冲区大小和网口设备的处理能力设置。In this embodiment, the downstream device needs to count the number of new packets and the number of consumed packets in the buffer within the window time, and calculate the cache increase rate based on the number of new packets and the number of consumed packets in the buffer within the window time. In an optional embodiment of the present application, the window time can be set according to the buffer size and the processing capacity of the network port device.
在一种可选的实施例中,可通过公式(1)计算窗口时间内缓冲区的缓存增加率。In an optional embodiment, the cache increase rate of the buffer within the window time can be calculated by formula (1).
(1) (1)
其中,A为缓存增加率;T为窗口时间;Rn为窗口时间内网口设备接收到的新数据包的数量;Ru为窗口时间内后端消耗掉的网口设备缓冲区数据包的数量。Where A is the cache increase rate; T is the window time;Rn is the number of new data packets received by the network port device within the window time;Ru is the number of data packets in the network port device buffer consumed by the backend within the window time.
同时,根据窗口时间内缓冲区的消耗数据包数量计算得到下游当前处理能力。在一种可选的实施例中,可通过公式(2)计算窗口时间内的下游当前处理能力。At the same time, the current downstream processing capacity is calculated according to the number of consumed data packets in the buffer within the window time. In an optional embodiment, the current downstream processing capacity within the window time can be calculated by formula (2).
(2) (2)
其中,V为下游当前处理能力;T为窗口时间;Ru为窗口时间内后端消耗掉的网口设备缓冲区数据包的数量。Where V is the current processing capacity of the downstream; T is the window time;Ru is the number of data packets consumed by the back-end in the network port device buffer within the window time.
根据占用率和缓存增加率判断是否需要控制下游设备向上游设备发送流量预警帧,具体而言,当占用率在预设时间内持续高于第一预设阈值,且缓存增加率为正值时,控制下游设备向上游设备发送流量预警帧。若需要控制下游设备向上游设备发送流量预警帧时,将下游当前处理能力设置为流量预警帧中的第一预设字节。在一种可选的实施例中,可以将流量预警帧中的Pad(填充字段)中的第2-3个字节设置为最近一次的下游当前处理能力。According to the occupancy rate and the cache increase rate, it is determined whether it is necessary to control the downstream device to send a traffic warning frame to the upstream device. Specifically, when the occupancy rate is continuously higher than the first preset threshold within the preset time and the cache increase rate is a positive value, the downstream device is controlled to send a traffic warning frame to the upstream device. If it is necessary to control the downstream device to send a traffic warning frame to the upstream device, the current downstream processing capacity is set to the first preset byte in the traffic warning frame. In an optional embodiment, the 2nd to 3rd bytes in the Pad (padding field) in the traffic warning frame can be set to the most recent current downstream processing capacity.
本申请实施例通过实时监控缓冲区的新增和消耗数据包数量,预测潜在的拥塞情况,并在问题发生之前发送流量预警帧进行流量控制,从而避免网络性能下降。The embodiment of the present application predicts potential congestion by monitoring the number of new and consumed data packets in the buffer in real time, and sends traffic warning frames to perform traffic control before the problem occurs, thereby avoiding network performance degradation.
在本申请的一种可选的实施例中,所述控制所述上游设备按照所述下游当前处理能力调整发送所述数据包的速率,包括:In an optional embodiment of the present application, controlling the upstream device to adjust the rate of sending the data packet according to the current processing capability of the downstream device includes:
若所述缓冲区的所述占用率高于所述第一预设阈值,则控制所述下游设备统计当前缓存增加率与所述下游当前处理能力;If the occupancy rate of the buffer is higher than the first preset threshold, controlling the downstream device to count the current cache increase rate and the current downstream processing capacity;
当所述当前缓存增加率为正值时,定时将所述下游当前处理能力发送至所述上游设备;When the current cache increase rate is a positive value, the downstream current processing capacity is sent to the upstream device at a regular interval;
控制所述上游设备按照所述下游当前处理能力调整所述发送所述数据包的速率。The upstream device is controlled to adjust the rate of sending the data packet according to the current processing capability of the downstream device.
在本实施例中,在缓冲区的占用率高于第一预设阈值的期间,下游设备需要按照窗口时间持续统计当前缓存增加率与下游当前处理能力。在当前缓存增加率为正值的情况下,下游设备将该窗口时间的下游当前处理能力定时发送至上游设备,使上游设备根据新接收到的下游当前处理能力继续调整发送数据包的速率。In this embodiment, during the period when the occupancy rate of the buffer is higher than the first preset threshold, the downstream device needs to continuously count the current cache increase rate and the downstream current processing capacity according to the window time. When the current cache increase rate is a positive value, the downstream device periodically sends the downstream current processing capacity of the window time to the upstream device, so that the upstream device continues to adjust the rate of sending data packets according to the newly received downstream current processing capacity.
本申请实施例通过实时发送下游当前处理能力至上游设备,更加灵活地调节上游设备发送速率,加快下游设备压力的缓解。The embodiment of the present application sends the current processing capacity of the downstream to the upstream device in real time, so as to more flexibly adjust the sending rate of the upstream device and accelerate the relief of the pressure on the downstream device.
在本申请的一种可选的实施例中,所述控制所述上游设备按照所述下游当前处理能力调整发送所述数据包的速率,包括:In an optional embodiment of the present application, controlling the upstream device to adjust the rate of sending the data packet according to the current processing capability of the downstream device includes:
控制所述上游设备将所述发送所述数据包的速率调整至所述下游当前处理能力对应的处理速率的第一预设百分比。The upstream device is controlled to adjust the rate of sending the data packet to a first preset percentage of the processing rate corresponding to the current processing capacity of the downstream.
在本实施例中,在上游设备根据下游当前处理能力调整发送数据包的速率时,可以将发送数据包的速率调整至下游当前处理能力所对应的处理速率的第一预设百分比。在一种示例中,可以将上游设备发送数据包的速率调整至下游当前处理能力所对应的处理速率的90%。该数值仅为示例,本申请实施例不对第一预设百分比的实际设置作任何限制,本领域技术人员可按实际需求设置。In this embodiment, when the upstream device adjusts the rate of sending data packets according to the current processing capacity of the downstream, the rate of sending data packets can be adjusted to a first preset percentage of the processing rate corresponding to the current processing capacity of the downstream. In one example, the rate of sending data packets by the upstream device can be adjusted to 90% of the processing rate corresponding to the current processing capacity of the downstream. This value is only an example, and the embodiment of the present application does not impose any restrictions on the actual setting of the first preset percentage, and those skilled in the art can set it according to actual needs.
本申请实施例按照下游当前处理能力调整上游设备的发送速率,实现了动态调整上游设备的发送速率,以适应下游设备的处理能力状态的变化,有助于维持网络性能的稳定。The embodiment of the present application adjusts the sending rate of the upstream device according to the current processing capacity of the downstream, realizes dynamic adjustment of the sending rate of the upstream device to adapt to changes in the processing capacity status of the downstream device, and helps to maintain the stability of network performance.
在本申请的一种可选的实施例中,所述检测到所述缓冲区的所述占用率低于所述第一预设阈值时,控制所述下游设备向所述上游设备发送限速解除帧,包括:In an optional embodiment of the present application, when detecting that the occupancy rate of the buffer is lower than the first preset threshold, controlling the downstream device to send a rate limit release frame to the upstream device includes:
检测到所述缓冲区的所述占用率低于所述第一预设阈值的第二预设百分比时,控制所述下游设备向所述上游设备发送限速解除帧。When it is detected that the occupancy rate of the buffer is lower than a second preset percentage of the first preset threshold, the downstream device is controlled to send a rate limit release frame to the upstream device.
在本实施例中,当缓冲区的占用率低于第一预设阈值的第二预设百分比时,下游设备会向上游设备发送限速解除帧,以解除对上游设备的限速,恢复上游设备的发送速率。在一种示例中,第一预设阈值为占用率预警值Py,第二预设百分比可设置为80%,即当缓冲区的占用率低于占用率预警值Py的80%后,下游设备向上游设备发送限速解除帧。该数值仅为示例,本申请实施例不对第二预设百分比的实际设置作任何限制,本领域技术人员可按实际需求设置。In this embodiment, when the occupancy rate of the buffer is lower than the second preset percentage of the first preset threshold, the downstream device will send a speed limit release frame to the upstream device to release the speed limit on the upstream device and restore the sending rate of the upstream device. In one example, the first preset threshold is the occupancy rate warning value Py , and the second preset percentage can be set to 80%, that is, when the occupancy rate of the buffer is lower than 80% of the occupancy rate warning value Py , the downstream device sends a speed limit release frame to the upstream device. This value is only an example, and the embodiment of the present application does not impose any restrictions on the actual setting of the second preset percentage, and those skilled in the art can set it according to actual needs.
本申请实施例根据占用率的情况判断是否需要解除限速,当占用率降低到一定程度时,自动解除限速,恢复上游设备的发送速率,从而实现对网络状态的快速响应。The embodiment of the present application determines whether the speed limit needs to be lifted according to the occupancy rate. When the occupancy rate drops to a certain level, the speed limit is automatically lifted and the sending rate of the upstream device is restored, thereby achieving a rapid response to the network status.
在本申请的一种可选的实施例中,所述检测到所述缓冲区的所述占用率低于所述第一预设阈值的第二预设百分比,还包括:In an optional embodiment of the present application, the detecting that the occupancy rate of the buffer is lower than a second preset percentage of the first preset threshold further includes:
若控制所述上游设备按照所述下游当前处理能力调整发送所述数据包的速率后,所述缓冲区的所述占用率高于第一预设阈值,且所述缓存增加率为负值,则检测到所述缓冲区的所述占用率逐渐降低至所述第一预设阈值的所述第二预设百分比。If after controlling the upstream device to adjust the rate of sending the data packets according to the current processing capacity of the downstream, the occupancy rate of the buffer is higher than the first preset threshold and the cache increase rate is a negative value, it is detected that the occupancy rate of the buffer gradually decreases to the second preset percentage of the first preset threshold.
在本实施例中,在上游设备接收到流量预警帧,按照下游当前处理能力调整发送数据包的速率后,虽然此时缓冲区的占用率仍高于第一预设阈值,但由于缓存增加率为负值,缓冲区的占用率会缓慢回落,当回落至第一预设阈值的第二预设百分比时,下游设备向上游设备发送限速解除帧,以解除对上游设备的限速,恢复上游设备的发送速率。In this embodiment, after the upstream device receives the traffic warning frame and adjusts the rate of sending data packets according to the current processing capacity of the downstream, although the buffer occupancy rate is still higher than the first preset threshold at this time, since the cache increase rate is a negative value, the buffer occupancy rate will slowly fall back. When it falls back to the second preset percentage of the first preset threshold, the downstream device sends a speed limit release frame to the upstream device to lift the speed limit on the upstream device and restore the sending rate of the upstream device.
本申请实施例根据缓存增加率、占用率的情况判断是否需要解除限速,当占用率降低到一定程度时,自动解除限速,恢复上游设备的发送速率,从而实现对网络状态的快速响应。The embodiment of the present application determines whether the speed limit needs to be lifted based on the cache increase rate and occupancy rate. When the occupancy rate drops to a certain level, the speed limit is automatically lifted and the sending rate of the upstream device is restored, thereby achieving a rapid response to the network status.
在本申请的一种可选的实施例中,在所述控制所述下游设备向所述上游设备发送流量预警帧之后,所述方法还包括:In an optional embodiment of the present application, after controlling the downstream device to send a traffic warning frame to the upstream device, the method further includes:
若所述上游设备未及时响应流量预警帧,或,所述上游设备不具备识别所述流量预警帧的能力,则在检测到所述缓冲区的所述占用率高于第二预设阈值后,控制所述下游设备向所述上游设备发送流量暂停帧,所述流量暂停帧用于暂停所述上游设备发送所述数据包;If the upstream device does not respond to the traffic warning frame in time, or the upstream device does not have the ability to identify the traffic warning frame, after detecting that the occupancy rate of the buffer is higher than the second preset threshold, control the downstream device to send a traffic pause frame to the upstream device, wherein the traffic pause frame is used to pause the upstream device from sending the data packet;
在所述上游设备接收到所述流量暂停帧时,控制所述上游设备暂停发送所述数据包。When the upstream device receives the traffic pause frame, the upstream device is controlled to pause sending the data packet.
在本实施例中,在缓冲区的占用率高于第一预设阈值且缓存增加率为正值时,下游设备会向上游设备发送流量预警帧。然而,上游设备对流量预警帧不一定能及时响应,或者,上游设备并不具备识别流量预警帧的能力,即流量预警帧与该上游设备不兼容。在上述情况下,上游设备的发送速率未能及时调整,可能会导致缓冲区占用率进一步上升,最后到达第二预设阈值,该第二预设阈值高于第一预设阈值。此时,下游设备向上游设备发送流量暂停帧,使上游设备停止发送数据包。上游设备接收到流量暂停帧后,停止数据包的发送。In this embodiment, when the occupancy rate of the buffer is higher than the first preset threshold and the cache increase rate is a positive value, the downstream device will send a traffic warning frame to the upstream device. However, the upstream device may not be able to respond to the traffic warning frame in a timely manner, or the upstream device does not have the ability to identify the traffic warning frame, that is, the traffic warning frame is incompatible with the upstream device. In the above case, the sending rate of the upstream device fails to be adjusted in time, which may cause the buffer occupancy rate to further increase and finally reach the second preset threshold, which is higher than the first preset threshold. At this time, the downstream device sends a traffic pause frame to the upstream device to stop the upstream device from sending data packets. After receiving the traffic pause frame, the upstream device stops sending data packets.
本申请实施例通过在上游设备未能及时响应流量预警帧或不兼容时,下游设备能够在缓冲区占用率达到更高的第二预设阈值时发送流量暂停帧,从而防止缓冲区占用率进一步上升,避免网络严重拥塞。In the embodiment of the present application, when the upstream device fails to respond to the traffic warning frame in time or is incompatible, the downstream device can send a traffic pause frame when the buffer occupancy reaches a higher second preset threshold, thereby preventing the buffer occupancy from further increasing and avoiding serious network congestion.
在本申请的一种可选的实施例中,所述方法还包括:In an optional embodiment of the present application, the method further includes:
检测到所述缓冲区的所述占用率低于所述第一预设阈值的第二预设百分比时,控制所述下游设备向所述上游设备发送暂停恢复帧,所述暂停恢复帧用于使所述上游设备恢复发送所述数据包。When it is detected that the occupancy rate of the buffer is lower than a second preset percentage of the first preset threshold, the downstream device is controlled to send a pause resume frame to the upstream device, wherein the pause resume frame is used to enable the upstream device to resume sending the data packet.
本实施例在上游设备停止发送数据包后,缓冲区的占用率会逐渐回落。当回落至第一预设阈值的第二预设百分比时,下游设备向上游设备发送暂停恢复帧,以解除对上游设备的发送的暂停,使上游设备恢复发送数据包。在一种示例中,第一预设阈值为占用率预警值Py,第二预设阈值位占用率暂停值Ps,Py小于Ps;第二预设百分比可设置为80%,即当缓冲区的占用率低于占用率预警值Py的80%后,下游设备向上游设备发送暂停恢复帧。该数值仅为示例,本申请实施例不对第二预设百分比的实际设置作任何限制,本领域技术人员可按实际需求设置。In this embodiment, after the upstream device stops sending data packets, the occupancy rate of the buffer will gradually fall back. When it falls back to the second preset percentage of the first preset threshold, the downstream device sends a pause resume frame to the upstream device to release the pause of the upstream device's transmission, so that the upstream device resumes sending data packets. In one example, the first preset threshold is the occupancy warning value Py , the second preset threshold is the occupancy pause value Ps , and Py is less than Ps ; the second preset percentage can be set to 80%, that is, when the occupancy rate of the buffer is lower than 80% of the occupancy warning value Py , the downstream device sends a pause resume frame to the upstream device. This value is only an example, and the embodiment of the present application does not impose any restrictions on the actual setting of the second preset percentage, and those skilled in the art can set it according to actual needs.
本申请实施例根据占用率的情况判断是否需要恢复上游设备的发送,当占用率降低到一定程度时,自动解除暂停,恢复上游设备的发送速率,从而实现对网络状态的快速响应。The embodiment of the present application determines whether it is necessary to resume the transmission of the upstream device according to the occupancy rate. When the occupancy rate drops to a certain level, the pause is automatically released and the transmission rate of the upstream device is resumed, thereby achieving a rapid response to the network status.
在本申请的一种可选的实施例中,所述控制所述下游设备向所述上游设备发送限速解除帧,还包括:In an optional embodiment of the present application, the controlling the downstream device to send a rate limit release frame to the upstream device further includes:
在所述上游设备未正常接收所述限速解除帧,且所述缓冲区的所述占用率低于所述第一预设阈值的情况下,控制所述下游设备定时向所述上游设备发送所述限速解除帧。When the upstream device fails to normally receive the speed limit release frame and the occupancy rate of the buffer is lower than the first preset threshold, the downstream device is controlled to periodically send the speed limit release frame to the upstream device.
在本实施例中,若上游设备处于限速状态时,如果限速解除帧接收异常,错过了限速解除的触发,会导致上游设备不知道缓冲区的占用率已经恢复,并继续限制发送速率。因此,在上游设备未正常接收限速解除帧,且缓冲区的占用率低于第一预设阈值的情况下,下游设备需要定时向上游设备发送限速解除帧。In this embodiment, if the upstream device is in a speed limit state, if the speed limit release frame is received abnormally and the trigger of speed limit release is missed, the upstream device will not know that the buffer occupancy has been restored and continue to limit the sending rate. Therefore, when the upstream device does not receive the speed limit release frame normally and the buffer occupancy is lower than the first preset threshold, the downstream device needs to send the speed limit release frame to the upstream device regularly.
本申请实施例通过定时发送限速解除帧,即使在最开始的限速解除帧未能被上游设备正常接收的情况下,也能确保上游设备最终能够接收到解除限速的指令,从而提高流量控制的可靠性。The embodiment of the present application sends the speed limit release frame at a regular interval, so that even if the initial speed limit release frame cannot be normally received by the upstream device, it can ensure that the upstream device can eventually receive the speed limit release instruction, thereby improving the reliability of flow control.
在本申请的一种可选的实施例中,所述控制所述下游设备向所述上游设备发送暂停恢复帧,还包括:In an optional embodiment of the present application, the controlling the downstream device to send a pause resume frame to the upstream device further includes:
在所述上游设备未正常接收所述暂停恢复帧,且所述缓冲区的所述占用率低于所述第一预设阈值的情况下,控制所述下游设备定时向所述上游设备发送所述暂停恢复帧。When the upstream device fails to normally receive the pause resume frame and the occupancy rate of the buffer is lower than the first preset threshold, the downstream device is controlled to periodically send the pause resume frame to the upstream device.
在本实施例中,若上游设备处于暂停状态时,如果暂停恢复帧接收异常,错过了暂停恢复的触发,会导致上游设备不知道缓冲区的占用率已经恢复,并继续暂停发送数据包。因此,在上游设备未正常接收暂停恢复帧,且缓冲区的占用率低于第一预设阈值的情况下,下游设备需要定时向上游设备发送暂停恢复帧。In this embodiment, if the upstream device is in a pause state, if the pause resume frame is received abnormally and the pause resume trigger is missed, the upstream device will not know that the occupancy rate of the buffer has been restored and continue to suspend sending data packets. Therefore, when the upstream device does not normally receive the pause resume frame and the occupancy rate of the buffer is lower than the first preset threshold, the downstream device needs to periodically send the pause resume frame to the upstream device.
本申请实施例通过定时发送暂停恢复帧,即使在最开始的暂停恢复帧未能被上游设备正常接收的情况下,也能确保上游设备最终能够接收到暂停恢复的指令,从而提高流量控制的可靠性。The embodiment of the present application periodically sends pause resume frames, thereby ensuring that the upstream device can eventually receive the pause resume instruction even if the initial pause resume frame cannot be normally received by the upstream device, thereby improving the reliability of flow control.
在本申请的一种可选的实施例中,所述网口设备具有多个虚拟通道,每个所述虚拟通道具有对应的优先级,所述上游设备与所述下游设备之间通过所述虚拟通道传输数据包,所述方法还包括:In an optional embodiment of the present application, the network port device has multiple virtual channels, each of the virtual channels has a corresponding priority, and the upstream device and the downstream device transmit data packets through the virtual channels. The method also includes:
控制所述下游设备统计所述多个虚拟通道的所述缓冲区的占用率和缓存增加率;Controlling the downstream device to count the occupancy rate and cache increase rate of the buffers of the multiple virtual channels;
当目标虚拟通道的所述占用率在预设时间内持续高于第一预设阈值,且所述缓存增加率为正值时,控制所述下游设备向所述上游设备发送流量预警帧,所述流量预警帧中至少包括下游当前处理能力与所述目标虚拟通道的通道标识;When the occupancy rate of the target virtual channel is continuously higher than a first preset threshold value within a preset time, and the cache increase rate is a positive value, controlling the downstream device to send a traffic warning frame to the upstream device, wherein the traffic warning frame includes at least the current downstream processing capacity and the channel identifier of the target virtual channel;
在所述上游设备接收到所述流量预警帧时,根据所述通道标识控制所述上游设备按照所述下游当前处理能力调整向所述目标虚拟通道发送所述数据包的速率;When the upstream device receives the traffic warning frame, controlling the upstream device to adjust the rate of sending the data packet to the target virtual channel according to the current processing capacity of the downstream according to the channel identifier;
检测到所述目标虚拟通道的所述缓冲区的所述占用率低于所述第一预设阈值时,控制所述下游设备向所述上游设备发送限速解除帧,所述限速解除帧中至少包括所述目标虚拟通道的所述通道标识。When it is detected that the occupancy rate of the buffer of the target virtual channel is lower than the first preset threshold, the downstream device is controlled to send a rate limit release frame to the upstream device, wherein the rate limit release frame includes at least the channel identifier of the target virtual channel.
在本实施例中,一种网络流量控制方法还可用于PFC的所有优先级的虚拟通道。即在本实施例中,网口设备具有多个虚拟通道,每个虚拟通道具有对应的优先级,上游设备与下游设备之间通过不同的优先级虚拟通道传输对应优先级的数据包。In this embodiment, a network traffic control method can also be used for virtual channels of all priorities of PFC. That is, in this embodiment, the network port device has multiple virtual channels, each virtual channel has a corresponding priority, and the upstream device and the downstream device transmit data packets of corresponding priorities through virtual channels of different priorities.
本实施例中,由下游设备统计多个不同优先级的虚拟通道的对应的缓冲区的占用率和缓存增加率。当存在目标虚拟通道的占用率在预设时间内持续高于第一预设阈值,且缓存增加率为正值时,下游设备向上游设备发送流量预警帧,该流量预警帧中至少包括下游当前处理能力与目标虚拟通道的通道标识,该通道标识可以为目标虚拟通道的优先级。在上游设备接收到流量预警帧时,根据通道标识、按照下游当前处理能力调整上游设备向对应的目标虚拟通道发送数据包的速率,以释放该目标虚拟通道对应的缓冲区。当检测到目标虚拟通道的缓冲区的占用率回落至低于第一预设阈值时,下游设备向上游设备发送限速解除帧,限速解除帧中至少包括目标虚拟通道的通道标识,以使上游设备恢复向该目标虚拟通道发送数据包的速率。In this embodiment, the downstream device counts the occupancy rates and cache increase rates of the corresponding buffers of multiple virtual channels of different priorities. When the occupancy rate of the target virtual channel is continuously higher than the first preset threshold value within the preset time, and the cache increase rate is a positive value, the downstream device sends a traffic warning frame to the upstream device, and the traffic warning frame at least includes the current downstream processing capacity and the channel identifier of the target virtual channel, and the channel identifier can be the priority of the target virtual channel. When the upstream device receives the traffic warning frame, it adjusts the rate at which the upstream device sends data packets to the corresponding target virtual channel according to the channel identifier and the current downstream processing capacity to release the buffer corresponding to the target virtual channel. When it is detected that the occupancy rate of the buffer of the target virtual channel falls back to below the first preset threshold, the downstream device sends a speed limit release frame to the upstream device, and the speed limit release frame at least includes the channel identifier of the target virtual channel, so that the upstream device can restore the rate at which data packets are sent to the target virtual channel.
在一种可选的实施例中,流量预警帧以及流量暂停帧可以通过其中的Priorityenable vector(反压使能向量)字节区分不同优先级的虚拟通道。In an optional embodiment, the traffic warning frame and the traffic pause frame may distinguish virtual channels of different priorities through a Priority enable vector (back pressure enable vector) byte therein.
本申请实施例通过对不同优先级的虚拟通道分别进行流量控制管理,使得网络流量的管理更加灵活。The embodiment of the present application makes the management of network traffic more flexible by performing flow control management on virtual channels of different priorities respectively.
在一种可选的实施例中,所述流量预警帧的第二预设字节为区别标识,所述区别标识用于区别所述流量预警帧与所述流量暂停帧,以及标识所述流量预警帧的流量限速能力。In an optional embodiment, the second preset byte of the traffic warning frame is a distinguishing mark, and the distinguishing mark is used to distinguish the traffic warning frame from the traffic pause frame, and to identify the traffic rate limiting capability of the traffic warning frame.
在本实施例中,流量预警帧的第二预设字节为区别标识,区别标识用于区别流量预警帧与流量暂停帧,以及标识流量预警帧的流量限速能力。In this embodiment, the second preset byte of the traffic warning frame is a distinguishing mark, which is used to distinguish the traffic warning frame from the traffic pause frame and to identify the traffic rate limiting capability of the traffic warning frame.
在一种实施例中,流量暂停帧的格式可如表1所示。In one embodiment, the format of the traffic pause frame may be as shown in Table 1.
其中,Destination address(目的地址)为目的MAC地址(媒体访问控制)地址),取值固定为01-80-c2-00-00-01,占用6个octets(八位字节);Source address(源地址)为源MAC地址,占用6个octets;Ethertype(以太网帧类型)为以太网帧类型,取值为88-08,占用2个octets;Control opcode(控制码)为控制码,取值为01-01,占用2个octets;Priorityenable vector(反压使能向量)反压使能向量,占用2个octets,其中E(n)和优先级队列n(n为优先级)对应,表示优先级队列n是否需要反压,当E(n)=1时,表示优先级队列n需要反压,反压时间为Time(n),当E(n)=0时,则表示该优先级队列不需要反压;Time(0)~Time(7)(优先级为0~7的队列的反压时间)为反压定时器,占用16个octets,当Time(n)=0时表示取消优先级队列n的反压;Pad(填充字段)为预留字节,占用26个octets,当传输时Pad默认为0;CRC(循环冗余校验)为循环冗余校验,占用4个octets。Among them, Destination address is the destination MAC address (Media Access Control) address), the value is fixed to 01-80-c2-00-00-01, occupying 6 octets; Source address is the source MAC address, occupying 6 octets; Ethertype is the Ethernet frame type, the value is 88-08, occupying 2 octets; Control opcode is the control code, the value is 01-01, occupying 2 octets; Priority enable vector (back pressure enable vector) is the back pressure enable vector, which occupies 2 octets. E(n) corresponds to priority queue n (n is the priority), indicating whether priority queue n needs back pressure. When E(n)=1, it means that priority queue n needs back pressure, and the back pressure time is Time(n). When E(n)=0, it means that the priority queue does not need back pressure. Time(0)~Time(7) (the back pressure time of queues with priorities 0~7) is the back pressure timer, which occupies 16 octets. When Time(n)=0, it means that the back pressure of priority queue n is canceled. Pad (padding field) is a reserved byte, which occupies 26 octets. When transmitting, Pad defaults to 0. CRC (cyclic redundancy check) is a cyclic redundancy check, which occupies 4 octets.
表1 流量暂停帧格式Table 1 Traffic pause frame format
在本实施例中,流量预警帧的格式可如表2所示。In this embodiment, the format of the traffic warning frame may be as shown in Table 2.
其中,Destination address(目的地址)为目的MAC地址(媒体访问控制)地址),取值固定为01-80-c2-00-00-01,占用6个octets(八位字节);Source address(源地址)为源MAC地址,占用6个octets;Ethertype(以太网帧类型)为以太网帧类型,取值为88-08,占用2个octets;Control opcode(控制码)为控制码,取值为01-01,占用2个octets;Priorityenable vector(反压使能向量)反压使能向量,占用2个octets,其中E(n)和优先级队列n(n为优先级)对应,表示优先级队列n是否需要反压,当E(n)=1时,表示优先级队列n需要反压,反压时间为Time(n),当E(n)=0时,则表示该优先级队列不需要反压;Time(0)~Time(7)(优先级为0~7的队列的反压时间)为反压定时器,占用16个octets,当Time(n)=0时表示取消优先级队列n的反压;Pad(填充字段)设置为区别标识,区别标识用于区别流量预警帧与流量暂停帧,以及标识流量预警帧的流量限速能力,占用26个octets,其中Pad[n*3]=1标明优先级队列n需要限流,Pad[n*3+1]=V为下游当前处理能力V;CRC(循环冗余校验)为循环冗余校验,占用4个octets。Among them, Destination address is the destination MAC address (Media Access Control) address), the value is fixed to 01-80-c2-00-00-01, occupying 6 octets; Source address is the source MAC address, occupying 6 octets; Ethertype is the Ethernet frame type, the value is 88-08, occupying 2 octets; Control opcode is the control code, the value is 01-01, occupying 2 octets; Priority enable vector (back pressure enable vector) is the back pressure enable vector, which occupies 2 octets. E(n) corresponds to priority queue n (n is the priority), indicating whether priority queue n needs back pressure. When E(n)=1, it means that priority queue n needs back pressure, and the back pressure time is Time(n). When E(n)=0, it means that the priority queue does not need back pressure. Time(0)~Time(7) (back pressure time of queues with priorities 0~7) is the back pressure timer, which occupies 16 octets. When Time(n)=0, it means that the back pressure of priority queue n is canceled. Pad (padding field) is set to a distinguishing mark, which is used to distinguish traffic warning frames from traffic pause frames, and to identify the traffic rate limit capability of traffic warning frames, which occupies 26 octets. Pad[n*3]=1 indicates that priority queue n needs to be limited, and Pad[n*3+1]=V is the current downstream processing capacity V. CRC (cyclic redundancy check) is a cyclic redundancy check, which occupies 4 octets.
表2 流量预警帧格式Table 2 Traffic warning frame format
比较表1与表2可知,流量预警帧与流量暂停帧的区别主要在于Pad字段,流量预警帧具有区别标识,该区别标识表征流量预警帧的限速上游设备的能力,而非暂停上游设备发送的能力。Comparing Table 1 with Table 2, it can be seen that the difference between the traffic warning frame and the traffic pause frame lies mainly in the Pad field. The traffic warning frame has a distinguishing mark, which represents the ability of the upstream device to limit the speed of the traffic warning frame, rather than the ability to pause the upstream device to send.
本申请实施例通过区分流量预警帧与流量暂停帧,在流量控制过程中增加流量预警处理从而以一种更为温和的方式保障网络传输的连续性,避免因突然停止传输而引发的网络暂停。The embodiment of the present application distinguishes between traffic warning frames and traffic pause frames, and adds traffic warning processing during the traffic control process, thereby ensuring the continuity of network transmission in a more gentle manner and avoiding network pauses caused by sudden cessation of transmission.
在本申请的一种可选的实施例中,还可使用INT(Inband Network Telemetry,带内网络遥测技术)替代流量预警帧,实现本申请实施例的一种网络流量控制方法。INT利用网络遥感技术在业务报文头部封装和解析预警信息,网络拥塞预警将不使用流量预警帧,减少对网络资源的占用。在一种可行的实施例中,还可以使用INT技术实现第一预设阈值和第二预设阈值的动态调整与更新。具体而言,可以使用INT根据网络的实时状态和历史数据动态调整第一预设阈值和第二预设阈值,以适应网络流量的变化,或者,使用机器学习算法来预测网络拥塞出现的时间与位置,并据此使用INT调整第一预设阈值和第二预设阈值。In an optional embodiment of the present application, INT (Inband Network Telemetry) can also be used to replace the traffic warning frame to implement a network traffic control method of an embodiment of the present application. INT uses network remote sensing technology to encapsulate and parse warning information in the service message header. The network congestion warning will not use the traffic warning frame, thereby reducing the occupation of network resources. In a feasible embodiment, INT technology can also be used to realize the dynamic adjustment and update of the first preset threshold and the second preset threshold. Specifically, INT can be used to dynamically adjust the first preset threshold and the second preset threshold according to the real-time status and historical data of the network to adapt to changes in network traffic, or a machine learning algorithm can be used to predict the time and location of network congestion, and INT can be used to adjust the first preset threshold and the second preset threshold accordingly.
本申请实施例通过使用INT技术,实现实时监控、动态阈值调整和预测性维护,为网络流量控制提供了一种高效、灵活和自动化的解决方案,有助于提升网络性能、稳定性和用户体验。The embodiments of the present application use INT technology to achieve real-time monitoring, dynamic threshold adjustment and predictive maintenance, providing an efficient, flexible and automated solution for network traffic control, which helps to improve network performance, stability and user experience.
在本申请实施例中,控制下游设备统计缓冲区的占用率和缓存增加率,缓冲区中保存有上游设备发送的数据包;当占用率在预设时间内持续高于第一预设阈值,且缓存增加率为正值时,控制下游设备向上游设备发送流量预警帧,流量预警帧中至少包括下游当前处理能力;在上游设备接收到流量预警帧时,控制上游设备按照下游当前处理能力调整发送数据包的速率;检测到缓冲区的占用率低于第一预设阈值时,控制下游设备向上游设备发送限速解除帧,限速解除帧用于使上游设备恢复发送数据包的速率。本申请实施例通过引入流量预警帧,有效应对下游设备处理能力受限的情况。一旦检测到缓冲区占用率过高,将提前发出流量预警帧,确保在实施流量控制时能够平稳降速,同时维持网络的连续性,避免突然的网络中断。此外,本申请实施例还能在拥塞发生之前,及时降低上游设备的发送速度,防止过度拥塞导致断流,从而以一种更为温和的方式保障网络传输的连续性,避免因突然停止传输而引发的网络暂停。In an embodiment of the present application, the downstream device is controlled to count the occupancy rate and cache increase rate of the buffer, and the buffer stores the data packets sent by the upstream device; when the occupancy rate is continuously higher than the first preset threshold value within the preset time, and the cache increase rate is a positive value, the downstream device is controlled to send a traffic warning frame to the upstream device, and the traffic warning frame includes at least the current downstream processing capacity; when the upstream device receives the traffic warning frame, the upstream device is controlled to adjust the rate of sending data packets according to the current downstream processing capacity; when the occupancy rate of the buffer is detected to be lower than the first preset threshold value, the downstream device is controlled to send a speed limit release frame to the upstream device, and the speed limit release frame is used to restore the rate of sending data packets by the upstream device. The embodiment of the present application effectively responds to the situation where the processing capacity of the downstream device is limited by introducing a traffic warning frame. Once it is detected that the buffer occupancy rate is too high, a traffic warning frame will be issued in advance to ensure that the speed can be smoothly reduced when the flow control is implemented, while maintaining the continuity of the network and avoiding sudden network interruption. In addition, the embodiment of the present application can also reduce the sending speed of the upstream device in time before congestion occurs, prevent excessive congestion from causing interruption, thereby ensuring the continuity of network transmission in a more gentle way and avoiding network suspension caused by sudden cessation of transmission.
下文将结合图2的本申请的又一种网络流量控制方法实施例的状态切换示意图,对本申请实施例的一种网络流量控制方法的具体过程进行描述,以便本领域技术人员更好地理解本申请的一种网络流量控制方法的技术方案。The following will describe the specific process of a network flow control method of an embodiment of the present application in combination with the state switching schematic diagram of another network flow control method embodiment of the present application in Figure 2, so that those skilled in the art can better understand the technical solution of a network flow control method of the present application.
参照图2,示出了本申请的又一种网络流量控制方法实施例的状态切换示意图。2 , there is shown a schematic diagram of state switching of yet another network traffic control method embodiment of the present application.
接收端(即下游设备)与发送端(即上游设备)之间通过网口设备(具有缓冲区)进行数据传输。在缓冲区占用率大于第一预设阈值时,接收端由全速状态切换至预警状态,并向发送端发送流量预警帧,使发送端从全速状态切换至降速状态,对发送端的发送进行限速。此时,如果缓冲区的接收实现平衡后,空间被逐渐释放,在缓冲区占用率小于80%后,接收端可从预警状态切换至全速状态,并发送限速解除帧至发送端,使发送端切换至全速状态。Data is transmitted between the receiving end (i.e., the downstream device) and the sending end (i.e., the upstream device) through the network port device (with a buffer). When the buffer occupancy rate is greater than the first preset threshold, the receiving end switches from the full-speed state to the warning state, and sends a traffic warning frame to the sending end, so that the sending end switches from the full-speed state to the reduced speed state, and limits the speed of the sending end. At this time, if the buffer reception is balanced, the space is gradually released. After the buffer occupancy rate is less than 80%, the receiving end can switch from the warning state to the full-speed state, and send a speed limit release frame to the sending end, so that the sending end switches to the full-speed state.
如果在预警状态的接收端处理能力仍持续降低,使得缓冲区占用率持续升高至大于第二预设阈值,接收端由预警状态切换至暂停状态,并向发送端发送流量暂停帧,使发送端从降速状态切换至拥塞暂停状态,暂停发送端的发送。此时,如果缓冲区的接收实现平衡后,空间被逐渐释放,在缓冲区占用率小于80%后,接收端可从暂停状态切换至全速状态,并发送暂停恢复帧至发送端,使发送端切换至全速状态。If the processing capacity of the receiving end in the warning state continues to decrease, causing the buffer occupancy rate to continue to increase to a value greater than the second preset threshold, the receiving end switches from the warning state to the pause state, and sends a traffic pause frame to the sending end, causing the sending end to switch from the speed reduction state to the congestion pause state, and suspend the sending of the sending end. At this time, if the buffer reception is balanced and the space is gradually released, after the buffer occupancy rate is less than 80%, the receiving end can switch from the pause state to the full speed state, and send a pause recovery frame to the sending end, causing the sending end to switch to the full speed state.
在本申请实施例中,控制下游设备统计缓冲区的占用率和缓存增加率,缓冲区中保存有上游设备发送的数据包;当占用率在预设时间内持续高于第一预设阈值,且缓存增加率为正值时,控制下游设备向上游设备发送流量预警帧,流量预警帧中至少包括下游当前处理能力;在上游设备接收到流量预警帧时,控制上游设备按照下游当前处理能力调整发送数据包的速率;检测到缓冲区的占用率低于第一预设阈值时,控制下游设备向上游设备发送限速解除帧,限速解除帧用于使上游设备恢复发送数据包的速率。本申请实施例通过引入流量预警帧,有效应对下游设备处理能力受限的情况。一旦检测到缓冲区占用率过高,将提前发出流量预警帧,确保在实施流量控制时能够平稳降速,同时维持网络的连续性,避免突然的网络中断。此外,本申请实施例还能在拥塞发生之前,及时降低上游设备的发送速度,防止过度拥塞导致断流,从而以一种更为温和的方式保障网络传输的连续性,避免因突然停止传输而引发的网络暂停。In an embodiment of the present application, the downstream device is controlled to count the occupancy rate and cache increase rate of the buffer, and the buffer stores the data packets sent by the upstream device; when the occupancy rate is continuously higher than the first preset threshold value within the preset time, and the cache increase rate is a positive value, the downstream device is controlled to send a traffic warning frame to the upstream device, and the traffic warning frame includes at least the current downstream processing capacity; when the upstream device receives the traffic warning frame, the upstream device is controlled to adjust the rate of sending data packets according to the current downstream processing capacity; when the occupancy rate of the buffer is detected to be lower than the first preset threshold value, the downstream device is controlled to send a speed limit release frame to the upstream device, and the speed limit release frame is used to restore the rate of sending data packets by the upstream device. The embodiment of the present application effectively responds to the situation where the processing capacity of the downstream device is limited by introducing a traffic warning frame. Once it is detected that the buffer occupancy rate is too high, a traffic warning frame will be issued in advance to ensure that the speed can be smoothly reduced when the flow control is implemented, while maintaining the continuity of the network and avoiding sudden network interruption. In addition, the embodiment of the present application can also reduce the sending speed of the upstream device in time before congestion occurs, prevent excessive congestion from causing interruption, thereby ensuring the continuity of network transmission in a more gentle way and avoiding network suspension caused by sudden cessation of transmission.
需要说明的是,对于方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请实施例并不受所描述的动作顺序的限制,因为依据本申请实施例,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作并不一定是本申请实施例所必须的。It should be noted that, for the method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the described action sequence, because according to the embodiments of the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.
在上述实施例的基础上,本实施例还提供了一种网络流量控制装置,应用于终端设备、服务器等电子设备中。On the basis of the above embodiments, this embodiment further provides a network traffic control device, which is applied to electronic devices such as terminal devices and servers.
参照图3,示出了本申请的一种网络流量控制装置实施例的结构框图,具体可以包括如下模块:3, a structural block diagram of an embodiment of a network traffic control device of the present application is shown, which may specifically include the following modules:
数据统计模块301,用于控制所述下游设备统计所述缓冲区的占用率和缓存增加率,所述缓冲区中保存有所述上游设备发送的所述数据包;A data statistics module 301, used to control the downstream device to count the occupancy rate and cache increase rate of the buffer, in which the data packets sent by the upstream device are stored;
流量预警模块302,用于当所述占用率在预设时间内持续高于第一预设阈值,且所述缓存增加率为正值时,控制所述下游设备向所述上游设备发送流量预警帧,所述流量预警帧中至少包括下游当前处理能力;The traffic warning module 302 is used to control the downstream device to send a traffic warning frame to the upstream device when the occupancy rate is continuously higher than the first preset threshold within a preset time and the cache increase rate is a positive value, wherein the traffic warning frame includes at least the current processing capacity of the downstream;
流量限速模块303,用于在所述上游设备接收到所述流量预警帧时,控制所述上游设备按照所述下游当前处理能力调整发送所述数据包的速率;The traffic rate limiting module 303 is used to control the upstream device to adjust the rate of sending the data packet according to the current processing capacity of the downstream when the upstream device receives the traffic warning frame;
限速解除模块304,用于检测到所述缓冲区的所述占用率低于所述第一预设阈值时,控制所述下游设备向所述上游设备发送限速解除帧,所述限速解除帧用于使所述上游设备恢复所述发送所述数据包的速率。The speed limit release module 304 is used to control the downstream device to send a speed limit release frame to the upstream device when it is detected that the occupancy rate of the buffer is lower than the first preset threshold, and the speed limit release frame is used to enable the upstream device to restore the rate of sending the data packet.
在本申请的一种可选的实施例中,所述数据统计模块301,还用于:In an optional embodiment of the present application, the data statistics module 301 is further used to:
控制所述下游设备统计窗口时间内所述缓冲区的新增数据包数量以及消耗数据包数量;Control the number of newly added data packets and the number of consumed data packets in the buffer within the statistical window time of the downstream device;
根据所述窗口时间内所述缓冲区的所述新增数据包数量以及所述消耗数据包数量计算得到所述缓存增加率,并根据所述窗口时间内所述缓冲区的所述消耗数据包数量计算得到所述下游当前处理能力;The cache increase rate is calculated based on the number of newly added data packets and the number of consumed data packets in the buffer within the window time, and the downstream current processing capacity is calculated based on the number of consumed data packets in the buffer within the window time;
根据所述占用率和所述缓存增加率判断是否需要控制所述下游设备向所述上游设备发送所述流量预警帧;Determining whether it is necessary to control the downstream device to send the traffic warning frame to the upstream device according to the occupancy rate and the cache increase rate;
若需要控制所述下游设备向所述上游设备发送所述流量预警帧,则将所述下游当前处理能力设置为所述流量预警帧中的第一预设字节。If it is necessary to control the downstream device to send the traffic warning frame to the upstream device, the downstream current processing capacity is set to the first preset byte in the traffic warning frame.
在本申请的一种可选的实施例中,所述流量限速模块303,还用于:In an optional embodiment of the present application, the flow rate limiting module 303 is further used to:
若所述缓冲区的所述占用率高于所述第一预设阈值,则控制所述下游设备统计当前缓存增加率与所述下游当前处理能力;If the occupancy rate of the buffer is higher than the first preset threshold, controlling the downstream device to count the current cache increase rate and the current downstream processing capacity;
当所述当前缓存增加率为正值时,定时将所述下游当前处理能力发送至所述上游设备;When the current cache increase rate is a positive value, the downstream current processing capacity is sent to the upstream device at a regular interval;
控制所述上游设备按照所述下游当前处理能力调整所述发送所述数据包的速率。The upstream device is controlled to adjust the rate of sending the data packet according to the current processing capability of the downstream device.
在本申请的一种可选的实施例中,所述流量限速模块303,还用于:In an optional embodiment of the present application, the flow rate limiting module 303 is further used to:
控制所述上游设备将所述发送所述数据包的速率调整至所述下游当前处理能力对应的处理速率的第一预设百分比。The upstream device is controlled to adjust the rate of sending the data packet to a first preset percentage of the processing rate corresponding to the current processing capacity of the downstream.
在本申请的一种可选的实施例中,所述限速解除模块304,还用于:In an optional embodiment of the present application, the speed limit release module 304 is further configured to:
检测到所述缓冲区的所述占用率低于所述第一预设阈值的第二预设百分比时,控制所述下游设备向所述上游设备发送限速解除帧。When it is detected that the occupancy rate of the buffer is lower than a second preset percentage of the first preset threshold, the downstream device is controlled to send a rate limit release frame to the upstream device.
在本申请的一种可选的实施例中,所述检测到所述缓冲区的所述占用率低于所述第一预设阈值的第二预设百分比,还包括:In an optional embodiment of the present application, the detecting that the occupancy rate of the buffer is lower than a second preset percentage of the first preset threshold further includes:
若控制所述上游设备按照所述下游当前处理能力调整发送所述数据包的速率后,所述缓冲区的所述占用率高于第一预设阈值,且所述缓存增加率为负值,则检测到所述缓冲区的所述占用率逐渐降低至所述第一预设阈值的所述第二预设百分比。If after controlling the upstream device to adjust the rate of sending the data packets according to the current processing capacity of the downstream, the occupancy rate of the buffer is higher than the first preset threshold and the cache increase rate is a negative value, it is detected that the occupancy rate of the buffer gradually decreases to the second preset percentage of the first preset threshold.
在本申请的一种可选的实施例中,所述装置还包括:In an optional embodiment of the present application, the device further includes:
流量暂停模块,用于若所述上游设备未及时响应流量预警帧,或,所述上游设备不具备识别所述流量预警帧的能力,则在检测到所述缓冲区的所述占用率高于第二预设阈值后,控制所述下游设备向所述上游设备发送流量暂停帧,所述流量暂停帧用于暂停所述上游设备发送所述数据包;A traffic pause module, configured to control the downstream device to send a traffic pause frame to the upstream device after detecting that the occupancy rate of the buffer is higher than a second preset threshold value if the upstream device fails to respond to the traffic warning frame in time, or the upstream device does not have the ability to identify the traffic warning frame, wherein the traffic pause frame is used to pause the upstream device from sending the data packet;
暂停发送模块,用于在所述上游设备接收到所述流量暂停帧时,控制所述上游设备暂停发送所述数据包。The sending pause module is used to control the upstream device to pause sending the data packet when the upstream device receives the traffic pause frame.
在本申请的一种可选的实施例中,所述装置还包括:In an optional embodiment of the present application, the device further includes:
暂停恢复模块,用于检测到所述缓冲区的所述占用率低于所述第一预设阈值的第二预设百分比时,控制所述下游设备向所述上游设备发送暂停恢复帧,所述暂停恢复帧用于使所述上游设备恢复发送所述数据包。The pause-resume module is used to control the downstream device to send a pause-resume frame to the upstream device when detecting that the occupancy rate of the buffer is lower than a second preset percentage of the first preset threshold, wherein the pause-resume frame is used to enable the upstream device to resume sending the data packet.
在本申请的一种可选的实施例中,所述限速解除模块304,还包括:In an optional embodiment of the present application, the speed limit release module 304 further includes:
第一定时子模块,用于在所述上游设备未正常接收所述限速解除帧,且所述缓冲区的所述占用率低于所述第一预设阈值的情况下,控制所述下游设备定时向所述上游设备发送所述限速解除帧。The first timing submodule is used to control the downstream device to periodically send the speed limit release frame to the upstream device when the upstream device fails to normally receive the speed limit release frame and the occupancy rate of the buffer is lower than the first preset threshold.
在本申请的一种可选的实施例中,所述暂停恢复模块,还包括:In an optional embodiment of the present application, the pause and resume module further includes:
第二定时子模块,用于在所述上游设备未正常接收所述暂停恢复帧,且所述缓冲区的所述占用率低于所述第一预设阈值的情况下,控制所述下游设备定时向所述上游设备发送所述暂停恢复帧。The second timing submodule is used to control the downstream device to periodically send the pause resume frame to the upstream device when the upstream device fails to normally receive the pause resume frame and the occupancy rate of the buffer is lower than the first preset threshold.
在本申请的一种可选的实施例中,所述网口设备具有多个虚拟通道,每个所述虚拟通道具有对应的优先级,所述上游设备与所述下游设备之间通过所述虚拟通道传输数据包,所述装置还包括:In an optional embodiment of the present application, the network port device has multiple virtual channels, each of the virtual channels has a corresponding priority, and the upstream device and the downstream device transmit data packets through the virtual channels, and the device further includes:
通道数据统计模块,用于控制所述下游设备统计所述多个虚拟通道的所述缓冲区的占用率和缓存增加率;A channel data statistics module, used for controlling the downstream device to count the occupancy rate and cache increase rate of the buffer of the multiple virtual channels;
通道预警模块,用于当目标虚拟通道的所述占用率在预设时间内持续高于第一预设阈值,且所述缓存增加率为正值时,控制所述下游设备向所述上游设备发送流量预警帧,所述流量预警帧中至少包括下游当前处理能力与所述目标虚拟通道的通道标识;A channel warning module, configured to control the downstream device to send a traffic warning frame to the upstream device when the occupancy rate of the target virtual channel is continuously higher than a first preset threshold value within a preset time and the cache increase rate is a positive value, wherein the traffic warning frame includes at least the current processing capacity of the downstream and the channel identifier of the target virtual channel;
通道限速模块,用于在所述上游设备接收到所述流量预警帧时,根据所述通道标识控制所述上游设备按照所述下游当前处理能力调整向所述目标虚拟通道发送所述数据包的速率;A channel rate limiting module, configured to control the upstream device to adjust the rate at which the data packet is sent to the target virtual channel according to the current processing capacity of the downstream device when the upstream device receives the traffic warning frame according to the channel identifier;
通道恢复模块,用于检测到所述目标虚拟通道的所述缓冲区的所述占用率低于所述第一预设阈值时,控制所述下游设备向所述上游设备发送限速解除帧,所述限速解除帧中至少包括所述目标虚拟通道的所述通道标识。The channel recovery module is used to control the downstream device to send a speed limit release frame to the upstream device when it is detected that the occupancy rate of the buffer of the target virtual channel is lower than the first preset threshold, and the speed limit release frame includes at least the channel identifier of the target virtual channel.
在本申请的一种可选的实施例中,所述流量预警帧的第二预设字节为区别标识,所述区别标识用于区别所述流量预警帧与所述流量暂停帧,以及标识所述流量预警帧的流量限速能力。In an optional embodiment of the present application, the second preset byte of the traffic warning frame is a distinguishing mark, and the distinguishing mark is used to distinguish the traffic warning frame from the traffic pause frame, and to identify the traffic speed limiting capability of the traffic warning frame.
在本申请实施例中,控制下游设备统计缓冲区的占用率和缓存增加率,缓冲区中保存有上游设备发送的数据包;当占用率在预设时间内持续高于第一预设阈值,且缓存增加率为正值时,控制下游设备向上游设备发送流量预警帧,流量预警帧中至少包括下游当前处理能力;在上游设备接收到流量预警帧时,控制上游设备按照下游当前处理能力调整发送数据包的速率;检测到缓冲区的占用率低于第一预设阈值时,控制下游设备向上游设备发送限速解除帧,限速解除帧用于使上游设备恢复发送数据包的速率。本申请实施例通过引入流量预警帧,有效应对下游设备处理能力受限的情况。一旦检测到缓冲区占用率过高,将提前发出流量预警帧,确保在实施流量控制时能够平稳降速,同时维持网络的连续性,避免突然的网络中断。此外,本申请实施例还能在拥塞发生之前,及时降低上游设备的发送速度,防止过度拥塞导致断流,从而以一种更为温和的方式保障网络传输的连续性,避免因突然停止传输而引发的网络暂停。In an embodiment of the present application, the downstream device is controlled to count the occupancy rate and cache increase rate of the buffer, and the buffer stores the data packets sent by the upstream device; when the occupancy rate is continuously higher than the first preset threshold value within the preset time, and the cache increase rate is a positive value, the downstream device is controlled to send a traffic warning frame to the upstream device, and the traffic warning frame includes at least the current downstream processing capacity; when the upstream device receives the traffic warning frame, the upstream device is controlled to adjust the rate of sending data packets according to the current downstream processing capacity; when the occupancy rate of the buffer is detected to be lower than the first preset threshold value, the downstream device is controlled to send a speed limit release frame to the upstream device, and the speed limit release frame is used to restore the rate of sending data packets by the upstream device. The embodiment of the present application effectively responds to the situation where the processing capacity of the downstream device is limited by introducing a traffic warning frame. Once it is detected that the buffer occupancy rate is too high, a traffic warning frame will be issued in advance to ensure that the speed can be smoothly reduced when the flow control is implemented, while maintaining the continuity of the network and avoiding sudden network interruption. In addition, the embodiment of the present application can also reduce the sending speed of the upstream device in time before congestion occurs, prevent excessive congestion from causing interruption, thereby ensuring the continuity of network transmission in a more gentle way and avoiding network suspension caused by sudden cessation of transmission.
本申请实施例还提供了一种非易失性可读存储介质,该存储介质中存储有一个或多个模块(programs),该一个或多个模块被应用在设备时,可以使得该设备执行本申请实施例中各方法步骤的指令(instructions)。The embodiment of the present application further provides a non-volatile readable storage medium, in which one or more modules (programs) are stored. When the one or more modules are applied to a device, the device can execute instructions (instructions) of each method step in the embodiment of the present application.
本申请实施例提供了一个或多个机器可读介质,其上存储有指令,当由一个或多个处理器执行时,使得电子设备执行如上述实施例中一个或多个所述的方法。本申请实施例中,所述电子设备包括终端设备、服务器(集群)等各类型的设备。The present application embodiment provides one or more machine-readable media on which instructions are stored, and when executed by one or more processors, an electronic device executes one or more of the methods described in the above embodiments. In the present application embodiment, the electronic device includes various types of devices such as terminal devices and servers (clusters).
本公开的实施例可被实现为使用任意适当的硬件,固件,软件,或及其任意组合进行想要的配置的装置,该装置可包括终端设备、服务器(集群)等电子设备。图4示意性地示出了可被用于实现本申请中所述的各个实施例的示例性装置400 。The embodiments of the present disclosure may be implemented as a device configured as desired using any appropriate hardware, firmware, software, or any combination thereof, and the device may include electronic devices such as terminal devices, servers (clusters), etc. FIG4 schematically shows an exemplary device 400 that can be used to implement various embodiments described in this application.
对于一个实施例,图4示出了示例性装置400,该装置具有一个或多个处理器402、被耦合到(一个或多个)处理器402中的至少一个的控制模块(芯片组)404、被耦合到控制模块404的存储器406、被耦合到控制模块404的非易失性存储器(NVM,Non-VolatileMemory)/存储设备408、被耦合到控制模块404的一个或多个输入/输出设备410,以及被耦合到控制模块404的网络接口412。For one embodiment, Figure 4 shows an exemplary apparatus 400 having one or more processors 402, a control module (chip set) 404 coupled to at least one of the (one or more) processors 402, a memory 406 coupled to the control module 404, a non-volatile memory (NVM)/storage device 408 coupled to the control module 404, one or more input/output devices 410 coupled to the control module 404, and a network interface 412 coupled to the control module 404.
处理器402可包括一个或多个单核或多核处理器,处理器402可包括通用处理器或专用处理器(例如图形处理器、应用处理器、基频处理器等)的任意组合。在一些实施例中,装置400 能够作为本申请实施例中所述终端设备、服务器(集群)等设备。The processor 402 may include one or more single-core or multi-core processors, and the processor 402 may include any combination of general-purpose processors or special-purpose processors (such as graphics processors, application processors, baseband processors, etc.). In some embodiments, the device 400 can be used as a terminal device, server (cluster), etc. described in the embodiments of the present application.
在一些实施例中,装置400 可包括具有指令414的一个或多个计算机可读介质(例如,存储器406或NVM/ 存储设备408) 以及与该一个或多个计算机可读介质相合并被配置为执行指令414以实现模块从而执行本公开中所述的动作的一个或多个处理器402。In some embodiments, the apparatus 400 may include one or more computer-readable media (e.g., memory 406 or NVM/storage device 408) having instructions 414 and one or more processors 402 combined with the one or more computer-readable media and configured to execute the instructions 414 to implement a module to perform the actions described in the present disclosure.
对于一个实施例,控制模块404可包括任意适当的接口控制器,以向(一个或多个)处理器402中的至少一个和/或与控制模块404通信的任意适当的设备或组件提供任意适当的接口。For one embodiment, control module 404 may include any suitable interface controller to provide any suitable interface to at least one of processor(s) 402 and/or any suitable device or component in communication with control module 404 .
控制模块404可包括存储器控制器模块,以向存储器406提供接口。存储器控制器模块可以是硬件模块、软件模块和/或固件模块。The control module 404 may include a memory controller module to provide an interface to the memory 406. The memory controller module may be a hardware module, a software module, and/or a firmware module.
存储器406可被用于例如为装置400加载和存储数据和/或指令414。对于一个实施例,存储器406可包括任意适当的易失性存储器,例如,适当的DRAM(Dynamic RandomAccess Memory,动态随机存取存储器)。在一些实施例中,存储器406可包括双倍数据速率类型四同步动态随机存取存储器(DDR4SDRAM,Double Data Rate 4 Synchronous DynamicRandom-Access Memory) 。The memory 406 may be used, for example, to load and store data and/or instructions 414 for the device 400. For one embodiment, the memory 406 may include any suitable volatile memory, such as a suitable DRAM (Dynamic Random Access Memory). In some embodiments, the memory 406 may include a Double Data Rate 4 Synchronous Dynamic Random-Access Memory (DDR4 SDRAM).
对于一个实施例,控制模块404可包括一个或多个输入/输出控制器,以向NVM/存储设备408及(一个或多个)输入/输出设备410提供接口。For one embodiment, control module 404 may include one or more input/output controllers to provide an interface to NVM/storage device 408 and input/output device(s) 410 .
例如,NVM/存储设备408可被用于存储数据和/或指令414。NVM/存储设备408可包括任意适当的非易失性存储器(例如,闪存)和/或可包括任意适当的(一个或多个)非易失性存储设备(例如,一个或多个硬盘驱动器(HDD,Hard Disk Drive) 、一个或多个光盘(CD,Compact Disc) 驱动器和/或一个或多个数字通用光盘(DVD,Digital Video Disc) 驱动器)。For example, NVM/storage device 408 may be used to store data and/or instructions 414. NVM/storage device 408 may include any suitable non-volatile memory (e.g., flash memory) and/or may include any suitable non-volatile storage device(s) (e.g., one or more hard disk drives (HDDs), one or more compact disc (CD) drives, and/or one or more digital versatile disc (DVD) drives).
NVM/存储设备408可包括在物理上作为装置400 被安装在其上的设备的一部分的存储资源,或者其可被该设备访问可不必作为该设备的一部分。例如,NVM/存储设备408可通过网络经由(一个或多个)输入/输出设备410进行访问。NVM/storage device 408 may include storage resources that are physically part of the device on which apparatus 400 is installed, or it may be accessible to the device without being part of the device. For example, NVM/storage device 408 may be accessed via input/output device(s) 410 over a network.
(一个或多个)输入/输出设备410可为装置400 提供接口以与任意其他适当的设备通信,输入/输出设备410可以包括通信组件、音频组件、传感器组件等。网络接口412可为装置400 提供接口以通过一个或多个网络通信,装置400 可根据一个或多个无线网络标准和/或协议中的任意标准和/或协议来与无线网络的一个或多个组件进行无线通信,例如接入基于通信标准的无线网络,如WiFi、2G、3G、4G、5G等,或它们的组合进行无线通信。(One or more) input/output devices 410 may provide an interface for the apparatus 400 to communicate with any other appropriate device, and the input/output device 410 may include a communication component, an audio component, a sensor component, etc. The network interface 412 may provide an interface for the apparatus 400 to communicate through one or more networks, and the apparatus 400 may wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and/or protocols, for example, accessing a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, 5G, etc., or a combination thereof for wireless communication.
对于一个实施例,(一个或多个)处理器402中的至少一个可与控制模块404的一个或多个控制器(例如,存储器控制器模块) 的逻辑封装在一起。对于一个实施例,(一个或多个)处理器402中的至少一个可与控制模块404的一个或多个控制器的逻辑封装在一起以形成系统级封装(SiP,System in Package) 。对于一个实施例,(一个或多个)处理器402中的至少一个可与控制模块404的一个或多个控制器的逻辑集成在同一模具上。对于一个实施例,(一个或多个)处理器402中的至少一个可与控制模块404的一个或多个控制器的逻辑集成在同一模具上以形成片上系统(SoC,System on a Chip) 。For one embodiment, at least one of the processor(s) 402 may be packaged together with the logic of one or more controllers (e.g., a memory controller module) of the control module 404. For one embodiment, at least one of the processor(s) 402 may be packaged together with the logic of one or more controllers of the control module 404 to form a system in package (SiP). For one embodiment, at least one of the processor(s) 402 may be integrated on the same die with the logic of one or more controllers of the control module 404. For one embodiment, at least one of the processor(s) 402 may be integrated on the same die with the logic of one or more controllers of the control module 404 to form a system on a chip (SoC).
在各个实施例中,装置400可以但不限于是:服务器、台式计算设备或移动计算设备(例如,膝上型计算设备、手持计算设备、平板电脑、上网本等)等终端设备。在各个实施例中,装置400 可具有更多或更少的组件和/或不同的架构。例如,在一些实施例中,装置400包括一个或多个摄像机、键盘、液晶显示器(LCD,Liquid Crystal Display) 屏幕(包括触屏显示器)、非易失性存储器端口、多个天线、图形芯片、专用集成电路(ASIC,Application-Specific Integrated Circuit) 和扬声器。In various embodiments, the device 400 may be, but is not limited to, a terminal device such as a server, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet computer, a netbook, etc.). In various embodiments, the device 400 may have more or fewer components and/or different architectures. For example, in some embodiments, the device 400 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touch screen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit (ASIC), and a speaker.
其中,检测装置中可采用主控芯片作为处理器或控制模块,传感器数据、位置信息等存储到存储器或NVM/存储设备中,传感器组可作为输入/输出设备,通信接口可包括网络接口。Among them, the main control chip can be used as a processor or control module in the detection device, sensor data, location information, etc. are stored in a memory or NVM/storage device, the sensor group can be used as an input/output device, and the communication interface may include a network interface.
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
以上对本申请所提供的一种网络流量控制方法和装置,一种电子设备和一种存储介质,进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The network traffic control method and device, an electronic device and a storage medium provided by the present application are introduced in detail above. The principles and implementation methods of the present application are explained in this article using specific examples. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202411008400.7ACN118540282B (en) | 2024-07-26 | 2024-07-26 | Network traffic control method, device, equipment and storage medium |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202411008400.7ACN118540282B (en) | 2024-07-26 | 2024-07-26 | Network traffic control method, device, equipment and storage medium |
| Publication Number | Publication Date |
|---|---|
| CN118540282Atrue CN118540282A (en) | 2024-08-23 |
| CN118540282B CN118540282B (en) | 2025-04-29 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202411008400.7AActiveCN118540282B (en) | 2024-07-26 | 2024-07-26 | Network traffic control method, device, equipment and storage medium |
| Country | Link |
|---|---|
| CN (1) | CN118540282B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119945986A (en)* | 2024-12-18 | 2025-05-06 | 鹏城实验室 | Data management method, device, storage medium and computer equipment |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6167029A (en)* | 1998-10-13 | 2000-12-26 | Xaqti Corporation | System and method for integrated data flow control |
| CN105979065A (en)* | 2016-04-19 | 2016-09-28 | 乐视控股(北京)有限公司 | Method and device for monitoring traffic of mobile terminal |
| WO2017114165A1 (en)* | 2015-12-28 | 2017-07-06 | 阿里巴巴集团控股有限公司 | Message traffic control method, apparatus, and related system |
| CN108353027A (en)* | 2015-11-13 | 2018-07-31 | 华为技术有限公司 | A kind of software defined network system for detecting port failure |
| CN111954031A (en)* | 2019-05-14 | 2020-11-17 | 西安光启未来技术研究院 | A method and system for dynamically adjusting frame rate of video stream |
| CN112328202A (en)* | 2020-11-26 | 2021-02-05 | 山东云海国创云计算装备产业创新中心有限公司 | A flow control method, device, electronic device and storage medium |
| CN113114528A (en)* | 2017-09-22 | 2021-07-13 | 华为技术有限公司 | A communication connection detection method and device |
| CN113766561A (en)* | 2021-05-31 | 2021-12-07 | 大连交通大学 | Unmanned cluster network congestion control method based on cross-layer optimization |
| US20220078118A1 (en)* | 2019-01-29 | 2022-03-10 | Zte Corporation | Congestion control method, terminal and readable storage medium |
| CN116233016A (en)* | 2023-03-16 | 2023-06-06 | 中国建设银行股份有限公司 | A method, device and equipment for information transmission |
| CN117135117A (en)* | 2023-07-31 | 2023-11-28 | 北京邮电大学 | Near-end control-based cross-data center RDMA network congestion control method and device |
| WO2023241063A1 (en)* | 2022-06-14 | 2023-12-21 | 中兴通讯股份有限公司 | Packet processing method, device and system, and storage medium |
| CN117395207A (en)* | 2023-12-12 | 2024-01-12 | 南京邮电大学 | A fine-grained traffic control method for lossless networks |
| CN117411833A (en)* | 2022-07-08 | 2024-01-16 | 河南昆仑技术有限公司 | Congestion control method, device and system |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6167029A (en)* | 1998-10-13 | 2000-12-26 | Xaqti Corporation | System and method for integrated data flow control |
| CN108353027A (en)* | 2015-11-13 | 2018-07-31 | 华为技术有限公司 | A kind of software defined network system for detecting port failure |
| WO2017114165A1 (en)* | 2015-12-28 | 2017-07-06 | 阿里巴巴集团控股有限公司 | Message traffic control method, apparatus, and related system |
| CN105979065A (en)* | 2016-04-19 | 2016-09-28 | 乐视控股(北京)有限公司 | Method and device for monitoring traffic of mobile terminal |
| CN113114528A (en)* | 2017-09-22 | 2021-07-13 | 华为技术有限公司 | A communication connection detection method and device |
| US20220078118A1 (en)* | 2019-01-29 | 2022-03-10 | Zte Corporation | Congestion control method, terminal and readable storage medium |
| CN111954031A (en)* | 2019-05-14 | 2020-11-17 | 西安光启未来技术研究院 | A method and system for dynamically adjusting frame rate of video stream |
| CN112328202A (en)* | 2020-11-26 | 2021-02-05 | 山东云海国创云计算装备产业创新中心有限公司 | A flow control method, device, electronic device and storage medium |
| CN113766561A (en)* | 2021-05-31 | 2021-12-07 | 大连交通大学 | Unmanned cluster network congestion control method based on cross-layer optimization |
| WO2023241063A1 (en)* | 2022-06-14 | 2023-12-21 | 中兴通讯股份有限公司 | Packet processing method, device and system, and storage medium |
| CN117411833A (en)* | 2022-07-08 | 2024-01-16 | 河南昆仑技术有限公司 | Congestion control method, device and system |
| CN116233016A (en)* | 2023-03-16 | 2023-06-06 | 中国建设银行股份有限公司 | A method, device and equipment for information transmission |
| CN117135117A (en)* | 2023-07-31 | 2023-11-28 | 北京邮电大学 | Near-end control-based cross-data center RDMA network congestion control method and device |
| CN117395207A (en)* | 2023-12-12 | 2024-01-12 | 南京邮电大学 | A fine-grained traffic control method for lossless networks |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119945986A (en)* | 2024-12-18 | 2025-05-06 | 鹏城实验室 | Data management method, device, storage medium and computer equipment |
| Publication number | Publication date |
|---|---|
| CN118540282B (en) | 2025-04-29 |
| Publication | Publication Date | Title |
|---|---|---|
| US10552352B2 (en) | Methods and apparatus for synchronizing uplink and downlink transactions on an inter-device communication link | |
| EP3893448A1 (en) | Congestion control method, terminal and readable storage medium | |
| US8208467B2 (en) | Method and apparatus for modulating the width of a high-speed link | |
| US9247449B2 (en) | Reducing interarrival delays in network traffic | |
| EP3722938B1 (en) | Nof based reading control method, device and system | |
| EP4195760A1 (en) | Roce network congestion control method and related apparatus | |
| EP2204016B1 (en) | Efficient flow control in a radio network controller (rnc) | |
| US20220094640A1 (en) | Congestion control method and apparatus, communications network, and computer storage medium | |
| CN118540282B (en) | Network traffic control method, device, equipment and storage medium | |
| JP4700290B2 (en) | Method for flow control in a communication system | |
| US20220248259A1 (en) | Data processing method and apparatus | |
| CN115514710B (en) | Weak connection flow management and control method based on self-adaptive sliding window | |
| WO2022002397A1 (en) | Latency control for a communication network | |
| US9930565B2 (en) | Controlling apparatus for communication-quality measuring, communication apparatus, and program | |
| KR101341668B1 (en) | Controlling data flow through a data communications link | |
| JP2009278532A (en) | Transmission apparatus and congestion control method | |
| WO2024140547A1 (en) | Network congestion processing method and apparatus, and electronic device and storage medium | |
| CN112996044B (en) | Control method and system for network congestion of 5G communication virtualization network element | |
| JPWO2019004013A1 (en) | Data transmission device, method and program | |
| US20190007317A1 (en) | Technologies for efficiently determining a root of congestion with a multi-stage network switch | |
| US20240214321A1 (en) | Data transmitting apparatus and control method thereof | |
| EP4315801A1 (en) | Plunger for faster video stream recovery | |
| RU2772112C1 (en) | Method and device for monitoring network congestion based on pfc frame, system and data carrier | |
| CN119882504A (en) | Equipment control method and electronic equipment | |
| CN120547013A (en) | Communication rate adjustment method, device, equipment and storage medium |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |