Method, device, electronic device and storage medium for determining code rate of multimedia resources

By calculating the buffer change gradient and the objective function to determine the optimal bit rate of multimedia resources, the problems of stuttering and jitter caused by buffer exhaustion are solved, and a more stable multimedia resource playback experience is achieved.

CN116366885BActive Publication Date: 2025-09-30BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310147629.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-20
Publication Date
2025-09-30
Estimated Expiration
2043-02-20

AI Technical Summary

Technical Problem

In the prior art, the bit rate of multimedia resources cannot be adjusted in time, resulting in freezes and image jitters when the client buffer is exhausted, affecting the user's viewing experience.

Method used

By obtaining the buffering capacity and sending rate of multimedia resources, calculating the buffering change gradient, and determining the optimal bit rate based on the objective function, the gap between adjacent bit rates is reduced, the buffer data volume is stabilized, and the picture jitter is reduced.

Benefits of technology

It improves the clarity and smoothness of multimedia resources, reduces the picture jitter caused by bit rate switching, and enhances the user viewing experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116366885B_ABST
    Figure CN116366885B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method, device, electronic device and storage medium for determining the bit rate of multimedia resources, which belongs to the field of multimedia technology. The method includes: obtaining a first buffer amount of a multimedia resource and a first sending rate of the multimedia resource; determining a buffer change gradient of the buffer of the receiving end based on the first buffer amount and the first sending rate; determining an objective function based on the buffer change gradient and the first bit rate; and determining a second bit rate when the function value of the objective function is minimum, the second bit rate being used to represent the bit rate of the multimedia resource at the current moment. The above technical solution is conducive to maintaining the stability of the data volume of the multimedia resource cached in the buffer of the receiving end, which not only improves the clarity and smoothness of the multimedia resource, but also reduces the picture jitter of the multimedia resource caused by bit rate switching, thereby improving the user's viewing experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of multimedia technology, and in particular to a method, device, electronic device, and storage medium for determining a bit rate of multimedia resources. Background Art

[0002] With the development of multimedia technology, more and more people are accustomed to watching multimedia resources such as videos or live broadcasts online. Since the bit rate of multimedia resources directly affects the clarity and smoothness of multimedia resources, how to determine the bit rate of multimedia resources to maximize the clarity and smoothness of multimedia resources is a research focus in this field.

[0003] In related technologies, congestion control algorithms are commonly used to determine the bitrate of multimedia resources. Specifically, a congestion control algorithm estimates the bandwidth as the maximum transmission bandwidth. Then, a bitrate that best matches this maximum transmission bandwidth is selected and sent to the client, maximizing the clarity and smoothness of the multimedia resources.

[0004] However, the above technical solution may also cause severe lag due to uncertainty about the client's buffer status. For example, if the client's buffer is about to run out of buffering and can no longer cache more multimedia resources, but the current bandwidth is still sufficient to transmit more multimedia resources, the server will be unable to quickly switch to a lower bitrate in time, resulting in frame drops, causing the multimedia resources played by the client to lag, affecting the user's viewing experience. Summary of the Invention

[0005] The present disclosure provides a method, device, electronic device, and storage medium for determining the bitrate of multimedia resources, which facilitates stabilizing the amount of multimedia resource data cached in a buffer at a receiving end. This not only improves the clarity and smoothness of multimedia resources, but also reduces image jitter caused by bitrate switching, thereby enhancing the user's viewing experience. The technical solutions of the present disclosure are as follows:

[0006] According to one aspect of an embodiment of the present disclosure, a method for determining a bit rate of a multimedia resource is provided, comprising:

[0007] Obtaining a first buffering amount of a multimedia resource and a first sending rate of the multimedia resource, where the first buffering amount indicates a current situation in which a buffer area of ​​the receiving end caches the multimedia resource, and the first sending rate indicates a current situation in which the sending end sends the multimedia resource;

[0008] determining, based on the first buffer amount and the first sending rate, a buffer change gradient of the buffer of the receiving end, where the buffer change gradient is used to represent an increment of the multimedia resource cached in the buffer of the receiving end per unit time;

[0009] determining a target function based on the buffer change gradient and a first bit rate, where the first bit rate is a bit rate used when the multimedia resource was last sent, the target function being used to represent a relationship between the bit rate at the current moment and the first bit rate, and a function value of the target function being used to represent a difference between two adjacent bit rates;

[0010] When the function value of the objective function is minimum, a second bit rate is determined, where the second bit rate is used to represent the bit rate of the multimedia resource at the current moment.

[0011] According to another aspect of an embodiment of the present disclosure, a device for determining a bit rate of a multimedia resource is provided, comprising:

[0012] a first acquiring unit configured to acquire a first buffering amount of a multimedia resource and a first sending rate of the multimedia resource, wherein the first buffering amount indicates a current situation in which a buffer area of ​​a receiving end caches the multimedia resource, and the first sending rate indicates a current situation in which a sending end sends the multimedia resource;

[0013] a first determining unit configured to determine a buffer change gradient of a buffer of the receiving end based on the first buffer amount and the first sending rate, wherein the buffer change gradient is used to represent an increment of the multimedia resource cached in the buffer of the receiving end per unit time;

[0014] a second determining unit configured to determine a target function based on the buffer change gradient and a first bit rate, where the first bit rate is a bit rate used when the multimedia resource was last sent, the target function being used to represent a relationship between the bit rate at the current moment and the first bit rate, and a function value of the target function being used to represent a difference between two adjacent bit rates;

[0015] The third determining unit is configured to determine a second bit rate when the function value of the objective function is minimized, where the second bit rate is used to represent the bit rate of the multimedia resource at the current moment.

[0016] In some embodiments, the first determining unit includes:

[0017] an acquisition subunit, configured to execute acquisition of a first proportional control factor, a first integral control factor, a second proportional control factor, and a second integral control factor, wherein the first proportional control factor is used to control an influence of the first buffer amount on the buffer change gradient; the first integral control factor is used to control an influence of the buffer amount of the receiving end at least one time before the current time on the buffer change gradient; the second proportional control factor is used to control an influence of the first sending rate on the buffer change gradient; and the second integral control factor is used to control an influence of the sending rate of the sending end at least one time before the current time on the buffer change gradient;

[0018] The determination subunit is configured to determine the buffer change gradient of the buffer of the receiving end based on the first buffer amount, the first sending rate, the first proportional control factor, the first integral control factor, the second proportional control factor and the second integral control factor.

[0019] In some embodiments, the determination subunit is configured to execute acquisition of a target buffer size, at least one second buffer size, a target sending rate, and at least one second sending rate, wherein the target buffer size is used to indicate the amount of data of the multimedia resource that the receiving end can cache, the at least one second buffer size is used to indicate the amount of data of the multimedia resource cached by the receiving end at least one time before the current time, the target sending rate is used to indicate the maximum rate at which the sending end sends the multimedia resource, and the at least one second sending rate is used to indicate the rate at which the sending end sends the multimedia resource at least one time before the current time; taking the difference between the target buffer size and the first buffer size as a first difference, the overall difference between the target buffer size and the at least one second buffer size as a second difference, the difference between the target sending rate and the first sending rate as a third difference, and the overall difference between the target sending rate and the at least one second sending rate as a fourth difference; and summing the product of the first proportional control factor and the first difference, the product of the first integral control factor and the second difference, the product of the second proportional control factor and the third difference, and the product of the second integral control factor and the fourth difference to obtain the buffer change gradient.

[0020] In some embodiments, the apparatus further comprises:

[0021] The first processing unit is configured to, when the buffer change gradient is less than a target value, subtract a product of the first integral control factor and the second difference and a product of the second integral control factor and the fourth difference from the buffer change gradient to obtain a first value;

[0022] a correction unit configured to correct the buffer change gradient to a maximum value between the first value and a second value, the second value being greater than the target value;

[0023] Among them, when the buffer change gradient is greater than the target value, the larger the buffer change gradient is, the lower the determined bit rate of the multimedia resource is; when the buffer change gradient is less than the target value, the larger the buffer change gradient is, the higher the determined bit rate of the multimedia resource is.

[0024] In some embodiments, the apparatus further comprises:

[0025] The second processing unit is configured to execute extreme value calculation for the objective function to obtain a first extreme value and a second extreme value, wherein the first extreme value is smaller than the second extreme value; and use the second extreme value as the target value.

[0026] In some embodiments, the device also includes: a second acquisition unit, configured to select the buffer amount with the largest value from the first buffer amount and the at least one second buffer amount as the third buffer amount, the third buffer amount being used to represent the maximum buffer amount reached by the receiving end at the current moment and before the current moment; when the third buffer amount is less than the preset buffer amount, determining that the target buffer amount is equal to the preset buffer amount; when the third buffer amount is not less than the preset buffer amount, taking the average value between the third buffer amount and the preset buffer amount as the target buffer amount.

[0027] In some embodiments, the first sending rate is used to represent the content duration of the multimedia resource sent per unit time;

[0028] The device also includes: a third acquisition unit, configured to execute acquisition of a fourth buffer amount and a buffer amount threshold, wherein the fourth buffer amount is used to represent the buffer amount of the buffer of the sending end at the current moment, and the buffer amount threshold is used to represent the maximum buffer amount of the buffer of the sending end; when the fourth buffer amount is less than the buffer amount threshold, determining the first sending rate to be 1; when the fourth buffer amount is not less than the buffer amount threshold, determining the first sending rate based on the content duration and sending duration of the multimedia resource, wherein the sending duration is the duration taken for the multimedia resource to travel from the sending end to the receiving end.

[0029] In some embodiments, the second determination unit is configured to determine a first function based on the buffer change gradient and the transmission bandwidth of the multimedia resource, wherein the function value of the first function is used to represent the occupancy of the transmission bandwidth when the multimedia resource is sent at the current moment; determine a second function based on the first bit rate, wherein the function value of the second function is used to represent the difference between the bit rates of the multimedia resource sent twice adjacently; and determine the objective function based on minimizing the sum of the first function and the second function.

