Code rate allocation method and device, electronic equipment and storage medium
By dynamically adjusting the bit rate according to the number of anchors and screen size, the problem of uneven bit rate distribution in video broadcasts is solved, ensuring picture clarity and saving bandwidth, avoiding live broadcast freezes, and improving user experience.
Patent Information
- Application Number
- CN202410867425.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-10-22
AI Technical Summary
During the video linking process, the anchor's screen size adjustment leads to uneven bit rate distribution, resulting in inconsistent picture clarity and waste of network bandwidth, which may cause freezes in the live broadcast.
According to the number of anchors participating in the broadcast and the number of anchors whose screen size has been adjusted, the bitrate of each anchor is dynamically adjusted, and the anchors who are enlarged or reduced are assigned a higher or lower bitrate through the screen adjustment command to ensure the clarity of the picture. and save bandwidth.
It achieves a clear display of each anchor's screen, while avoiding lags caused by bandwidth waste during the live broadcast, improving the user experience.
Smart Images

Figure CN118828074A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of live broadcast technology, and in particular to a bit rate allocation method, a bit rate allocation device, an electronic device, a computer-readable storage medium, and a computer program product. Background Art
[0002] With the development of Internet technology and the improvement of live broadcast technology, the microphone connection function has become a common function in the live broadcast field. Microphone connection means that at least two users (also called anchors) can communicate in real time during the live broadcast, and the users in the microphone connection process can watch the video images of other users participating in the microphone connection, and the user's own image can be displayed on the same screen with the video images of other users.
[0003] The methods described in this section are not necessarily methods that have been previously conceived or used. Unless otherwise indicated, it should not be assumed that any method described in this section is considered to be prior art simply because it is included in this section. Similarly, unless otherwise indicated, the issues mentioned in this section should not be considered to have been recognized in any prior art. Summary of the invention
[0004] The present disclosure provides a code rate allocation method, a code rate allocation device, an electronic device, a computer-readable storage medium, and a computer program product.
[0005] According to one aspect of the present disclosure, a bit rate allocation method is provided, including: determining that the number of anchors of a plurality of anchors participating in a live broadcast is a first value; receiving a picture adjustment instruction from the plurality of anchors, wherein the picture adjustment instruction is used to adjust a picture size corresponding to a target anchor among the plurality of anchors; based on the picture adjustment instruction from the plurality of anchors, determining that the number of anchors whose picture sizes are adjusted is a second value; and adjusting the bit rate allocated to each of the plurality of anchors based on the first value and the second value.
[0006] According to another aspect of the present disclosure, a bit rate allocation device is also provided, including: a first determination module, configured to determine that the number of anchors of a plurality of anchors participating in a live broadcast is a first value; a receiving module, configured to receive a picture adjustment instruction from the plurality of anchors, wherein the picture adjustment instruction is used to adjust the picture size corresponding to a target anchor among the plurality of anchors; a second determination module, configured to determine that the number of anchors whose picture sizes are adjusted is a second value based on the picture adjustment instruction from the plurality of anchors; and an adjustment module, configured to adjust the bit rate allocated to each of the plurality of anchors based on the first value and the second value.
[0007] According to another aspect of the present disclosure, an electronic device is also provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program, and the computer program implements the above method when executed by the at least one processor.
[0008] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing a computer program is also provided, wherein the computer program implements the above method when executed by a processor.
[0009] According to another aspect of the present disclosure, a computer program product is further provided, comprising a computer program, wherein the computer program implements the above method when executed by a processor.
[0010] By utilizing the embodiments provided by the present disclosure, the bit rate of each anchor can be adjusted based on the number of anchors participating in the joint microphone and the number of anchors whose screen sizes are adjusted, thereby allocating different bit rates to anchors whose screen sizes are adjusted and anchors whose screen sizes are not adjusted.
[0011] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.
[0013] Figure 1 An exemplary flow chart of a code rate allocation method according to an embodiment of the present disclosure is shown;
[0014] Figure 2 A schematic diagram showing a screen display of an anchor according to an embodiment of the present disclosure is shown;
[0015] Figure 3 An exemplary block diagram of a code rate allocation device according to an embodiment of the present disclosure is shown; and
[0016] Figure 4 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0017] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0018] In the present disclosure, unless otherwise specified, the use of the terms "first", "second", etc. to describe various elements is not intended to limit the positional relationship, timing relationship, or importance relationship of these elements, and such terms are only used to distinguish one element from another element. In some examples, the first element and the second element may refer to the same instance of the element, and in some cases, based on the description of the context, they may also refer to different instances.
[0019] The terms used in the description of various examples in this disclosure are only for the purpose of describing specific examples and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element can be one or more. In addition, the term "and / or" used in this disclosure covers any one of the listed items and all possible combinations.
[0020] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0021] The following are explanations of some of the terms involved in this disclosure:
[0022] Video linking is also called video connection, same-screen live broadcast, etc. It is a common function in online live broadcasting. When video linking is performed, the images of different live broadcast rooms will be spliced together according to the set layout. Users can see the images of all anchors participating in this video linking at the same time, and can also hear the voices of these anchors at the same time.
[0023] Real-time Communication (RTC) refers to low-latency audio and video transmission technology, which is often used in voice calls, video calls, etc. over the Internet.
[0024] Bit rate is a common unit in audio and video transmission. The common unit is kilobits per second (kbps), which refers to the amount of data generated per second. It can usually be considered that there is a positive correlation between bit rate and image quality: the higher the bit rate, the clearer the picture, and the lower the bit rate, the blurrier the picture. In actual estimation, it can be used as the network transmission rate.
[0025] Bandwidth refers to the rate and capacity of network data transmission, usually measured in kilobytes (KB / S) and megabytes (MB / S), and refers to the amount of data that can be transmitted per second.
[0026] In the related technology, each host participating in the live broadcast is assigned the same bit rate. Each host transmits one channel of audio and video data to the RTC server, which is either high-definition or low-definition. Each host receives the audio and video data of other hosts from the RTC server and displays the images of each host on its own terminal. However, when the host who wants to participate zooms in on the image corresponding to one of the hosts, the following problems will arise: if each host transmits a low-definition image, it will be very blurry after zooming in; if the host transmits a high-definition image, the network bandwidth requirement for receiving multiple channels of audio and video data at the same time is too high, and serious jamming is very likely to occur.
[0027] For this purpose, the present disclosure provides a bit rate allocation method, which can adjust the bit rate of each anchor based on the number of anchors participating in the joint microphone and the number of anchors whose screen size is adjusted, so as to allocate different bit rates to the anchors whose screen size is adjusted and the anchors whose screen size is not adjusted. In the technical solution of the present disclosure, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good customs.
[0028] Figure 1 An exemplary flow chart of a code rate allocation method 100 according to an embodiment of the present disclosure is shown.
[0029] In step S102, it is determined that the number of hosts among the multiple hosts participating in the joint microphone connection is a first value.
[0030] In step S104, a screen adjustment instruction is received from the multiple hosts, wherein the screen adjustment instruction is used to adjust the screen size corresponding to a target host among the multiple hosts.
[0031] In step S106, based on the picture adjustment instructions from the multiple anchors, it is determined that the number of anchors whose picture sizes are adjusted is a second value.
[0032] In step S108, based on the first value and the second value, the bit rate allocated to each of the multiple hosts is adjusted.
[0033] It can be understood that during the live broadcast process, each host participating in the live broadcast transmits his own audio and video data to the server (such as an RTC server), and receives the audio and video data of other hosts from the server, so as to display his own picture and the pictures of other hosts on his own terminal.
[0034] Exemplarily, each anchor can adjust the screen size corresponding to the target anchor among multiple anchors through the screen adjustment command on his own terminal to enlarge or reduce the screen of the target anchor. For example, the screen corresponding to the target anchor can be enlarged or reduced by clicking on it. Therefore, using the bit rate allocation method provided by the embodiment of the present disclosure, the bit rate of each anchor can be adjusted based on the number of anchors participating in the joint microphone and the number of anchors whose screen sizes are adjusted, so as to allocate different bit rates to the anchors whose screen sizes are adjusted and the anchors whose screen sizes are not adjusted. Allocating different bit rates to anchors who display corresponding screens in different screen sizes helps to make each anchor's screen clearly displayed, while not excessively wasting network bandwidth to cause live broadcast freezes and the like.
[0035] The principles of the present disclosure will be described in detail below.
[0036] In step S102, the total number of anchors participating in the joint broadcast is determined and recorded as the first value; in step S104, when each anchor adjusts the screen size corresponding to the target anchor among the multiple anchors through the screen adjustment instruction on its own terminal, the screen adjustment instruction from the multiple anchors is received, and the number of anchors whose screen size is adjusted is determined in step S106, and the number of anchors whose screen size is adjusted is recorded as the second value, so that under the condition of having a specific available bandwidth, the bit rate allocated to each of the multiple anchors can be adjusted based on the first value and the second value in step S108. In an example, the available bandwidth can be allocated according to the available bandwidth value and the ratio of the first value to the second value, so as to adjust the bit rate allocated to each of the multiple anchors. Thus, different bit rates are allocated to the anchor whose screen size is adjusted and the anchor whose screen size is not adjusted, so that the screen of each anchor can be displayed clearly, and at the same time, the network bandwidth is not excessively wasted to cause the live broadcast to freeze.
[0037] According to some embodiments, the picture adjustment instruction is used to enlarge and display the picture corresponding to the target anchor among the multiple anchors. Exemplarily, each anchor can enlarge and display the picture of the target anchor by clicking the picture corresponding to the target anchor. It is understandable that the anchor to be enlarged and displayed will be assigned a higher bit rate, so that the enlarged picture has sufficient clarity to improve the user experience.
[0038] In some examples, the screen adjustment instruction is used to reduce the screen corresponding to the target anchor among the multiple anchors. The anchor displayed in reduced size can be assigned a lower bit rate, thereby saving bandwidth and avoiding freezes during the live broadcast.
[0039] According to some embodiments, the bitrate allocation method 100 further includes: determining a threshold of a receiving bandwidth of a terminal, wherein when the receiving bandwidth is greater than the threshold, a freeze occurs in a picture displayed by the terminal; and determining a mathematical relationship between a bitrate to be allocated to an anchor whose picture size is adjusted and a bitrate to be allocated to an anchor whose picture size is not adjusted. Step S108 includes: determining a bitrate to be allocated to each of the multiple anchors based on the first value, the second value, the threshold, and the mathematical relationship.
[0040] For example, when the receiving bandwidth of the terminal reaches a certain value, the freezing rate of the anchor's terminal will not change significantly; when it exceeds this certain value, the freezing rate will increase significantly. By analyzing the collected historical data, the size of this certain value can be obtained as the threshold of the receiving bandwidth.
[0041] Exemplarily, the mathematical relationship between the bit rate to be allocated to the anchor whose screen size is adjusted and the bit rate to be allocated to the anchor whose screen size is not adjusted can be determined according to whether the screen adjustment instruction is to enlarge or reduce the screen, so as to exemplarily allocate a higher bit rate to the anchor whose screen size is enlarged. In one example, the mathematical relationship between the bit rate to be allocated to the anchor whose screen size is adjusted and the bit rate to be allocated to the anchor whose screen size is not adjusted can be determined according to the ratio of the screen size after the screen size is adjusted to the screen size before the screen size is adjusted.
[0042] When the above mathematical relationship is determined, the total bitrate allocated to all hosts participating in the live broadcast can be expressed by an expression based on the first value and the second value. When the total bitrate is less than the threshold, it can be ensured that no lag occurs on each terminal. By setting the total bitrate to an appropriate value, the bitrate allocated to each of the multiple hosts can be determined.
[0043] According to some embodiments, determining the mathematical relationship between the bit rate to be allocated to the anchor whose picture size is adjusted and the bit rate to be allocated to the anchor whose picture size is not adjusted includes: allocating proportional bit rates to the anchor whose picture size is adjusted and the anchor whose picture size is not adjusted; and determining a proportional coefficient of the proportion as the mathematical relationship.
[0044] For example, the value of the proportional coefficient can be determined according to whether the picture adjustment instruction is used to enlarge or reduce the picture corresponding to the target anchor.
[0045] When the picture adjustment instruction is used to enlarge the picture corresponding to the target anchor, it can be understood that the anchor to be enlarged needs to transmit higher-definition content, so a higher bit rate needs to be allocated to the anchor to be enlarged. Exemplarily, when the bit rate allocated to the anchor that is not enlarged is M, a bit rate of jM can be allocated to the anchor to be enlarged, and at this time, the proportional coefficient j is greater than 1.
[0046] Accordingly, when the screen adjustment instruction is used to reduce the screen corresponding to the target anchor, a lower bit rate can be allocated to the anchor that is reduced in size to save bandwidth. For example, when the bit rate allocated to the anchor that is not reduced in size is M, a bit rate of jM can be allocated to the anchor that is enlarged in size, and at this time, the proportional coefficient j is less than 1.
[0047] According to some embodiments, determining the bit rate allocated to each of the multiple hosts based on the first value, the second value, the threshold and the mathematical relationship includes: determining the receiving bandwidth requirement of any one of the multiple hosts based on the threshold; and determining the bit rate allocated to each of the multiple hosts based on the receiving bandwidth requirement, the first value, the second value and the mathematical relationship.
[0048] For any of the multiple anchors, it needs to receive audio and video data from other anchors from the server, so the receiving bandwidth requirement of any anchor is expressed according to the number of all anchors, i.e., the first value, the number of anchors whose screen size is adjusted, i.e., the second value, and the above mathematical relationship. When the receiving bandwidth requirement is smaller than the threshold, the bit rate allocated to each anchor is relatively small, and the smoothness of the live broadcast can be guaranteed; when the receiving bandwidth requirement is closer to the threshold, the bit rate allocated to each anchor is relatively large, and the clarity of the screen of each anchor can be guaranteed. Therefore, the bit rate allocated to each of the multiple anchors can be determined based on the receiving bandwidth requirement and the threshold.
[0049] According to some embodiments, based on the threshold, determining the receiving bandwidth requirement of any one of the multiple hosts includes: setting the receiving bandwidth requirement to be equal to the threshold, and wherein, based on the receiving bandwidth requirement, the first value, the second value and the mathematical relationship, determining the bit rate allocated to each of the multiple hosts includes: determining the bit rate allocated to each of the multiple hosts based on the following formula (1):
[0050] (NM-1)*A + M*kA = X (1)
[0051] Wherein, N represents the first value, M represents the second value, X represents the threshold, k represents the proportional coefficient, A represents the bit rate allocated to the anchor whose picture size is not adjusted, and kA represents the bit rate allocated to the anchor whose picture size is adjusted.
[0052] A proportional bit rate is allocated to the anchor whose screen size is adjusted and the anchor whose screen size is not adjusted, that is, the bit rate allocated to the anchor whose screen size is not adjusted is A, and the bit rate allocated to the anchor whose screen size is adjusted is kA. For example, there are currently N anchors participating in the joint broadcast, so each anchor needs to receive the audio and video data of N-1 other anchors. During the joint broadcast process, the screen size can be adjusted by clicking on the screen of the target anchor. When the number of anchors whose screen size is adjusted is M, the receiving bandwidth requirement of any anchor can be expressed as (NM-1)*A+M*kA. In order to pursue the highest image quality under the premise of a reasonable stuttering rate, the receiving bandwidth requirement (NM-1)*A+M*kA can be made equal to the threshold value X of the receiving bandwidth of the terminal, that is, the above formula (1) is obtained, thereby, the values of A and kA can be obtained under the condition determined by the proportional coefficient k, so that the server can notify each anchor whether to send their respective audio and video data according to the bit rate A or the bit rate kA.
[0053] According to some embodiments, when the picture adjustment instruction is used to enlarge and display the picture corresponding to the target anchor, k is a constant greater than 1. Thus, the anchor that is enlarged and displayed can be displayed with a clearer picture without lag.
[0054] According to some embodiments, determining the threshold of the receiving bandwidth of the terminal includes: in response to the first value being less than a first preset value and the second value being less than a second preset value, reducing the threshold. When N and M are small, the value of X can be appropriately reduced to further reduce the jam rate.
[0055] Figure 2 A schematic diagram of the screen display of the anchor according to an embodiment of the present disclosure is shown. For example, four anchors who are broadcasting live have a video link, where anchor No. 1 clicks to enlarge anchor No. 3, anchor No. 2 enlarges anchor No. 3, anchor No. 3 clicks to enlarge anchor No. 2, and anchor No. 4 clicks to enlarge himself.
[0056] It can be seen that N = 4, that is, there are 4 anchors participating in this live broadcast; M = 2, because anchor No. 3 is amplified by anchor No. 1 and anchor No. 2, anchor No. 2 is amplified by anchor No. 3, and anchor No. 4 amplifies himself, and does not need to transmit high-definition audio and video data, so he is not counted in the number of anchors that are magnified. When X = 1000KB / S, that is, 8000kbps, is obtained through historical data analysis, and k = 2 is defined, the above formula (1) can be used to calculate that A is 1600kbps, and kA is 3200kps. Thus, the server can notify anchors 1 and 4 to use 1600 kbps for audio and video transmission, and anchors 2 and 3 to use 3200 kbps for audio and video transmission, and can calculate the receiving bandwidth of each anchor. At this time, the receiving bandwidth of anchor 1 is 3200+3200+1600=8000 (kbps), the receiving bandwidth of anchor 2 is 1600+3200+1600=6400 (kbps), the receiving bandwidth of anchor 3 is 1600+3200+1600=6400 (kbps), and the receiving bandwidth of anchor 4 is 1600+3200+3200=8000 (kbps).
[0057] As a result, each anchor's image can be displayed clearly without excessively wasting network bandwidth, causing live broadcast freezes and the like.
[0058] According to another aspect of the present disclosure, a code rate allocation device is also provided.
[0059] Figure 3 FIG. 2 shows an exemplary block diagram of a code rate allocation device according to an embodiment of the present disclosure. Figure 3 As shown, the bit rate allocation device 300 includes: a first determination module 301, configured to determine that the number of anchors of a plurality of anchors participating in the joint microphone is a first value; a receiving module 302, configured to receive a picture adjustment instruction from the plurality of anchors, wherein the picture adjustment instruction is used to adjust the picture size corresponding to a target anchor among the plurality of anchors; a second determination module 303, configured to determine that the number of anchors whose picture size is adjusted is a second value based on the picture adjustment instruction from the plurality of anchors; and an adjustment module 304, configured to adjust the bit rate allocated to each of the plurality of anchors based on the first value and the second value.
[0060] Therefore, by using the bit rate allocation device provided by the embodiment of the present disclosure, the bit rate of each anchor can be adjusted based on the number of anchors participating in the joint microphone and the number of anchors whose screen sizes are adjusted, so as to allocate different bit rates to the anchors whose screen sizes are adjusted and the anchors whose screen sizes are not adjusted. Allocating different bit rates to anchors who display corresponding screens with different screen sizes helps to make the screen of each anchor clearly displayed, while not wasting too much network bandwidth to cause live broadcast freezes and the like.
[0061] It should be understood that Figure 3 The various units of the device 300 shown in FIG. Figure 1 The steps in the method 100 described above correspond to each other. Therefore, the operations, features and advantages described above for the method 100 are also applicable to the device 300 and the units included therein. For the sake of brevity, some operations, features and advantages are not repeated here.
[0062] According to some embodiments, the picture adjustment instruction is used to enlarge and display the picture corresponding to the target anchor among the multiple anchors. Exemplarily, each anchor can enlarge and display the picture of the target anchor by clicking the picture corresponding to the target anchor. It is understandable that the anchor to be enlarged and displayed will be assigned a higher bit rate, so that the enlarged picture has sufficient clarity to improve the user experience.
[0063] In some examples, the screen adjustment instruction is used to reduce the screen corresponding to the target anchor among the multiple anchors. The anchor displayed in reduced size can be assigned a lower bit rate, thereby saving bandwidth and avoiding freezes during the live broadcast.
[0064] According to some embodiments, the bit rate allocation device 300 also includes: a third determination module, configured to determine a threshold of a receiving bandwidth of a terminal, wherein when the receiving bandwidth is greater than the threshold, a freeze occurs in a picture displayed by the terminal; a fourth determination module, configured to determine a mathematical relationship between a bit rate to be allocated to an anchor whose picture size is adjusted and a bit rate to be allocated to an anchor whose picture size is not adjusted, wherein the adjustment module 304 is further configured to: determine the bit rate allocated to each of the multiple anchors based on the first value, the second value, the threshold and the mathematical relationship.
[0065] For example, when the receiving bandwidth of the terminal reaches a specific value, the freeze rate of the anchor's terminal will not change significantly; and when it exceeds this specific value, the freeze rate will increase significantly. By analyzing the collected historical data, the third determination module can obtain the size of this specific value as the threshold of the receiving bandwidth.
[0066] Exemplarily, the fourth determination module may determine the mathematical relationship between the bit rate to be allocated to the anchor whose screen size is adjusted and the bit rate to be allocated to the anchor whose screen size is not adjusted according to whether the screen adjustment instruction is to enlarge or reduce the screen, so as to exemplarily allocate a higher bit rate to the anchor whose screen size is enlarged. In one example, the fourth determination module may determine the mathematical relationship between the bit rate to be allocated to the anchor whose screen size is adjusted and the bit rate to be allocated to the anchor whose screen size is not adjusted according to the ratio of the screen size after the screen size is adjusted to the screen size when it is not adjusted.
[0067] When the above mathematical relationship is determined, the adjustment module can use an expression to express the total bit rate allocated to all hosts participating in the live broadcast based on the first value and the second value. When this total bit rate is less than the threshold, it can be ensured that each terminal does not experience lag. By setting this total bit rate to an appropriate size, the adjustment module can determine the bit rate allocated to each of the multiple hosts.
[0068] According to some embodiments, the fourth determination module includes: an allocation unit configured to allocate proportional bit rates to the anchor whose picture size is adjusted and the anchor whose picture size is not adjusted; and a first determination unit configured to determine a proportional coefficient of the proportion as the mathematical relationship.
[0069] Exemplarily, the first determination unit may determine the value of the proportional coefficient according to whether the picture adjustment instruction is used to enlarge or reduce the picture corresponding to the target anchor.
[0070] When the picture adjustment instruction is used to enlarge the picture corresponding to the target anchor, it can be understood that the anchor to be enlarged needs to transmit higher-definition content, so a higher bit rate needs to be allocated to the anchor to be enlarged. Exemplarily, when the bit rate allocated to the anchor that is not enlarged is M, a bit rate of jM can be allocated to the anchor to be enlarged, and at this time, the proportional coefficient j is greater than 1.
[0071] Accordingly, when the screen adjustment instruction is used to reduce the screen corresponding to the target anchor, a lower bit rate can be allocated to the anchor that is reduced in size to save bandwidth. For example, when the bit rate allocated to the anchor that is not reduced in size is M, a bit rate of jM can be allocated to the anchor that is enlarged in size, and at this time, the proportional coefficient j is less than 1.
[0072] According to some embodiments, the adjustment module includes: a second determination unit, configured to determine the receiving bandwidth requirement of any one of the multiple anchors based on the threshold; a third determination unit, configured to determine the bit rate allocated to each of the multiple anchors based on the receiving bandwidth requirement, the first value, the second value and the mathematical relationship.
[0073] For any of the multiple anchors, it is necessary to receive audio and video data from other anchors from the server, so the second determination unit represents the receiving bandwidth requirement of any anchor according to the number of all anchors, i.e., the first value, the number of anchors whose screen size is adjusted, i.e., the second value, and the above mathematical relationship. When this receiving bandwidth requirement is smaller than the threshold, the bit rate allocated to each anchor is relatively small, and the smoothness of the live broadcast can be guaranteed; when this receiving bandwidth requirement is closer to the threshold, the bit rate allocated to each anchor is relatively large, and the clarity of the screen of each anchor can be guaranteed. Therefore, the third determination unit can determine the bit rate allocated to each of the multiple anchors based on the size of the receiving bandwidth requirement and the threshold.
[0074] According to some embodiments, the second determining unit is further configured to set the receiving bandwidth requirement equal to the threshold, and wherein the third determining unit is further configured to: determine the bit rate allocated to each of the multiple anchors based on the following formula,
[0075] (NM-1)*A+M*kA=X,
[0076] Wherein, N represents the first value, M represents the second value, X represents the threshold, k represents the proportional coefficient, A represents the bit rate allocated to the anchor whose picture size is not adjusted, and kA represents the bit rate allocated to the anchor whose picture size is adjusted.
[0077] The adjustment module allocates proportional bit rates to the anchor whose screen size is adjusted and the anchor whose screen size is not adjusted, that is, the bit rate allocated to the anchor whose screen size is not adjusted is A, and the bit rate allocated to the anchor whose screen size is adjusted is kA. For example, there are currently N anchors participating in the joint broadcast, so each anchor needs to receive the audio and video data of N-1 other anchors. During the joint broadcast process, the screen size can be adjusted by clicking on the screen of the target anchor. When the number of anchors whose screen size is adjusted is M, the receiving bandwidth requirement of any anchor can be expressed as (NM-1)*A+M*kA. In order to pursue the highest image quality under the premise of a reasonable stuttering rate, the receiving bandwidth requirement (NM-1)*A+M*kA can be made equal to the threshold value X of the receiving bandwidth of the terminal, that is, the above formula (1) is obtained, thereby, the values of A and kA can be obtained under the condition determined by the proportional coefficient k, so that the server can notify each anchor whether to send their respective audio and video data according to the bit rate A or the bit rate kA.
[0078] According to some embodiments, when the picture adjustment instruction is used to enlarge and display the picture corresponding to the target anchor, k is a constant greater than 1. Thus, the anchor that is enlarged and displayed can be displayed with a clearer picture without lag.
[0079] According to some embodiments, the third determination module is further configured to: in response to the first value being less than a first preset value and the second value being less than a second preset value, reduce the threshold. When N and M are small, the third determination module may appropriately reduce the value of X to further reduce the jam rate.
[0080] It should also be understood that various techniques may be described herein in the general context of software hardware elements or program modules. Figure 3 The various units described can be implemented in hardware or in hardware in combination with software and / or firmware. For example, these units can be implemented as computer program codes / instructions, which are configured to be executed in one or more processors and stored in a computer-readable storage medium. Alternatively, these units can be implemented as hardware logic / circuits. For example, in some embodiments, one or more of the first determination module 301, the receiving module 302, the second determination module 303, and the adjustment module 304 can be implemented together in a system on chip (System on Chip, SoC). SoC may include an integrated circuit chip (which includes a processor (e.g., a central processing unit (CPU), a microcontroller, a microprocessor, a digital signal processor (DSP), etc.), a memory, one or more communication interfaces, and / or one or more components in other circuits), and may optionally execute the received program code and / or include embedded firmware to perform functions.
[0081] According to another aspect of the present disclosure, an electronic device is also provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program, and the computer program implements the above method when executed by the at least one processor.
[0082] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing a computer program is also provided, wherein the computer program implements the above method when executed by a processor.
[0083] According to another aspect of the present disclosure, a computer program product is further provided, comprising a computer program, wherein the computer program implements the above method when executed by a processor.
[0084] See also Figure 4, a block diagram of an electronic device 400 that can be used as a server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device can be a computer device of different types, such as a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0085] like Figure 4 As shown, the electronic device 400 may include at least one processor 401 , a working memory 402 , an input unit 404 , a display unit 405 , a speaker 406 , a storage unit 407 , a communication unit 408 , and other output units 409 that can communicate with each other via a system bus 403 .
[0086] Processor 401 may be a single processing unit or multiple processing units, all of which may include a single or multiple computing units or multiple cores. Processor 401 may be implemented as one or more microprocessors, microcomputers, microcontrollers, digital signal processors, central processing units, state machines, logic circuits, and / or any device that manipulates signals based on operating instructions. Processor 401 may be configured to obtain and execute computer-readable instructions stored in working memory 402, storage unit 407, or other computer-readable media, such as program codes of operating system 402a, program codes of application programs 402b, and the like.
[0087] Working memory 402 and storage unit 407 are examples of computer-readable storage media for storing instructions that are executed by processor 401 to implement the various functions described above. Working memory 402 may include both volatile memory and non-volatile memory (e.g., RAM, ROM, etc.). In addition, storage unit 407 may include a hard disk drive, a solid-state drive, a removable medium, including external and removable drives, a memory card, a flash memory, a floppy disk, an optical disk (e.g., a CD, a DVD), a storage array, a network attached storage, a storage area network, etc. Working memory 402 and storage unit 407 may all be collectively referred to herein as memory or computer-readable storage media, and may be a non-transitory medium capable of storing computer-readable, processor-executable program instructions as computer program code, which may be executed by processor 401 as a specific machine configured to implement the operations and functions described in the examples herein.
[0088] The input unit 406 may be any type of device capable of inputting information to the electronic device 400. The input unit 406 may receive input digital or character information and generate key signal input related to user settings and / or function control of the electronic device, and may include but is not limited to a mouse, a keyboard, a touch screen, a track pad, a track ball, a joystick, a microphone and / or a remote controller. The output unit may be any type of device capable of presenting information, and may include but is not limited to a display unit 405, a speaker 406, and other output units 409, which may include but are not limited to video / audio output terminals, vibrators and / or printers. The communication unit 408 allows the electronic device 400 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks, and may include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver and / or a chipset, such as a Bluetooth device, an 802.8 device, a WiFi device, a WiMax device, a cellular communication device and / or the like.
[0089] The application 402b in the working register 402 can be loaded to execute the various methods and processes described above, such as Figure 1 401. For example, in some embodiments, the method 100 described above may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 407. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 400 via the storage unit 407 and / or the communication unit 408. When the computer program is loaded and executed by the processor 401, one or more steps of the method 100 described above may be performed. Alternatively, in other embodiments, the processor 401 may be configured to execute the method 100 in any other appropriate manner (e.g., by means of firmware).
[0090] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0091] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0092] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0093] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0094] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0095] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.
[0096] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0097] Although the embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above-mentioned methods, systems and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples, but only by the claims after authorization and their equivalent scope. Various elements in the embodiments or examples can be omitted or replaced by their equivalent elements. In addition, each step can be performed in an order different from that described in the present disclosure. Further, the various elements in the embodiments or examples can be combined in various ways. It is important that with the evolution of technology, many elements described herein can be replaced by equivalent elements that appear after the present disclosure.
Claims
1. A code rate allocation method, include: Determine that the number of anchors participating in the live broadcast is a first value; Receiving a screen adjustment instruction from the multiple anchors, wherein the screen adjustment instruction is used to adjust a screen size corresponding to a target anchor among the multiple anchors; Based on the picture adjustment instructions from the multiple anchors, determining the number of anchors whose picture sizes are adjusted to be a second value; and Based on the first value and the second value, a bit rate allocated to each of the multiple hosts is adjusted.
2. The method according to claim 1, further comprising: include: Determine a threshold of a receiving bandwidth of a terminal, wherein when the receiving bandwidth is greater than the threshold, a screen displayed by the terminal freezes; Determine a mathematical relationship between the bitrate to be allocated to the anchor whose screen size is adjusted and the bitrate to be allocated to the anchor whose screen size is not adjusted, The adjusting the bit rate allocated to each of the plurality of hosts based on the first value and the second value includes: Based on the first value, the second value, the threshold, and the mathematical relationship, a bit rate allocated to each of the multiple anchors is determined.
3. The method according to claim 2, in, The mathematical relationship between the bit rate to be allocated to the anchor whose picture size is adjusted and the bit rate to be allocated to the anchor whose picture size is not adjusted comprises: Allocate proportional bitrates to resized streamers and non-resized streamers; and A proportionality coefficient of the proportionality is determined as the mathematical relationship.
4. The method according to claim 2 or 3, in, The determining, based on the first value, the second value, the threshold, and the mathematical relationship, of a bit rate allocated to each of the plurality of hosts comprises: Based on the threshold, determining a receiving bandwidth requirement of any one of the multiple anchors; Based on the receiving bandwidth requirement, the first value, the second value, and the mathematical relationship, a bit rate allocated to each of the multiple anchors is determined.
5. The method according to claim 4, in, The determining, based on the threshold, the receiving bandwidth requirement of any one of the plurality of hosts comprises: setting the receiving bandwidth requirement to be equal to the threshold, and The step of determining the bit rate allocated to each of the plurality of anchors based on the receiving bandwidth requirement, the first value, the second value, and the mathematical relationship includes: The bit rate allocated to each of the multiple hosts is determined based on the following formula: (NM-1)*A+M*kA=X, Wherein, N represents the first value, M represents the second value, X represents the threshold, k represents the proportional coefficient, A represents the bit rate allocated to the anchor whose picture size is not adjusted, and kA represents the bit rate allocated to the anchor whose picture size is adjusted.
6. The method according to any one of claims 1 to 3, in, The picture adjustment instruction is used to enlarge and display the picture corresponding to the target anchor among the multiple anchors.
7. The method according to claim 6, in, k is a constant greater than 1.
8. The method according to claim 2 or 3, in, The threshold of determining the receiving bandwidth of the terminal includes: In response to the first value being less than a first preset value and the second value being less than a second preset value, the threshold is decreased.
9. A code rate allocation device, include: A first determination module is configured to determine that the number of anchors of the plurality of anchors participating in the joint microphone connection is a first value; A receiving module is configured to receive a screen adjustment instruction from the multiple anchors, wherein the screen adjustment instruction is used to adjust the screen size corresponding to a target anchor among the multiple anchors; A second determining module is configured to determine that the number of anchors whose screen sizes are adjusted is a second value based on the screen adjustment instructions from the multiple anchors; and The adjustment module is configured to adjust the bit rate allocated to each of the multiple hosts based on the first value and the second value.
10. The device according to claim 9, further comprising: include: A third determination module is configured to determine a threshold of a receiving bandwidth of a terminal, wherein when the receiving bandwidth is greater than the threshold, a freeze occurs in a screen displayed by the terminal; The fourth determination module is configured to determine a mathematical relationship between a bit rate to be allocated to the anchor whose picture size is adjusted and a bit rate to be allocated to the anchor whose picture size is not adjusted, Wherein, the adjustment module is further configured as follows: Based on the first value, the second value, the threshold, and the mathematical relationship, a bit rate allocated to each of the multiple anchors is determined.
11. The device according to claim 10, in, The fourth determination module comprises: an allocating unit configured to allocate proportional bit rates to the anchor whose picture size is adjusted and the anchor whose picture size is not adjusted; and The first determining unit is configured to determine a proportionality coefficient of the proportion as the mathematical relationship.
12. The device according to claim 10 or 11, in, The adjustment module comprises: A second determining unit is configured to determine a receiving bandwidth requirement of any one of the multiple anchors based on the threshold; The third determining unit is configured to determine a bit rate allocated to each of the multiple anchors based on the receiving bandwidth requirement, the first value, the second value, and the mathematical relationship.
13. The device according to claim 12, in, The second determining unit is further configured to set the receiving bandwidth requirement to be equal to the threshold, and wherein the third determining unit is further configured to: The bit rate allocated to each of the multiple hosts is determined based on the following formula: (NM-1)*A+M*kA=X, Wherein, N represents the first value, M represents the second value, X represents the threshold, k represents the proportional coefficient, A represents the bit rate allocated to the anchor whose picture size is not adjusted, and kA represents the bit rate allocated to the anchor whose picture size is adjusted.
14. The device according to claims 9 to 11, in, The picture adjustment instruction is used to enlarge and display the picture corresponding to the target anchor among the multiple anchors.
15. The device according to claim 14, in, k is a constant greater than 1.
16. The device according to claim 10 or 11, in, The third determining module is further configured to: In response to the first value being less than a first preset value and the second value being less than a second preset value, the threshold is decreased.
17. An electronic device, include: at least one processor; as well as a memory communicatively coupled to the at least one processor; in The memory stores a computer program, which, when executed by the at least one processor, implements the method according to any one of claims 1 to 8.
18. A non-transitory computer-readable storage medium storing a computer program, in, The computer program implements the method according to any one of claims 1 to 8 when executed by a processor.
19. A computer program product comprising a computer program, in, The computer program implements the method according to any one of claims 1 to 8 when executed by a processor.
Citation Information
Cited By
Live broadcast processing method and device, storage medium and computer equipment
CN120692413A
