Search

CN-122001821-A - Flow control method, flow control device, electronic device, storage medium, and program product

CN122001821ACN 122001821 ACN122001821 ACN 122001821ACN-122001821-A

Abstract

The present disclosure relates to the field of computer technology, and discloses a flow control method, a flow control device, an electronic device, a storage medium and a program product, wherein the flow control method includes obtaining consumption conditions of a first flow control window; if the first flow control window consumes to a first preset value of the first flow control window size, the current service state and the target service threshold value are obtained, the second flow control window size is determined based on a comparison result of the current service state and the target service threshold value and used for representing the updated first flow control window size, the second flow control window size is synchronized to the opposite end through a first window adjusting frame, and the second flow control window size is used for controlling flow data. The method realizes the effective control of the client to the cache data and the reduction of the bandwidth waste rate through the dynamically updated flow control window.

Inventors

  • Liu Senzhen
  • LONG ZHI
  • XIAO YIKAI
  • WU HAO
  • CHEN LI
  • WANG JIAN

Assignees

  • 抖音视界有限公司

Dates

Publication Date
20260508
Application Date
20241104

Claims (17)

  1. 1. A method of flow control, the method comprising: Acquiring consumption conditions of a first stream control window; If the first flow control window consumes to a first preset value of the size of the first flow control window, acquiring a current service state and a target service threshold; Determining a second streaming window size based on a comparison result of the current service state and the target service threshold, wherein the second streaming window size is used for representing the updated first streaming window size; And synchronizing the size of the second flow control window to the opposite end through a first window adjusting frame, wherein the size of the second flow control window is used for controlling flow data.
  2. 2. The method of claim 1, wherein the obtaining the current traffic state and the target traffic threshold comprises: Acquiring a first time stamp of a second window adjusting frame, and obtaining a first time difference between the current time and the first time stamp, wherein the second window adjusting frame is a previous frame of the first window adjusting frame; Acquiring a state estimation result of a current network to obtain the target service threshold; and determining the actual transceiving performance of the current network based on the first time difference, wherein the current service state comprises the actual transceiving performance of the current network.
  3. 3. The method of claim 2, wherein the determining an actual transceiving performance of a current network based on the first time difference comprises: the actual transceiving behavior is determined as the first time difference.
  4. 4. The method of claim 3, wherein the obtaining the state estimation result of the current network to obtain the target traffic threshold includes: Acquiring the round trip delay of the current network; And obtaining the target service threshold based on the round trip delay.
  5. 5. The method of claim 4, wherein determining a second streaming window size based on the comparison of the current traffic state and the traffic threshold comprises: If the first time difference is smaller than a first service threshold, the size of the first flow control window is increased, and the size of the second flow control window is obtained; And if the first time difference is larger than a second service threshold, reducing the size of the first flow control window to obtain the size of the second flow control window, wherein the target service threshold comprises the first service threshold and the second service threshold, and the second service threshold is larger than or equal to the first service threshold.
  6. 6. The method of claim 5, wherein if the second traffic threshold is greater than the first traffic threshold, the determining a second window size based on the comparison of the current traffic state and the target traffic threshold further comprises: and if the first time difference is larger than the first service threshold and smaller than the second service threshold, keeping the size of the first flow control window unchanged, and obtaining the size of the second flow control window.
  7. 7. The method of claim 2, wherein the determining an actual transceiving performance of a current network based on the first time difference comprises: acquiring the data transmission amount in the first time difference; and obtaining the data transmission rate of the current network based on the ratio of the data transmission amount to the first time difference, wherein the actual receiving and transmitting performance comprises the data transmission rate.
  8. 8. The method of claim 7, wherein obtaining the current network state estimate results in the target traffic threshold comprises: and determining the bandwidth estimation value of the current network as the target service threshold value.
  9. 9. The method of claim 8, wherein the determining a second streaming window size based on the comparison of the current traffic state and the target traffic threshold comprises: if the data sending rate is greater than the target service threshold, increasing the size of the first flow control window to obtain the size of the second flow control window; and if the data sending rate is smaller than the target service threshold, reducing the size of the first flow control window to obtain the size of the second flow control window.
  10. 10. The method of claim 1, wherein the obtaining the current traffic state and the target traffic threshold comprises: Obtaining the buffer water level of the player to obtain the current service state; And obtaining the blocking water level to obtain the target service threshold, wherein the blocking water level is obtained based on the code rate of the current playing data.
  11. 11. The method of claim 10, wherein the determining a second streaming window size based on the comparison of the current traffic state and the target traffic threshold comprises: if the current service state is lower than a third service threshold, the size of the first flow control window is increased, and the size of the second flow control window is obtained; And if the current service state is higher than a fourth service threshold, reducing the size of the first flow control window to obtain the size of the second flow control window, wherein the target service threshold comprises the third service threshold and the fourth service threshold, and the fourth service threshold is larger than or equal to the third service threshold.
  12. 12. The method of claim 11, wherein if the fourth traffic threshold is greater than the third traffic threshold, the determining a second window size based on the comparison of the current traffic state and the target traffic threshold further comprises: and if the current service state is higher than the third service threshold and lower than the fourth service threshold, keeping the size of the first flow control window unchanged, and obtaining the size of the second flow control window.
  13. 13. The method according to any one of claims 1 to 12, further comprising: Acquiring code rate information of a current playing fragment to obtain the data volume of the current playing fragment; Acquiring the size of first frame data in the current playing fragment; Determining the size of an initial flow control window based on the size of the first frame data and the data quantity of the current playing fragment; and synchronizing the initial flow control window size to an opposite end through a second window adjusting frame, wherein the initial flow control window size is used for controlling flow data.
  14. 14. A flow control device, the device comprising: the first acquisition module is used for acquiring the consumption condition of the first flow control window; The second acquisition module is used for acquiring the current service state and the target service threshold value if the first streaming control window is consumed to a first preset value of the size of the first streaming control window; A comparison module, configured to determine a second streaming window size based on a comparison result between the current service state and the target service threshold, where the second streaming window size is used to characterize the updated first streaming window size; And the synchronization module is used for synchronizing the size of the second flow control window to the opposite end through the first window adjustment frame, and the size of the second flow control window is used for controlling flow data.
  15. 15. An electronic device, comprising: A memory and a processor in communication with each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the flow control method of any of claims 1 to 13.
  16. 16. A computer-readable storage medium having stored thereon computer instructions for causing a computer to perform the flow control method of any one of claims 1 to 13.
  17. 17. A computer program product comprising computer instructions for causing a computer to perform the flow control method of any one of claims 1 to 13.