[0030] In some embodiments, the apparatus further includes: a switching unit configured to switch the bit rate of the multimedia resource to a bit rate lower than the current moment when frame loss occurs on the sending end regarding the multimedia resource.

[0031] According to another aspect of an embodiment of the present disclosure, there is provided an electronic device, the electronic device including:

[0032] one or more processors;

[0033] a memory for storing program codes executable by the processor;

[0034] The processor is configured to execute the program code to implement the above-mentioned method for determining the bit rate of multimedia resources.

[0035] According to another aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When the program code in the computer-readable storage medium is executed by a processor of an electronic device, the electronic device can execute the above-mentioned method for determining the bit rate of multimedia resources.

[0036] According to another aspect of an embodiment of the present disclosure, a computer program product is provided, including a computer program / instruction, which implements the above-mentioned method for determining the bit rate of multimedia resources when executed by a processor.

[0037] The disclosed embodiments provide a method for determining the bitrate of multimedia resources. By obtaining a first buffering amount and a first sending rate, the amount of multimedia resources cached in a buffer area of ​​a receiving end and the status of multimedia resource transmission by a sending end can be determined. Then, a buffer change gradient of the receiving end's buffer is determined based on the first buffering amount and the first sending rate. This allows the data change of the multimedia resources cached in the receiving end's buffer to be determined based on the status of both the receiving end and the sending end, thereby stabilizing the data volume of the multimedia resources cached in the receiving end's buffer and improving the clarity and smoothness of the multimedia resources. Then, a target function is determined based on the buffer change gradient and the first bitrate. When the function value of the target function is minimized, the bitrate at the current moment is determined. Since the first bitrate is the bitrate used when the multimedia resource was last transmitted, the function value of the target function is used to represent the difference between two adjacent bitrates. This ensures that the bitrate determined at the current moment is less different from the bitrate used when the multimedia resource was last transmitted, thereby reducing image jitter of the multimedia resource and improving the user's viewing experience.

[0038] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The accompanying drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute an improper limitation of the present disclosure.

[0040] Figure 1 The figure is a schematic diagram showing an implementation environment of a method for determining a bit rate of multimedia resources according to an exemplary embodiment.

[0041] Figure 2 The figure is a flowchart of a method for determining a bit rate of multimedia resources according to an exemplary embodiment.

[0042] Figure 3 The figure is a flowchart of another method for determining a bit rate of multimedia resources according to an exemplary embodiment.

[0043] Figure 4 The figure is a flowchart of another method for determining a bit rate of multimedia resources according to an exemplary embodiment.

[0044] Figure 5 A schematic diagram showing the relationship between a bit rate of a multimedia resource and a buffer change gradient according to an exemplary embodiment.

[0045] Figure 6 The figure is a framework diagram of a method for determining a bit rate of multimedia resources according to an exemplary embodiment.

[0046] Figure 7 The figure is a block diagram showing a device for determining a bit rate of multimedia resources according to an exemplary embodiment.

[0047] Figure 8 The figure is a block diagram of another apparatus for determining a bit rate of multimedia resources according to an exemplary embodiment.

[0048] Figure 9 It is a block diagram of a terminal according to an exemplary embodiment.

[0049] Figure 10 The figure is a block diagram of a server according to an exemplary embodiment. DETAILED DESCRIPTION

[0050] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0051] It should be noted that the terms "first," "second," and the like in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the numbers used in this manner are interchangeable where appropriate so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure as detailed in the appended claims.

[0052] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, storage, and display, etc.), and signals involved in this disclosure are all authorized by the user or fully authorized by all parties. The collection, use, and processing of relevant data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the first buffer size of multimedia resources involved in this disclosure is obtained with full authorization.

[0053] Figure 1 FIG. 1 is a schematic diagram showing an implementation environment of a method for determining a bit rate of a multimedia resource according to an exemplary embodiment. For example, the electronic device is provided as a server. Figure 1 , the implementation environment specifically includes: a terminal 101 and a server 102.

[0054] Terminal 101 is at least one of a smartphone, a smartwatch, a desktop computer, a laptop, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), and a laptop computer. An application is installed and running on terminal 101. The application can be used to display multimedia resources. The multimedia resources can be online videos or live videos, etc., which are not limited in the embodiments of the present disclosure. Users can log in to the application through terminal 101 to watch multimedia resources. Terminal 101 can be connected to server 102 via a wireless network or a wired network, and can then obtain and cache multimedia resources from server 102, and then display the multimedia resources. In other words, terminal 101 is the receiving end of multimedia resources.

[0055] Terminal 101 generally refers to one of multiple terminals. This embodiment uses terminal 101 as an example. Those skilled in the art will appreciate that the number of terminals may be greater or lesser. For example, there may be a few terminals, or dozens, hundreds, or even more. This embodiment does not limit the number or device type of terminals.

[0056] The server 102 is at least one of a single server, multiple servers, a cloud computing platform, and a virtualization center. The server 102 can be connected to the terminal 101 and other terminals via a wireless network or a wired network. The server 102 can determine the bit rate and transmission rate of the multimedia resource. Then, the server 102 can send the multimedia resource to the terminal 101 at the determined bit rate and transmission rate. In other words, the server 102 is the sending end of the multimedia resource. In some embodiments, the number of the above-mentioned servers can be more or less, and the embodiments of the present disclosure are not limited to this. Of course, the server 102 also includes other functional servers to provide more comprehensive and diversified services.

[0057] Figure 2 is a flowchart of a method for determining a bit rate of a multimedia resource according to an exemplary embodiment. Figure 2 The method for determining the bit rate of multimedia resources is applied to a server and includes the following steps:

[0058] In step 201, the server obtains a first buffer amount of multimedia resources and a first sending rate of multimedia resources. The first buffer amount is used to indicate the situation of the receiving end's buffer area caching multimedia resources at the current moment, and the first sending rate is used to indicate the situation of the sending end sending multimedia resources at the current moment.

[0059] In the embodiment of the present disclosure, the multimedia resource can be an online video or a live broadcast, etc., which is not limited by the embodiment of the present disclosure. The server is the sending end of the multimedia resource. The terminal is the receiving end of the multimedia resource. Before the server sends the multimedia resource to the terminal, the server obtains the first buffer amount of the multimedia resource in the receiving end and the first sending rate of the multimedia resource in the sending end. The first buffer amount can reflect the amount of multimedia resources cached in the buffer area of ​​the receiving end at the current moment. The buffer area refers to the buffer in the terminal. The first sending rate refers to the first sending rate at which the server will send the multimedia resource to the terminal. Since the rate at which the multimedia resource is sent by the server is related to the amount of the multimedia resource cached in the server, the first sending rate can reflect the amount of multimedia resources cached in the server.

[0060] In step 202, the server determines a buffer change gradient of the buffer of the receiving end based on the first buffer amount and the first sending rate. The buffer change gradient is used to represent an increment of multimedia resources cached in the buffer of the receiving end per unit time.

[0061] In the disclosed embodiment, the buffer change gradient can reflect the change in the amount of multimedia resources cached in the receiving end's buffer per unit time. The disclosed embodiment does not limit the magnitude of the buffer change gradient. The server can calculate the buffer change gradient based on the acquired first buffer amount and the first sending rate. In other words, the server can determine the amount of data change in the multimedia resources cached in the receiving end's buffer based on the conditions of both the terminal and the server.

[0062] In step 203, the server determines a target function based on the buffer change gradient and the first bit rate, where the first bit rate is the bit rate used when the multimedia resource was last sent. The target function is used to represent the relationship between the bit rate at the current moment and the first bit rate, and the function value of the target function is used to represent the difference between two adjacent bit rates.

[0063] In the disclosed embodiment, the multimedia resource is transmitted in the form of multiple video segments. That is, the server sends the multiple video segments of the multimedia resource to the terminal in chronological order. The server can construct an objective function. The objective function can reflect the relationship between the bit rates used in two adjacent transmissions of the multimedia resource. The server obtains the first bit rate used in the last transmission of the video segment of the multimedia resource. The server then substitutes the buffer change gradient and the first bit rate into the constructed objective function. In this case, the objective function can reflect the difference between the bit rate at the current moment and the bit rate used when the multimedia resource was last transmitted.

[0064] In step 204, when the function value of the objective function is minimum, the server determines a second bit rate, where the second bit rate is used to represent the bit rate of the multimedia resource at the current moment.

[0065] In the disclosed embodiment, since the function value of the objective function represents the difference between the bitrates used in two consecutive transmissions of the multimedia resource, the second bitrate determined by the server minimizes the difference between the current bitrate and the first bitrate. The server then transmits the multimedia resource at the second bitrate to the terminal. This approach minimizes the difference in bitrate between two consecutive transmissions of the multimedia resource at the receiving end of the terminal, thereby reducing jitter in the multimedia resource image and improving the user's viewing experience.

[0066] The disclosed embodiments provide a method for determining the bitrate of multimedia resources. By obtaining a first buffering amount and a first sending rate, the amount of multimedia resources cached in a buffer area of ​​a receiving end and the status of multimedia resource transmission by a sending end can be determined. Then, a buffer change gradient of the receiving end's buffer is determined based on the first buffering amount and the first sending rate. This allows the data change of the multimedia resources cached in the receiving end's buffer to be determined based on the status of both the receiving end and the sending end, thereby stabilizing the data volume of the multimedia resources cached in the receiving end's buffer and improving the clarity and smoothness of the multimedia resources. Then, a target function is determined based on the buffer change gradient and the first bitrate. When the function value of the target function is minimized, the bitrate at the current moment is determined. Since the first bitrate is the bitrate used when the multimedia resource was last transmitted, the function value of the target function is used to represent the difference between two adjacent bitrates. This ensures that the bitrate determined at the current moment is less different from the bitrate used when the multimedia resource was last transmitted, thereby reducing image jitter of the multimedia resource and improving the user's viewing experience.

[0067] In some embodiments, determining a buffer change gradient of a buffer at a receiving end based on the first buffer amount and the first sending rate includes:

