Flow control and flow control parameter determination method and device
By using the INT protocol to transmit flow control parameters in the network transmission protocol and determining transmission bandwidth and other parameters based on the historical data transmission rate, the complex and time-consuming problem of flow control in the prior art is solved, and simple and efficient flow control is achieved.
Patent Information
- Application Number
- CN202310036619.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-09
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2043-01-09
AI Technical Summary
When performing traffic control, the existing network transmission protocols are complex and time-consuming, making it difficult to achieve simple and efficient flow control.
Target data packets containing flow control parameters of multiple network devices in the transmission link are transmitted through the INT protocol. These parameters are used to determine the transmission bandwidth, remaining transmission bandwidth and transmission bandwidth at the current time to account for the target ratio of the preset total bandwidth based on the historical data transmission rate of each target network device, thereby quickly adjusting the traffic.
The acquisition process of flow control parameters is simplified, the overall complexity of the flow control process is reduced, and the efficiency of flow control is improved.
Smart Images

Figure CN116016343B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and device for determining flow control and flow control parameters. Background Art
[0002] The existing network transmission protocols establish links between hosts and transfer data, and the flow control process is complicated and inefficient. For example, when starting data transmission based on the TCP protocol, in order to prevent too much data from being injected into the network and causing congestion, four basic algorithms can be used for data transmission, namely slow-start, congestion avoidance, fast retransmit and fast recovery. Today's series of congestion control algorithms are constantly evolving on this basis. These algorithms require multiple end-to-end data transmissions to determine the network load and perform flow control, and the implementation process is complex and time-consuming.
[0003] Therefore, how to perform flow control simply and efficiently is a current research direction. Summary of the invention
[0004] The present invention provides a method and device for determining flow control and flow control parameters, so as to provide a flow control method and realize simple and efficient flow control.
[0005] The present invention provides a flow control method, comprising: being applied to at least one sending end, the method comprising: obtaining a target data packet containing flow control parameters of multiple network devices in a transmission link, the flow control parameters including the transmission bandwidth at the current moment, the remaining transmission bandwidth, and the target ratio of the transmission bandwidth at the current moment to the preset total bandwidth corresponding to each network device; the flow control parameters are added to the target data packet based on an INT protocol, and the flow control parameters of each network device are determined based on the historical data transmission rate corresponding to each target network device; and determining the transmission rate of the at least one sending end based on the flow control parameters of the multiple network devices and the bandwidth of the at least one sending end.
[0006] In one of the embodiments, the process of determining the target data packet of each network device includes: determining the target data transmission rate of the target network device based on the historical data transmission rate corresponding to the target network device, the data transmission volume in the current cycle, and the time interval of the current cycle; based on the target data transmission rate, determining the transmission bandwidth corresponding to the target network device at the current moment, the remaining transmission bandwidth, and the target proportion of the transmission bandwidth at the current moment to the preset total bandwidth in turn.
[0007] In one embodiment, the target data transmission rate of the target network device is determined based on the historical data transmission rate corresponding to the target network device, the data transmission volume in the current cycle, and the time interval of the current cycle, including: obtaining the data transmission volume data_traffic_amout in the current cycle and the time interval T of the current cycle corresponding to the target network device, and obtaining the historical data transmission rate rate_old corresponding to the target network device; wherein the rate_old is determined based on the exponential moving average of the historical data transmission rate corresponding to the target network device; based on the data transmission volume data_traffic_amout in the current cycle and the time interval T of the current cycle, determining the data transmission rate rate_new in the current cycle; the corresponding first expression is: Based on the data transmission rate rate_new in the current period and the historical data transmission rate rate_old, the target data transmission rate rate of the target network device is determined; the corresponding second expression is: rate = rate_old×(1-r)+rate_new×r, 0<r<1, where r is a coefficient representing a weight value.
[0008] In one of the embodiments, the target transmission bandwidth, remaining transmission bandwidth and target ratio of the transmission bandwidth at the current moment to the preset total bandwidth corresponding to the target network device are determined in sequence based on the target data transmission rate, including: determining the target data transmission rate rate as the transmission bandwidth tx_bandwidth corresponding to the target network device at the current moment, and the corresponding third expression is: tx_bandwidth=rate; determining the remaining transmission bandwidth headroom_bandwidth of the target network device based on the difference between the preset total bandwidth total_bandwidth corresponding to the target network device and the transmission bandwidth tx_bandwidth corresponding to the target network device at the current moment, and the corresponding fourth expression is: headroom_bandwidth=total_bandwidth-tx_bandwidth; or, determining the target ratio ratio of the transmission bandwidth at the current moment to the preset total bandwidth based on the ratio of the preset total bandwidth total_bandwidth corresponding to the target network device to the transmission bandwidth tx_bandwidth corresponding to the target network device at the current moment, and the corresponding fifth expression is:
[0009] In one of the embodiments, the transmission rate of the at least one transmitting end is determined based on the flow control parameters of the multiple network devices and the bandwidth of the at least one transmitting end, including: determining the maximum transmission bandwidth of the target transmitting end based on the remaining transmission bandwidth corresponding to each network device in the target data packet and the current bandwidth of the target transmitting end in the at least one transmitting end; or determining the transmission bandwidth of each transmitting end based on the target proportion of the transmission bandwidth corresponding to each network device in the target data packet at the current moment to the preset total bandwidth and the bandwidth of each transmitting end in the at least one transmitting end.
[0010] In one of the embodiments, the determining the maximum transmission bandwidth of the target transmitting end based on the remaining transmission bandwidth corresponding to each network device in the target data packet and the current bandwidth of the target transmitting end in the at least one transmitting end includes: determining the minimum remaining transmission bandwidth min_headroom_bandwidth based on the remaining transmission bandwidth corresponding to each network device in the target data packet, and the corresponding sixth expression is: min_headroom_bandwidth=min(headroom_bandwidth 0 , headroom_bandwidth 1 , ...headroom_bandwidth n-1 ), where headroom_bandwidth 0 Indicates the remaining transmission bandwidth of the 0th network device among the multiple network devices; headroom_bandwidth 1 Indicates the remaining transmission bandwidth of the first network device among the multiple network devices; headroom_bandwidth n-1 Represents the remaining transmission bandwidth of the n-1th network device among the multiple network devices; n is the number of network devices; based on the current bandwidth cur_sender_bandwidth of the target sending end among the at least one sending end and the minimum remaining transmission bandwidth min_headroom_bandwidth, the maximum transmission bandwidth max_sender_bandwidth of the target sending end is determined, and the corresponding seventh expression is: max_sender_bandwidth=cur_sender_bandwidth+min_headroom_bandwidth.
[0011] In one of the embodiments, the transmission bandwidth of each transmitting end is determined based on the target ratio of the transmission bandwidth of each network device at the current moment in the target data packet to the preset total bandwidth and the bandwidth of each transmitting end in the at least one transmitting end, including: determining the maximum target ratio max_ratio based on multiple target ratios corresponding to the multiple network devices, and the corresponding eighth expression is: max_ratio=max(ratio 0 , ratio 1 ,…ratio n-1 ), where ratio 0 Indicates the target ratio corresponding to the 0th network device among the multiple network devices; ratio 1 Indicates the target ratio corresponding to the first network device among the multiple network devices; ratio n-1 Represents the target ratio corresponding to the n-1th network device among the multiple network devices; based on the current bandwidth cur_sender_bandwidth of the target sender among the at least one sender and the maximum target ratio max_ratio, determines the transmission bandwidth sender_bandwidth_adj of the target sender, and the corresponding ninth expression is: sender_bandwidth_adj=cur_sender_bandwidth*(1 / max_ratio).
[0012] The present invention also provides a method for determining flow control parameters, which is applied to a target network device. The method includes: determining a target data transmission rate of the target network device based on a historical data transmission rate corresponding to the target network device, a data transmission amount in a current cycle, and a time interval of the current cycle; determining flow control parameters of the target network device in sequence based on the target data transmission rate, the flow control parameters including: a transmission bandwidth corresponding to the target network device at the current moment, a remaining transmission bandwidth, and a target ratio of the transmission bandwidth at the current moment to a preset total bandwidth; and adding the flow control parameters of the target network device to a target data packet through an INT protocol.
[0013] The present invention also provides a flow control device, comprising: an acquisition module, used to acquire a target data packet containing flow control parameters of multiple network devices in a transmission link, the flow control parameters including the transmission bandwidth at the current moment, the remaining transmission bandwidth and the target ratio of the transmission bandwidth at the current moment to the preset total bandwidth corresponding to each network device; the flow control parameters are added to the target data packet based on the INT protocol, and the flow control parameters of each network device are determined based on the historical data transmission rate corresponding to each target network device; a first determination module, used to determine the transmission rate of at least one sending end based on the flow control parameters of the multiple network devices and the bandwidth of the at least one sending end.
[0014] The present invention also provides a device for determining flow control parameters, including: a second determination module, used to determine the target data transmission rate of the target network device based on the historical data transmission rate corresponding to the target network device, the data transmission volume in the current cycle and the time interval of the current cycle; a third determination module, used to determine the flow control parameters of the target network device in sequence based on the target data transmission rate, and the flow control parameters include: the transmission bandwidth corresponding to the target network device at the current moment, the remaining transmission bandwidth and the target proportion of the transmission bandwidth at the current moment to the preset total bandwidth; an adding module, used to add the flow control parameters of the target network device to the target data packet through the INT protocol.
[0015] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the flow control methods and flow control parameter determination methods described above are implemented.
[0016] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the flow control methods and flow control parameter determination methods described above.
[0017] The flow control and flow control parameter determination method and device provided by the present invention transmits a target data packet containing flow control parameters of multiple network devices in a transmission link through the INT protocol, making the flow control parameter acquisition process relatively simple, thereby laying a foundation for efficiently performing flow control based on the flow control parameters. In addition, the flow control parameters of each network device are determined based on the historical data transmission rate corresponding to each target network device, which is relatively easy to implement and makes the calculation of the flow control parameters relatively simple, thereby reducing the overall complexity of the flow control process based on the flow control parameters. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 It is a schematic diagram of an application scenario of the flow control method provided by the present invention;
[0020] Figure 2 It is one of the flow charts of the flow control method provided by the present invention;
[0021] Figure 3 This is the second flow chart of the flow control method provided by the present invention;
[0022] Figure 4 This is the third flow chart of the flow control method provided by the present invention;
[0023] Figure 5 It is a flow chart of a method for determining flow control parameters provided by the present invention;
[0024] Figure 6 This is the fourth flow chart of the flow control method provided by the present invention;
[0025] Figure 7 is a schematic block diagram of a system for determining flow control parameters provided by the present invention;
[0026] Figure 8 is a schematic structural diagram of a flow control device provided by the present invention;
[0027] Fig. 9 It is a structural schematic diagram of the device for determining flow control parameters provided by the present invention. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0029] In order to facilitate understanding, the technical terms involved in the present invention are first explained.
[0030] (1) Inband network telemetry (INT)
[0031] As a hybrid measurement technology, INT is fundamentally a technology that uses data plane services to collect, carry, organize, and report network conditions, without using a separate control plane to manage traffic for the above information collection. The two key points of this technology can also be seen from the name of the technology: one is Inband, which means using data plane service traffic instead of using protocol packets to achieve the purpose of the protocol as many protocols do; the second point is Telemetry, which is reflected in the characteristics of measuring network data and reporting it remotely.
[0032] (2) Bandwidth
[0033] Bandwidth has many application areas. It can be used to identify the data transmission capacity of signal transmission, the amount of data passing through a link per unit time, and the display capacity of a display.
[0034] In analog signal systems, it is also called bandwidth, which refers to the amount of data that can be transmitted in a fixed time, that is, the ability to transmit data in a transmission channel. It is usually expressed in transmission cycles per second or Hertz (Hz).
[0035] In digital devices, bandwidth refers to the amount of data that can pass through a link per unit time. It is usually expressed in bits per second (bps), which is the number of bits that can be transmitted per second.
[0036] (3) Data transmission rate
[0037] Data transfer rate is a measure of the amount of digital information that can be transmitted per second through a channel. Data transfer rate is also called throughput rate. Data transfer rate is determined by many factors, including line bandwidth, transmission impairments, distance, media type, etc.
[0038] Data transmission rate is one of the important technical indicators to describe the data transmission system. The data transmission rate is numerically equal to the number of binary bits that constitute the data code transmitted per second, and the unit is bit / second, recorded as bps.
[0039] In order to facilitate understanding, the technical problem of the present invention is firstly explained.
[0040] It can be understood that in the prior art, in order to prevent excessive data from being injected into the network and causing congestion, four basic algorithms can be used to perform data transmission, i.e., slow-start, congestion avoidance, fast retransmit, and fast recovery, during data transmission, for example, when data transmission is started based on the TCP protocol. Today's series of congestion control algorithms are constantly evolving on this basis. These algorithms require multiple end-to-end data transmissions to determine the network load and further implement flow control. The corresponding implementation process is complex and time-consuming. Therefore, the present invention proposes a method and device for determining flow control and flow control parameters to achieve low computational complexity and efficient flow control.
[0041] Combine the following Figure 1-Figure 9 The flow control and flow control parameter determination method and device of the present invention are described.
[0042] For ease of understanding, Figure 1 An application scenario diagram of the flow control method of the present invention is given as an example. The flow control method provided by the present invention is a flow control framework driven by the sending end. Figure 1 As shown, the packet sent by the sender will be answered by the receiver. The data packet pkt to be transmitted uses the INT protocol to add metadata to the packet header in each switch chip on the transmission path from the sender to the receiver. The metadata includes three meters corresponding to each switch, namely the transmission bandwidth at the current moment, the remaining transmission bandwidth, and the target ratio of the transmission bandwidth at the current moment to the preset total bandwidth. When the receiver receives the data packet, it copies the metadata collected from each switch chip to the acknowledgment data packet (acknowledge character, ACK), and sends the acknowledgment data packet back to the sender. After receiving the acknowledgment data packet, the sender quickly adjusts the traffic according to the current transmission bandwidth, remaining transmission bandwidth, and the target ratio of the transmission bandwidth at the current moment to the preset total bandwidth corresponding to each switch port.
[0043] Figure 2 This is one of the flow diagrams of the flow control method provided by the present invention. It can be understood that the flow control method can be applied to at least one sending end and executed by a flow control device, which can be located at Figure 1 In the device corresponding to the sending end in the application framework shown, the method includes:
[0044] Step 210, obtaining a target data packet including flow control parameters of multiple network devices in the transmission link, wherein the flow control parameters include the transmission bandwidth corresponding to each network device at the current moment, the remaining transmission bandwidth, and the target ratio of the transmission bandwidth at the current moment to the preset total bandwidth; the flow control parameters are added to the target data packet based on the INT protocol, and the flow control parameters of each network device are determined based on the historical data transmission rate corresponding to each target network device.
[0045] Among them, the network device can be, for example, a switch, a network interface controller (NIC) or a data processor (DPU) used as a smart network card, or other network devices. The present invention does not limit the type of network devices. The flow control parameter is a parameter used to perform flow control. The transmission bandwidth corresponding to each network device at the current moment is the transmission bandwidth at the current moment determined according to the actual data transmission volume corresponding to each network device in a period of time before the current moment. The remaining transmission bandwidth corresponding to each network device is the remaining transmission bandwidth of the transmission bandwidth corresponding to each network device at the current moment relative to the preset total bandwidth corresponding to each network device. The preset total bandwidth corresponding to each network device is the total bandwidth pre-configured for each network device.
[0046] It can be understood that the historical data transmission rate corresponding to each target network device is the historical data transmission rate corresponding to each target network device within a certain period of time before the current moment, which is relatively easy to obtain. Therefore, it is relatively easy to determine the flow control parameters of each network device based on the historical data transmission rate corresponding to each target network device, which reduces the complexity of the flow control process to a certain extent.
[0047] It can also be understood that the target data packet can be a response data packet from the receiving end. Figure 1As shown, when the original data packet pkt to be transmitted passes through each network device in the transmission link, each network device can add corresponding metadata (metadata1, metadata2) to the original data packet to be transmitted based on the INT protocol. The metadata includes the current transmission bandwidth, remaining transmission bandwidth, and target ratio of the current transmission bandwidth to the preset total bandwidth corresponding to each network device. These flow control parameters. When the receiving end receives the data packet with the added metadata, the metadata can be directly copied to the acknowledgment data packet ACK, and then the acknowledgment data packet ACK is sent to the sending end. Therefore, the sending end can obtain the acknowledgment data packet and parse the acknowledgment data packet to obtain the current transmission bandwidth, remaining transmission bandwidth, and target ratio of the current transmission bandwidth to the preset total bandwidth corresponding to each network device. These flow control parameters.
[0048] It can also be understood that since the flow control parameters can be added to the target data packet based on the INT protocol, that is, the flow control parameters corresponding to each network device are also transmitted to the receiving end during the transmission process of the original data packet to be transmitted, and the receiving end directly encapsulates it into the response data packet and sends it to the sending end. Therefore, the process of obtaining the flow control parameters is relatively simple, thereby laying the foundation for efficient flow control based on the flow control parameters.
[0049] Step 220: Determine the transmission rate of the at least one sending end based on the flow control parameters of the plurality of network devices and the bandwidth of the at least one sending end.
[0050] It can be understood that the bandwidth of each sending end is different, so the transmission rate corresponding to each sending end can be determined by combining the flow control parameters of multiple network devices.
[0051] The flow control method provided by the present invention transmits a target data packet containing flow control parameters of multiple network devices in a transmission link through an INT protocol, so that the process of acquiring the flow control parameters is relatively simple, thereby laying a foundation for efficiently performing flow control based on the flow control parameters. In addition, the flow control parameters of each network device are determined based on the historical data transmission rate corresponding to each target network device, which is relatively easy to implement and makes the calculation of the flow control parameters relatively simple, thereby reducing the overall complexity of the flow control process based on the flow control parameters.
[0052] In one embodiment, if Figure 3 As shown, the process of determining the target data packet of each network device includes the following steps:
[0053] Step 310: determine a target data transmission rate of the target network device based on the historical data transmission rate corresponding to the target network device, the data transmission volume in the current cycle, and the time interval of the current cycle.
[0054] Understandably, Figure 3 The steps shown can all be executed by the corresponding target network device, where the target network device is one of the network devices, for example, a switch, a NIC or a DPU smart network card.
[0055] Specifically, step 310 may include steps 3101 to 3103 .
[0056] Step 3101, obtaining the data transmission volume data_traffic_amout in the current cycle and the time interval T of the current cycle corresponding to the target network device, and obtaining the historical data transmission rate rate_old corresponding to the target network device.
[0057] The historical data transmission rate rate_old corresponding to the target network device may be pre-stored in the storage module, and the calculation process corresponding to rate_old is similar to the calculation process of the data transmission rate rate_new in the current cycle in step 3102, which may be based on the data transmission volume data_traffic_amout in the historical cycle. o and the time interval T of the historical cycle o rate_old can be understood as the exponential moving average of the historical data transmission rate corresponding to the target network device.
[0058] Step 3102: Determine the data transmission rate rate_new in the current cycle based on the data transmission amount data_traffic_amout in the current cycle and the time interval T of the current cycle.
[0059] Among them, the first expression corresponding to rate new is:
[0060] Step 3103: Determine the target data transmission rate rate of the target network device based on the data transmission rate rate_new in the current cycle and the historical data transmission rate rate_old.
[0061] Among them, the second expression corresponding to rate is: rate=rate_old×(1-r)+rate_new×r, 0<r<1, where r is a coefficient representing a weight value.
[0062] It can be understood that the port rate of the network device (the target data transmission rate of the target network device) has stability over time, so the update of the port rate (the target data transmission rate of the target network device) can be reasonably postponed. The data transmission rate rate_new in the current cycle will continue to some extent into the near future, so the target data transmission rate of the target network device can be determined based on the data transmission rate in the current cycle. Therefore, the present invention uses an exponential moving average algorithm to calculate the port rate of the switch. The exponential moving average of any period is the weighted average of the actual observation value of this period and the previous exponential moving average. Therefore, the present invention calculates the data transmission rate in the current cycle in each fixed time period, and performs a weighted average with the previous historical port rate exponential moving average to obtain the latest rate (the target data transmission rate of the target network device), which corresponds to the above second expression.
[0063] Step 320: Based on the target data transmission rate, the current transmission bandwidth, the remaining transmission bandwidth, and the target ratio of the current transmission bandwidth to the preset total bandwidth corresponding to the target network device are determined in sequence.
[0064] Specifically, step 320 may include steps 3201 to 3203 .
[0065] Step 3201: determine the target data transmission rate rate as the transmission bandwidth tx_bandwidth corresponding to the target network device at the current moment.
[0066] The third expression corresponding to tx_bandwidth is: tx_bandwidth=rate.
[0067] Step 3202: Determine the remaining transmission bandwidth headroom_bandwidth of the target network device based on the difference between the preset total bandwidth total_bandwidth corresponding to the target network device and the transmission bandwidth tx_bandwidth corresponding to the target network device at the current moment.
[0068] The fourth expression corresponding to headroom_bandwidth is: headroom_bandwidth=total_bandwidth-tx_bandwidth.
[0069] Step 3203: Determine a target ratio ratio of the transmission bandwidth at the current moment to the preset total bandwidth based on the ratio of the preset total bandwidth total_bandwidth corresponding to the target network device to the transmission bandwidth tx_bandwidth at the current moment corresponding to the target network device.
[0070] The fifth expression corresponding to ratio is:
[0071] It can be seen from the above third expression, fourth expression and fifth expression that the calculation process of the three flow control parameters, namely the transmission bandwidth at the current moment, the remaining transmission bandwidth and the target ratio of the transmission bandwidth at the current moment to the preset total bandwidth corresponding to the target network device, is relatively simple. Therefore, it is conducive to simple and efficient flow control.
[0072] It can be understood that there is no obvious order of execution between step 3202 and step 3203.
[0073] In one embodiment, if Figure 4 As shown, the determining of the transmission rate of the at least one transmitting end based on the flow control parameters of the plurality of network devices and the bandwidth of the at least one transmitting end includes step 410 or step 420. It can be understood that at least one transmitting end can selectively perform step 410 or step 420.
[0074] Step 410: Determine the maximum transmission bandwidth of the target transmitting end based on the remaining transmission bandwidth corresponding to each network device in the target data packet and the current bandwidth of the target transmitting end among the at least one transmitting end.
[0075] The current bandwidth of the target sending end can be understood as the transmission rate corresponding to the target sending end at the current moment. The maximum transmission bandwidth of the target sending end is the maximum amount of data that the target sending end can transmit per unit time.
[0076] Specifically, step 410 may include step 4101 to step 4102 .
[0077] Step 4101: determine the minimum remaining transmission bandwidth min_headroom_bandwidth based on the remaining transmission bandwidth corresponding to each network device in the target data packet.
[0078] Among them, the sixth expression corresponding to min_headroom_bandwidth is: min_headroom_bandwidth=min(headroom_bandwidth 0, headroom_bandwidth 1 , …headroom_bandwidth n-1 ), where headroom_bandwidth 0 Indicates the remaining transmission bandwidth of the 0th network device among the multiple network devices; headroom_bandwidth 1Indicates the remaining transmission bandwidth of the first network device among the multiple network devices; headroom_bandwidth n-1 Represents the remaining transmission bandwidth of the n-1th network device among the multiple network devices; n is the number of network devices.
[0079] Step 4102: Determine the maximum transmission bandwidth max_sender_bandwidth of the target sending end based on the current bandwidth cur_sender_bandwidth of the target sending end among the at least one sending end and the minimum remaining transmission bandwidth min_headroom_bandwidth.
[0080] Among them, the seventh expression corresponding to max_sender_bandwidth is: max_sender_bandwidth=cur_sender_bandwidth+min_headroom_bandwidth.
[0081] Step 420, determining the transmission bandwidth of each transmitting end based on the target ratio of the current transmission bandwidth corresponding to each network device in the target data packet to the preset total bandwidth and the bandwidth of each transmitting end in the at least one transmitting end.
[0082] The current bandwidth of the target sending end can be understood as the transmission rate corresponding to the target sending end at the current moment. The maximum transmission bandwidth of the target sending end is the maximum amount of data that the target sending end can transmit per unit time.
[0083] Specifically, step 420 may include step 4201 to step 4202 .
[0084] Step 4201: determine a maximum target ratio max_ratio based on multiple target ratios corresponding to the multiple network devices.
[0085] Among them, the eighth expression corresponding to max_ratio is: max_ratio=max(ratio 0 , ratio 1 ,…ratio n-1 ), where ratio 0 Indicates the target ratio corresponding to the 0th network device among the multiple network devices; ratio 1 Indicates the target ratio corresponding to the first network device among the multiple network devices; ratio n-1 Indicates the target ratio corresponding to the n-1th network device among the multiple network devices.
[0086] Step 4202: Determine a transmission bandwidth sender_bandwidth_adj of the target sender based on the current bandwidth cur_sender_bandwidth of the target sender among the at least one sender and the maximum target ratio max_ratio.
[0087] Among them, the ninth expression corresponding to sender_bandwidth_adj is: sender_bandwidth_adj=cur_sender_bandwidth*(1 / max_ratio).
[0088] It can be seen from the above-mentioned sixth expression, seventh expression, eighth expression and ninth expression that after determining the three flow control parameters corresponding to the target network device's transmission bandwidth at the current moment, the remaining transmission bandwidth and the target ratio of the transmission bandwidth at the current moment to the preset total bandwidth, the calculation process corresponding to the transmission bandwidth of each sending end is relatively simple, and therefore, is conducive to simple and efficient flow control.
[0089] The present invention also provides a method for determining flow control parameters, which can be applied to target network devices, such as Figure 5 As shown, the method includes:
[0090] Step 510: determine a target data transmission rate of the target network device based on a historical data transmission rate corresponding to the target network device, a data transmission amount in a current cycle, and a time interval of the current cycle.
[0091] Step 520: determine the flow control parameters of the target network device in sequence based on the target data transmission rate.
[0092] The flow control parameters include: the transmission bandwidth corresponding to the target network device at the current moment, the remaining transmission bandwidth, and the target ratio of the transmission bandwidth at the current moment to the preset total bandwidth.
[0093] It can be understood that step 510 and step 520 can refer to the relevant descriptions in step 310 and step 320 respectively, and for the sake of brevity, they are not repeated here.
[0094] Step 530: Add the flow control parameters of the target network device to the target data packet through the INT protocol.
[0095] It can be understood that step 530 can refer to the relevant description in step 210 respectively, and for the sake of brevity, it will not be repeated here.
[0096] The method for determining flow control parameters provided by the present invention transmits a target data packet containing flow control parameters of multiple network devices in a transmission link through the INT protocol, so that the process of obtaining the flow control parameters is relatively simple, thereby laying a foundation for efficiently performing flow control based on the flow control parameters. In addition, the flow control parameters of each network device are determined based on the historical data transmission rate corresponding to each target network device, which is relatively easy to implement and makes the calculation of the flow control parameters relatively simple, thereby reducing the overall complexity of the flow control process based on the flow control parameters.
[0097] Figure 6 Another schematic flow chart of the flow control method provided by the present invention. Figure 6 The flow control method provided by the present invention is explained from the process of multi-party interaction between the sending end device, the switch device and the receiving end device in the transmission link. Among them, there is at least one sending end device. It can be understood that in the actual application scenario, there can be at least one corresponding switch device, but because the processing process corresponding to each switch device in the flow control method provided by the present invention is similar, Figure 6 The interaction scenario shown takes a switch device as an example to illustrate the processing process of the corresponding switch device. Figure 6 As shown, the flow control method provided by the present invention comprises the following steps:
[0098] Step 610: A transmission control protocol is established between the transmitting end device, the switch device and the receiving end device in the transmission link.
[0099] Step 620: The sending device sends a data packet to the switch device.
[0100] In step 630, the switch device adds the calculated flow control parameters to the data packet in the form of in-band network telemetry metadata (INTMetadata).
[0101] Specifically, the steps for the switch device to calculate and upload the flow control parameters are as follows: collect the port data transmission volume of each clock cycle; accumulate the port data transmission volume of each clock cycle, and when the accumulated time reaches the update cycle set by the system, calculate the port rate of the current cycle (corresponding to the data transmission rate in the current cycle in the previous text), clear the accumulated value, and restart the counting; use the exponential moving average of the port rate of the current cycle and the previous port rate (corresponding to the historical data transmission rate in the previous text) to calculate the latest port rate (corresponding to the target data transmission rate in the previous text) exponential moving average, and re-store it. And determine the flow control parameters based on the calculated latest port rate, and add the flow control parameters to INT Metadata. It can be understood that the determination of the flow control parameters based on the calculated latest port rate can refer to the relevant description in the previous text, and the specific process of adding the flow control parameters to INT Metadata can refer to the existing technology. For the sake of brevity, it will not be repeated here.
[0102] Step 640: The switch device forwards the data packet including the flow control parameter to the receiving device.
[0103] Step 650: The receiving device extracts the INT metadata and inserts it into the generated ACK response data packet, and then returns the ACK response data packet with the INT metadata to the sending device.
[0104] Step 660: After receiving the ACK response data packet, the sending end device extracts INT metadata from it, obtains the flow control parameters of each switch device, and performs flow adjustment.
[0105] Figure 7 Schematic block diagram of a system for determining flow control parameters provided by the present invention. Figure 7 As shown, the flow control parameter determination system provided by the present invention includes: a timing module 710, a current data transmission accumulation module 720, a rate update module 730, a rate storage module 740 and a flow control parameter calculation module 750.
[0106] The timing module 710 provides a fixed time period T to the rate update module, and generates refresh instructions and previous rate (historical data transmission rate) reading instructions in a timely manner.
[0107] The current data transmission accumulation module 720 is used to count the data transmission volume in the current cycle, accumulate the data transmission volume in the current cycle, and when the refresh instruction is valid, output the accumulated count value of the counter to the rate update module 730, and at the same time, the counter in the current data transmission accumulation module 720 is cleared.
[0108] The rate update module 730, when the refresh instruction is valid, reads the cumulative count value (the amount of data transmitted in the current cycle) from the current data transmission accumulation module 720, and reads the previous port rate (historical data transmission rate) from the rate storage module 740, and then calculates the latest port rate (target data transmission rate) based on the first expression and the second expression in the previous text, and stores it back into the rate storage module 740.
[0109] The rate storage module 740, when the read instruction issued by the timing module 710 is valid, outputs the corresponding port rate to the rate update module 730, then replaces the previous port rate (historical data transmission rate) with the updated port rate (target data transmission rate) and stores it; when the upper-level read instruction is valid, the corresponding port rate is provided to the flow control parameter calculation module 750.
[0110] The flow control parameter calculation module 750 receives the port rate from the rate storage module 740, calculates three flow control parameters: the current transmission bandwidth (the transmission bandwidth at the current moment), the remaining transmission bandwidth, and the ratio of the current transmission bandwidth to the total bandwidth (the target ratio of the transmission bandwidth at the current moment to the preset total bandwidth), and outputs the calculation results to the upper layer application module.
[0111] The flow control device and the flow control parameter determination device provided by the present invention are described below. The flow control device described below and the flow control method described above can be referenced to each other, and the flow control parameter determination device described below and the flow control parameter determination method described above can be referenced to each other.
[0112] Figure 8 Schematic diagram of the flow control device provided by the present invention, such as Figure 8 As shown, the flow control device provided by the present invention comprises:
[0113] The acquisition module 810 is used to acquire a target data packet including flow control parameters of multiple network devices in the transmission link, wherein the flow control parameters include the transmission bandwidth at the current moment, the remaining transmission bandwidth, and the target ratio of the transmission bandwidth at the current moment to the preset total bandwidth corresponding to each network device; the flow control parameters are added to the target data packet based on the INT protocol, and the flow control parameters of each network device are determined based on the historical data transmission rate corresponding to each target network device;
[0114] The first determination module 820 is configured to determine the transmission rate of the at least one sending end based on the flow control parameters of the plurality of network devices and the bandwidth of the at least one sending end.
[0115] In one embodiment, the device further comprises:
[0116] A fourth determination module, configured to determine a target data transmission rate of the target network device based on a historical data transmission rate corresponding to the target network device, a data transmission amount in a current cycle, and a time interval of the current cycle;
[0117] The fifth determination module is used to determine the current transmission bandwidth, the remaining transmission bandwidth and the target ratio of the current transmission bandwidth to the preset total bandwidth corresponding to the target network device in sequence based on the target data transmission rate.
[0118] In one embodiment, the fourth determination module includes:
[0119] An acquisition unit, used to acquire the data transmission volume data_traffic_amout in the current cycle corresponding to the target network device and the time interval T of the current cycle, and acquire the historical data transmission rate rate_old corresponding to the target network device; wherein the rate_old is determined based on the exponential moving average of the historical data transmission rate corresponding to the target network device;
[0120] The first determining unit is used to determine the data transmission rate rate_new in the current cycle based on the data transmission amount data_traffic_amout in the current cycle and the time interval T of the current cycle; the corresponding first expression is:
[0121] The second determination unit is used to determine the target data transmission rate rate of the target network device based on the data transmission rate rate_new in the current period and the historical data transmission rate rate_old; the corresponding second expression is: rate = rate_old×(1-r)+rate_new×r, 0<r<1, where r is a coefficient representing a weight value.
[0122] In one embodiment, the fifth determination module includes:
[0123] The third determining unit is used to determine the target data transmission rate rate as the transmission bandwidth tx_bandwidth corresponding to the target network device at the current moment, and the corresponding third expression is: tx_bandwidth=rate;
[0124] A fourth determining unit is used to determine the remaining transmission bandwidth headroom_bandwidth of the target network device based on the difference between the preset total bandwidth total_bandwidth corresponding to the target network device and the transmission bandwidth tx_bandwidth corresponding to the target network device at the current moment, and the corresponding fourth expression is: headroom_bandwidth=total_bandwidth-tx_bandwidth; or,
[0125] The fifth determining unit is used to determine a target ratio ratio of the transmission bandwidth at the current moment to the preset total bandwidth based on the ratio of the preset total bandwidth total_bandwidth corresponding to the target network device to the transmission bandwidth tx_bandwidth at the current moment corresponding to the target network device. The corresponding fifth expression is:
[0126] In one embodiment, the first determining module 820 includes:
[0127] a sixth determining unit, configured to determine the maximum transmission bandwidth of the target transmitting end based on the remaining transmission bandwidth corresponding to each network device in the target data packet and the current bandwidth of the target transmitting end among the at least one transmitting end; or
[0128] The seventh determination unit is used to determine the transmission bandwidth of each transmitting end based on the target ratio of the transmission bandwidth corresponding to each network device in the target data packet at the current moment to the preset total bandwidth and the bandwidth of each transmitting end in the at least one transmitting end.
[0129] In one embodiment, the sixth determining unit includes:
[0130] The eighth determining unit is used to determine the minimum remaining transmission bandwidth min_headroom_bandwidth based on the remaining transmission bandwidth corresponding to each network device in the target data packet, and the corresponding sixth expression is: min_headroom_bandwidth=min(headroom_bandwidth 0 , headroom_bandwidth 1 , …headroom_bandwidth n-1 ), where headroom_bandwidth 0 Indicates the remaining transmission bandwidth of the 0th network device among the multiple network devices; headroom_bandwidth 1Indicates the remaining transmission bandwidth of the first network device among the multiple network devices; headroom_bandwidth n-1 represents the remaining transmission bandwidth of the n-1th network device among the multiple network devices; n is the number of network devices;
[0131] The ninth determining unit is used to determine the maximum transmission bandwidth max_sender_bandwidth of the target transmitting end based on the current bandwidth cur_sender_bandwidth of the target transmitting end in the at least one transmitting end and the minimum remaining transmission bandwidth min_headroom_bandwidth. The corresponding seventh expression is: max_sender_bandwidth=cur_sender_bandwidth+min_headroom_bandwidth.
[0132] In one embodiment, the seventh determining unit includes:
[0133] The tenth determining unit is used to determine the maximum target ratio max_ratio based on the multiple target ratios corresponding to the multiple network devices, and the corresponding eighth expression is: max_ratio=max(ratio 0 , ratio 1 ,…ratio n-1 ), where ratio 0 Indicates the target ratio corresponding to the 0th network device among the multiple network devices; ratio 1 Indicates the target ratio corresponding to the first network device among the multiple network devices; ratio n-1 represents a target ratio corresponding to the n-1th network device among the plurality of network devices;
[0134] The eleventh determining unit is used to determine the transmission bandwidth sender_bandwidth_adj of the target sender based on the current bandwidth cur_sender_bandwidth of the target sender in the at least one sender and the maximum target ratio max_ratio, and the corresponding ninth expression is: sender_bandwidth_adj=cur_sender_bandwidth*(1 / max_ratio).
[0135] The present invention also provides a device for determining flow control parameters, such as Fig. 9 As shown, including:
[0136] A second determination module 910 is used to determine a target data transmission rate of the target network device based on a historical data transmission rate corresponding to the target network device, a data transmission amount in a current cycle, and a time interval of the current cycle;
[0137] A third determination module 920 is used to determine the flow control parameters of the target network device in sequence based on the target data transmission rate, the flow control parameters including: the transmission bandwidth of the target network device at the current moment, the remaining transmission bandwidth, and the target ratio of the transmission bandwidth at the current moment to the preset total bandwidth;
[0138] The adding module 930 is used to add the flow control parameters of the target network device to the target data packet through the INT protocol.
[0139] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the flow control method or the flow control parameter determination method provided by the present invention, wherein the flow control method includes: obtaining a target data packet containing flow control parameters of multiple network devices in a transmission link, the flow control parameters including the transmission bandwidth at the current moment, the remaining transmission bandwidth, and the target ratio of the transmission bandwidth at the current moment to the preset total bandwidth corresponding to each network device; the flow control parameters are added to the target data packet based on the INT protocol, and the flow control parameters of each network device are determined based on the historical data transmission rate corresponding to each target network device; the transmission rate of at least one sending end is determined based on the flow control parameters of the multiple network devices and the bandwidth of the at least one sending end. The method for determining flow control parameters includes: determining a target data transmission rate of the target network device based on a historical data transmission rate corresponding to the target network device, a data transmission amount in a current cycle, and a time interval of the current cycle; determining flow control parameters of the target network device in sequence based on the target data transmission rate, the flow control parameters including: a transmission bandwidth corresponding to the target network device at the current moment, a remaining transmission bandwidth, and a target ratio of the transmission bandwidth at the current moment to a preset total bandwidth; and adding the flow control parameters of the target network device to a target data packet through an INT protocol.
[0140] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the flow control method or the flow control parameter determination method provided by the present invention, wherein the flow control method comprises: obtaining a target data packet containing flow control parameters of multiple network devices in a transmission link, the flow control parameters including the transmission bandwidth corresponding to each network device at the current moment, the remaining transmission bandwidth, and the target ratio of the transmission bandwidth at the current moment to the preset total bandwidth; the flow control parameters are added to the target data packet based on the INT protocol, and the flow control parameters of each network device are determined based on the historical data transmission rate corresponding to each target network device; the transmission rate of at least one sending end is determined based on the flow control parameters of the multiple network devices and the bandwidth of the at least one sending end. The method for determining flow control parameters includes: determining a target data transmission rate of the target network device based on a historical data transmission rate corresponding to the target network device, a data transmission amount in a current cycle, and a time interval of the current cycle; determining flow control parameters of the target network device in sequence based on the target data transmission rate, the flow control parameters including: a transmission bandwidth corresponding to the target network device at the current moment, a remaining transmission bandwidth, and a target ratio of the transmission bandwidth at the current moment to a preset total bandwidth; and adding the flow control parameters of the target network device to a target data packet through an INT protocol.
[0141] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0142] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0143] It can be understood that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A flow control method, characterized in that, applied to at least one sending end, the method includes: obtaining a target data packet containing flow control parameters of multiple network devices in a transmission link, where the flow control parameters include the transmission bandwidth, remaining transmission bandwidth, and target ratio of the transmission bandwidth at the current moment to the preset total bandwidth corresponding to each network device; the flow control parameters are added to the target data packet based on the INT protocol, and the flow control parameters of each network device are determined based on the historical data transmission rate corresponding to each target network device; determining the transmission rate of the at least one sending end based on the flow control parameters of the multiple network devices and the bandwidth of the at least one sending end; The determining the transmission rate of the at least one sending end based on the flow control parameters of the multiple network devices and the bandwidth of the at least one sending end includes: determining the maximum transmission bandwidth of the target sending end based on the remaining transmission bandwidth corresponding to each network device in the target data packet and the current bandwidth of the target sending end in the at least one sending end; or, determining the transmission bandwidth of each sending end based on the target ratio of the transmission bandwidth at the current moment to the preset total bandwidth corresponding to each network device in the target data packet and the bandwidth of each sending end in the at least one sending end; The determination process of the target data packet of each network device includes: determining the target data transmission rate of the target network device based on the historical data transmission rate corresponding to the target network device, the data transmission amount within the current period, and the time interval of the current period; The determining the target data transmission rate of the target network device based on the historical data transmission rate corresponding to the target network device, the data transmission amount within the current period, and the time interval of the current period includes: obtaining the data transmission amount data_traffic_amout within the current period and the time interval T of the current period corresponding to the target network device, and obtaining the historical data transmission rate rate_old corresponding to the target network device; where the rate_old is determined based on the exponential moving average of the historical data transmission rate corresponding to the target network device; determining the data transmission rate rate_new within the current period based on the data transmission amount data_traffic_amout within the current period and the time interval T of the current period; the corresponding first expression is: determining the target data transmission rate rate of the target network device based on the data transmission rate rate_new within the current period and the historical data transmission rate rate_old; the corresponding second expression is: rate = rate_old×(1 - r)+rate_new×r, 0 < r < 1, where r is a coefficient representing the weight value.
2. The flow control method according to claim 1, characterized in that, The determination process of the target data packet of each network device further includes: Based on the target data transmission rate, the transmission bandwidth at the current moment, the remaining transmission bandwidth, and the target ratio of the transmission bandwidth at the current moment to the preset total bandwidth corresponding to the target network device are determined in sequence.
3. The flow control method according to claim 2, It is characterized in that The determining, based on the target data transmission rate, the transmission bandwidth at the current moment, the remaining transmission bandwidth, and the target ratio of the transmission bandwidth at the current moment to the preset total bandwidth corresponding to the target network device in sequence includes: The target data transmission rate rate is determined as the transmission bandwidth tx_bandwidth corresponding to the target network device at the current moment, and the corresponding third expression is: tx_bandwidth=rate; Based on the difference between the preset total bandwidth total_bandwidth corresponding to the target network device and the transmission bandwidth tx_bandwidth corresponding to the target network device at the current moment, the remaining transmission bandwidth headroom_bandwidth of the target network device is determined, and the corresponding fourth expression is: headroom_bandwidth=total_bandwidth-tx_bandwidth; or, Based on the ratio of the preset total bandwidth total_bandwidth corresponding to the target network device and the transmission bandwidth tx_bandwidth corresponding to the target network device at the current moment, the target ratio ratio of the transmission bandwidth at the current moment to the preset total bandwidth is determined, and the corresponding fifth expression is:
4. The flow control method according to claim 3, It is characterized in that The determining the maximum transmission bandwidth of the target transmitting end based on the remaining transmission bandwidth corresponding to each network device in the target data packet and the current bandwidth of the target transmitting end among the at least one transmitting end comprises: Based on the remaining transmission bandwidth corresponding to each network device in the target data packet, the minimum remaining transmission bandwidth min_headroom_bandwidth is determined, and the corresponding sixth expression is: min_headroom_bandwidth=min(headroom_bandwidth 0, headroom_bandwidth 1 , …headroom_bandwidth n-1 ), where headroom_bandwidth 0 Indicates the remaining transmission bandwidth of the 0th network device among the multiple network devices; headroom_bandwidth 1 Indicates the remaining transmission bandwidth of the first network device among the multiple network devices; headroom_bandwidth n-1 represents the remaining transmission bandwidth of the n-1th network device among the multiple network devices; n is the number of network devices; Based on the current bandwidth cur_sender_bandwidth of the target sender among the at least one sender and the minimum remaining transmission bandwidth min_headroom_bandwidth, the maximum transmission bandwidth max_sender_bandwidth of the target sender is determined, and the corresponding seventh expression is: max_sender_bandwidth=cur_sender_bandwidth+min_headroom_bandwidth.
5. The flow control method according to claim 3, It is characterized in that The determining the transmission bandwidth of each transmitting end based on the target ratio of the transmission bandwidth of each network device corresponding to the current moment in the target data packet to the preset total bandwidth and the bandwidth of each transmitting end in the at least one transmitting end includes: The maximum target ratio max_ratio is determined based on the multiple target ratios corresponding to the multiple network devices, and the corresponding eighth expression is: max_ratio=max(ratio 0 , ratio 1 ,…ratio n-1 ), where ratio 0 Indicates the target ratio corresponding to the 0th network device among the multiple network devices; ratio 1 Indicates the target ratio corresponding to the first network device among the multiple network devices; ratio n-1 represents a target ratio corresponding to the n-1th network device among the plurality of network devices; Based on the current bandwidth cur_sender_bandwidth of the target sender among the at least one sender and the maximum target ratio max_ratio, the transmission bandwidth sender_bandwidth_adj of the target sender is determined, and the corresponding ninth expression is: sender_bandwidth_adj=cur_sender_bandwidth*(1 / max_ratio).
6. A method for determining flow control parameters, It is characterized in that Applied to a target network device, the method comprises: Determine the target data transmission rate of the target network device based on the historical data transmission rate, the data transmission amount within the current period, and the time interval of the current period corresponding to the target network device; Determine the flow control parameters of the target network device in sequence based on the target data transmission rate, where the flow control parameters include: the transmission bandwidth at the current moment corresponding to the target network device, the remaining transmission bandwidth, and the target ratio of the transmission bandwidth at the current moment to the preset total bandwidth; Add the flow control parameters of the target network device to the target data packet through the INT protocol; The determination process of the target data packet for each network device includes: Determine the target data transmission rate of the target network device based on the historical data transmission rate, the data transmission amount within the current period, and the time interval of the current period corresponding to the target network device; The determination of the target data transmission rate of the target network device based on the historical data transmission rate, the data transmission amount within the current period, and the time interval of the current period corresponding to the target network device includes: Obtain the data transmission amount data_traffic_amout within the current period and the time interval T of the current period corresponding to the target network device, and obtain the historical data transmission rate rate_old corresponding to the target network device; where the rate_old is determined based on the exponential moving average value of the historical data transmission rate corresponding to the target network device; Based on the data transmission amount data_traffic_amout within the current period and the time interval T of the current period, determine the data transmission rate rate_new within the current period; the corresponding first expression is: Based on the data transmission rate rate_new within the current period and the historical data transmission rate rate_old, determine the target data transmission rate rate of the target network device; the corresponding second expression is: rate = rate_old × (1 - r) + rate_new × r, 0 < r < 1, where r is a coefficient representing the weight value.
7. A flow control device, Characterized in that, It includes: An acquisition module, configured to acquire a target data packet containing the flow control parameters of multiple network devices in a transmission link, where the flow control parameters include the transmission bandwidth at the current moment, the remaining transmission bandwidth, and the target ratio of the transmission bandwidth at the current moment to the preset total bandwidth corresponding to each network device; the flow control parameters are added to the target data packet based on the INT protocol, and the flow control parameters of each network device are determined based on the historical data transmission rate corresponding to each target network device; A first determination module, configured to determine the transmission rate of the at least one sending end based on the flow control parameters of the multiple network devices and the bandwidth of the at least one sending end; The first determination module is further configured to determine the maximum transmission bandwidth of the target sending end based on the remaining transmission bandwidth corresponding to each network device in the target data packet and the current bandwidth of the target sending end in the at least one sending end; Or, Determine the transmission bandwidth of each sender based on the target ratio of the transmission bandwidth of each network device in the target data packet at the current moment to the preset total bandwidth and the bandwidth of each sender in the at least one sender; The determination process of the target data packet of each network device includes: Determine the target data transmission rate of the target network device based on the historical data transmission rate, the data transmission amount within the current period, and the time interval of the current period corresponding to the target network device; The determining the target data transmission rate of the target network device based on the historical data transmission rate, the data transmission amount within the current period, and the time interval of the current period corresponding to the target network device includes: Obtain the data transmission amount data_traffic_amout within the current period and the time interval T of the current period corresponding to the target network device, and obtain the historical data transmission rate rate_old corresponding to the target network device; wherein, the rate_old is determined based on the exponential moving average value of the historical data transmission rate corresponding to the target network device; Based on the data transmission amount data_traffic_amout within the current period and the time interval T of the current period, determine the data transmission rate rate_new within the current period; the corresponding first expression is: Based on the data transmission rate rate_new within the current period and the historical data transmission rate rate_old, determine the target data transmission rate rate of the target network device; the corresponding second expression is: rate = rate_old × (1 - r) + rate_new × r, 0 < r < 1, where r is a coefficient representing the weight value.
8. An apparatus for determining flow control parameters Characterized in that It includes: A second determination module, configured to determine the target data transmission rate of the target network device based on the historical data transmission rate, the data transmission amount within the current period, and the time interval of the current period corresponding to the target network device; A third determination module, configured to sequentially determine the flow control parameters of the target network device based on the target data transmission rate, where the flow control parameters include: the transmission bandwidth, the remaining transmission bandwidth, and the target ratio of the transmission bandwidth at the current moment to the preset total bandwidth corresponding to the target network device at the current moment; An adding module, configured to add the flow control parameters of the target network device to the target data packet through the INT protocol; The determination process of the target data packet of each network device includes: Determine the target data transmission rate of the target network device based on the historical data transmission rate, the data transmission amount within the current period, and the time interval of the current period corresponding to the target network device; The determining the target data transmission rate of the target network device based on the historical data transmission rate, the data transmission amount within the current period, and the time interval of the current period corresponding to the target network device includes: Obtain the data transmission amount data_traffic_amout within the current period corresponding to the target network device and the time interval T of the current period, and obtain the historical data transmission rate rate_old corresponding to the target network device; wherein, the rate_old is determined based on the exponentially weighted moving average of the historical data transmission rate corresponding to the target network device; Based on the data transmission amount data_traffic_amout within the current period and the time interval T of the current period, determine the data transmission rate rate_new within the current period; the corresponding first expression is: Based on the data transmission rate rate_new within the current period and the historical data transmission rate rate_old, determine the target data transmission rate rate of the target network device; the corresponding second expression is: rate = rate_old×(1 - r)+rate_new×r, 0 < r < 1, where r is a coefficient representing the weight value.
9. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein, when the processor executes the program, it implements the steps of the flow control method according to any one of claims 1 to 7 or the method for determining the flow control parameter according to claim 8.
10. A non-transitory computer-readable storage medium, on which a computer program is stored, wherein, when the computer program is executed by the processor, it implements the steps of the flow control method according to any one of claims 1 to 7 or the method for determining the flow control parameter according to any one of claims 1 to 7 or claim 8.
Citation Information
Patent Citations
Traffic control method and device
CN106453150A
Network traffic control method and network equipment thereof
CN107196877A