Description

Flow control method, flow control device, electronic device, storage medium, and program product Technical Field The present disclosure relates to the field of computer technology, and in particular, to a flow control method, apparatus, electronic device, storage medium, and program product. Background There may be multiple modules in the video transmission link, and for each module, some buffers may be provided to ensure the user experience in order to ensure the quality of service. For example, video data may be distributed in different buffers during playback under a content delivery network (Content Delivery Network, CDN) as shown in fig. 1. In some cases, the end portion of the video is not played, and in addition, in the case where the video is not completely played out in advance, data that has been buffered but not played is wasted, resulting in a large waste of bandwidth. Accordingly, there is a need to provide a flow control method to reduce the bandwidth waste. Disclosure of Invention In view of this, the present disclosure provides a flow control method, apparatus, electronic device, storage medium and program product, so as to solve the problem of greater bandwidth waste. In a first aspect, the present disclosure provides a flow control method, the method comprising: Acquiring consumption conditions of a first stream control window; If the first flow control window consumes to a first preset value of the size of the first flow control window, acquiring a current service state and a target service threshold; Determining a second streaming window size based on a comparison result of the current service state and the target service threshold, wherein the second streaming window size is used for representing the updated first streaming window size; And synchronizing the size of the second flow control window to the opposite end through a first window adjusting frame, wherein the size of the second flow control window is used for controlling flow data. In a second aspect, the present disclosure provides a flow control device comprising: the first acquisition module is used for acquiring the consumption condition of the first flow control window; The second acquisition module is used for acquiring the current service state and the target service threshold value if the first streaming control window is consumed to a first preset value of the size of the first streaming control window; A comparison module, configured to determine a second streaming window size based on a comparison result between the current service state and the target service threshold, where the second streaming window size is used to characterize the updated first streaming window size; And the synchronization module is used for synchronizing the size of the second flow control window to the opposite end through the first window adjustment frame, and the size of the second flow control window is used for controlling flow data. In a third aspect, the present disclosure provides an electronic device, including a memory and a processor, where the memory and the processor are communicatively connected to each other, and the memory stores computer instructions, and the processor executes the computer instructions, thereby executing the flow control method according to the first aspect or any implementation manner corresponding to the first aspect. In a fourth aspect, the present disclosure provides a computer-readable storage medium having stored thereon computer instructions for causing a computer to perform the flow control method of the first aspect or any of its corresponding embodiments. In a fifth aspect, the present disclosure provides a computer program product comprising computer instructions for causing a computer to perform the flow control method of the first aspect or any of its corresponding embodiments. According to the flow control method provided by the embodiment of the disclosure, under the condition that the first flow control window is consumed to the first preset value of the size of the first flow control window, the current service state and the target service threshold value are obtained, the size of the first flow control window is dynamically adjusted by utilizing the comparison result of the current service state and the target service threshold value, and the adjusted result is synchronized to the opposite end through the first window adjusting frame, so that the sizes of the flow control windows at the two ends are consistent. In other words, in the service process, the size of the first flow control window is dynamically adjusted according to the actual service state, so that the adjusted size of the flow control window can be consistent with the actual service state, and the client side can effectively control the cache data and reduce the bandwidth waste rate through the dynamically updated flow control window. Drawings In order to more clearly illustrate the embodiments of the present disclosure or the