[0068] Obtain a first proportional control factor, a first integral control factor, a second proportional control factor, and a second integral control factor, where the first proportional control factor is used to control the influence of the first buffer amount on the buffer change gradient, the first integral control factor is used to control the influence of the buffer amount of the receiving end at least at a time before the current time on the buffer change gradient, the second proportional control factor is used to control the influence of the first sending rate on the buffer change gradient, and the second integral control factor is used to control the influence of the sending rate of the sending end at least at a time before the current time on the buffer change gradient;

[0069] A buffer change gradient of a buffer at the receiving end is determined based on the first buffer amount, the first sending rate, the first proportional control factor, the first integral control factor, the second proportional control factor, and the second integral control factor.

[0070] The solution provided by the embodiment of the present disclosure controls the influence of the first buffer amount on the buffer change gradient through a first proportional control factor, controls the influence of the buffer amount of the receiving end at least one moment before the current moment on the buffer change gradient through a first integral control factor, controls the influence of the first sending rate on the buffer change gradient through a second proportional control factor, and controls the influence of the sending rate of the sending end at least one moment before the current moment on the buffer change gradient through a second integral control factor. This realizes a method of calculating the bit rate of multimedia resources through a proportional-integral control method, which is beneficial to reducing the error in bit rate calculation. In addition, the user can adjust the sizes of the above-mentioned multiple factors according to needs, so that the influence of multiple aspects on the buffer change gradient can be adjusted according to needs, which meets the user's intention.

[0071] In some embodiments, determining a buffer change gradient of a buffer at a receiving end based on a first buffer amount, a first sending rate, a first proportional control factor, a first integral control factor, a second proportional control factor, and a second integral control factor includes:

[0072] Obtaining a target buffer size, at least one second buffer size, a target sending rate, and at least one second sending rate, where the target buffer size indicates the amount of multimedia resource data that can be cached by the receiving end, the at least one second buffer size indicates the amount of multimedia resource data cached by the receiving end at at least one time before the current time, the target sending rate indicates the maximum rate at which the sending end sends the multimedia resource, and the at least one second sending rate indicates the rate at which the sending end sends the multimedia resource at at least one time before the current time;

[0073] The difference between the target buffer amount and the first buffer amount is used as the first difference, the overall difference between the target buffer amount and the at least one second buffer amount is used as the second difference, the difference between the target sending rate and the first sending rate is used as the third difference, and the overall difference between the target sending rate and the at least one second sending rate is used as the fourth difference;

[0074] The product of the first proportional control factor and the first difference, the product of the first integral control factor and the second difference, the product of the second proportional control factor and the third difference, and the product of the second integral control factor and the fourth difference are summed to obtain a buffer change gradient.

[0075] The solution provided by the embodiment of the present disclosure uses the difference between the target buffer amount and the first buffer amount as a first difference to obtain the difference between the buffer amount of the multimedia resource at the receiving end at the current moment and the maximum data amount of the multimedia resource that can be buffered; uses the overall difference between the target buffer amount and at least one second buffer amount as a second difference to obtain the difference between the buffer amount of the multimedia resource at the receiving end before the current moment and the maximum data amount of the multimedia resource that can be buffered; uses the difference between the target sending rate and the first sending rate as a third difference to obtain the difference between the rate at which the sending end sends the multimedia resource at the current moment and the maximum rate at which the multimedia resource is sent; and uses the overall difference between the target sending rate and at least one second sending rate as a fourth difference to obtain the difference between the rate at which the sending end sends the multimedia resource before the current moment and the maximum rate at which the multimedia resource is sent. Then, the plurality of differences are multiplied by a first proportional control factor, a first integral control factor, a second proportional control factor, and a second integral control factor, respectively, so that the plurality of differences can be controlled by the plurality of control factors, thereby determining a buffer change gradient based on previous and current differences, making the buffer change gradient more accurate and in line with current conditions.

[0076] In some embodiments, the method further comprises:

[0077] When the buffer change gradient is less than the target value, subtracting the product of the first integral control factor and the second difference and the product of the second integral control factor and the fourth difference from the buffer change gradient to obtain a first value;

[0078] Correcting the buffer change gradient to a maximum value between a first value and a second value, wherein the second value is greater than the target value;

[0079] Among them, when the buffer change gradient is greater than the target value, the larger the buffer change gradient is, the lower the bit rate of the determined multimedia resource is; when the buffer change gradient is less than the target value, the larger the buffer change gradient is, the higher the bit rate of the determined multimedia resource is.

[0080] The solution provided by the embodiments of the present disclosure is that, when the buffer change gradient is less than the target value, the larger the buffer change gradient, the higher the bit rate of the determined multimedia resource. This results in the product of the first integral control factor and the second difference, and the product of the second integral control factor and the fourth difference being less than zero when the buffer change gradient is less than zero. As the buffer change gradient increases, the bit rate of the determined multimedia resource increases. As a result, when the rate of cached multimedia resources is low, multimedia resources with a higher bit rate are still sent, resulting in a slower rate of cached multimedia resources and causing lag. Therefore, when the buffer change gradient is less than the target value, the product of the first integral control factor and the second difference, and the product of the second integral control factor and the fourth difference are subtracted to correct the buffer change gradient. Since the second value is greater than the target value, the corrected buffer change gradient is the maximum value of the first and second values, thereby ensuring that the buffer change gradient is always greater than the target value. This achieves the purpose of achieving the goal of lowering the bit rate of the determined multimedia resource as the buffer change gradient increases, reducing lag and thereby improving user experience.

[0081] In some embodiments, the method further comprises:

[0082] Find the extreme value of the objective function, and obtain the first extreme value and the second extreme value, where the first extreme value is smaller than the second extreme value;

[0083] The second extreme value is used as the target value.

[0084] The solution provided by the embodiment of the present disclosure determines the target value by finding the extreme value of the objective function, so that the relationship between the buffer change gradient and the bit rate of the multimedia resource can be obtained. The determined target value conforms to the situation that when the buffer change gradient is greater than the target value, the larger the buffer change gradient, the lower the bit rate of the determined multimedia resource. This is conducive to correcting the buffer change gradient so that the determined bit rate conforms to the current conditions of the receiving end and the sending end, which is conducive to reducing the jamming problem of the multimedia resource, thereby improving the user experience.

[0085] In some embodiments, the process of obtaining the target buffer size includes:

[0086] Selecting a buffer amount with the largest value from the first buffer amount and the at least one second buffer amount as a third buffer amount, where the third buffer amount is used to represent a maximum buffer amount reached by the receiving end at a current moment and before the current moment;

[0087] When the third buffer amount is less than the preset buffer amount, determining the target buffer amount to be equal to the preset buffer amount;

[0088] When the third buffer amount is not less than the preset buffer amount, an average value between the third buffer amount and the preset buffer amount is used as the target buffer amount.

[0089] The solution provided by the embodiment of the present disclosure compares the maximum buffer amount reached by the receiving end before the previous moment with the preset buffer amount. When the third buffer amount is less than the preset buffer amount, the target buffer amount is determined to be equal to the preset buffer amount. When the third buffer amount is not less than the preset buffer amount, the average value between the third buffer amount and the preset buffer amount is used as the target buffer amount, so that the change based on the target buffer amount tends to be stable, thereby facilitating the change of the bit rate of the multimedia resource determined subsequently to be stable, avoiding a large adjustment of the bit rate, and further reducing the picture jitter of the multimedia resource, thereby improving the user viewing experience.

[0090] In some embodiments, the first sending rate is used to represent the content duration of the multimedia resource sent per unit time;

[0091] The process of obtaining the first sending rate includes:

[0092] Obtaining a fourth buffer amount and a buffer amount threshold, where the fourth buffer amount is used to indicate the buffer amount of the buffer of the sending end at a current moment, and the buffer amount threshold is used to indicate the maximum buffer amount of the buffer of the sending end;

[0093] When the fourth buffer amount is less than the buffer amount threshold, determining the first sending rate to be 1;

[0094] When the fourth buffer amount is not less than the buffer amount threshold, the first sending rate is determined based on the content duration and sending duration of the multimedia resource, where the sending duration is the duration it takes for the multimedia resource to travel from the sending end to the receiving end.

[0095] The solution provided by the embodiment of the present disclosure is that since the sending rate of the server is related to the amount of multimedia resources cached in the server, sometimes the sending rate is not reduced due to a poor downstream link, but may be simply because the server has no multimedia resources. By comparing the buffer capacity of the buffer of the sending end at the current moment with the maximum buffer capacity, when the buffer capacity of the buffer of the sending end at the current moment is less than the maximum buffer capacity, the first sending rate is determined to be 1. Since the first sending rate is used to represent the content duration of the multimedia resources sent per unit time, the first sending rate equal to 1 determined in this way is equivalent to the maximum sending rate, that is, when the buffer capacity of the buffer of the sending end at the current moment is less than the maximum buffer capacity, it is confirmed that the sending rate has reached the maximum sending rate; when the buffer capacity of the buffer of the sending end at the current moment is not less than the maximum buffer capacity, the actual sending rate is calculated based on the content duration and sending duration of the multimedia resources, thereby realizing the correction of the first sending rate and improving the accuracy of the first sending rate, which is conducive to obtaining a bit rate that is more in line with the current situation in the future.

[0096] In some embodiments, determining the objective function based on the buffer change gradient and the first bit rate includes:

[0097] Determining a first function based on the buffer change gradient and the transmission bandwidth of the multimedia resource, wherein a function value of the first function is used to represent an occupation status of the transmission bandwidth when sending the multimedia resource at a current moment;

[0098] Determining a second function based on the first bit rate, where a function value of the second function is used to represent a difference between bit rates of the multimedia resource sent twice consecutively;

[0099] An objective function is determined based on minimization of the sum of the first function and the second function.

[0100] The solution provided by the embodiment of the present disclosure determines a first function by buffering the change gradient and the transmission bandwidth of the multimedia resource, and determines a second function by using the first bit rate. Since the function value of the first function is used to represent the occupancy of the transmission bandwidth when the multimedia resource is sent at the current moment, and the function value of the second function is used to represent the difference between the bit rates of the multimedia resources sent twice adjacently, the objective function determined based on minimization of the sum of the first function and the second function not only takes into account the occupancy rate of the transmission bandwidth, but also takes into account the situation where the bit rate switching is as small as possible. This is not only beneficial to maintaining the stability of the buffer at the receiving end, improving the clarity and smoothness of the multimedia resources, but also reducing the picture jitter of the multimedia resources, thereby enhancing the user's viewing experience.

