Adaptive adjustment method and apparatus for congestion window, device and medium
By receiving confirmation frames to determine the data packet sending information and combining the bandwidth estimation value, packet loss rate and round-trip delay strategy, the congestion window is dynamically adjusted to solve the image quality and real-time problems in live broadcast scenarios and achieve improved stability and real-time performance.
Patent Information
- Application Number
- PCT/CN2024/138770
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-03-20
- Filing Date
- 2024-12-12
- Publication Date
- 2025-09-25
AI Technical Summary
Existing technologies cannot effectively and dynamically adjust the congestion window in live broadcast scenarios, resulting in the inability to simultaneously guarantee live broadcast quality and real-time performance. Adjustment algorithms based on mathematical formulas have delays, while algorithms based on bandwidth feedback cannot stably adjust the congestion window.
By receiving confirmation frames to determine the data packet sending information, combined with the adjustment strategy based on bandwidth estimation, packet loss rate and round-trip delay, the congestion window is dynamically adjusted to achieve adaptive adjustment.
The throughput stability and real-time performance of the congestion window are improved, ensuring the quality and real-time performance of live broadcasts while optimizing the data transmission process.
Smart Images

Figure CN2024138770_25092025_PF_FP_ABST
Abstract
Description
Adaptive congestion window adjustment method, device, equipment and medium
[0001] This application claims priority to Chinese Patent Application No. 202410324372.3 filed on March 20, 2024, and the contents of the above-mentioned Chinese patent application disclosure are hereby incorporated by reference in their entirety as a part of this application. Technical Field
[0002] Embodiments of the present disclosure relate to a method, apparatus, device, and medium for adaptively adjusting a congestion window. Background Art
[0003] With the rapid development of computer and internet technologies, live streaming has become a popular way for people to interact and relax in the internet age. Live streaming primarily involves two processes: push streaming and pull streaming. Push streaming occurs in the uplink portion of the live streaming system, and its quality determines the pull streaming quality for all viewers on the downlink. During the multimedia data stream transmission process, dynamic adjustment of the congestion window to adapt it to the current network transmission environment is crucial for achieving optimal live visual quality.
[0004] Currently, two methods are commonly used to adjust the congestion window in live broadcast scenarios. The first method uses a mathematical formula to detect the maximum send window, while the second method uses bandwidth and latency feedback. However, the first method is only sensitive to packet loss signals and simply identifies them as signs of congestion. Packet loss only occurs when latency has reached a very high level, resulting in window adjustment delays and a failure to ensure real-time live broadcast performance. The second method, however, suffers from poor window adjustment stability and a failure to guarantee live broadcast quality due to the continuous jitter of bandwidth estimates and the inability to detect the actual bandwidth size. Summary of the Invention
[0005] The present disclosure provides a method, apparatus, device, and medium for adaptively adjusting the congestion window to achieve adaptive dynamic adjustment of the congestion window, improve the stability and real-time performance of the congestion window throughput, and thereby achieve the effect of ensuring both live broadcast quality and live broadcast real-time performance in a live broadcast scenario.
[0006] In a first aspect, an embodiment of the present disclosure provides a method for adaptively adjusting a congestion window, the method comprising:
[0007] Upon receiving a current confirmation frame, determining data packet sending information corresponding to the current confirmation frame, wherein the confirmation frame is generated by the server based on at least one received data packet including a multimedia data stream;
[0008] Determining target adjustment information for a current congestion window based on the data packet sending information and at least one pre-set congestion window adjustment policy; wherein the congestion window adjustment policy includes a window adjustment policy based on bandwidth estimation, a window adjustment policy based on packet loss rate, and / or a window adjustment policy based on round-trip delay;
[0009] The window information of the current congestion window is adjusted based on the target adjustment information, so as to control the amount of data packets in the current congestion window or the number of bytes of data packets to be sent based on the adjusted window information.
[0010] In a second aspect, an embodiment of the present disclosure further provides a device for adaptively adjusting a congestion window, the device comprising:
[0011] a data packet information determining module, configured to determine, upon receiving a current confirmation frame, data packet sending information corresponding to the current confirmation frame, wherein the confirmation frame is generated by the server based on at least one received data packet including a multimedia data stream;
[0012] an adjustment information determining module, configured to determine target adjustment information for a current congestion window based on the data packet sending information and at least one pre-set congestion window adjustment policy; wherein the congestion window adjustment policy includes a window adjustment policy based on bandwidth estimation, a window adjustment policy based on packet loss rate, and / or a window adjustment policy based on round-trip delay;
[0013] A congestion window adjustment module is configured to adjust the window information of the current congestion window based on the target adjustment information, so as to control the amount of data packets in the current congestion window or the number of bytes of data packets to be sent based on the adjusted window information.
[0014] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:
[0015] one or more processors;
[0016] a storage device for storing one or more programs,
[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for adaptively adjusting the congestion window as described in any one of the embodiments of the present disclosure.
[0018] In a fourth aspect, an embodiment of the present disclosure further provides a storage medium comprising computer-executable instructions, which, when executed by a computer processor, are used to perform the method for adaptively adjusting the congestion window as described in any one of the embodiments of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale.
[0020] FIG1 is a flow chart of a method for adaptively adjusting a congestion window according to an embodiment of the present disclosure;
[0021] FIG2 is a flow chart of another method for adaptively adjusting a congestion window provided by an embodiment of the present disclosure;
[0022] FIG3 is a schematic diagram of a process for determining entering a bandwidth stable state and exiting a bandwidth stable state provided by an embodiment of the present disclosure;
[0023] FIG4 is a flow chart of another method for adaptively adjusting a congestion window provided by an embodiment of the present disclosure;
[0024] FIG5 is a schematic diagram showing the relationship between the window adjustment coefficient and the packet loss rate according to an embodiment of the present disclosure;
[0025] FIG6 is a flow chart of another method for adaptively adjusting a congestion window provided by an embodiment of the present disclosure;
[0026] FIG7 is an example diagram of determining target adjustment information of the current congestion window based on a window adjustment strategy of a reference delay provided by an embodiment of the present disclosure;
[0027] FIG8 is a schematic structural diagram of a device for adaptively adjusting a congestion window provided by an embodiment of the present disclosure; and
[0028] FIG9 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0029] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0030] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0031] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.
[0032] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0033] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0034] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0035] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0036] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.
[0037] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0038] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0039] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.
[0040] Before introducing this technical solution, we can first give an example of the application scenario. Next, let's explain the meaning of the congestion window. The so-called "congestion window" is the "congestion avoidance" window. The congestion window is used to accommodate data streams that have been sent by the sender but not received by the receiver. The congestion window is a sliding window, which is mainly reflected in two aspects. On the one hand, during the data transmission process, the data in the congestion window is in and out; on the other hand, the amount of data that the congestion window can accommodate is adjustable. The principle of adjusting the congestion window is: as long as there is no congestion in the network, the congestion window will be increased to allow more data streams to be sent out. However, as long as there is congestion in the network, the congestion window will be reduced to reduce the data stream injected into the network, thereby avoiding data congestion in the congestion window. This technical solution can be applied to any scenario that requires dynamic adjustment of the congestion window, such as live broadcast scenarios, real-time video processing scenarios, or real-time audio processing scenarios. In order to introduce the present technical solution more clearly, the execution process of the present technical solution can be explained by taking the live broadcast scenario as an example. For other data stream processing scenarios where real-time data transmission is performed, reference can be made to the processing process of adaptively adjusting the congestion window in the live broadcast scenario.
[0041] For example, in a live broadcast scenario, it mainly involves two processes: live streaming push and live streaming pull. The so-called live streaming push refers to the process in which the live broadcast source end (i.e., the terminal device corresponding to the anchor) sends the real-time video content to the live broadcast server, and the so-called live streaming pull refers to the process in which the audience end (i.e., the terminal device corresponding to the audience) obtains the live video stream from the live broadcast source server. During the multimedia data stream transmission process of live streaming push, the window that accommodates the data packets that have been sent by the live broadcast source end but have not been received by the live broadcast server is the congestion window. During the live broadcast process, only by dynamically adjusting the congestion window so that the congestion window adapts to the current network transmission environment can the requirements of both ensuring the live broadcast quality and ensuring the real-time performance of the live broadcast be achieved.
[0042] During the streaming process, the multimedia data stream generated by the live broadcast source can be packaged into individual data packets, and the data packets are sequentially sent to the congestion window. The data packets in the congestion window are then sequentially received by the live broadcast server. When the live broadcast server receives a certain number of data packets, it can feedback a confirmation frame. At this time, the data packet sending information corresponding to the confirmation frame can be determined (for example, including at least one of the bandwidth estimation value, packet loss rate, and round-trip delay). Then, based on the data packet sending information, the first congestion window adjustment method, and at least one newly added congestion window adjustment strategy, the final window adjustment information is determined, and the congestion window is adjusted based on the window adjustment information to improve the stability and real-time performance of the congestion window throughput, thereby achieving the effect of ensuring both live broadcast quality and real-time performance in the live broadcast scenario.
[0043] Figure 1 is a flow chart of a method for adaptively adjusting a congestion window provided by an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to any scenario requiring real-time rendering of a data stream. The method can be performed by an adaptive adjustment device for a congestion window, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, which can be a mobile terminal, a PC, a server, etc.
[0044] As shown in FIG1 , the method of this embodiment may specifically include:
[0045] S110 . When a current confirmation frame is received, determine the data packet sending information corresponding to the current confirmation frame.
[0046] An acknowledgment frame is primarily used to confirm the receipt of at least one data packet prior to the current moment. For example, an acknowledgment frame can be an ACK (Acknowledge character) frame. When a server receives at least one data packet from another terminal device, it responds with an ACK frame (acknowledgement frame) with the receiving address. The current acknowledgment frame is the acknowledgment frame received at the current moment.
[0047] In this embodiment, the confirmation frame is generated by the server based on at least one received data packet including a multimedia data stream. The multimedia data stream may be a data stream consisting of at least one media type (e.g., image, text, audio, video, etc.). In this embodiment, the multimedia data stream may include an audio stream and / or a video stream. An audio stream may be understood as a data stream consisting of audio. A video stream may be understood as a data stream consisting of video.
[0048] It should be noted that in a live broadcast scenario, the multimedia data stream can be the live video and audio information presented simultaneously on the live broadcast page. In actual applications, the multimedia data stream can be split into multiple data packets, each corresponding to a portion of the multimedia data stream. After receiving a certain number of data packets of the multimedia data stream, the server generates an acknowledgment frame. Optionally, the certain number can be one, two, or more.
[0049] The data packet transmission information describes the records or statistical data generated during the data packet transmission process. In this embodiment, the data packet transmission information includes at least one of bandwidth estimation, packet loss rate, and round-trip delay. This allows the congestion window to be adjusted based on data from multiple dimensions, making it sensitive to any of these information. This enhances the applicability of this window adjustment method. Bandwidth refers to the ability to transmit data from one point to another per unit time, typically measured in bits per second (bps). The bandwidth estimation is an estimate of the bandwidth of a network link. The packet loss rate is the ratio of the number of lost data packets to the total number of transmitted data packets during data transmission. This ratio can be used to measure the stability of data transmission and the quality of network communication. In this embodiment, multimedia data streams are transmitted in the form of data packets. The packet loss rate can reflect the efficiency and quality of data transmission. For example, in a live broadcast scenario, a high packet loss rate can cause frame drops in the live video. Therefore, a lower packet loss rate is preferable; a high packet loss rate generally indicates poor communication quality. Round-trip time (RTT) is the total delay from the time the sender sends data to the time the sender receives confirmation from the receiver (the receiver sends confirmation immediately after receiving the data).
[0050] In this embodiment, the specific implementation method of determining the data packet sending information corresponding to the current confirmation frame is: determining the transmission data of at least one data packet based on the packet information of at least one data packet corresponding to the current confirmation frame; and determining the data packet sending information based on the transmission data.
[0051] A data packet is a medium composed of multiple layers of protocols that can be efficiently transmitted over a network. It can be understood that a data packet is a unit of data such as text, images, executable files, multimedia data streams, and other data that is encapsulated into an organized unit of data that can be transmitted reliably and efficiently over a network. In this embodiment, a data packet is the unit of data in a multimedia data stream during communication transmission.
[0052] The packet information of a data packet is the metadata of the data packet, that is, the information describing the attributes of the data packet, used to support functions such as indicating storage location, historical data, resource search, file logging, etc. For example, the packet information of a data packet may include at least one of the following information: the destination IP address, source IP address, payload data, sending time, arrival time, number of bytes sent, number of bytes received, sending duration, and receiving duration.
[0053] In this embodiment, the current confirmation frame may correspond to one or more data packets. For each data packet, the packet information contains a large amount of information describing the data packet. Information describing the data transmission process, i.e., the transmission data, can be extracted from the packet information. For example, the transmission data may include information such as the sending time, arrival time, number of bytes sent, number of bytes received, sending duration, receiving duration, the time the confirmation frame was sent, and the time the confirmation frame was received. Furthermore, by calculating the transmission data, the data packet transmission information can be obtained.
[0054] Illustratively, determining the bandwidth estimate in the data packet transmission information based on the transmission data may include: determining the transmission rate based on the number of bytes sent and the transmission duration; determining the reception rate based on the number of bytes received and the reception duration; and determining the bandwidth estimate based on the transmission rate and the reception rate. Determining the packet loss rate in the data packet transmission information based on the transmission data may include: determining the packet loss rate in the data packet transmission information based on the number of bytes sent and the number of bytes received. Determining the round-trip delay in the data packet transmission information based on the transmission data may include: determining the round-trip delay in the data packet transmission information based on the transmission time and the time when the acknowledgment frame was received.
[0055] In this embodiment, by extracting key transmission data from a large amount of packet information of a data packet and performing calculations on the transmission data to obtain the data packet sending information, the data packet sending information can be determined quickly and accurately.
[0056] For example, in a live broadcast scenario, the multimedia data stream generated by the live broadcast source can be encapsulated into multiple data packets based on a pre-set unit load capacity and sent sequentially to the live broadcast server. For example, each data packet can contain 1000 bytes of multimedia data stream. After receiving a certain number of data packets, the live broadcast server can feedback an acknowledgment frame, which is the current acknowledgment frame. Furthermore, the bandwidth estimation value, packet loss rate, and / or round-trip delay of the data packets corresponding to the current acknowledgment frame are determined.
[0057] S120: Determine target adjustment information of the current congestion window according to the data packet sending information and at least one preset congestion window adjustment policy.
[0058] Among them, the congestion window adjustment strategy is the method for adjusting the size of the congestion window. The target adjustment information is the basis information for finally determining the adjustment of the current congestion window.
[0059] In this embodiment, the congestion window adjustment strategy includes a window adjustment strategy based on a bandwidth estimation value, a window adjustment strategy based on a packet loss rate, and / or a window adjustment strategy based on a round-trip delay.
[0060] Specifically, for the window adjustment strategy based on the bandwidth estimation value, the implementation method for determining the target adjustment information of the current congestion window is as follows: determine whether to enter the bandwidth stable state according to the current bandwidth estimation value in the data packet sending information and the historical bandwidth estimation values corresponding to at least one historical acknowledgment frame; specifically, preset a first bandwidth threshold (a) and a second bandwidth threshold (b), a < b. If the bandwidth estimation value when entering the bandwidth stable state last time is x, respectively determine the ratios of the current bandwidth estimation value (A0) and each historical bandwidth estimation value (A0-1, A0-2, A0-3,..., A0-n) to x. When these ratios are all less than a, it is determined that the bandwidth stable state is entered; when the ratios are all greater than b, it is determined that the bandwidth stable state is exited; when entering the bandwidth stable state, the target adjustment information of the current congestion window is to inhibit the growth of the congestion window; when exiting the bandwidth stable state, the target adjustment information of the current congestion window is not to inhibit the growth of the congestion window.
[0061] For the window adjustment strategy based on the packet loss rate, the implementation method for determining the target adjustment information of the current congestion window is as follows: determine the target adjustment information of the current congestion window according to the packet loss rate in the data packet sending information and two pre-configured high and low thresholds (respectively the high threshold and the low threshold). Specifically, when the packet loss rate is less than the low threshold, the target adjustment information is not to change the congestion window information; when the packet loss rate is greater than the high threshold, the target adjustment information is to reduce the congestion window according to a preset window reduction coefficient; when the packet loss rate is between the low threshold and the high threshold, determine the window adjustment coefficient corresponding to the packet loss rate according to a linear function, and the target adjustment information is to reduce the congestion window according to the window adjustment coefficient.
[0062] For the window adjustment strategy based on the round-trip delay, the implementation method for determining the target adjustment information of the current congestion window is as follows: preset a first delay threshold (d) and a second delay threshold (f), d < f. Determine the current round-trip delay difference according to the round-trip delay in the data packet sending information corresponding to the current acknowledgment frame and the historical round-trip delay before the current moment; if the current round-trip delay difference is greater than the first delay threshold (d), the target adjustment information is to continuously reduce the window M times, and the size of each window reduction is a first preset value; if the current round-trip delay difference is greater than the second delay threshold (f), the target adjustment information is to continuously reduce the window N times, and the size of each window reduction is a second preset value.
[0063] It should be noted that the technical solution provided by the embodiment of the present disclosure is a new congestion window adjustment strategy based on the original first congestion window adjustment method. In specific applications, since the new congestion window adjustment strategy is triggered only when the corresponding conditions are met, for example, the window adjustment strategy based on the bandwidth estimation value is only triggered when the bandwidth enters a stable state; the window adjustment strategy based on the packet loss rate is only triggered when packet loss occurs; the window adjustment strategy based on the round-trip delay is only triggered when the round-trip delay corresponding to the current determined frame meets the preset conditions. Even if none of the three new window adjustment strategies are triggered, the current congestion window will still be adjusted according to the original first congestion window adjustment method. The target adjustment information is the adjustment information that needs to be determined only when at least one of the new window adjustment strategies is triggered.
[0064] S130 : Adjust the window information of the current congestion window based on the target adjustment information, so as to control the amount of data packets in the current congestion window or the number of bytes of data packets to be sent based on the adjusted window information.
[0065] The window information of the current congestion window is used to represent the size of the congestion window at the current moment.
[0066] In this embodiment, the size of the current congestion window can be adjusted based on the target adjustment information. The number of data packets and bytes of data that the adjusted congestion window can accommodate can be determined, thereby ensuring that the number of data packets in the current congestion window is within the capacity range of the adjusted congestion window, or ensuring that the number of bytes of data packets to be sent is within the capacity range of the adjusted congestion window.
[0067] For example, if the target adjustment information is to reduce the congestion window capacity by 1000KB, the current congestion window capacity, originally 15000KB, is reduced to 14000KB. If each data packet corresponds to 1000KB of data, the number of data packets in the current congestion window can be controlled to be less than or equal to 14, or the number of bytes of data packets to be sent can be controlled to be less than or equal to 14000KB.
[0068] On the basis of the above embodiment, after adjusting the window information of the current congestion window based on the target adjustment information, it also includes: determining the amount of data packets in the current congestion window or the number of bytes of data packets to be sent based on the adjusted window information, and taking the confirmation frame received at the next moment as the current confirmation frame, and executing the step of determining the target adjustment information.
[0069] In this embodiment, an acknowledgment frame is received every preset duration. For example, an acknowledgment frame is received every 0.1ms. If the current acknowledgment frame (ACK0 frame) is received at the current time (t), and an acknowledgment frame (ACK1 frame) is received at the next time (t+0.1ms), the ACK1 frame is determined to be the current acknowledgment frame, and steps S110-S130 are executed. Based on this, the congestion window is continuously and intelligently adjusted during the live broadcast process, thereby ensuring the smoothness of the live broadcast process.
[0070] Based on the above embodiment, the method further includes: determining a sending rate for transmitting the data packets to be sent in the congestion window according to the bandwidth estimation value and the preset coefficient in the data packet information, so as to send the data packets to be sent to the server based on the sending rate.
[0071] The preset coefficient is a specific value set in advance. The data packet to be sent is a data packet that is within the congestion window and is about to be sent to the server.
[0072] In this embodiment, the relationship between the transmission rate of the data packet to be transmitted, the bandwidth estimation value, and the preset coefficient can be expressed in the form of a formula: Pacing_rate=α*Bandwidth_estimate Formula (1)
[0073] Wherein, Pacing_rate is the sending rate, Bandwidth_estimate is the estimated bandwidth, and α is the preset coefficient.
[0074] Specifically, based on the bandwidth estimate, the bandwidth estimate is multiplied by a preset coefficient according to formula (1) to obtain the transmission rate for the data packets to be sent within the congestion window. Furthermore, the data packets to be sent within the congestion window are controlled to be sent to the server at the transmission rate. In this way, the transmission rate corresponding to the data packets to be sent within the congestion window also changes in real time, and a large number of data packets will not accumulate within the congestion window, thereby achieving smooth data transmission.
[0075] The technical solution of the embodiment of the present disclosure determines the data packet sending information corresponding to the current confirmation frame when the current confirmation frame is received; further, based on the data packet sending information and at least one pre-set congestion window adjustment strategy, the target adjustment information of the current congestion window is determined, wherein the congestion window adjustment strategy includes a window adjustment strategy based on bandwidth estimation, a window adjustment strategy based on packet loss rate, and / or a window adjustment strategy based on round-trip delay, thereby adjusting the window information of the current congestion window based on the target adjustment information to control the amount of data packets in the current congestion window or the number of bytes of data packets to be sent based on the adjusted window information. The technical solution of the embodiment of the present disclosure realizes adaptive dynamic adjustment of the congestion window, improves the stability and real-time performance of the congestion window throughput, and thus achieves the effect of ensuring both live broadcast quality and live broadcast real-time performance in live broadcast scenarios.
[0076] Figure 2 is a flow chart illustrating another method for adaptively adjusting the congestion window provided by an embodiment of the present disclosure. Building upon the aforementioned embodiments, the technical solution of this embodiment details how to determine target congestion window adjustment information based on bandwidth estimates contained in packet transmission information and a window adjustment strategy based on these estimates. For specific implementation details, please refer to the detailed description of the embodiments of the present disclosure. Technical features identical or similar to those of the aforementioned embodiments are not further detailed here.
[0077] As shown in FIG2 , the method of this embodiment may specifically include:
[0078] S210 . When a current confirmation frame is received, determine a bandwidth estimation value of data packet transmission information corresponding to the current confirmation frame.
[0079] In this embodiment, determining the bandwidth estimation value in the data packet sending information includes: using the minimum value of the sending rate and the corresponding receiving rate of at least one data packet in the transmitted data as the bandwidth estimation value in the data packet sending information.
[0080] The sending rate is the amount of data sent per unit time, and the receiving rate is the amount of data received per unit time.
[0081] Specifically, the current acknowledgment frame corresponds to at least one data packet, and the transmitted data includes the transmission rate and the corresponding reception rate of at least one data packet. Optionally, each data packet may correspond to a transmission rate and a reception rate, or all data packets may correspond to a transmission rate and a reception rate. The bandwidth estimation value can be determined based on the minimum value of the transmission rate and the corresponding reception rate of each data packet. Exemplarily, the current acknowledgment frame corresponds to data packet 1, data packet 2, and data packet 3. The transmission rate corresponding to data packet 1 is a1, and the reception rate is b1; the transmission rate corresponding to data packet 2 is a2, and the reception rate is b2; the transmission rate corresponding to data packet 3 is a⑶, and the reception rate is b3; where a1 < b1 < a2 < b2 < a3 < b3, then the bandwidth estimation value in the data packet transmission information is a1. In addition, the bandwidth estimation value can also be determined based on the minimum value of the transmission rate and the corresponding reception rate of all data packets. Exemplarily, the current acknowledgment frame corresponds to data packet 1, data packet 2, and data packet 3. The transmission rate corresponding to data packet 1, data packet 2, and data packet 3 is x, and the reception rate is y, where x < y, then the bandwidth estimation value in the data packet transmission information is x.
[0082] In this embodiment, the minimum transmission rate of each data packet corresponding to the current acknowledgment frame is used as the bandwidth estimation value. The minimum transmission rate is the transmission rate shown when the network state is the worst. When determining the target adjustment information based on the bandwidth estimation value subsequently, even in the case of the worst network state, the determined target adjustment information is the best.
[0083] S220. Determine the target adjustment information of the current congestion window according to the bandwidth estimation value in the data packet transmission information and the window adjustment policy based on the bandwidth estimation value.
[0084] In this embodiment, the target adjustment information of the current congestion window is determined according to the bandwidth estimation value in the data packet transmission information and the historical bandwidth estimation values corresponding to at least one historical acknowledgment frame.
[0085] Among them, the historical acknowledgment frame is the acknowledgment frame received at at least one moment before the current moment. The historical bandwidth estimation value is the bandwidth estimation value corresponding to the historical acknowledgment frame. The number of historical bandwidth estimation values is one or more.
[0086] In this embodiment, according to the bandwidth estimation value corresponding to the current acknowledgment frame and at least one historical bandwidth estimation value, it is determined whether the network bandwidth is stable during the current period. The target adjustment information corresponding to bandwidth stability and bandwidth instability is different, so as to determine that the target adjustment information conforms to the current network state.
[0087] Optionally, target adjustment information of the current congestion window is determined based on the bandwidth estimation value and the historical bandwidth estimation value corresponding to at least one historical confirmation frame, which may specifically include: retrieving the baseline bandwidth estimation value corresponding to the previous entry into the stable bandwidth state; determining the ratio of the bandwidth estimation value and the historical bandwidth estimation value to the baseline bandwidth estimation value respectively; and determining the target adjustment information of the current congestion window based on the ratio and a preset ratio threshold.
[0088] The reference bandwidth estimation value is the bandwidth estimation value corresponding to the last time the system entered the stable bandwidth state. The preset ratio threshold is a pre-set fixed value, and the value of the preset ratio threshold can be adjusted.
[0089] In this embodiment, the baseline bandwidth estimation value is a known quantity at this time and can be retrieved according to a pre-set storage path. The ratio of the bandwidth estimation value to the baseline bandwidth estimation value and the ratio of each historical bandwidth estimation value to the baseline bandwidth estimation value can be determined respectively. For example, if the baseline bandwidth estimation value is x, the bandwidth estimation value (A0) and the ratio of each historical bandwidth estimation value (A1) can be determined respectively. 0-1 、A 0-2 、A 0-3 ,…,A 0-n ), the ratio of A0 to x, i.e. A0 / x, A 0-1 / x、A 0-2 / x、A 0-3 / x,…,A 0- n Therefore, the target adjustment information of the current congestion window can be determined based on the magnitude relationship between the ratio and the preset ratio threshold.
[0090] In this embodiment, whether to enter the bandwidth stable state is determined based on the currently determined bandwidth estimation value, the historical bandwidth estimation value, and the reference bandwidth estimation value corresponding to the previous time the stable bandwidth state was entered. Different states correspond to different target adjustment information. Since the historical bandwidth estimation value and the reference bandwidth estimation value are taken into account, the error of a single bandwidth estimation value can be eliminated, and more stable target adjustment information can be determined.
[0091] Optionally, the preset ratio threshold includes a first ratio threshold and a second ratio threshold. Based on the ratio and the preset ratio threshold, the target adjustment information of the current congestion window is determined, which may specifically include: when the ratios are less than or equal to the first ratio threshold, determining that the bandwidth enters a stable state, and updating the reference bandwidth estimation value corresponding to entering the stable bandwidth state based on the bandwidth estimation value, and determining that the target adjustment information is to suppress the growth of the congestion window; when the ratios are greater than the second ratio threshold, determining to exit the bandwidth stable state, and determining the target adjustment information is not to suppress the growth of the congestion window.
[0092] The first ratio threshold is different from the second ratio threshold, and the specific values of the first ratio threshold and the second ratio threshold are different. For example, the first ratio threshold is a, and the second ratio threshold is b.
[0093] Based on the above exemplary embodiment, the process of determining whether to enter the bandwidth stable state and exit the bandwidth stable state is shown in FIG3 , wherein A0 / x, A 0-1 / x、A 0-2 / x、A 0-3 / x,…,A 0-n Any of A0 / x and A 0-1 / x、A 0-2 / x、A 0-3 / x,…,A 0-n When the ratios of A0 / x and A0 / x (a total of Y ratios) are all less than or equal to the first ratio threshold, it is determined that the bandwidth enters a stable state. At this time, the reference bandwidth estimation value corresponding to the stable bandwidth state is updated to A0, and the target adjustment information is determined to be to suppress the growth of the congestion window. That is, based on the original adjustment information determined based on the first congestion window adjustment method (original), it is necessary to suppress the growth of the congestion window size. As shown in Figure 3, when A0 / x and A0 / x are equal, the bandwidth enters a stable state. 0- 1 / x, A 0-2 / x、A 0-3 / x,…,A 0-n When the ratios / x (a total of Y ratios) are all greater than the second ratio threshold, it is determined that the bandwidth stable state is exited, and the target adjustment information is determined to be not suppressing the growth of the congestion window. That is, based on the original adjustment information determined based on the first congestion window adjustment method (original), the growth of the congestion window size is not suppressed.
[0094] In this embodiment, when entering the stable bandwidth state, it indicates that the current bandwidth is close to saturation. If the size of the congestion window is continuously increased, there is a risk of data congestion. When exiting the stable bandwidth state, it indicates that a higher bandwidth may be available. The size of the congestion window can be increased, thereby improving the throughput of the congestion window and improving data transmission performance.
[0095] S230: Adjust the window information of the current congestion window based on the target adjustment information, so as to control the amount of data packets in the current congestion window or the number of bytes of data packets to be sent based on the adjusted window information.
[0096] The technical solution of the embodiment of the present disclosure determines the data packet transmission information corresponding to the current confirmation frame upon receiving the current confirmation frame; further, based on the bandwidth estimation value in the data packet transmission information and the window adjustment strategy based on the bandwidth estimation value, determines the target adjustment information of the current congestion window, thereby adjusting the window information of the current congestion window based on the target adjustment information to control the amount of data packets within the current congestion window or the number of bytes of data packets to be sent based on the adjusted window information. The technical solution of the embodiment of the present disclosure determines whether to enter a bandwidth stable state based on the currently determined bandwidth estimation value, the historical bandwidth estimation value, and the reference bandwidth estimation value corresponding to the previous time the stable bandwidth state was entered. Different states correspond to different target adjustment information. Since the historical bandwidth estimation value and the reference bandwidth estimation value are taken into account, the error of a single bandwidth estimation value can be eliminated, and more stable target adjustment information can be determined.
[0097] Figure 4 is a flow chart illustrating another method for adaptively adjusting the congestion window provided by an embodiment of the present disclosure. Building upon the aforementioned embodiments, the technical solution of this embodiment details how to determine target congestion window adjustment information based on the packet loss rate in the data packet transmission information and a pre-set window adjustment strategy based on the packet loss rate. For specific implementation details, please refer to the detailed description of the embodiments of the present disclosure. Technical features identical or similar to those of the aforementioned embodiments are not further detailed here.
[0098] As shown in FIG4 , the method of this embodiment may specifically include:
[0099] S310: When a current confirmation frame is received, determine a packet loss rate in the data packet sending information corresponding to the current confirmation frame.
[0100] In this embodiment, determining the packet loss rate in the data packet sending information corresponding to the current confirmation frame specifically includes: determining the to-be-fitted packet loss rate corresponding to the current confirmation frame based on the number of sent bytes and the number of received bytes of at least one data packet in the transmitted data; when the to-be-fitted packet loss rate that has not participated in the fitting meets a preset condition, fitting all to-be-fitted packet loss rates to obtain a to-be-processed packet loss rate; updating the to-be-processed packet loss rate based on the to-be-processed packet loss rate and the to-be-updated packet loss rate corresponding to the current congestion window; and using the updated to-be-updated packet loss rate as the packet loss rate in the data packet sending information.
[0101] The preset condition is a pre-set processing rule used to control whether all packet loss rates to be fitted are fitted. For example, the preset condition may be that the number of packet loss rates to be fitted that are not included in the fitting reaches a preset number threshold, or that the duration of determining the packet loss rates to be fitted that are not included in the fitting reaches a preset duration threshold. The packet loss rate to be updated corresponding to the current congestion window is the previously determined packet loss rate to be processed.
[0102] In this embodiment, for the current confirmation frame, the total number of bytes sent is determined based on the number of bytes sent by each data packet, and the total number of bytes received is determined based on the number of bytes received by each data packet. The ratio of the total number of bytes sent to the total number of bytes received is determined as the packet loss rate to be fitted corresponding to the current confirmation frame. Furthermore, when the number of packet loss rates to be fitted that are not included in the fitting reaches a preset number threshold (the number of packet loss rates to be fitted reaches 5), and / or the duration of the packet loss rates to be fitted that are not included in the fitting reaches a preset duration threshold (the duration of the packet loss rates to be fitted that are not included in the fitting is determined to be 1 second), fitting processing is performed on all packet loss rates to be fitted to obtain the packet loss rate to be processed. Specific methods of fitting processing may include, but are not limited to, averaging, weighted averaging, and other methods. For example, when the number of packet loss rates to be fitted that are not included in the fitting is 5, these 5 packet loss rates to be fitted are averaged to obtain the packet loss rate to be processed. Furthermore, the packet loss rate to be processed and the packet loss rate to be updated may be smoothed to obtain a smoothed packet loss rate, and the packet loss rate to be updated may be updated according to the smoothed packet loss rate.
[0103] For example, if the current confirmation frame is the tenth confirmation frame received and the preset condition is that the number of unfitted packet loss rates reaches five, then fitting can be performed on the packet loss rates corresponding to the sixth through tenth confirmation frames to obtain a processed packet loss rate. The packet loss rate corresponding to the current congestion window to be updated is the processed packet loss rate determined by the first through fifth confirmation frames. Based on this, the processed packet loss rate and the packet loss rate corresponding to the current congestion window to be updated are smoothed to obtain a smoothed packet loss rate. The packet loss rate to be updated is then updated based on the smoothed packet loss rate. This improves the accuracy of the packet loss rate determination, thereby improving the accuracy of the target adjustment information.
[0104] S320: Determine target adjustment information of the current congestion window according to the packet loss rate in the data packet sending information and a preset window adjustment strategy based on the packet loss rate.
[0105] In this embodiment, the specific implementation method for determining the target adjustment information of the current congestion window is as follows: when the packet loss rate is greater than the first packet loss rate threshold, the target adjustment information is determined to be unchanged congestion window information; when the packet loss rate is between the first packet loss rate threshold and the second packet loss rate threshold, a first window adjustment coefficient corresponding to the packet loss rate is determined based on a linear function, and the first window adjustment coefficient is used as the target adjustment information; when the packet loss rate is greater than the second packet loss rate threshold, the target adjustment information is determined to be the second window adjustment coefficient.
[0106] The first packet loss rate threshold is greater than the second packet loss rate threshold. For example, the first packet loss rate threshold is j, the second packet loss rate threshold is k, and j < k. A linear function is used to characterize the linear relationship between the packet loss rate and the window adjustment coefficient. When the packet loss rate is a known value, the window adjustment coefficient corresponding to the packet loss rate can be determined based on the packet loss rate and the linear relationship.
[0107] Specifically, a schematic diagram of the changing relationship between the window adjustment coefficient and the packet loss rate is shown in Figure 5. As shown in Figure 5, when the packet loss rate is less than the first packet loss rate threshold, the window adjustment coefficient is 1. At this time, the target adjustment information is determined to be not changing the congestion window information; the oblique line in Figure 5 represents the linear relationship between the packet loss rate and the window adjustment coefficient. When the packet loss rate is between the first packet loss rate threshold and the second packet loss rate threshold, the first window adjustment coefficient corresponding to the packet loss rate is determined based on the linear relationship between the packet loss rate and the window adjustment coefficient (for example, the packet loss rate is s, and the first window adjustment coefficient corresponding to the packet loss rate s is determined to be p based on the linear relationship). At this time, the target adjustment information is to perform window lowering processing on the congestion window based on the first window adjustment coefficient; when the packet loss rate is greater than the second packet loss rate threshold, the window adjustment coefficient is B. At this time, the target adjustment information is determined to perform window lowering processing on the congestion window based on the second window adjustment coefficient.
[0108] This embodiment does not simply identify packet loss as a sign of congestion. This avoids the problem of persistently reducing the send window size, even in the absence of congestion, in scenarios with a certain degree of random packet loss, leading to reduced throughput. Furthermore, different target adjustment information is determined in stages based on the specific value of the packet loss rate, improving the stability and accuracy of congestion window adjustment.
[0109] S330: Adjust the window information of the current congestion window based on the target adjustment information, so as to control the amount of data packets in the current congestion window or the number of bytes of data packets to be sent based on the adjusted window information.
[0110] The technical solution of the embodiment of the present disclosure determines the data packet sending information corresponding to the current confirmation frame when the current confirmation frame is received; further, based on the packet loss rate in the data packet sending information and a pre-set window adjustment strategy based on the packet loss rate, the target adjustment information of the current congestion window is determined, thereby adjusting the window information of the current congestion window based on the target adjustment information to control the amount of data packets in the current congestion window or the number of bytes of data packets to be sent based on the adjusted window information. The technical solution of the embodiment of the present disclosure does not simply identify packet loss as a signal of congestion occurrence, but avoids the problem that in scenarios with a certain degree of random packet loss, the sending window size will continue to decrease even if congestion does not occur, resulting in a decrease in throughput performance, and further improves the stability and accuracy of adjusting the congestion window.
[0111] Figure 6 is a flow chart illustrating another method for adaptively adjusting the congestion window provided by an embodiment of the present disclosure. Building upon the aforementioned embodiments, the technical solution of this embodiment details how to determine target congestion window adjustment information based on the round-trip delay corresponding to at least one data packet in the data packet transmission information and a pre-set window adjustment policy based on round-trip delay. For specific implementation details, please refer to the detailed description of the embodiments of the present disclosure. Technical features identical or similar to those of the aforementioned embodiments are not further detailed here.
[0112] As shown in FIG6 , the method of this embodiment may specifically include:
[0113] S410: When a current confirmation frame is received, determine the data packet sending information corresponding to the current confirmation frame.
[0114] S420: Determine target adjustment information of the current congestion window according to the round-trip delay corresponding to at least one data packet in the data packet sending information and a preset window adjustment policy based on the round-trip delay.
[0115] In this embodiment, determining the target adjustment information of the current congestion window specifically includes: obtaining a reference delay corresponding to the current transmission link; smoothing at least one round-trip delay to obtain a round-trip delay to be used; and determining the target adjustment information of the current congestion window based on the round-trip delay to be used and the reference delay.
[0116] The reference delay is determined based on the historical round-trip delay of at least one data packet sent before the current moment. For example, the minimum value of the historical round-trip delay of at least one data packet sent before the current moment can be determined as the reference delay.
[0117] Specifically, the reference delay is pre-stored in a preset storage unit and can be retrieved here according to a preset storage path. In this embodiment, at least one round-trip delay can be averaged, weighted averaged, or filtered to obtain the round-trip delay to be used. Furthermore, the difference between the round-trip delay to be used and the reference delay can be determined, and target adjustment information for the current congestion window can be determined based on the relationship between the difference and a preset threshold.
[0118] It is understandable that the sampling value of the round-trip delay usually fluctuates greatly due to other delays such as processing delays in different data packets. This embodiment can determine more stable target adjustment information by using the reference delay and the smoothed round-trip delay to be used.
[0119] Specifically, based on the round-trip delay to be used and the reference delay, the target adjustment information of the current congestion window is determined, and the implementation method is as follows: when the difference between the round-trip delay to be used and the reference delay is greater than the first preset difference, the target adjustment information is determined to be adjusting the current congestion window a first preset number of times with the first preset window lowering coefficient; when the difference between the round-trip delay to be used and the reference delay is greater than the second preset difference, the target adjustment information is determined to be adjusting the current congestion window a second preset number of times with the second preset window lowering coefficient.
[0120] The second preset difference is greater than the first preset difference. The first preset window lowering coefficient is different from the second preset window lowering coefficient. The first preset number of times is different from the second preset number of times.
[0121] In this embodiment, the first preset difference is a, the second preset difference is b, the first preset window-lowering coefficient is x% for each window-lowering, the second preset window-lowering coefficient is y% for each window-lowering, the first preset number of times is M, and the second preset number of times is N. The difference between the round-trip delay to be used and the reference delay is determined to be h. When h is greater than a, the target adjustment information is determined to be M consecutive window-lowering times, each time by x% to adjust the current congestion window. When h is greater than b, the target adjustment information is determined to be N consecutive window-lowering times, each time by y% to adjust the current congestion window.
[0122] It is understandable that when the difference between the round-trip delay to be used and the reference delay is greater than the second preset difference, it indicates that the round-trip delay to be used is suddenly higher than the reference delay previously monitored. It is speculated that a sudden drop in available bandwidth may have occurred. For the new network environment, if the current amount of data sent is maintained, packet loss may occur. Therefore, trying to lower the window before packet loss can effectively avoid window congestion.
[0123] S430: Adjust the window information of the current congestion window based on the target adjustment information, so as to control the amount of data packets in the current congestion window or the number of bytes of data packets to be sent based on the adjusted window information.
[0124] Based on the above embodiment, after adjusting the window information of the current congestion window based on the target adjustment information, the method further includes: determining the round-trip delay of at least one data packet sent after adjusting the window information, and using the minimum value of the round-trip delay as the reference delay.
[0125] In this embodiment, after adjusting the window information, the current confirmation frame (referred to as the next confirmation frame) is received again at the next moment after the current moment. The next confirmation frame also corresponds to at least one data packet. The round-trip delays corresponding to these data packets can be determined, and the minimum of these round-trip delays is determined and used as the reference delay. This configuration has the advantage that the reference delay is continuously updated over time, improving the real-time nature and applicability of the target adjustment information.
[0126] For example, a specific example is used to illustrate how to determine the target adjustment information of the current congestion window based on the window adjustment strategy of the reference delay, see Figure 7. As shown in Figure 7, first determine whether the difference between the round-trip delay to be used and the reference delay is greater than the second preset difference; if so, the target adjustment information is to adjust the current congestion window by the second preset number of times using the second preset window reduction coefficient (aggressive window reduction); if not, further determine whether the difference between the round-trip delay to be used and the reference delay is greater than the first preset difference. If so, the target adjustment information is to adjust the current congestion window by the first preset number of times using the first preset window reduction coefficient (conservative window reduction); otherwise, do not reduce the window. Finally, determine the round-trip delay of at least one data packet sent after adjusting the window information, and use the minimum value of the round-trip delay as the reference delay.
[0127] The technical solution of the embodiment of the present disclosure is to determine the data packet sending information corresponding to the current confirmation frame when the current confirmation frame is received; further, according to the round-trip delay corresponding to at least one data packet in the data packet sending information and the pre-set window adjustment strategy based on the round-trip delay, determine the target adjustment information of the current congestion window, thereby adjusting the window information of the current congestion window based on the target adjustment information to control the amount of data packets in the current congestion window or the number of bytes of data packets to be sent based on the adjusted window information. The technical solution of the embodiment of the present disclosure is based on the window adjustment strategy based on the round-trip delay by setting two difference thresholds of different numerical values. When the round-trip delay to be used is greater than the difference threshold with a larger numerical value, it indicates that the round-trip delay to be used is suddenly higher than the reference delay previously monitored, and it is speculated that a sudden drop in available bandwidth may have occurred. For the new network environment, if the current amount of data sent is maintained, packet loss may occur. Therefore, trying to lower the window before packet loss can effectively avoid window congestion.
[0128] FIG8 is a schematic structural diagram of a device for adaptively adjusting a congestion window according to an embodiment of the present disclosure. As shown in FIG8 , the device includes: a data packet information determination module 510 , an adjustment information determination module 520 , and a congestion window adjustment module 530 .
[0129] Among them, the data packet information determination module 510 is used to determine the data packet sending information corresponding to the current confirmation frame when receiving the current confirmation frame, wherein the confirmation frame is generated by the server based on at least one data packet received including a multimedia data stream; the adjustment information determination module 520 is used to determine the target adjustment information of the current congestion window based on the data packet sending information and at least one pre-set congestion window adjustment policy; wherein the congestion window adjustment policy includes a window adjustment policy based on bandwidth estimation, a window adjustment policy based on packet loss rate and / or a window adjustment policy based on round-trip delay; the congestion window adjustment module 530 is used to adjust the window information of the current congestion window based on the target adjustment information, so as to control the amount of data packets in the current congestion window or the number of bytes of data packets to be sent based on the adjusted window information.
[0130] Based on the above-mentioned optional technical solutions, optionally, the data packet information determination module 510 is specifically used to determine the transmission data of the at least one data packet according to the packet information of the at least one data packet corresponding to the current confirmation frame; and determine the data packet sending information based on the transmission data.
[0131] Based on the above optional technical solutions, optionally, the data packet sending information includes at least one of a bandwidth estimation value, a packet loss rate, and a round-trip delay.
[0132] Based on the above optional technical solutions, optionally, the data packet information determination module 510 further includes a bandwidth estimation value determination unit;
[0133] The bandwidth estimation value determining unit is configured to use the minimum value of the sending rate and the corresponding receiving rate of at least one data packet in the transmission data as the bandwidth estimation value in the data packet sending information.
[0134] On the basis of the above-mentioned optional technical solutions, optionally, the adjustment information determination module 520 includes: a first adjustment information determination submodule, a second adjustment information determination submodule and a third adjustment information determination submodule;
[0135] Optionally, the congestion window adjustment strategy is a window adjustment strategy based on a bandwidth estimation value, the data packet sending information includes a bandwidth estimation value, and the first adjustment information determination submodule is used to determine the target adjustment information of the current congestion window based on the bandwidth estimation value and a historical bandwidth estimation value corresponding to at least one historical confirmation frame.
[0136] Optionally, the first adjustment information determination submodule specifically includes:
[0137] A reference bandwidth retrieving unit, configured to retrieve a reference bandwidth estimation value corresponding to the last time the stable bandwidth state was entered;
[0138] a reference ratio determination unit, configured to determine ratios of the bandwidth estimation value and the historical bandwidth estimation value to the reference bandwidth estimation value, respectively;
[0139] The first adjustment information determining unit is configured to determine target adjustment information of the current congestion window based on the ratio and a preset ratio threshold.
[0140] Optionally, the preset ratio threshold includes a first ratio threshold and a second ratio threshold, and the first adjustment information determination unit is specifically used to: when the ratios are all less than or equal to the first ratio threshold, determine to enter a bandwidth stable state, and update the baseline bandwidth estimation value corresponding to entering the stable bandwidth state based on the bandwidth estimation value, and determine that the target adjustment information is to suppress the growth of the congestion window; when the ratios are all greater than the second ratio threshold, determine to exit the bandwidth stable state, and determine that the target adjustment information is not to suppress the growth of the congestion window.
[0141] Based on the above optional technical solutions, optionally, the device further includes: a packet loss rate determination module;
[0142] Optionally, a packet loss rate determination module includes:
[0143] a packet loss rate determination unit to be fitted, configured to determine the packet loss rate to be fitted corresponding to the current confirmation frame based on the number of sent bytes and the number of received bytes of at least one data packet in the transmission data;
[0144] a packet loss rate determination unit for processing, configured to perform fitting processing on all packet loss rates to be fitted when the packet loss rates to be fitted that are not involved in fitting reach a preset condition, to obtain a packet loss rate to be processed;
[0145] a packet loss rate updating unit, configured to update the packet loss rate to be updated according to the packet loss rate to be processed and the packet loss rate to be updated corresponding to the current congestion window;
[0146] The packet loss rate determining unit is configured to use the updated packet loss rate to be updated as the packet loss rate in the data packet sending information.
[0147] Optionally, the data packet sending information includes a packet loss rate, the congestion window adjustment strategy is a window adjustment strategy based on the packet loss rate, and the second adjustment information determination submodule specifically includes:
[0148] Optionally, the data packet sending information includes a packet loss rate, and the second adjustment submodule specifically includes:
[0149] a first adjustment unit, configured to determine, when the packet loss rate is less than a first packet loss rate threshold, that the target adjustment information is not to change the congestion window information;
[0150] a second adjustment unit, configured to determine, when the packet loss rate is between the first packet loss rate threshold and a second packet loss rate threshold, a first window adjustment coefficient corresponding to the packet loss rate according to a linear function, and use the first window adjustment coefficient as the target adjustment information;
[0151] a third adjustment unit, configured to determine, when the packet loss rate is greater than the second packet loss rate threshold, that the target adjustment information is a second window adjustment coefficient;
[0152] The second packet loss rate threshold is greater than the first packet loss rate threshold.
[0153] Optionally, the data packet sending information includes a round-trip delay corresponding to at least one data packet, and the congestion window adjustment strategy includes a window adjustment strategy based on the round-trip delay; and the third adjustment information determination submodule specifically includes:
[0154] a reference delay acquisition unit, configured to acquire a reference delay corresponding to the current transmission link, wherein the reference delay is determined based on a historical round-trip delay of at least one data packet sent before the current moment;
[0155] a round-trip delay to be used determining unit, configured to smooth at least one of the round-trip delays to obtain a round-trip delay to be used;
[0156] An adjustment information determining unit is configured to determine target adjustment information of the current congestion window according to the round trip delay to be used and the reference delay.
[0157] Optionally, the adjustment information determination unit is specifically used to: when the difference between the round-trip delay to be used and the reference delay is greater than a first preset difference, determine the target adjustment information to adjust the current congestion window a first preset number of times with a first preset window lowering coefficient; when the difference between the round-trip delay to be used and the reference delay is greater than a second preset difference, determine the target adjustment information to adjust the current congestion window a second preset number of times with a second preset window lowering coefficient; wherein the second preset difference is greater than the first preset difference.
[0158] Based on the above optional technical solutions, optionally, the device further includes: a sending rate determination module;
[0159] The sending rate determination module is used to determine the sending rate for transmitting the data packets to be sent in the congestion window according to the bandwidth estimation value and the preset coefficient in the data packet information, so as to send the data packets to be sent to the server based on the sending rate.
[0160] On the basis of the above optional technical solutions, optionally, the device further includes: a repeated execution module;
[0161] The repeated execution module is used to determine the amount of data packets in the current congestion window or the number of bytes of data packets to be sent based on the adjusted window information, and use the confirmation frame received at the next moment as the current confirmation frame, and execute the step of determining the target adjustment information.
[0162] On the basis of the above optional technical solutions, optionally, the device further includes: a reference delay updating module;
[0163] The reference delay updating module is used to determine the round trip delay of at least one data packet sent after adjusting the window information, and use the minimum value of the round trip delay as the reference delay.
[0164] The technical solution of the embodiment of the present disclosure determines the data packet sending information corresponding to the current confirmation frame when the current confirmation frame is received; further, based on the data packet sending information and at least one pre-set congestion window adjustment strategy, the target adjustment information of the current congestion window is determined, wherein the congestion window adjustment strategy includes a window adjustment strategy based on bandwidth estimation, a window adjustment strategy based on packet loss rate, and / or a window adjustment strategy based on round-trip delay, thereby adjusting the window information of the current congestion window based on the target adjustment information to control the amount of data packets in the current congestion window or the number of bytes of data packets to be sent based on the adjusted window information. The technical solution of the embodiment of the present disclosure realizes adaptive dynamic adjustment of the congestion window, improves the stability and real-time performance of the congestion window throughput, and thus achieves the effect of ensuring both live broadcast quality and live broadcast real-time performance in live broadcast scenarios.
[0165] The apparatus for adaptively adjusting the congestion window provided in the embodiments of the present disclosure can execute the method for adaptively adjusting the congestion window provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0166] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.
[0167] FIG9 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Referring to FIG9 , a schematic diagram of the structure of an electronic device (such as a terminal device or server in FIG9 ) 500 suitable for implementing an embodiment of the present disclosure is shown below. The terminal device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. The electronic device shown in FIG9 is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.
[0168] As shown in FIG9 , the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. Various programs and data required for the operation of the electronic device 500 are also stored in the RAM 503. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An edit / output (I / O) interface 505 is also connected to the bus 504.
[0169] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although FIG9 shows the electronic device 500 with various devices, it should be understood that not all of the devices shown are required to be implemented or present. More or fewer devices may be implemented or present instead.
[0170] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0171] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0172] The electronic device provided in the embodiment of the present disclosure and the adaptive adjustment method of the congestion window provided in the above embodiment belong to the same inventive concept. For technical details not fully described in the embodiment of the present disclosure, please refer to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0173] An embodiment of the present disclosure provides a computer storage medium having a computer program stored thereon. When the program is executed by a processor, the method for adaptively adjusting the congestion window provided in the above embodiment is implemented.
[0174] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0175] In some embodiments, the client and server can communicate using any currently known or later developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or later developed network.
[0176] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0177] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: obtains a multimedia data stream, wherein the multimedia data stream includes an audio stream and / or a video stream; and upon receiving a target request, sends the obtained multimedia data stream to a target device, so that the target device renders and processes the multimedia data stream based on the target request to obtain the multimedia data stream to be pushed.
[0178] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0179] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0180] The units involved in the embodiments described in this disclosure may be implemented in software or hardware. In some cases, the name of a unit does not limit the unit itself. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses."
[0181] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0182] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0183] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0184] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0185] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
Claims
1. A method for adaptively adjusting a congestion window, comprising: Upon receiving a current confirmation frame, determining data packet sending information corresponding to the current confirmation frame, wherein the confirmation frame is generated by the server based on at least one received data packet including a multimedia data stream; Determining target adjustment information for a current congestion window based on the data packet sending information and at least one pre-set congestion window adjustment policy; wherein the congestion window adjustment policy includes a window adjustment policy based on bandwidth estimation, a window adjustment policy based on packet loss rate, and / or a window adjustment policy based on round-trip delay; The window information of the current congestion window is adjusted based on the target adjustment information, so as to control the amount of data packets in the current congestion window or the number of bytes of data packets to be sent based on the adjusted window information.
2. The method according to claim 1, wherein The determining of the data packet sending information corresponding to the current confirmation frame includes: determining transmission data of the at least one data packet according to packet information of the at least one data packet corresponding to the current confirmation frame; Based on the transmission data, the data packet sending information is determined.
3. The method according to claim 1 or 2, wherein: The data packet sending information includes at least one of a bandwidth estimation value, a packet loss rate, and a round-trip delay.
4. The method according to claim 3, wherein: Determining a bandwidth estimate value in the data packet sending information includes: The minimum value of the sending rate and the corresponding receiving rate of at least one data packet in the transmission data is used as the bandwidth estimation value in the data packet sending information.
5. The method according to claim 1, wherein The congestion window adjustment strategy is a window adjustment strategy based on bandwidth estimation, and the data packet sending information includes bandwidth estimation; The determining target adjustment information of the current congestion window according to the data packet sending information and at least one preset congestion window adjustment policy includes: Target adjustment information of the current congestion window is determined according to the bandwidth estimation value and a historical bandwidth estimation value corresponding to at least one historical confirmation frame.
6. The method according to claim 5, wherein: The determining, based on the bandwidth estimation value and a historical bandwidth estimation value corresponding to at least one historical confirmation frame, target adjustment information of the current congestion window includes: Retrieve the baseline bandwidth estimation value corresponding to the last time the stable bandwidth state was entered; determining a ratio of each of the bandwidth estimate and the historical bandwidth estimate to the benchmark bandwidth estimate; Based on the ratio and a preset ratio threshold, target adjustment information of the current congestion window is determined.
7. The method according to claim 6, wherein: The preset ratio threshold includes a first ratio threshold and a second ratio threshold, and determining the target adjustment information of the current congestion window based on the ratio and the preset ratio threshold includes: When the ratios are all less than or equal to a first ratio threshold, determining that a bandwidth stable state has been entered, updating a reference bandwidth estimation value corresponding to entering the stable bandwidth state according to the bandwidth estimation value, and determining that the target adjustment information is to suppress congestion window growth; When the ratios are all greater than a second ratio threshold, it is determined that the bandwidth stable state is exited, and the target adjustment information is determined to be not suppressing congestion window growth.
8. The method according to claim 3, wherein: Determining a packet loss rate in the data packet sending information includes: Determining a packet loss rate to be fitted corresponding to the current confirmation frame according to a number of sent bytes and a number of received bytes of at least one data packet in the transmitted data; When the packet loss rate to be fitted that is not involved in fitting reaches a preset condition, fitting is performed on all the packet loss rates to be fitted to obtain a packet loss rate to be processed; Updating the packet loss rate to be updated according to the packet loss rate to be processed and the packet loss rate to be updated corresponding to the current congestion window; The updated packet loss rate to be updated is used as the packet loss rate in the data packet sending information.
9. The method according to claim 1, wherein: The data packet sending information includes a packet loss rate, and the congestion window adjustment strategy is a window adjustment strategy based on the packet loss rate; The determining target adjustment information of the current congestion window according to the data packet sending information and at least one preset congestion window adjustment policy includes: When the packet loss rate is less than a first packet loss rate threshold, determining that the target adjustment information is not to change the congestion window information; When the packet loss rate is between the first packet loss rate threshold and the second packet loss rate threshold, determining a first window adjustment coefficient corresponding to the packet loss rate according to a linear function, and using the first window adjustment coefficient as the target adjustment information; When the packet loss rate is greater than the second packet loss rate threshold, determining that the target adjustment information is a second window adjustment coefficient; The second packet loss rate threshold is greater than the first packet loss rate threshold.
10. The method according to claim 1, wherein The data packet sending information includes a round-trip delay corresponding to at least one data packet, and the congestion window adjustment strategy includes a window adjustment strategy based on the round-trip delay; The determining target adjustment information of the current congestion window according to the data packet sending information and at least one preset congestion window adjustment policy includes: Obtaining a reference delay corresponding to the current transmission link, wherein the reference delay is determined based on a historical round-trip delay of at least one data packet sent before the current moment; Smoothing at least one of the round-trip delays to obtain a round-trip delay to be used; Target adjustment information of the current congestion window is determined according to the round-trip delay to be used and the reference delay.
11. The method according to claim 10, wherein: The determining, based on the round-trip delay to be used and the reference delay, target adjustment information of the current congestion window includes: When the difference between the round-trip delay to be used and the reference delay is greater than a first preset difference, determining the target adjustment information to be adjusting the current congestion window a first preset number of times using a first preset window lowering coefficient; When the difference between the round trip delay to be used and the reference delay is greater than a second preset difference, determining the target adjustment information to be adjusting the current congestion window a second preset number of times using a second preset window lowering coefficient; The second preset difference is greater than the first preset difference.
12. The method according to any one of claims 1 to 11, further comprising: A sending rate for transmitting the data packets to be sent in the congestion window is determined according to the bandwidth estimation value and the preset coefficient in the data packet information, so as to send the data packets to be sent to the server based on the sending rate.
13. The method according to any one of claims 1 to 12, wherein: After adjusting the window information of the current congestion window based on the target adjustment information, the method further includes: The amount of data packets in the current congestion window or the number of bytes of data packets to be sent is determined based on the adjusted window information, and the confirmation frame received at the next moment is used as the current confirmation frame, and the step of determining the target adjustment information is performed.
14. The method according to any one of claims 11 to 13, further comprising: The round trip delay of at least one data packet sent after adjusting the window information is determined, and a minimum value of the round trip delay is used as a reference delay.
15. A device for adaptively adjusting a congestion window, comprising: a data packet information determination module configured to, upon receiving a current confirmation frame, determine data packet transmission information corresponding to the current confirmation frame, wherein the confirmation frame is generated by the server based on at least one received data packet including a multimedia data stream; an adjustment information determining module configured to determine target adjustment information for a current congestion window based on the data packet sending information and at least one pre-set congestion window adjustment policy; wherein the congestion window adjustment policy includes a window adjustment policy based on bandwidth estimation, a window adjustment policy based on packet loss rate, and / or a window adjustment policy based on round-trip delay; The congestion window adjustment module is configured to adjust the window information of the current congestion window based on the target adjustment information, so as to control the amount of data packets in the current congestion window or the number of bytes of data packets to be sent based on the adjusted window information.
16. An electronic device comprising: one or more processors; A storage device configured to store one or more programs, wherein When the one or more programs are executed by the one or more processors, the one or more processors are enabled to implement the method for adaptively adjusting the congestion window according to any one of claims 1 to 14.
17. A storage medium containing computer-executable instructions, wherein: When the computer executable instructions are executed by a computer processor, they are used to perform the method for adaptively adjusting the congestion window according to any one of claims 1 to 14.
Citation Information
Patent Citations
Video transmission congestion control method based on MPTCP in heterogeneous wireless network
CN105049369A
Congestion control method and device, electronic equipment and readable storage medium
CN115941614A
Network congestion control method and device and storage medium
CN116684359A
Adaptive adjustment method and device for congestion window, equipment and medium
CN118233400A
Congestion control method and apparatus
WO2023011179A1
Cited By
Collection terminal for communication quality monitoring
CN121098746A
Satellite-ground communication data transmission method and system
CN121508635A