Self-adaptive bit rate adjusting method and device
By obtaining the congestion window data and congestion status, calculating the sending rate control parameters, and selecting the target bit rate based on the objective function, the problem of inaccurate adjustment of the bit rate in the prior art is solved, and the video quality and user experience are improved.
Patent Information
- Application Number
- CN202411841453.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-12-13
AI Technical Summary
Existing adaptive bit rate algorithms cannot accurately adjust bit rate according to different network conditions, affecting video quality and user experience.
By obtaining the congestion window data and congestion status, the transmission rate control parameters are calculated, and based on the pre-constructed objective function, the target bit rate that makes the objective function reach the maximum value is selected from the preset set of bit rates.
Dynamically adjust the bit rate to ensure high quality of video shards and short download time, thereby improving the quality of user experience.
Smart Images

Figure CN119854589A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of video processing technology, and in particular to a method and device for adaptive bit rate adjustment. Background Art
[0002] With the rapid development of mobile Internet, video streaming services have been widely used in various fields. The characteristics of video streaming services are high real-time requirements and users are sensitive to video quality and playback smoothness. The adaptive bitrate algorithm for video streaming is a key technology for video streaming services. It dynamically adjusts the bitrate suitable for the receiving end according to the network conditions to achieve the best video quality and user experience. The current adaptive bitrate algorithm has the problem of being unable to accurately adjust the bitrate according to different network conditions, which affects the video quality and reduces the user experience. Summary of the invention
[0003] In view of this, an object of the embodiments of the present application is to provide an adaptive bit rate adjustment method and device.
[0004] Based on the above purpose, the embodiment of the present application provides an adaptive bit rate adjustment method, including:
[0005] Get congestion window data and congestion status;
[0006] Calculate the sending rate control parameters according to the congestion window data and congestion status;
[0007] Based on a pre-constructed objective function, a target bit rate is selected from a preset bit rate set so that the objective function reaches a maximum value; wherein the objective function includes the quality of the video segment with the bit rate as a variable, and the download time of the video segment with the bit rate as a variable and based on the sending rate control parameter.
[0008] Optionally, the objective function is:
[0009]
[0010] Where B is the bit rate set, α1 and α2 are weights, and a k+1,t+1 is the bit rate of video segment k+1 at time t+1, q(a k+1,t+1 ) is the quality of video segment k+1, a k,t is the bit rate of video segment k at time t, q(a k,t ) is the quality of video segment k, T(a k+1,t+1 ) is the download time of video segment k+1 at time t+1, and P is the buffer length when downloading video segment k+1 at time t+1.
[0011] Optionally, the download time of the video segment is determined according to the sending rate control parameter and the size of the video segment, and different bit rates correspond to different sizes of video segments.
[0012] Optionally, the congestion window data includes a congestion window and a round trip time estimate, and the calculating the sending rate control parameter according to the congestion window data and the congestion state includes:
[0013] When it is determined according to the congestion state that the congestion avoidance phase is in progress, the method for calculating the sending rate control parameter is:
[0014]
[0015] When the congestion threshold is reached, γ takes the value of 1.2, and in other cases takes the value of 1. t is the congestion window value at time t, and rtt is the estimated round-trip time at time t.
[0016] Optionally, the congestion window data includes a congestion window and a round trip time estimate, and the calculating the sending rate control parameter according to the congestion window data and the congestion state includes:
[0017] When it is determined according to the congestion state that the congestion avoidance phase is in progress, the congestion window value is increased in an additive growth manner, and the method for calculating the sending rate control parameter is as follows:
[0018]
[0019] Among them, CWND t-1 is the congestion window value at time t-1, rtt t-1 is the estimated round trip time at time t-1.
[0020] The embodiment of the present application also provides an adaptive bit rate adjustment device, including:
[0021] An acquisition module, used to obtain congestion window data and congestion status;
[0022] A calculation module, used for calculating a sending rate control parameter according to congestion window data and congestion status;
[0023] A bit rate adjustment module is used to select a target bit rate from a preset bit rate set based on a pre-constructed objective function so that the objective function reaches a maximum value; wherein the objective function includes the quality of the video segment with the bit rate as a variable, and the download time of the video segment with the bit rate as a variable and based on the sending rate control parameter.
[0024] Optionally, the objective function is:
[0025]
[0026] Where B is the bit rate set, α1 and α2 are weights, and a k+1,t+1 is the bit rate of video segment k+1 at time t+1, q(a k+1,t+1 ) is the quality of video segment k+1, a k,t is the bit rate of video segment k at time t, q(a k,t ) is the quality of video segment k, T(a k+1,t+1 ) is the download time of video segment k+1 at time t+1, and P is the buffer length when downloading video segment k+1 at time t+1.
[0027] Optionally, the download time of the video segment is determined according to the sending rate control parameter and the size of the video segment, and different bit rates correspond to different sizes of video segments.
[0028] Optionally, the congestion window data includes a congestion window and a round-trip time estimate;
[0029] The calculation module is used to calculate the sending rate control parameter in a method of: when it is determined according to the congestion state that the congestion avoidance phase is in progress:
[0030]
[0031] When the congestion threshold is reached, γ takes the value of 1.2, and in other cases takes the value of 1. t is the congestion window value at time t, and rtt is the estimated round-trip time at time t.
[0032] Optionally, the congestion window data includes a congestion window and a round-trip time estimate;
[0033] The calculation module is used to increase the congestion window value in an additive growth manner when it is determined that the congestion avoidance phase is in the congestion state according to the congestion state. The method for calculating the sending rate control parameter is:
[0034]
[0035] Among them, CWND t-1 is the congestion window value at time t-1, rtt t-1 is the estimated round trip time at time t-1.
[0036] From the above, it can be seen that the adaptive bit rate adjustment method and device provided in the embodiment of the present application obtain congestion window data and congestion status, calculate the sending rate control parameters according to the congestion window data and congestion status, and based on the pre-constructed objective function, select the target bit rate that makes the objective function reach the maximum value from the preset bit rate set. It can dynamically adjust the bit rate according to different congestion states and the sending rate control parameters of the sender to ensure the user experience quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0038] Figure 1 A schematic diagram of a method flow of an embodiment of the present application;
[0039] Figure 2 This is a block diagram of the device structure of an embodiment of the present application;
[0040] Figure 3 This is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0041] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0042] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be the usual meanings understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the embodiments of the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connecting" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to represent relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0043] like Figure 1 As shown, the adaptive bit rate adjustment method provided in the embodiment of the present application includes:
[0044] S101: Obtain congestion window data and congestion status;
[0045] In this embodiment, the congestion window data and congestion status of the sender are obtained, and the congestion window data includes the current congestion window value, the estimated round-trip time, the previous maximum window, the congestion threshold, etc. In some methods, the congestion window data can be obtained by parsing the relevant parameters in the structure, for example, the current congestion window value is obtained by parsing the parameter snd_cwnd, the previous maximum window is obtained by parsing the parameter last_max_cwnd, and the round-trip time estimate is obtained by parsing the parameter rcv_rtt_est. The congestion status includes slow start, congestion avoidance, fast retransmission, fast recovery, etc., which can be determined by calling the relevant functions of the congestion in combination with the congestion window data. The method of obtaining the congestion window data and the congestion status is not specifically described.
[0046] S102: Calculate a sending rate control parameter according to the congestion window data and the congestion status;
[0047] In this embodiment, after obtaining the congestion window data and congestion status, the sending rate control parameter is calculated based on the current congestion window value and the round-trip time estimate in combination with the congestion status of the network, and the sending end determines the rate at which the data packets are sent based on the sending rate control parameter.
[0048] In some embodiments, when it is determined according to the congestion state that the congestion avoidance phase is in progress, a method for calculating the transmission rate control parameter is as follows:
[0049]
[0050] When the congestion threshold is reached, γ takes the value of 1.2, and in other cases takes the value of 1; CWND t is the current congestion window value, that is, the congestion window value at time t; rtt t is the current estimated round-trip time, that is, the estimated round-trip time at time t.
[0051] S103: Based on a pre-constructed objective function, a target bit rate is selected from a preset bit rate set so that the objective function reaches a maximum value; wherein the objective function includes the quality of the video segment with the bit rate as a variable, and the download time of the video segment with the bit rate as a variable and based on the sending rate control parameter.
[0052] In this embodiment, the user experience quality of the video streaming service is:
[0053]
[0054] Among them, b k is the bit rate of video segment k, T(b k) is the download time of video segment k, q(b k ) is the quality of video segment k, which can be calculated using conventional quality calculation methods, and P is the buffer length when downloading video segment k. max{T(b k )-P,0} represents the stall time caused by downloading video segment k, where K is the total number of video segments.
[0055] At each moment of the total time T of downloading the video, if video segment k is downloaded, set the bit rate a of the downloaded video segment k t =b k If the video segment is not downloaded, set the bit rate to a t =0, the user experience quality of the adaptive bit rate method is defined as:
[0056]
[0057] Among them, this definition ensures that when there is no data downloaded, the quality change is 0, and the download time T(a t ) can correctly reflect whether the data has been downloaded.
[0058] With the goal of maximizing the user experience quality, an objective function is constructed, and the target bit rate is selected from the preset bit rate set so that the objective function reaches the maximum value and the user experience quality is optimized. The established objective function is:
[0059]
[0060] Where B is the bit rate set, α1 and α2 are weights, and a k+1,t+1 is the bit rate of video segment k+1 at time t+1, q(a k+1,t+1 ) is the quality of video segment k+1, a k,t is the bit rate of video segment k at time t, q(a k,t ) is the quality of video segment k, T(a k+1,t+1 ) is the download time of video segment k+1 at time t+1, and P is the buffer length when downloading video segment k+1 at time t+1. The objective function is to find the optimal bit rate at the next moment based on the network status and bit rate parameters at the current moment. When the target bit rate is determined, the quality of the video segment can be high and the freeze time can be reduced, thereby obtaining the best user experience quality.
[0061] In some embodiments, the download time of the video segment is determined according to the transmission rate control parameter and the size of the video segment. k+1,t+1 ), the relationship between the sending rate control parameter and the bit rate can be expressed as:
[0062]
[0063] Among them, pr τ is the sending rate control parameter, S(a k+1,t+1 ) is the bit rate a k+1,t+1 When the size of the video segment k+1, that is, different bit rates, correspond to different sizes of video segments. When a specific bit rate is selected from the bit rate set, the size of the corresponding video segment can be determined, and the download time of the video segment can be determined according to the size of the video segment and the calculated sending rate control parameter.
[0064] The adaptive bitrate adjustment method provided in this embodiment obtains the congestion window data and congestion status of the sending end, calculates the sending rate control parameters according to the congestion window data and the congestion status, determines the target bitrate that makes the user experience quality reach the best based on the sending rate control parameters, the quality of the video fragments, the buffer length of the receiving end, etc., sends a playback request carrying the target bitrate to the sending end, and the sending end sends the video stream corresponding to the target bitrate to the receiving end.
[0065] In some specific embodiments, the adaptive bit rate adjustment method of the present application is applied to the Cubic congestion control algorithm. In the congestion avoidance phase, when the bic_update function is used to increase the congestion window, the sending rate control parameter is calculated according to formula (1), and the calculation method of the congestion window is CWND t =C(tK) 3 +w max , w max is the congestion window value when a loss event occurs. Parameters C and K can be parsed from the relevant parameters of the structure. The cong_avoid_ai function is used to increase the congestion window. This function uses an additive growth method to increase the congestion window value. The calculation method of the sending rate control parameter is:
[0066]
[0067] Among them, CWND t-1 is the congestion window value at time t-1, rtt t-1 is the estimated round trip time at time t-1.
[0068] When the congestion state is misjudged and the cancellation is performed, the sending rate control parameters are set to:
[0069]
[0070] When the congestion window gradually shrinks to the congestion threshold, the end_cwnd_reduction function is called and the sending rate control parameters are set to:
[0071]
[0072] The adaptive bit rate adjustment method provided in the embodiment of the present application obtains congestion window data and congestion status, determines appropriate sending rate control parameters according to the congestion window data and congestion status, and the receiving end uses the constructed objective function to select the target bit rate from the bit rate set that makes the objective function reach the maximum value based on the sending rate control parameters, so as to optimize the user experience quality, thereby achieving the effect of accurately adjusting the target bit rate under different network conditions.
[0073] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the described method.
[0074] It should be noted that the above is a description of a specific embodiment of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0075] like Figure 2 As shown, the embodiment of the present application also provides an adaptive bit rate adjustment device, including:
[0076] An acquisition module, used to obtain congestion window data and congestion status;
[0077] A calculation module, used for calculating a sending rate control parameter according to congestion window data and congestion status;
[0078] The bit rate adjustment module is used to select a target bit rate from a preset bit rate set based on a pre-constructed target function so that the target function reaches a maximum value; wherein the target function includes the quality of the video segment with the bit rate as a variable, and the download time of the video segment with the bit rate as a variable and based on the sending rate control parameter.
[0079] For the convenience of description, the above devices are described in terms of functions divided into various modules. Of course, when implementing the embodiments of the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0080] The apparatus of the above-mentioned embodiment is used to implement the corresponding method in the above-mentioned embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0081] Figure 3 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.
[0082] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0083] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.
[0084] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0085] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0086] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).
[0087] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.
[0088] The electronic device of the above embodiment is used to implement the corresponding method in the above embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0089] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0090] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples. Based on the concept of the present disclosure, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0091] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present disclosure, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0092] Although the present disclosure has been described in conjunction with specific embodiments of the present disclosure, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
[0093] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present disclosure.
Claims
1. An adaptive bit rate adjustment method, characterized in that: include: Get congestion window data and congestion status; Calculate the sending rate control parameters according to the congestion window data and congestion status; Based on a pre-constructed objective function, a target bit rate is selected from a preset bit rate set so that the objective function reaches a maximum value; wherein the objective function includes the quality of the video segment with the bit rate as a variable, and the download time of the video segment with the bit rate as a variable and based on the sending rate control parameter.
2. The method according to claim 1, characterized in that The objective function is: Where B is the bit rate set, α1 and α2 are weights, and a k+1,t+1 is the bit rate of video segment k+1 at time t+1, q(a k+1,t+1 ) is the quality of video segment k+1, a k,t is the bit rate of video segment k at time t, q(a k,t ) is the quality of video segment k, T(a k+1,t+1 ) is the download time of video segment k+1 at time t+1, and P is the buffer length when downloading video segment k+1 at time t+1.
3. The method according to claim 2, characterized in that The download time of the video segment is determined according to the sending rate control parameter and the size of the video segment, and different bit rates correspond to different sizes of video segments.
4. The method according to any one of claims 1 to 3, characterized in that: The congestion window data includes a congestion window and a round trip time estimation value, and the calculation of a sending rate control parameter according to the congestion window data and the congestion state includes: When it is determined according to the congestion state that the congestion avoidance phase is in progress, the method for calculating the sending rate control parameter is: When the congestion threshold is reached, γ takes the value of 1.2, and in other cases takes the value of 1. t is the congestion window value at time t, and rtt is the estimated round-trip time at time t.
5. The method according to any one of claims 1 to 3, characterized in that: The congestion window data includes a congestion window and a round trip time estimation value, and the calculation of a sending rate control parameter according to the congestion window data and the congestion state includes: When it is determined according to the congestion state that the congestion avoidance phase is in progress, the congestion window value is increased in an additive growth manner, and the method for calculating the sending rate control parameter is as follows: Among them, CWND t-1 is the congestion window value at time t-1, rtt t-1 is the estimated round trip time at time t-1.
6. An adaptive bit rate adjustment device, characterized in that: include: An acquisition module, used to obtain congestion window data and congestion status; A calculation module, used for calculating a sending rate control parameter according to congestion window data and congestion status; A bit rate adjustment module is used to select a target bit rate from a preset bit rate set based on a pre-constructed objective function so that the objective function reaches a maximum value; wherein the objective function includes the quality of the video segment with the bit rate as a variable, and the download time of the video segment with the bit rate as a variable and based on the sending rate control parameter.
7. The device according to claim 6, characterized in that The objective function is: Where B is the bit rate set, α1 and α2 are weights, and a k+1,t+1 is the bit rate of video segment k+1 at time t+1, q(a k+1,t+1 ) is the quality of video segment k+1, a k,t is the bit rate of video segment k at time t, q(a k,t ) is the quality of video segment k, T(a k+1,t+1 ) is the download time of video segment k+1 at time t+1, and P is the buffer length when downloading video segment k+1 at time t+1.
8. The device according to claim 7, characterized in that The download time of the video segment is determined according to the sending rate control parameter and the size of the video segment, and different bit rates correspond to different sizes of video segments.
9. The device according to any one of claims 6 to 8, characterized in that The congestion window data includes a congestion window and a round trip time estimate; The calculation module is used to calculate the sending rate control parameter in a method of: when it is determined according to the congestion state that the congestion avoidance phase is in progress: When the congestion threshold is reached, γ takes the value of 1.2, and in other cases takes the value of 1. t is the congestion window value at time t, and rtt is the estimated round-trip time at time t.
10. The device according to any one of claims 6 to 8, characterized in that: The congestion window data includes a congestion window and a round trip time estimate; The calculation module is used to increase the congestion window value in an additive growth manner when it is determined that the congestion avoidance phase is in the congestion state according to the congestion state. The method for calculating the sending rate control parameter is: Among them, CWND t-1 is the congestion window value at time t-1, rtt t-1 is the estimated round trip time at time t-1.
Citation Information
Patent Citations
Network congestion control method, device, equipment and medium
CN113825171A
Self-adaptive streaming media method based on visual sensitivity
CN114666620A
Flow control transmission method, device, equipment and medium
CN115022247A
Live broadcast video stream code rate self-adaption method capable of expanding video coding
CN117014619A
Video stream bit rate self-adaption method and device based on bandwidth prediction
CN119071576A