[0101] In some embodiments, the method further comprises:

[0102] When a frame loss situation occurs with respect to multimedia resources at the sending end, the bit rate of the multimedia resources is switched to a bit rate lower than the current bit rate.

[0103] The solution provided by the embodiment of the present disclosure switches the bit rate of the multimedia resources to a bit rate lower than the current moment when frame loss occurs regarding multimedia resources at the sending end, so that more frames of multimedia resources can be transmitted to the receiving end, reducing the number of frame losses, thereby improving the fluency of the multimedia resources at the receiving end.

[0104] above Figure 2 The following is a basic process of the present disclosure. The solution provided by the present disclosure is further described based on a specific implementation method. Figure 3 FIG. 1 is a flow chart of another method for determining a bit rate of a multimedia resource according to an exemplary embodiment. Figure 3 , the method comprising:

[0105] In step 301, the server obtains a first buffer amount of multimedia resources and a first sending rate of multimedia resources. The first buffer amount is used to indicate the situation of the receiving end's buffer area caching multimedia resources at the current moment, and the first sending rate is used to indicate the situation of the sending end sending multimedia resources at the current moment.

[0106] In the disclosed embodiment, the first buffer size can reflect the amount of multimedia resources cached in the receiving end's buffer area at the current moment. The buffer size can also be referred to as the buffer length. The disclosed embodiment does not restrict the method for obtaining the first buffer size. The first sending rate refers to the first sending rate at which the server will send the multimedia resource to the terminal. The first sending rate can be the number of bytes of the multimedia resource sent per unit time, or it can be the content length of the multimedia resource sent per unit time, and the disclosed embodiment does not restrict this.

[0107] In some embodiments, the first sending rate is used to represent the content duration of the multimedia resource sent per unit time. Accordingly, the process of the server obtaining the first sending rate includes: the server obtains a fourth buffering amount and a buffering amount threshold. The fourth buffering amount is used to represent the buffering amount of the buffer of the sending end at the current moment, and the buffering amount threshold is used to represent the maximum buffering amount of the buffer of the sending end. Then, when the fourth buffering amount is less than the buffering amount threshold, the server determines the first sending rate to be 1. When the fourth buffering amount is not less than the buffering amount threshold, the server determines the first sending rate based on the content duration and sending duration of the multimedia resource, and the sending duration is the duration it takes for the multimedia resource to be transmitted from the sending end to the receiving end. The solution provided by the embodiment of the present disclosure is that since the sending rate of the server is related to the amount of multimedia resources cached in the server, sometimes the sending rate is not reduced due to a poor downstream link, but may be simply because the server has no multimedia resources. By comparing the buffer capacity of the buffer of the sending end at the current moment with the maximum buffer capacity, when the buffer capacity of the buffer of the sending end at the current moment is less than the maximum buffer capacity, the first sending rate is determined to be 1. Since the first sending rate is used to represent the content duration of the multimedia resources sent per unit time, the first sending rate equal to 1 determined in this way is equivalent to the maximum sending rate, that is, when the buffer capacity of the buffer of the sending end at the current moment is less than the maximum buffer capacity, it is confirmed that the sending rate has reached the maximum sending rate; when the buffer capacity of the buffer of the sending end at the current moment is not less than the maximum buffer capacity, the actual sending rate is calculated based on the content duration and sending duration of the multimedia resources, thereby realizing the correction of the first sending rate and improving the accuracy of the first sending rate, which is conducive to obtaining a bit rate that is more in line with the current situation in the future.

[0108] In some embodiments, the server may determine the first sending rate using the following formula 1.

[0109] Formula 1:

[0110]

[0111] in, Used to indicate the first sending rate; Used to indicate the fourth buffer amount; Used to indicate the maximum buffer size; Used to indicate the content duration of multimedia resources; Used to indicate the sending duration of multimedia resources.

[0112] In step 302, the server obtains a first proportional control factor, a first integral control factor, a second proportional control factor and a second integral control factor, the first proportional control factor is used to control the influence of the first buffer amount on the buffer change gradient, the first integral control factor is used to control the influence of the buffer amount of the receiving end at least at a moment before the current moment on the buffer change gradient, the second proportional control factor is used to control the influence of the first sending rate on the buffer change gradient, and the second integral control factor is used to control the influence of the sending rate of the sending end at least at a moment before the current moment on the buffer change gradient.

[0113] In an embodiment of the present disclosure, the server may obtain a first proportional control factor, a first integral control factor, a second proportional control factor, and a second integral control factor from a terminal. The server may also store the aforementioned multiple control factors. That is, the server may also directly obtain the aforementioned multiple control factors from its own storage. The embodiment of the present disclosure does not limit the method for obtaining the aforementioned multiple control factors. The embodiment of the present disclosure also does not limit the size of the aforementioned multiple control factors. The first proportional control factor, the first integral control factor, the second proportional control factor, and the second integral control factor may be user-defined.

[0114] In step 303, the server determines a buffer change gradient of the buffer of the receiving end based on the first buffer amount, the first sending rate, the first proportional control factor, the first integral control factor, the second proportional control factor, and the second integral control factor.

[0115] In the embodiment of the present disclosure, the buffer change gradient can represent the increment of multimedia resources cached in the buffer of the receiving end per unit time. The server determines the buffer change gradient through the first buffer amount, the first sending rate, the first proportional control factor, the first integral control factor, the second proportional control factor, and the second integral control factor. The solution provided by the embodiment of the present disclosure controls the influence of the first buffer amount on the buffer change gradient through the first proportional control factor, controls the influence of the buffer amount of the receiving end at least one moment before the current moment on the buffer change gradient through the first integral control factor, controls the influence of the first sending rate on the buffer change gradient through the second proportional control factor, and controls the influence of the sending rate of the sending end at least one moment before the current moment on the buffer change gradient through the second integral control factor. This realizes a method of calculating the bit rate of multimedia resources through a proportional integral control method, which is conducive to reducing the error of bit rate calculation. In addition, the user can adjust the size of the above multiple factors according to needs, so that the influence of multiple aspects on the buffer change gradient can be adjusted according to needs, which meets the user's intention.

[0116] In some embodiments, the server can obtain the amount of multimedia resource data cached by the receiving end at least one time before the current time and the rate at which the sending end sends the multimedia resource at least one time before the current time to determine the buffer change gradient. Accordingly, step 303 includes the following steps 3031 to 3033. Figure 4 , Figure 4 The figure is a flowchart of another method for determining a bit rate of multimedia resources according to an exemplary embodiment.

[0117] 3031. The server obtains a target buffer size, at least one second buffer size, a target sending rate, and at least one second sending rate. The target buffer size is used to indicate the amount of data of multimedia resources that the receiving end can cache, and the at least one second buffer size is used to indicate the amount of data of multimedia resources cached by the receiving end at at least one moment before the current moment. The target sending rate is used to indicate the maximum rate at which the sending end sends multimedia resources, and the at least one second sending rate is used to indicate the rate at which the sending end sends multimedia resources at at least one moment before the current moment.

[0118] Among them, the target buffering amount can represent the maximum amount of data that the receiving end can cache multimedia resources. When the transmission bandwidth of the multimedia resources is sufficient, the buffering amount in the receiving end is basically positively correlated with the delay. In other words, once the multimedia resources at the receiving end are stuck, the playback progress will stop, and after the network is restored, the receiving end will immediately receive multimedia resources that exceed the target buffering amount. In this case, if the bit rate is determined only based on the original target buffering amount, the multimedia resources will be quickly cut to a high bit rate, which will reduce the buffering amount at the receiving end. At this time, it will be cut down to a low bit rate, causing the buffering amount at the receiving end to continue to rise, and the cycle will repeat, causing the user to observe strong quality jitter in the multimedia resource picture. In order to reduce this jitter, a dynamic target buffering amount is set.

[0119] In some embodiments, the target buffer size may be related to the maximum buffer size reached by the receiving end before the current moment. Accordingly, the process of the server obtaining the target buffer size includes: the server selects the buffer size with the largest value from the first buffer size and at least one second buffer size as the third buffer size. The third buffer size is used to represent the maximum buffer size reached by the receiving end at the current moment and before the current moment. If the third buffer size is less than the preset buffer size, the server determines that the target buffer size is equal to the preset buffer size. If the third buffer size is not less than the preset buffer size, the server uses the average value between the third buffer size and the preset buffer size as the target buffer size. The embodiment of the present disclosure does not limit the size of the preset buffer size. The solution provided by the embodiment of the present disclosure compares the maximum buffer amount reached by the receiving end before the previous moment with the preset buffer amount. When the third buffer amount is less than the preset buffer amount, the target buffer amount is determined to be equal to the preset buffer amount. When the third buffer amount is not less than the preset buffer amount, the average value between the third buffer amount and the preset buffer amount is used as the target buffer amount, so that the change based on the target buffer amount tends to be stable, thereby facilitating the change of the bit rate of the multimedia resource determined subsequently to be stable, avoiding a large adjustment of the bit rate, and further reducing the picture jitter of the multimedia resource, thereby improving the user viewing experience.

[0120] Optionally, the server may determine the target buffer size using the following formula 2.

[0121] Formula 2:

[0122]

[0123]

[0124] in, Used to indicate the target buffer size, Used to indicate the preset buffer amount; Used to indicate the third buffer amount; They are used to represent the current moment and multiple buffer amounts before; Used to indicate the first buffer amount; It is used to indicate at least one second buffer amount; and N is used to indicate the number of second buffer amounts.

[0125] In step 3031, the embodiment of the present disclosure does not restrict the amount of the second buffer and the second sending rate. Both the amount of the second buffer and the second sending rate can be customized by the user. The target sending rate represents the maximum rate at which the transmitting end sends the multimedia resource. Optionally, the sending rate represents the duration of the multimedia resource content sent per unit time. Accordingly, the target sending rate is equal to 1.

[0126] 3032. The server takes the difference between the target buffer amount and the first buffer amount as the first difference, takes the overall difference between the target buffer amount and at least one second buffer amount as the second difference, takes the difference between the target sending rate and the first sending rate as the third difference, and takes the overall difference between the target sending rate and at least one second sending rate as the fourth difference.

[0127] The server subtracts the first buffer amount from the target buffer amount to obtain a first difference. The server subtracts the target buffer amount from the at least one second buffer amount and sums the sums to obtain a second difference. The server subtracts the first sending rate from the target sending rate to obtain a third difference. The server subtracts the target sending rate from the at least one second sending rate and sums the sums to obtain a fourth difference.

[0128] 3033. The server sums the product of the first proportional control factor and the first difference, the product of the first integral control factor and the second difference, the product of the second proportional control factor and the third difference, and the product of the second integral control factor and the fourth difference to obtain a buffer change gradient.

[0129] The server multiplies the first proportional control factor by the first difference; multiplies the first integral control factor by the second difference; multiplies the second proportional control factor by the third difference; and multiplies the second integral control factor by the fourth difference. The server then sums the four products obtained from these multiplications to obtain the buffer change gradient. The solution provided by the embodiment of the present disclosure uses the difference between the target buffer amount and the first buffer amount as a first difference to obtain the difference between the buffer amount of the multimedia resource at the receiving end at the current moment and the maximum data amount of the multimedia resource that can be buffered; uses the overall difference between the target buffer amount and at least one second buffer amount as a second difference to obtain the difference between the buffer amount of the multimedia resource at the receiving end before the current moment and the maximum data amount of the multimedia resource that can be buffered; uses the difference between the target sending rate and the first sending rate as a third difference to obtain the difference between the rate at which the sending end sends the multimedia resource at the current moment and the maximum rate at which the multimedia resource is sent; and uses the overall difference between the target sending rate and at least one second sending rate as a fourth difference to obtain the difference between the rate at which the sending end sends the multimedia resource before the current moment and the maximum rate at which the multimedia resource is sent. Then, the plurality of differences are multiplied by a first proportional control factor, a first integral control factor, a second proportional control factor, and a second integral control factor, respectively, so that the plurality of differences can be controlled by the plurality of control factors, thereby determining a buffer change gradient based on previous and current differences, making the buffer change gradient more accurate and in line with current conditions.

[0130] In some embodiments, the server may determine the buffer change gradient using the following formula three.

[0131] Formula 3:

[0132]

[0133] in, Used to indicate buffer change gradient; Used to represent the first proportional control factor; Used to represent the first integral control factor; Used to represent the second proportional control factor; Used to represent the second integral control factor; Used to indicate the target buffer amount; Used to indicate the first buffer amount; Used to indicate the second buffer amount; Used to indicate the target sending rate; Used to indicate the first sending rate; Used to indicate the second sending rate; 1 is used to indicate the steady-state error of the receiving end in playing multimedia resources, that is, to ensure that the receiving end caches 1 second of multimedia resources per second to ensure that the receiving end will have continuous multimedia resources for playback.

[0134] In some embodiments, when the network conditions are very good, no matter what bit rate is selected, the buffering amount of the buffer at the receiving end will not change, and may continue to be higher than the target buffering amount. In this case, the part controlled by the integral control factor in the buffer change gradient will always be less than 0, causing the buffer change gradient to always be negative and unable to recover. At this time, continuing to select the bit rate according to the buffer change gradient may instead select a low gear, so that when the rate of caching multimedia resources is low, multimedia resources with a higher bit rate will still be sent, resulting in fewer multimedia resources being received, which in turn causes freezes, and thus requires correction of the buffer change gradient. Accordingly, the process of the server correcting the buffer change gradient is: when the buffer change gradient is less than the target value, based on the buffer change gradient, the server subtracts the product between the first integral control factor and the second difference and the product between the second integral control factor and the fourth difference to obtain the first value. Then, the server corrects the buffer change gradient to the maximum value of the first value and the second value, and the second value is greater than the target value. Among them, when the buffer change gradient is greater than the target value, the larger the buffer change gradient is, the lower the bit rate of the determined multimedia resource is; when the buffer change gradient is less than the target value, the larger the buffer change gradient is, the higher the bit rate of the determined multimedia resource is. The solution provided by the embodiments of the present disclosure is that, when the buffer change gradient is less than the target value, the larger the buffer change gradient, the higher the bitrate of the determined multimedia resource. This results in the product of the first integral control factor and the second difference, and the product of the second integral control factor and the fourth difference being less than zero when the buffer change gradient is less than zero. As the buffer change gradient increases, the bitrate of the determined multimedia resource increases. As a result, when the rate of cached multimedia resources is low, multimedia resources with a higher bitrate are still sent, resulting in fewer multimedia resources being received, which in turn causes lag. Therefore, when the buffer change gradient is less than the target value, the product of the first integral control factor and the second difference, and the product of the second integral control factor and the fourth difference are subtracted to correct the buffer change gradient. Since the second value is greater than the target value, the corrected buffer change gradient is the maximum of the first and second values, thereby ensuring that the buffer change gradient is always greater than the target value. This achieves the goal of achieving a lower bitrate of the determined multimedia resource as the buffer change gradient increases, reducing multimedia resource lag and thereby improving user experience.

[0135] The server can determine the relationship between the bit rate of the multimedia resource and the buffer change gradient based on the objective function for determining the bit rate, thereby correcting the buffer change gradient.

[0136] Optionally, the objective function for determining the bit rate may be the following formula 4.

[0137] Formula 4:

[0138]

[0139] in, Used to indicate the finalized bit rate; Used to indicate buffer change gradient; The bit rate used to represent the multimedia resource at the current moment is a variable in the formula; Used to represent the transmission bandwidth of multimedia resources; Used to indicate the bit rate used when sending multimedia resources last time; It is used to represent a weight parameter, which may be fixed or dynamic, and is not limited in this embodiment of the present disclosure.

[0140] From a mathematical point of view, after modeling the objective function, the target value we determine is actually a problem of finding an extreme value, so that according to the target value, the relationship between the bit rate of the multimedia resource and the buffer change gradient is obtained. Accordingly, the process of the server determining the target value is: the server finds the extreme value of the objective function to obtain a first extreme value and a second extreme value, and the first extreme value is smaller than the second extreme value. Then, the server uses the second extreme value as the target value. The solution provided by the embodiment of the present disclosure determines the target value by finding the extreme value of the objective function, so that the relationship between the buffer change gradient and the bit rate of the multimedia resource can be obtained, so that the determined target value meets the situation that when the buffer change gradient is greater than the target value, the larger the buffer change gradient, the lower the bit rate of the determined multimedia resource, which is conducive to correcting the buffer change gradient so that the determined bit rate meets the situation that the larger the buffer change gradient, the lower the bit rate of the determined multimedia resource, which is conducive to reducing the jamming problem of the multimedia resource, thereby improving the user experience.

[0141] Based on Formula 4, the server obtains the function formula of the objective function shown in the following Formula 5.

[0142] Formula 5:

[0143]

[0144] in, Used to indicate the finalized bit rate; Used to indicate buffer change gradient; The bit rate used to represent the multimedia resource at the current moment is a variable in the formula; Used to represent the transmission bandwidth of multimedia resources; Used to indicate the bit rate used when sending multimedia resources last time; Used to represent weight parameters. In terms of Bitrate The more optimal it is, the more stable the bit rate is. The closer it is to The more optimal it is, the more bandwidth utilization is guaranteed. This is not a monotonic function, see Figure 5 , Figure 5 A schematic diagram showing the relationship between the bit rate of a multimedia resource and the buffer change gradient according to an exemplary embodiment. When , the larger the buffer change gradient is, the lower the selected bit rate should be. The larger the buffer change gradient is, the higher the selected bit rate should be, which is the opposite of the target. This phenomenon is called integral saturation.

[0145] The extreme value point of the objective function obtained according to the above formula 5 can be expressed by the following formula 6.

[0146] Formula 6:

[0147]

[0148] in, Used to indicate the finalized bit rate; Used to indicate buffer change gradient; The bit rate used to represent the multimedia resource at the current moment is a variable in the formula; Used to represent the transmission bandwidth of multimedia resources; Used to indicate the bit rate used when sending multimedia resources last time; Used to represent weight parameters.

[0149] In order to avoid the above-mentioned integral saturation phenomenon, it is necessary to correct the buffer change gradient. The correction method can be the clamped integral anti-saturation method to ensure the calculated The present disclosure does not limit the correction method.

[0150] The formula can be found in the following formula 7.

[0151] Formula 7:

[0152]

[0153] in, Used to indicate the finalized bit rate; Used to indicate buffer change gradient; The bit rate used to represent the multimedia resource at the current moment is a variable in the formula; Used to represent the transmission bandwidth of multimedia resources; Used to indicate the bit rate used when sending multimedia resources last time; Used to represent weight parameters.

[0154] In other words, we make , we can ensure that it does not fall into the integral saturation state. In terms of implementation, in order to prevent the selected bit rate from being too high when the buffer capacity of the receiving end is high, we set , and, in the calculation and The part removing the integral term is the same as When the signs are the same, the integrator is turned off to avoid entering the integral saturation state. Accordingly, the buffer change gradient can be seen in the following formula 8.

[0155] Formula 8:

[0156]

[0157] in, Used to indicate buffer change gradient; Used to represent the first integral control factor; Used to represent the second integral control factor; Used to indicate the target buffer amount; Used to indicate the second buffer amount; Used to indicate the target sending rate; Used to indicate the second sending rate, Used to represent hyperparameters.

[0158] In step 304, the server determines a target function based on the buffer change gradient and the first bit rate, where the first bit rate is the bit rate used when the multimedia resource was last sent. The target function is used to represent the relationship between the bit rate at the current moment and the first bit rate, and the function value of the target function is used to represent the difference between two adjacent bit rates.

[0159] In the embodiment of the present disclosure, the server obtains the first bit rate used when sending multimedia resources last time. Then, the server can substitute the buffer change gradient and the first bit rate into the above formula 4 to obtain the target function at the current moment. The first bit rate is the value in formula 4. . The objective function can reflect the relationship between the bit rates used for two adjacent transmissions of multimedia resources. Accordingly, the process of the server determining the objective function is: the server determines the first function based on the buffer change gradient and the transmission bandwidth of the multimedia resources. The function value of the first function is used to represent the occupancy of the transmission bandwidth when the multimedia resources are sent at the current moment. The server determines the second function based on the first bit rate. The function value of the second function is used to represent the difference between the bit rates of the multimedia resources sent twice adjacently. Then, the server determines the objective function based on minimizing the sum of the first function and the second function. Among them, the first function refers to the ; The second function refers to the . The solution provided by the embodiment of the present disclosure determines the first function by buffering the change gradient and the transmission bandwidth of the multimedia resource, and determines the second function by the first code rate. Since the function value of the first function is used to represent the occupancy of the transmission bandwidth when the multimedia resource is sent at the current moment, and the function value of the second function is used to represent the difference between the code rates of the multimedia resources sent twice adjacently, the objective function determined based on the minimization of the sum of the first function and the second function not only takes into account the occupancy rate of the transmission bandwidth, but also takes into account the switching amplitude of the code rate as small as possible, which is not only conducive to maintaining the stability of the buffer at the receiving end, improving the clarity and smoothness of the multimedia resources, but also reducing the picture jitter of the multimedia resources, thereby improving the user's viewing experience.

[0160] In step 305, when the function value of the objective function is minimum, the server determines a second bit rate, where the second bit rate is used to represent the bit rate of the multimedia resource at the current moment.

[0161] In the embodiment of the present disclosure, when the function value of the objective function is minimum, the server determines the second bit rate of the multimedia resource at the current moment, and then sends the multimedia resource at the second bit rate to the terminal.

[0162] In some embodiments, the above-mentioned method for determining the bit rate of multimedia resources can be used in combination with other algorithms in the server. The algorithm can be a frame loss algorithm, which is not limited by the embodiments of the present disclosure. That is, when the network is unstable, the method for determining the bit rate of multimedia resources and the frame loss algorithm can work together to strive to provide users with a seamless viewing experience. Accordingly, when frame loss occurs with respect to multimedia resources at the sending end, the server switches the bit rate of the multimedia resources to a bit rate lower than the current moment. Among them, the server can implement the process of switching to a bit rate lower than the current moment based on the above-mentioned method for determining the bit rate of multimedia resources. The solution provided by the embodiments of the present disclosure switches the bit rate of multimedia resources to a bit rate lower than the current moment when frame loss occurs with respect to multimedia resources at the sending end, so that more frames of multimedia resources can be transmitted to the receiving end, reducing the number of frame losses, thereby improving the fluency of multimedia resources at the receiving end.

[0163] In order to more clearly describe the method for determining the bit rate of multimedia resources in this solution, the method for determining the bit rate of multimedia resources will be described again below in conjunction with the appendix. Figure 6 FIG1 is a framework diagram of a method for determining a bit rate of a multimedia resource according to an exemplary embodiment. Figure 6 , the server obtains information such as the transmission bandwidth, the first buffer length, and the first sending rate of the multimedia resource. Since the first sending rate is related to the amount of multimedia resources cached in the buffer of the sending end, the server can obtain the situation of the buffer of the receiving end and the situation of the buffer of the sending end. Then, the server determines the buffer change gradient based on the transmission bandwidth, the situation of the buffer of the receiving end, and the situation of the buffer of the sending end. Then, the server determines the bit rate of the multimedia resource based on the buffer change gradient. The method for determining the bit rate of multimedia resources provided by this solution was used for experiments and achieved good results. That is, compared with the existing technical solutions, this solution reduces the failure rate of multimedia resource broadcasting by 7.735%, the duration of multimedia resource freezes per 100 seconds by 7.462%, the number of multimedia resource freezes per 100 seconds by 6.876%, and the freeze rate of multimedia resources by 6.758%.

[0164] The disclosed embodiments provide a method for determining the bitrate of multimedia resources. By obtaining a first buffering amount and a first sending rate, the amount of multimedia resources cached in a buffer area of ​​a receiving end and the status of multimedia resource transmission by a sending end can be determined. Then, a buffer change gradient of the receiving end's buffer is determined based on the first buffering amount and the first sending rate. This allows the data change of the multimedia resources cached in the receiving end's buffer to be determined based on the status of both the receiving end and the sending end, thereby stabilizing the data volume of the multimedia resources cached in the receiving end's buffer and improving the clarity and smoothness of the multimedia resources. Then, a target function is determined based on the buffer change gradient and the first bitrate. When the function value of the target function is minimized, the bitrate at the current moment is determined. Since the first bitrate is the bitrate used when the multimedia resource was last transmitted, the function value of the target function is used to represent the difference between two adjacent bitrates. This ensures that the bitrate determined at the current moment is less different from the bitrate used when the multimedia resource was last transmitted, thereby reducing image jitter of the multimedia resource and improving the user's viewing experience.

[0165] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present disclosure, and will not be described in detail here.

[0166] Figure 7 FIG1 is a block diagram of a device for determining a bit rate of a multimedia resource according to an exemplary embodiment. Figure 7 The device includes: a first obtaining unit 701, a first determining unit 702, a second determining unit 703 and a third determining unit 704.

[0167] The first acquiring unit 701 is configured to acquire a first buffering amount of the multimedia resource and a first sending rate of the multimedia resource, where the first buffering amount indicates a current state of caching the multimedia resource in a buffer area of ​​the receiving end, and the first sending rate indicates a current state of sending the multimedia resource by the sending end.

[0168] The first determining unit 702 is configured to determine a buffer change gradient of a buffer of the receiving end based on the first buffer amount and the first sending rate, where the buffer change gradient is used to represent an increment of multimedia resources cached in the buffer of the receiving end per unit time;

[0169] The second determining unit 703 is configured to determine a target function based on the buffer change gradient and the first bit rate, where the first bit rate is the bit rate used when the multimedia resource was last sent, the target function is used to represent the relationship between the current bit rate and the first bit rate, and the function value of the target function is used to represent the difference between two adjacent bit rates;

[0170] The third determining unit 704 is configured to determine a second bit rate when the function value of the objective function is minimized, where the second bit rate is used to represent the bit rate of the multimedia resource at the current moment.

[0171] The disclosed embodiments provide a device for determining the bitrate of multimedia resources. By acquiring a first buffering amount and a first sending rate, the device can determine the amount of multimedia resources cached in a buffer area of ​​a receiving end and the status of multimedia resource transmission by a sending end. Then, a buffer change gradient of the receiving end's buffer is determined based on the first buffering amount and the first sending rate. This allows the device to determine the data change of the multimedia resources cached in the receiving end's buffer based on the status of both the receiving end and the sending end, thereby stabilizing the data volume of the multimedia resources cached in the receiving end's buffer and improving the clarity and smoothness of the multimedia resources. Then, a target function is determined based on the buffer change gradient and the first bitrate. When the target function value is minimized, the bitrate at the current moment is determined. Since the first bitrate is the bitrate used when the multimedia resource was last transmitted, the target function value represents the difference between two adjacent bitrates. This ensures that the bitrate determined at the current moment is less different from the bitrate used when the multimedia resource was last transmitted, thereby reducing image jitter of the multimedia resource and improving the user's viewing experience.

[0172] In some embodiments, Figure 8 FIG1 is a block diagram of another apparatus for determining a bit rate of multimedia resources according to an exemplary embodiment. Figure 8 The first determining unit 702 includes:

[0173] An acquisition subunit 7021 is configured to acquire a first proportional control factor, a first integral control factor, a second proportional control factor, and a second integral control factor, wherein the first proportional control factor is used to control the influence of the first buffer amount on the buffer change gradient; the first integral control factor is used to control the influence of the buffer amount of the receiving end at least at a time before the current time on the buffer change gradient; the second proportional control factor is used to control the influence of the first sending rate on the buffer change gradient; and the second integral control factor is used to control the influence of the sending rate of the sending end at least at a time before the current time on the buffer change gradient;

[0174] The determination subunit 7022 is configured to determine a buffer change gradient of the buffer at the receiving end based on the first buffer amount, the first sending rate, the first proportional control factor, the first integral control factor, the second proportional control factor and the second integral control factor.

[0175] In some embodiments, see Figure 8The determination subunit 7022 is configured to execute the steps of obtaining a target buffer amount, at least one second buffer amount, a target sending rate, and at least one second sending rate, where the target buffer amount indicates the amount of multimedia resource data that can be cached by the receiving end, the at least one second buffer amount indicates the amount of multimedia resource data cached by the receiving end at least one time before the current time, the target sending rate indicates the maximum rate at which the sending end sends the multimedia resource, and the at least one second sending rate indicates the rate at which the sending end sends the multimedia resource at least one time before the current time; using the difference between the target buffer amount and the first buffer amount as a first difference, the overall difference between the target buffer amount and the at least one second buffer amount as a second difference, the difference between the target sending rate and the first sending rate as a third difference, and the overall difference between the target sending rate and the at least one second sending rate as a fourth difference; and summing the product of the first proportional control factor and the first difference, the product of the first integral control factor and the second difference, the product of the second proportional control factor and the third difference, and the product of the second integral control factor and the fourth difference to obtain a buffer change gradient.

[0176] In some embodiments, see Figure 8 , the device further comprises:

[0177] The first processing unit 705 is configured to, when the buffer change gradient is less than the target value, subtract the product of the first integral control factor and the second difference and the product of the second integral control factor and the fourth difference from the buffer change gradient to obtain a first value;

[0178] The correction unit 706 is configured to correct the buffer change gradient to a maximum value between a first value and a second value, the second value being greater than the target value;

[0179] Among them, when the buffer change gradient is greater than the target value, the larger the buffer change gradient is, the lower the bit rate of the determined multimedia resource is; when the buffer change gradient is less than the target value, the larger the buffer change gradient is, the higher the bit rate of the determined multimedia resource is.

[0180] In some embodiments, see Figure 8 , the device further comprises:

[0181] The second processing unit 707 is configured to execute extreme value calculation for the objective function to obtain a first extreme value and a second extreme value, wherein the first extreme value is smaller than the second extreme value; and use the second extreme value as the target value.

[0182] In some embodiments, see Figure 8The device further includes: a second acquisition unit 708, configured to select a buffer amount with the largest value from the first buffer amount and at least one second buffer amount as a third buffer amount, where the third buffer amount is used to represent the maximum buffer amount reached by the receiving end at the current moment and before the current moment; if the third buffer amount is less than the preset buffer amount, determine that the target buffer amount is equal to the preset buffer amount; if the third buffer amount is not less than the preset buffer amount, use the average value between the third buffer amount and the preset buffer amount as the target buffer amount.

[0183] In some embodiments, the first sending rate is used to represent the content duration of the multimedia resource sent per unit time;

[0184] Continue to see Figure 8 The device also includes: a third acquisition unit 709, configured to execute acquisition of a fourth buffer amount and a buffer amount threshold, where the fourth buffer amount is used to represent the buffer amount of the buffer of the sending end at the current moment, and the buffer amount threshold is used to represent the maximum buffer amount of the buffer of the sending end; when the fourth buffer amount is less than the buffer amount threshold, determining the first sending rate to be 1; when the fourth buffer amount is not less than the buffer amount threshold, determining the first sending rate based on the content duration and sending duration of the multimedia resource, where the sending duration is the duration taken for the multimedia resource to be transmitted from the sending end to the receiving end.

[0185] In some embodiments, see Figure 8 The second determination unit 703 is configured to execute a first function based on the buffer change gradient and the transmission bandwidth of the multimedia resource, and the function value of the first function is used to represent the occupancy of the transmission bandwidth when the multimedia resource is sent at the current moment; based on the first code rate, determine a second function, and the function value of the second function is used to represent the difference between the code rates of the multimedia resource sent twice adjacently; and determine the objective function based on minimizing the sum of the first function and the second function.

[0186] In some embodiments, see Figure 8 The device further includes: a switching unit 710, which is configured to switch the bit rate of the multimedia resource to a bit rate lower than the current moment when a frame loss situation occurs on the sending end regarding the multimedia resource.

[0187] It should be noted that the multimedia resource bit rate determination device provided in the above embodiment only uses the division of the above-mentioned functional units as an example to illustrate when determining the bit rate of the multimedia resource. In actual applications, the above-mentioned functions can be assigned to different functional units as needed, that is, the internal structure of the electronic device can be divided into different functional units to complete all or part of the functions described above. In addition, the multimedia resource bit rate determination device provided in the above embodiment and the multimedia resource bit rate determination method embodiment are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0188] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0189] When an electronic device is provided as a terminal, Figure 9 This is a block diagram of a terminal 900 according to an exemplary embodiment. Terminal 900 may be a smartphone, tablet computer, MP3 player, MP4 player, laptop computer, or desktop computer. Terminal 900 may also be referred to as user equipment, portable terminal, laptop terminal, desktop terminal, or other similar names.

[0190] Typically, the terminal 900 includes a processor 901 and a memory 902 .

[0191] Processor 901 may include one or more processing cores, such as a quad-core processor or an octa-core processor. Processor 901 may be implemented in hardware using at least one of the following: a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), or a PLA (Programmable Logic Array). Processor 901 may also include a main processor and a coprocessor. The main processor is used to process data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 901 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing content displayed on the display screen. In some embodiments, processor 901 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0192] The memory 902 may include one or more computer-readable storage media, which may be non-transitory. The memory 902 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 902 is used to store at least one program code, which is used to be executed by the processor 901 to implement the method for determining the bit rate of multimedia resources provided in the method embodiment of the present disclosure.

[0193] In some embodiments, terminal 900 may optionally include a peripheral device interface 903 and at least one peripheral device. The processor 901, memory 902, and peripheral device interface 903 may be connected via a bus or signal lines. Each peripheral device may be connected to peripheral device interface 903 via a bus, signal lines, or circuit boards. Specifically, the peripheral device may include at least one of a radio frequency circuit 904, a display screen 905, a camera assembly 906, an audio circuit 907, a positioning assembly 908, and a power supply 909.

[0194] The peripheral device interface 903 can be used to connect at least one I / O (Input / Output)-related peripheral device to the processor 901 and the memory 902. In some embodiments, the processor 901, the memory 902, and the peripheral device interface 903 are integrated on the same chip or circuit board. In other embodiments, any one or two of the processor 901, the memory 902, and the peripheral device interface 903 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.

[0195] The RF circuit 904 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 904 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 904 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the RF circuit 904 includes an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The RF circuit 904 can communicate with other terminals via at least one wireless communication protocol. Such wireless communication protocols include, but are not limited to, metropolitan area networks (MANs), various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks (WLANs), and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 904 may also include circuitry related to Near Field Communication (NFC), although this disclosure does not limit this.

[0196] Display screen 905 is used to display a user interface (UI). This UI may include graphics, text, icons, videos, or any combination thereof. If display screen 905 is a touchscreen display, it is also capable of detecting touch signals on or above the surface of display screen 905. These touch signals can be input as control signals to processor 901 for processing. Display screen 905 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there can be a single display screen 905, located on the front panel of terminal 900. In other embodiments, there can be at least two display screens 905, located on different surfaces of terminal 900 or in a foldable design. In still other embodiments, display screen 905 can be a flexible display, located on a curved or foldable surface of terminal 900. Display screen 905 can also be configured as a non-rectangular, irregular shape, also known as a special-shaped screen. Display screen 905 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0197] The camera component 906 is used to capture images or videos. Optionally, the camera component 906 includes a front camera and a rear camera. Typically, the front camera is set on the front panel of the terminal, and the rear camera is set on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera component 906 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.

[0198] The audio circuit 907 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals to be input into the processor 901 for processing, or input into the radio frequency circuit 904 to achieve voice communication. For the purpose of stereo sound collection or noise reduction, there may be multiple microphones, each located in different parts of the terminal 900. The microphone may also be an array microphone or an omnidirectional collection microphone. The speaker is used to convert electrical signals from the processor 901 or the radio frequency circuit 904 into sound waves. The speaker may be a traditional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert electrical signals into sound waves audible to humans, but also convert electrical signals into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 907 may also include a headphone jack.

[0199] Positioning component 908 is used to locate the current geographic location of terminal 900 to implement navigation or location-based services (LBS). Positioning component 908 can be based on the US GPS (Global Positioning System), China's BeiDou system, Russia's Greninja system, or the European Union's Galileo system.

[0200] Power supply 909 is used to power various components in terminal 900. Power supply 909 can be AC ​​power, DC power, disposable batteries, or rechargeable batteries. When power supply 909 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.

[0201] In some embodiments, the terminal 900 further includes one or more sensors 910 , including but not limited to: an acceleration sensor 911 , a gyroscope sensor 912 , a pressure sensor 913 , a fingerprint sensor 914 , an optical sensor 915 , and a proximity sensor 916 .

[0202] The accelerometer 911 can detect the magnitude of acceleration along the three coordinate axes of the coordinate system established by the terminal 900. For example, the accelerometer 911 can be used to detect the components of gravity acceleration along the three coordinate axes. The processor 901 can control the display screen 905 to display the user interface in a landscape or portrait view based on the gravity acceleration signal collected by the accelerometer 911. The accelerometer 911 can also be used to collect game or user motion data.

[0203] The gyroscope sensor 912 can detect the orientation and rotation angle of the terminal 900. It can also work with the accelerometer 911 to collect the user's 3D movements on the terminal 900. Based on the data collected by the gyroscope sensor 912, the processor 901 can implement the following functions: motion sensing (for example, changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.

[0204] The pressure sensor 913 can be set on the side frame of the terminal 900 and / or the lower layer of the display screen 905. When the pressure sensor 913 is set on the side frame of the terminal 900, it can detect the user's grip signal of the terminal 900, and the processor 901 performs left and right hand recognition or shortcut operations based on the grip signal collected by the pressure sensor 913. When the pressure sensor 913 is set on the lower layer of the display screen 905, the processor 901 controls the operable controls on the UI interface based on the user's pressure operation on the display screen 905. The operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.

[0205] The fingerprint sensor 914 is used to collect the user's fingerprint. The processor 901 identifies the user's identity based on the fingerprint collected by the fingerprint sensor 914, or the fingerprint sensor 914 identifies the user's identity based on the collected fingerprint. When the user's identity is identified as a trusted identity, the processor 901 authorizes the user to perform relevant sensitive operations, such as unlocking the screen, viewing encrypted information, downloading software, making payments, and changing settings. The fingerprint sensor 914 can be set on the front, back, or side of the terminal 900. When a physical button or manufacturer logo is set on the terminal 900, the fingerprint sensor 914 can be integrated with the physical button or manufacturer logo.

[0206] The optical sensor 915 is used to detect ambient light intensity. In one embodiment, the processor 901 can control the display brightness of the display screen 905 based on the ambient light intensity detected by the optical sensor 915. Specifically, when the ambient light intensity is high, the display brightness of the display screen 905 is increased; when the ambient light intensity is low, the display brightness of the display screen 905 is decreased. In another embodiment, the processor 901 can also dynamically adjust the shooting parameters of the camera assembly 906 based on the ambient light intensity detected by the optical sensor 915.

[0207] Proximity sensor 916, also known as a distance sensor, is typically located on the front panel of terminal 900. Proximity sensor 916 is used to detect the distance between the user and the front of terminal 900. In one embodiment, when proximity sensor 916 detects that the distance between the user and the front of terminal 900 is gradually decreasing, processor 901 controls display screen 905 to switch from the screen-on state to the screen-off state. When proximity sensor 916 detects that the distance between the user and the front of terminal 900 is gradually increasing, processor 901 controls display screen 905 to switch from the screen-off state to the screen-on state.

[0208] Those skilled in the art will understand that Figure 9 The structure shown in the figure does not constitute a limitation on the terminal 900, and the terminal 900 may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.

[0209] When an electronic device is provided as a server, Figure 10 This is a block diagram of a server 1000 according to an exemplary embodiment. The server 1000 may vary significantly due to different configurations or performance, and may include one or more processors (Central Processing Units, CPUs) 1001 and one or more memories 1002. The memories 1002 store at least one program code, which is loaded and executed by the processor 1001 to implement the method for determining the bit rate of multimedia resources provided by the various method embodiments described above. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and input and output interfaces for input and output. The server 1000 may also include other components for implementing device functions, which will not be described in detail here.

[0210] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as memory 902 or memory 1002 including instructions. The instructions may be executed by processor 901 of terminal 900 or processor 1001 of server 1000 to perform the above method. Alternatively, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, or the like.

[0211] A computer program product includes a computer program / instruction, which implements the above-mentioned method for determining the bit rate of multimedia resources when executed by a processor.

[0212] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.

[0213] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for determining the bit rate of multimedia resources, characterized in that: The method comprises: Obtaining a first buffering amount of a multimedia resource and a first sending rate of the multimedia resource, where the first buffering amount indicates a current situation in which a buffer area of ​​the receiving end caches the multimedia resource, and the first sending rate indicates a current situation in which the sending end sends the multimedia resource; Obtaining a target buffer size, at least one second buffer size, a target sending rate, and at least one second sending rate, wherein the target buffer size is used to indicate the amount of data of the multimedia resource that the receiving end can cache, the at least one second buffer size is used to indicate the amount of data of the multimedia resource cached by the receiving end at at least one moment before the current moment, the target sending rate is used to indicate the maximum rate at which the sending end sends the multimedia resource, and the at least one second sending rate is used to indicate the rate at which the sending end sends the multimedia resource at at least one moment before the current moment; taking the difference between the target buffer amount and the first buffer amount as a first difference, taking the overall difference between the target buffer amount and the at least one second buffer amount as a second difference, taking the difference between the target sending rate and the first sending rate as a third difference, and taking the overall difference between the target sending rate and the at least one second sending rate as a fourth difference; Obtaining a first proportional control factor, a first integral control factor, a second proportional control factor, and a second integral control factor, wherein the first proportional control factor is used to control an influence of the first buffer amount on a buffer change gradient of a buffer of the receiving end; the first integral control factor is used to control an influence of the buffer amount of the receiving end at least at a time before the current time on the buffer change gradient; the second proportional control factor is used to control an influence of the first sending rate on the buffer change gradient; and the second integral control factor is used to control an influence of the sending rate of the sending end at least at a time before the current time on the buffer change gradient; summing a product of the first proportional control factor and the first difference, a product of the first integral control factor and the second difference, a product of the second proportional control factor and the third difference, and a product of the second integral control factor and the fourth difference to determine the buffer change gradient, where the buffer change gradient represents an increment of the multimedia resource cached in the buffer of the receiving end per unit time; When the buffer change gradient is less than the target value, subtract the product of the first integral control factor and the second difference and the product of the second integral control factor and the fourth difference from the buffer change gradient to obtain a first value; correct the buffer change gradient to the maximum of the first value and the second value, where the second value is greater than the target value; wherein the target value is the larger value of the first extreme value point and the second extreme value point, and the first extreme value point and the second extreme value point are two extreme value points of the objective function; A first function is determined based on the buffer change gradient and the transmission bandwidth of the multimedia resource. The function value of the first function is used to represent the occupancy of the transmission bandwidth when the multimedia resource is sent at the current moment. The expression of the first function is as follows: ; A second function is determined based on the first bit rate, where the first bit rate is the bit rate used when the multimedia resource was last sent. A function value of the second function is used to represent a difference between the bit rates of the multimedia resource sent twice adjacently. The expression of the second function is as follows: ; in, Used to indicate buffer change gradient; The bit rate of the multimedia resource at the current moment is a variable in the expression; Used to represent the transmission bandwidth of multimedia resources; Used to indicate the bit rate used when sending multimedia resources last time; Used to represent weight parameters; Determining the objective function based on minimization of the sum of the first function and the second function; the objective function is used to represent the relationship between the bit rate at the current moment and the first bit rate; The function value of the objective function is used as a second bit rate, where the second bit rate is used to represent the bit rate of the multimedia resource at the current moment.

2. The method for determining the bit rate of multimedia resources according to claim 1, wherein: When the buffer change gradient is greater than the target value, the greater the buffer change gradient, the lower the determined bit rate of the multimedia resource; when the buffer change gradient is less than the target value, the greater the buffer change gradient, the higher the determined bit rate of the multimedia resource.

3. The method for determining the bit rate of multimedia resources according to claim 1, wherein: The process of obtaining the target buffer amount includes: Selecting a buffer amount with the largest value from the first buffer amount and the at least one second buffer amount as a third buffer amount, the third buffer amount being used to represent a maximum buffer amount reached by the receiving end at the current moment and before the current moment; When the third buffer amount is less than the preset buffer amount, determining that the target buffer amount is equal to the preset buffer amount; In a case where the third buffer amount is not less than the preset buffer amount, an average value between the third buffer amount and the preset buffer amount is used as the target buffer amount.

4. The method for determining the bit rate of multimedia resources according to claim 1, wherein: The first sending rate is used to represent the content length of the multimedia resource sent per unit time; The process of obtaining the first sending rate includes: Acquire a fourth buffer amount and a buffer amount threshold, wherein the fourth buffer amount is used to indicate the buffer amount of the buffer of the transmitting end at the current moment, and the buffer amount threshold is used to indicate the maximum buffer amount of the buffer of the transmitting end; When the fourth buffer amount is less than the buffer amount threshold, determining the first sending rate to be 1; When the fourth buffer amount is not less than the buffer amount threshold, the first sending rate is determined based on the ratio of the content duration and the sending duration of the multimedia resource, where the sending duration is the duration it takes for the multimedia resource to travel from the sending end to the receiving end.

5. The method for determining the bit rate of multimedia resources according to claim 1, wherein: The method further comprises: When frame loss occurs on the multimedia resource at the transmitting end, the bit rate of the multimedia resource is switched to a bit rate lower than the current bit rate.

6. A device for determining the bit rate of multimedia resources, characterized in that: The device comprises: a first acquiring unit configured to acquire a first buffering amount of a multimedia resource and a first sending rate of the multimedia resource, wherein the first buffering amount indicates a current situation in which a buffer area of ​​a receiving end caches the multimedia resource, and the first sending rate indicates a current situation in which a sending end sends the multimedia resource; The first determining unit is configured to execute acquisition of a target buffer amount, at least one second buffer amount, a target sending rate, and at least one second sending rate, wherein the target buffer amount is used to indicate the amount of data of the multimedia resource that the receiving end can cache, the at least one second buffer amount is used to indicate the amount of data of the multimedia resource cached by the receiving end at at least one moment before the current moment, the target sending rate is used to indicate the maximum rate at which the sending end sends the multimedia resource, and the at least one second sending rate is used to indicate the rate at which the sending end sends the multimedia resource at at least one moment before the current moment; taking the difference between the target buffer amount and the first buffer amount as the first difference, taking the overall difference between the target buffer amount and the at least one second buffer amount as the second difference, taking the difference between the target sending rate and the first sending rate as the third difference, and taking the overall difference between the target sending rate and the at least one second sending rate as the fourth difference; acquiring a first proportional control factor, a first an integral control factor, a second proportional control factor, and a second integral control factor, wherein the first proportional control factor is used to control the influence of the first buffering amount on the buffer change gradient of the buffer of the receiving end, the first integral control factor is used to control the influence of the buffering amount of the receiving end at least one time before the current time on the buffer change gradient, the second proportional control factor is used to control the influence of the first sending rate on the buffer change gradient, and the second integral control factor is used to control the influence of the sending rate of the sending end at least one time before the current time on the buffer change gradient; the buffer change gradient is determined by summing the product of the first proportional control factor and the first difference, the product of the first integral control factor and the second difference, the product of the second proportional control factor and the third difference, and the product of the second integral control factor and the fourth difference, wherein the buffer change gradient represents the increment of the multimedia resource cached in the buffer of the receiving end per unit time; The second determining unit is configured to execute: When the buffer change gradient is less than the target value, a first value is obtained by subtracting the product of the first integral control factor and the second difference and the product of the second integral control factor and the fourth difference from the buffer change gradient; the buffer change gradient is corrected to the maximum value of the first value and the second value, and the second value is greater than the target value; wherein the target value is the larger value of the first extreme point and the second extreme point, and the first extreme point and the second extreme point are two extreme points of the objective function; based on the buffer change gradient and the transmission bandwidth of the multimedia resource, a first function is determined, the function value of the first function is used to represent the occupancy of the transmission bandwidth when the multimedia resource is sent at the current moment, and the expression of the first function is as follows: A second function is determined based on the first bit rate, where the first bit rate is the bit rate used when the multimedia resource was last sent. A function value of the second function is used to represent a difference between the bit rates of the multimedia resource sent twice adjacently. The expression of the second function is as follows: in, Used to indicate buffer change gradient; The bit rate of the multimedia resource at the current moment is a variable in the expression; Used to represent the transmission bandwidth of multimedia resources; Used to indicate the bit rate used when sending multimedia resources last time; Used to represent weight parameters; Determining the objective function based on minimization of the sum of the first function and the second function; the objective function is used to represent the relationship between the bit rate at the current moment and the first bit rate; The third determining unit is configured to use the function value of the objective function as a second bit rate, where the second bit rate is used to represent the bit rate of the multimedia resource at the current moment.

7. An electronic device, characterized in that: The electronic device comprises: one or more processors; a memory for storing program code executable by the processor; The processor is configured to execute the program code to implement the method for determining the bit rate of multimedia resources according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method for determining the bit rate of multimedia resources according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Code rate adaptive adjusting method and apparatus and electronic device

    CN107295395A

  • Video code rate self-adapting method

    CN107613330A