Bitrate control method, apparatus, media server, terminal device, and storage medium

The media server generates and aggregates the bandwidth information of the subscription client, and pushes it to the publishing client to adjust the audio and video stream bit rate, which solves the problem of mismatch between bit rate and bandwidth in multi-person communication, improves the communication quality, and is suitable for SFU architecture.

WO2024174908A1PCT designated stage expired Publication Date: 2024-08-29DOUYIN VISION CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/076593
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-02-20
Filing Date
2024-02-07
Publication Date
2024-08-29

AI Technical Summary

Technical Problem

In the real-time communication process involving multiple people, the bit rate of the audio and video stream does not match the available bandwidth of the subscribing client, resulting in poor communication quality. The existing bit rate control protocol cannot effectively adjust the encoding bit rate adaptively, especially in SFU There is a problem of difficulty in expansion under the architecture.

Method used

The discrete bandwidth information of the subscribing client is generated through the media server, aggregated into aggregate bandwidth information, and pushed to the publishing client to determine the appropriate push stream code rate, ensure that the code rate of the audio and video stream matches the available bandwidth of the subscribing client, and improve communication quality.

Benefits of technology

It realizes the dynamic adjustment of the audio and video stream bit rate during multi-person communication, improves the communication quality, is suitable for SFU architecture, and solves the defect in the existing technology that the bit rate control protocol cannot be expanded under the P2P and MCU communication architecture.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024076593_29082024_PF_FP_ABST
    Figure CN2024076593_29082024_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the embodiments of the present disclosure are a bitrate control method, an apparatus, a media server, a terminal device, and a storage medium. The method comprises: on the basis of available bandwidth information of a plurality of subscription clients, generating discrete bandwidth information for the subscription clients, the discrete bandwidth information indicating an available bandwidth allocated to the subscription clients and a bandwidth interval where the available bandwidth is located; aggregating a plurality of pieces of discrete bandwidth information into aggregated bandwidth information, the aggregated bandwidth information indicating a candidate available bandwidth of each bandwidth interval and the aggregation number of subscription clients in each bandwidth interval; and pushing the aggregated bandwidth information to a publishing client, the aggregated bandwidth information being used for the publishing client to determine a stream pushing bitrate.
Need to check novelty before this filing date? Find Prior Art

Description

Bit rate control method, device, media server, terminal equipment and storage medium

[0001] This application claims priority to Chinese Patent Application No. 202310139262.5 filed on February 20, 2023, and the contents of the above-mentioned Chinese patent application disclosure are hereby incorporated by reference in their entirety as a part of this application. Technical Field

[0002] The present disclosure relates to a rate control method, apparatus, media server, terminal equipment and storage medium. Background Art

[0003] Currently, in a real-time communication process involving multiple participants, a publishing client can push audio and video streams to multiple subscribing clients. Specifically, the publishing client usually encodes the audio and video streams according to a pre-set bit rate and pushes the encoded audio and video streams to each subscribing client.

[0004] However, in actual application scenarios, when a subscribing client downloads the encoded audio and video stream via the downlink, the bitrate of the audio and video stream may not match the client's available bandwidth. If the bitrate of the audio and video stream is significantly higher or lower than the client's available bandwidth, the communication quality will be poor.

[0005] Summary of the Invention

[0006] In view of this, one or more embodiments of the present disclosure provide a rate control method, apparatus, media server, terminal device, and storage medium, which can improve the communication quality during a communication process involving multiple participants.

[0007] On one hand, the present disclosure provides a rate control method, the method comprising: generating discrete bandwidth information for a plurality of subscribing clients based on available bandwidth information of the subscribing clients, the discrete bandwidth information indicating the available bandwidth allocated to the subscribing clients and the bandwidth interval in which the available bandwidth is located; aggregating the plurality of discrete bandwidth information into aggregated bandwidth information, the aggregated bandwidth information indicating candidate available bandwidths for each bandwidth interval and the aggregate number of subscribing clients in each bandwidth interval; and pushing the aggregated bandwidth information to a publishing client, where the publishing client uses the aggregated bandwidth information to determine a streaming bitrate.

[0008] Another aspect of the present disclosure provides a rate control device, comprising: a discrete bandwidth information generation unit, configured to generate discrete bandwidth information for a plurality of subscribing clients based on available bandwidth information of the plurality of subscribing clients, wherein the discrete bandwidth information indicates the available bandwidth allocated to the subscribing clients and the bandwidth interval in which the available bandwidth is located; an aggregation unit, configured to aggregate the plurality of discrete bandwidth information into aggregated bandwidth information, wherein the aggregated bandwidth information indicates the candidate available bandwidth of each bandwidth interval and the aggregated number of subscribing clients in each bandwidth interval; and a push unit, configured to push the aggregated bandwidth information to a publishing client, wherein the aggregated bandwidth information is used by the publishing client to determine a streaming bitrate.

[0009] Another aspect of the present disclosure provides a media server, which includes a memory and a processor. The memory is used to store a computer program. When the computer program is executed by the processor, the above-mentioned bit rate control method is implemented.

[0010] Another aspect of the present disclosure provides a rate control method, the method comprising: receiving aggregate bandwidth information from a media server, the aggregate bandwidth information indicating candidate available bandwidths for each bandwidth interval and the aggregate number of subscribing clients in each of the bandwidth intervals; determining a streaming bitrate based on the aggregate bandwidth information; encoding an audio and video stream according to the streaming bitrate; and pushing the encoded audio and video stream to each subscribing client.

[0011] Another aspect of the present disclosure provides a bitrate control device, comprising: an information receiving unit, configured to receive aggregate bandwidth information from a media server, the aggregate bandwidth information indicating candidate available bandwidths for each bandwidth interval and the aggregate number of subscribing clients in each bandwidth interval; a bitrate determination unit, configured to determine a streaming bitrate based on the aggregate bandwidth information and encode an audio and video stream according to the streaming bitrate; and an audio and video stream pushing unit, configured to push the encoded audio and video stream to each subscribing client.

[0012] On the other hand, the present disclosure further provides a terminal device, which includes a memory and a processor, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the above-mentioned bit rate control method is implemented.

[0013] On the other hand, the present disclosure further provides a computer-readable storage medium, which is used to store a computer program. When the computer program is executed by a processor, the above-mentioned bit rate control method is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The features and advantages of the various embodiments of the present disclosure will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the present disclosure in any way. In the accompanying drawings:

[0015] FIG1 is a schematic diagram showing steps of a rate control method in one embodiment of the present disclosure;

[0016] FIG2 shows a schematic diagram of a system architecture in one embodiment of the present disclosure;

[0017] FIG3 shows a schematic diagram of steps for generating discrete bandwidth information in one embodiment of the present disclosure;

[0018] FIG4 shows a schematic diagram of a multi-level system architecture in one embodiment of the present disclosure;

[0019] FIG5 shows a schematic diagram of functional modules of a rate control device according to an embodiment of the present disclosure;

[0020] FIG6 shows a schematic structural diagram of a media server in one embodiment of the present disclosure; and

[0021] FIG7 shows a schematic diagram of steps of a rate control method in another embodiment of the present disclosure. DETAILED DESCRIPTION

[0022] To make the purpose, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making any creative efforts shall fall within the scope of protection of the present disclosure.

[0023] A communication process involving multiple people may, for example, include a video conferencing process, in which the client that initiates desktop sharing may be a publishing client, and the other clients participating in the video conference may be subscribing clients. When the publishing client pushes the audio and video stream to the subscribing client through the media server, it is usually encoded according to the preset bit rate built into the video conferencing software. For example, in the video conferencing software, the image quality of the audio and video stream can be set to 720P resolution by default, and the 720P resolution will correspond to a default bit rate (usually 3Mb / s). Then the publishing client will encode the audio and video stream at a bit rate of 3Mb / s, and push the encoded 720P audio and video stream to each participating subscribing client through the media server of the video conferencing software.

[0024] Currently, multi-party communication processes are typically implemented using an SFU (Selective Forwarding Unit) architecture. Within this SFU architecture, the encoding process for the publishing client can be as described above. However, in real-world scenarios, since different subscribing clients may operate in different network environments, if the bitrate of the audio or video stream is significantly higher than the available bandwidth of most subscribing clients, communication may experience lag for most clients. If the bitrate of the audio or video stream is significantly lower than the available bandwidth of most subscribing clients, poor image or audio quality may result. Existing SFU architectures are generally unable to adaptively adjust the encoding bitrate of the publishing client. This is because some current rate control protocols, such as the Temporary Maximum Media Stream Bit Rate Request (TMMBR) protocol and the Receiver Estimated Maximum Bitrate (REMB) protocol, are typically only applicable to P2P (Point-to-Point) or MCU (MultiPoint Control Unit) communication architectures and cannot be well extended to the SFU architecture.

[0025] To address the aforementioned issues, one embodiment of the present disclosure provides a rate control method that can be applied to a media server in multi-person communication software. The media server can be a server in an SFU architecture, configured to store and / or forward audio and video data between publishing and subscribing clients. In this embodiment, the data processing logic of the media server can be improved. Referring to Figure 1 , the method can include the following steps.

[0026] S11: Based on available bandwidth information of a plurality of subscribing clients, discrete bandwidth information is generated for the subscribing clients, where the discrete bandwidth information indicates the available bandwidth allocated to the subscribing clients and the bandwidth interval in which the available bandwidth is located.

[0027] Please refer to Figure 2. In this embodiment, multiple subscribing clients can access the same media server. In actual applications, the subscribing client can actively report its own available bandwidth information to the media server, and the media server can also detect the available bandwidth information of each subscribing client through a preset congestion control and bandwidth allocation algorithm. Among them, the available bandwidth information actively reported by the subscribing client can represent the downlink bit rate that it can support, and can also be the idle downlink bit rate under the current load state. Of course, the available bandwidth information can have different meanings in different scenarios, and the present disclosure does not limit this. The available bandwidth information detected by the media server can generally represent the downlink bit rate that the media server can allocate to the subscribing client. In actual applications, the downlink bit rate detected by the media server will generally be less than or equal to the downlink bit rate actively reported by the subscribing client.

[0028] In this embodiment, when a media server uses a congestion control and bandwidth allocation algorithm to detect available bandwidth, it can initialize a congestion window, which represents the amount of data pushed by the media server to a subscribing client. The media server can send probe messages to the subscribing client based on this congestion window. When the media server receives a response message from the subscribing client, it can increase the congestion window. If network congestion prevents the subscribing client from returning the probe message in a timely manner, the media server can appropriately reduce the congestion window. Through this congestion control approach, the media server can ultimately determine the available bandwidth allocated to the subscribing client.

[0029] Of course, in actual applications, there are many ways to implement congestion control and bandwidth allocation algorithms. Different algorithms can be flexibly selected according to different scenario requirements, and this disclosure does not limit this.

[0030] In this embodiment, regardless of the method used, after obtaining the available bandwidth information of the subscribing client, the media server can further determine the available bandwidth allocated to the subscribing client. Specifically, if the available bandwidth reported by the subscribing client is less than the maximum available bandwidth that the media server can allocate, then the available bandwidth reported by the subscribing client can be used as the available bandwidth allocated by the media server to the subscribing client; and if the available bandwidth reported by the subscribing client is greater than or equal to the maximum available bandwidth that the media server can allocate, then the maximum available bandwidth that the media server can allocate can be used as the available bandwidth allocated by the media server to the subscribing client. In addition, if the media server detects the available bandwidth through congestion control and bandwidth allocation algorithms, then the detected available bandwidth can be used as the available bandwidth allocated by the media server to the subscribing client.

[0031] It should be noted that in some cases, to control the media server load, the available bandwidth allocated to a subscribing client by the media server may not reach the subscribing client's own maximum available bandwidth. For example, the maximum available bandwidth reported by a subscribing client is 150 Mb / s, but the maximum available bandwidth allocated to the subscribing client by the media server may only be 10 Mb / s.

[0032] In this embodiment, after allocating available bandwidth to each subscribing client, the media server can further generate discrete bandwidth information for each subscribing client. Specifically, the media server can pre-set multiple bandwidth intervals based on the upper limit of the available bandwidth that can be provided. For example, if the media server can allocate a maximum of 10Mb / s of available bandwidth to a subscribing client, the media server can generate four bandwidth intervals, which can be, for example, 0 to 2Mb / s, 2Mb / s to 6Mb / s, 6Mb / s to 8Mb / s, and 8Mb / s to 10Mb / s. Of course, the number of bandwidth intervals can be pre-divided according to actual conditions, and this disclosure does not limit this.

[0033] In this embodiment, after dividing multiple bandwidth intervals, the bandwidth interval in which the available bandwidth allocated by the media server to a particular subscribing client falls can be determined. For example, if the available bandwidth allocated to a particular subscribing client is 4 Mbps, the available bandwidth for the subscribing client can fall within the second bandwidth interval described above. In actual applications, the subscribing client's discrete bandwidth information can record the available bandwidth allocated by the media server to the subscribing client and the bandwidth interval in which the available bandwidth falls.

[0034] In one embodiment, in order to improve the efficiency of data processing, the discrete bandwidth information of the subscribing client may be represented in the form of a vector. Specifically, referring to FIG3 , the process of generating the discrete bandwidth information may include the following steps.

[0035] S111: Generate an interval discrete vector and a bandwidth discrete vector according to a plurality of preset bandwidth intervals, wherein vector elements in the interval discrete vector and the bandwidth discrete vector correspond one-to-one to the plurality of preset bandwidth intervals.

[0036] In this embodiment, based on the multiple bandwidth intervals pre-divided by the media server, an interval discrete vector and a bandwidth discrete vector can be generated respectively. The number of vector elements in the interval discrete vector and the bandwidth discrete vector can be consistent with the number of bandwidth intervals. For example, if the media server currently divides 4 bandwidth intervals, then the interval discrete vector and the bandwidth discrete vector can both contain 4 vector elements. In this way, the vector elements in the interval discrete vector and the bandwidth discrete vector can correspond one-to-one to the preset multiple bandwidth intervals. For example, for the preset 4 bandwidth intervals, the interval discrete vector V1 and the bandwidth discrete vector V2 can be generated: V1 = [0, 0, 0, 0] V2 = [0, 0, 0, 0]

[0037] As can be seen, the initial values ​​of the vector elements in the interval discrete vector V1 and the bandwidth discrete vector V2 can both be 0, and each vector element corresponds to a bandwidth interval. For example, the first vector element corresponds to the bandwidth interval of 0 to 2 Mb / s, and the third vector element corresponds to the bandwidth interval of 6 Mb / s to 8 Mb / s.

[0038] S113: Determine the bandwidth interval in which the available bandwidth allocated to the subscribing client is located, and set a mark value for a vector element corresponding to the bandwidth interval in the interval discrete vector, and set an available bandwidth value for the vector element corresponding to the bandwidth interval in the bandwidth discrete vector.

[0039] In this embodiment, by identifying the available bandwidth of the subscribing client, values ​​can be assigned to some vector elements in the interval discrete vector and the bandwidth discrete vector. For example, the available bandwidth allocated to the subscribing client A is 4Mb / s, then the available bandwidth is located in the second bandwidth interval, so according to the rule of step S113, a mark value can be set for the second vector element in the interval discrete vector. In actual applications, the mark value can be 1, indicating that the available bandwidth of one subscribing client is located in the bandwidth interval. At the same time, an available bandwidth value can be set for the second vector element in the bandwidth discrete vector. The available bandwidth value can be the available bandwidth allocated by the media server to the subscribing client. In this way, the interval discrete vector V1 and bandwidth discrete vector V2 after assignment can be expressed as: V1 = [0, 1, 0, 0] V2 = [0, 4, 0, 0]

[0040] By identifying these two vectors, it can be known that the available bandwidth of the current subscribing client is 4 Mb / s, and the available bandwidth is within the second bandwidth interval.

[0041] S115: Using the combination of the assigned interval discrete vector and the assigned bandwidth discrete vector as the discrete bandwidth information of the subscribing client.

[0042] In this embodiment, after the interval discrete vector and the bandwidth discrete vector are assigned values, the combination of the two assigned vectors can be used as the discrete bandwidth information of the subscribing client.

[0043] According to the above steps S111 to S115 , the media server may generate corresponding discrete bandwidth information for each connected subscribing client one by one.

[0044] S13: Aggregate the plurality of discrete bandwidth information into aggregated bandwidth information, where the aggregated bandwidth information indicates the candidate available bandwidth of each bandwidth interval and the aggregate number of subscribed clients in each bandwidth interval.

[0045] In this embodiment, after generating discrete bandwidth information for each subscribing client, the media server may aggregate this discrete bandwidth information to obtain aggregated bandwidth information. Specifically, this aggregated bandwidth information may be a summary of the discrete bandwidth information. In actual applications, each preset bandwidth interval may be traversed. Taking any target bandwidth interval as an example, the following similar processing method is applied to each bandwidth interval:

[0046] For the target bandwidth interval, based on each discrete bandwidth information generated, the aggregate number of subscribing clients whose available bandwidths are within the target bandwidth interval can be counted, and candidate available bandwidths can be determined based on multiple available bandwidths within the target bandwidth interval.

[0047] Specifically, assuming that the target bandwidth interval is 2Mb / s to 6Mb / s, based on the discrete bandwidth information of each subscribing client, the total number of subscribing clients whose available bandwidth is within the target bandwidth interval can be counted, and this total number can be used as the aggregated number obtained by statistics. For example, there are currently two subscribing clients with available bandwidths of 2.2Mb / s and 4.5Mb / s, respectively. Since both available bandwidths are within the target bandwidth interval, the aggregated number corresponding to the target bandwidth interval can be 2. When determining the candidate available bandwidth corresponding to the target bandwidth interval, multiple available bandwidths within the target bandwidth interval (such as the 2.2Mb / s and 4.5Mb / s mentioned above) can be counted, and then the candidate available bandwidth can be determined based on these multiple available bandwidths. Generally speaking, the maximum available bandwidth or the minimum available bandwidth among the multiple available bandwidths within the target bandwidth interval can be used as the candidate available bandwidth, or a weighted sum of the multiple available bandwidths within the target bandwidth interval can be performed, and the resulting available bandwidth can be used as the candidate available bandwidth. In other words, the candidate available bandwidth is generated based on the actual available bandwidth of the subscribing clients, and can, to a certain extent, represent the overall bandwidth available to the subscribing clients within the target bandwidth range. The specific method used to determine the candidate available bandwidth in actual applications can be determined based on actual business needs.

[0048] Using the above method, two parameters, the aggregate quantity and the candidate available bandwidth, can be generated for the target bandwidth interval. Ultimately, the combination of these two parameters serves as the interval information for the target bandwidth interval. Similarly, for other bandwidth intervals, the interval information for each bandwidth interval can be obtained. The collection of this interval information serves as the aggregated bandwidth information.

[0049] The aggregated bandwidth information generated in the above manner can represent the overall distribution of available bandwidth of subscribing clients, thereby providing an accurate data basis for subsequent determination of the streaming bitrate, making the streaming bitrate more in line with actual business needs.

[0050] In one embodiment, the vector representation method in steps S111 to S115 can be used to generate aggregated bandwidth information. Specifically, for interval discrete vectors, the interval discrete vectors in each discrete bandwidth information can be added together to obtain an interval aggregate vector. For example, if the interval discrete vectors of two subscribing clients are V11 = [1, 0, 0, 0] and V12 = [0, 1, 0, 0], then the interval aggregate vector can be the sum of the two, [1, 1, 0, 0].

[0051] For the bandwidth discrete vector, the candidate available bandwidth can be determined in the above-mentioned manner, and the preset multiple bandwidth intervals can be traversed. For any target bandwidth interval, the available bandwidth values ​​corresponding to the target bandwidth interval can be identified in the bandwidth discrete vectors of each discrete bandwidth information, and the candidate available bandwidth of the target bandwidth interval can be determined based on the identified available bandwidth values. The specific method of determining the candidate available bandwidth will not be described here, and reference can be made to the method described above. After determining the corresponding candidate available bandwidth for each bandwidth interval in the preset multiple bandwidth intervals, a bandwidth aggregation vector containing each candidate available bandwidth can be generated. For example, the bandwidth discrete vectors of two subscribing clients are V21 = [0, 4.5, 0, 0] and V22 = [0, 2, 0, 0], respectively. Then, when the maximum available bandwidth is used as the candidate available bandwidth, the generated bandwidth aggregation vector can be [0, 4.5, 0, 0].

[0052] For another example, in FIG2 , two subscribing clients access media server A, and the bandwidth discrete vectors in the discrete bandwidth information are [0, 0, 0, 7.5] and [0, 3, 0, 0] respectively, then the aggregated bandwidth aggregation vector can be [0, 3, 0, 7.5].

[0053] In this embodiment, after generating the interval aggregation vector and the bandwidth aggregation vector, the combination of the two can be used as the aggregated bandwidth information obtained by aggregation. Representing the aggregated bandwidth information in a vector manner can make the aggregated bandwidth information more accurate and intuitive, and also facilitate subsequent data processing.

[0054] S15: Push the aggregate bandwidth information to the publishing client. The aggregate bandwidth information is used by the publishing client to determine a streaming bitrate.

[0055] In this embodiment, after the media server aggregates the aggregated bandwidth information, it can push the aggregated bandwidth information to the publishing client. By parsing the aggregated bandwidth information, the publishing client can determine the current distribution of available bandwidth for each subscribing client. For example, in a specific application example, the aggregated bandwidth information received by the publishing client can be represented by the following interval aggregation vector and bandwidth aggregation vector: C1 = [2, 4, 8, 1] C2 = [1.2, 3.5, 7, 10]

[0056] It can be seen that within the four preset bandwidth intervals, the numbers of distributed subscribing clients are 2, 4, 8, and 1 respectively, and the candidate available bandwidths of the four bandwidth intervals are 1.2 Mb / s, 3.5 Mb / s, 7 Mb / s, and 10 Mb / s respectively.

[0057] In this embodiment, the publishing client can determine the streaming bitrate based on the aggregated bandwidth information according to pre-defined rules. For example, the publishing client can determine the bandwidth interval with the largest number of subscribing clients, and then use the candidate available bandwidth corresponding to this bandwidth interval as the streaming bitrate. In this way, subsequent encoding of the audio and video streams according to this streaming bitrate can meet the bandwidth requirements of the majority of subscribing clients.

[0058] In one embodiment, considering that there may be a certain level of media servers in the SFU architecture, for example, in Figure 4, the media servers can be divided into two levels. The first-level media servers are connected to the subscribing clients. These media servers can generate discrete bandwidth information of the subscribing clients according to the contents described in steps S11 and S13, and aggregate the discrete bandwidth information to obtain aggregate bandwidth information. The second-level media servers can receive the aggregate bandwidth information sent by the first-level media servers, and then aggregate it again, and push the final aggregated result to the publishing client. By applying the technical solution of the present disclosure in a multi-level architecture, it can be more in line with actual business scenarios, facilitating the implementation and expansion of the technical solution of the present disclosure.

[0059] Specifically, in one embodiment, after the media server accessed by the subscribing client obtains aggregated bandwidth information through aggregation, the media server may upload the aggregated bandwidth information to a next-level media server, so that the next-level media server re-aggregates the received aggregated bandwidth information and pushes the re-aggregated aggregated bandwidth information to the publishing client.

[0060] In addition, if the media server is located at the second level, when the media server receives the first aggregate bandwidth information uploaded by multiple upper-level media servers, it can aggregate the multiple first aggregate bandwidth information into second aggregate bandwidth information again, and push the second aggregate bandwidth information to the publishing client, so that the publishing client determines the streaming bit rate based on the second aggregate bandwidth information, and encodes the audio and video stream according to the streaming bit rate.

[0061] Among them, when the second-level media server re-aggregates the first aggregate bandwidth information, it can also adopt a similar method to generate the first aggregate bandwidth information. Specifically, it can still traverse each bandwidth interval, and for any target bandwidth interval, it can accumulate the sum of the aggregated number of subscribing clients in the target bandwidth interval based on multiple first aggregate bandwidth information, and determine the re-aggregated second candidate available bandwidth based on multiple first candidate available bandwidths corresponding to the target bandwidth interval. Among them, the logic for determining the re-aggregated second candidate available bandwidth can be the same as the logic for determining the first candidate available bandwidth in the first aggregate bandwidth information.

[0062] In this embodiment, after obtaining the sum of the above-mentioned aggregation quantities and the second candidate available bandwidth, the sum of the aggregation quantities and the second candidate available bandwidth can be used as the interval information after re-aggregation of the target bandwidth interval. After generating corresponding re-aggregated interval information for each bandwidth interval in the preset multiple bandwidth intervals, the set of the generated re-aggregated interval information can be used as the second aggregated bandwidth information.

[0063] Taking Figure 4 as an example, the first level contains two media servers, which can upload their respective first aggregate bandwidth information to the media servers in the second level. The two first aggregate bandwidth information can be represented by vectors: C3 = [0, 1, 0, 1] C4 = [0, 3.5, 0, 10]

[0064] and C5 = [0, 1, 1, 0] C5 = [0, 2, 6, 0]

[0065] By re-aggregating the two first aggregate bandwidth information, the second aggregate bandwidth information can be obtained: C6 = [0, 2, 1, 1] C7 = [0, 3.5, 6, 10]

[0066] The second-level media server may push the second aggregate bandwidth information to the publishing client, and the publishing client may determine the streaming bit rate and encode the audio and video streams in the manner described in step S15.

[0067] In one embodiment, there may be a third or more layers of media servers behind the second-tier media servers, and aggregation can be performed layer by layer in a similar manner. Specifically, the media server can upload the second aggregated bandwidth information to the next-tier media server, so that the next-tier media server re-aggregates the received second aggregated bandwidth information and pushes the re-aggregated third aggregated bandwidth information to the publishing client.

[0068] As can be seen, the technical solutions provided by one or more embodiments of the present disclosure enable a media server to obtain available bandwidth information for each subscribing client and then generate corresponding discrete bandwidth information for each subscribing client. This discrete bandwidth information can record the actual available bandwidth of the subscribing client and the bandwidth interval in which the available bandwidth falls. Subsequently, the media server can aggregate the discrete bandwidth information of each subscribing client to obtain aggregated bandwidth information. In this aggregated bandwidth information, for each bandwidth interval, the aggregate number of subscribing clients whose available bandwidth falls within that bandwidth interval can be counted, and a candidate available bandwidth can be set for each bandwidth interval. In this way, after the media server pushes the aggregated bandwidth information to the publishing client, the publishing client can obtain the current distribution of available bandwidth for each subscribing client. Based on the distribution of available bandwidth for the subscribing clients, the publishing client can generate a streaming bitrate that matches the available bandwidth of the majority of subscribing clients. In this way, the audio and video streams encoded according to this streaming bitrate, when pushed to each subscribing client, can ensure communication quality for the majority of subscribing clients, thereby improving the overall communication quality of the multi-person communication process.

[0069] Referring to FIG5 , an embodiment of the present disclosure further provides a rate control device, the device comprising:

[0070] The discrete bandwidth information generating unit 110 is configured to generate discrete bandwidth information for a plurality of subscribing clients based on the available bandwidth information of the subscribing clients, wherein the discrete bandwidth information indicates the available bandwidth allocated to the subscribing clients and the bandwidth interval in which the available bandwidth is located;

[0071] an aggregation unit 130, configured to aggregate the plurality of discrete bandwidth information into aggregated bandwidth information, wherein the aggregated bandwidth information indicates the candidate available bandwidth of each bandwidth interval and the aggregate number of subscribed clients in each bandwidth interval;

[0072] The pushing unit 150 is configured to push the aggregate bandwidth information to a publishing client, where the aggregate bandwidth information is used by the publishing client to determine a streaming bitrate.

[0073] The specific processing logic of each functional module can be found in the description of the aforementioned method embodiment, which will not be repeated here.

[0074] Please refer to FIG6 . The present disclosure further provides a media server, which includes a memory and a processor. The memory is used to store a computer program. When the computer program is executed by the processor, the above-mentioned rate control method is implemented.

[0075] The present disclosure further provides a rate control method, which can be applied to the above-mentioned publishing client. Please refer to FIG7 . The method may include the following steps.

[0076] S21: Receive aggregate bandwidth information from a media server, where the aggregate bandwidth information indicates candidate available bandwidths for each bandwidth interval and an aggregate number of subscribed clients in each bandwidth interval.

[0077] S23: Determine a streaming bitrate according to the aggregated bandwidth information, and encode the audio and video streams according to the streaming bitrate.

[0078] S25: Push the encoded audio and video streams to each subscribing client.

[0079] In this embodiment, the publishing client can receive aggregated bandwidth information pushed by the media server. The specific method for generating this aggregated bandwidth information can be found in the description of the aforementioned method embodiment. By parsing this aggregated bandwidth information, the publishing client can determine the available bandwidth distribution of the subscribing clients currently participating in the multi-person communication. In this way, according to pre-set rules, the publishing client can determine the streaming bitrate based on the available bandwidth distribution.

[0080] Specifically, in one embodiment, the publishing client can use the maximum or minimum candidate available bandwidth in the aggregated bandwidth information as the streaming bitrate to meet the needs of different application scenarios. Furthermore, the publishing client can determine the target bandwidth interval with the largest number of subscribing clients in the aggregated bandwidth information and use the candidate available bandwidth corresponding to the target bandwidth interval as the streaming bitrate. This ensures that the streaming bitrate matches the network environment of the majority of subscribing clients.

[0081] Of course, those skilled in the art who understand the main idea of ​​the present disclosure may also use more ways to determine the streaming bitrate, but as long as the streaming bitrate is determined based on the aggregated bandwidth information, it should fall within the scope of protection of the present disclosure.

[0082] In one embodiment, considering that the media server originally has a default encoding rule, for example, a 720P audio and video stream can be encoded according to a 3Mb / s bit rate, in order to be compatible with the existing encoding rules, the present disclosure can provide a constant multi-bitrate audio and video stream. Specifically, when there is a preset push stream bit rate, the publishing client can still determine the push stream bit rate that matches the network environment of the subscribing client in the manner of the aforementioned steps, and then encode the audio and video stream according to the determined push stream bit rate and the preset push stream bit rate, thereby forming a multi-bitrate audio and video stream, and push the multi-bitrate audio and video stream to each subscribing client through the media server. The purpose of this processing is to provide a network optimization function in some scenarios in the subscribing client. When this function is turned on, the subscribing client can load the audio and video stream encoded according to the determined push stream bit rate; and when this function is turned off, the subscribing client can load the audio and video stream encoded according to the preset push stream bit rate, so that the technical solution of the present disclosure can be compatible with the existing SFU architecture.

[0083] An embodiment of the present disclosure further provides a rate control device, the device comprising:

[0084] An information receiving unit, configured to receive aggregate bandwidth information from a media server, the aggregate bandwidth information indicating candidate available bandwidths for each bandwidth interval and an aggregate number of subscribed clients in each of the bandwidth intervals;

[0085] a bitrate determination unit, configured to determine a streaming bitrate based on the aggregated bandwidth information, and encode the audio and video streams according to the streaming bitrate;

[0086] The audio and video stream push unit is used to push the encoded audio and video stream to each subscribing client.

[0087] The specific processing logic of each functional module can be found in the description of the aforementioned method embodiment, which will not be repeated here.

[0088] An embodiment of the present disclosure further provides a terminal device, which includes a memory and a processor, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the above-mentioned rate control method applied to the publishing client is implemented.

[0089] The various units described in the above embodiments can be implemented by computer chips or products with certain functions. A typical implementation device is a computer. Specifically, the computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0090] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing the present disclosure, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0091] The present disclosure also provides a computer-readable storage medium, which is used to store a computer program. When the computer program is executed by a processor, the above-mentioned bit rate control method is implemented.

[0092] The processor may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.

[0093] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as the program instructions / modules corresponding to the methods in the embodiments of the present disclosure. The processor executes the non-transitory software programs, instructions, and modules stored in the memory to perform various processor functions and data processing, thereby implementing the methods in the above-mentioned method embodiments.

[0094] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory may optionally include a memory remotely located relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0095] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above-mentioned embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD). The storage medium can also include a combination of the above-mentioned types of memory.

[0096] Each embodiment of this disclosure is described in a progressive manner. Similar portions between embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the device, equipment, and storage medium embodiments are generally similar to the method embodiments, so their descriptions are relatively simplified. For relevant portions, refer to the descriptions of the method embodiments.

[0097] The foregoing is merely an embodiment of the present disclosure and is not intended to limit the present disclosure. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure are intended to be included within the scope of the claims of the present disclosure.

[0098] Although the embodiments of the present disclosure have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A rate control method, include: Based on the available bandwidth information of multiple subscribing clients, generate discrete bandwidth information for the subscribing clients, where the discrete bandwidth information indicates the available bandwidth allocated to the subscribing clients and the bandwidth interval in which the available bandwidth is located; Aggregating the plurality of discrete bandwidth information into aggregated bandwidth information, wherein the aggregated bandwidth information indicates candidate available bandwidths of each bandwidth interval and an aggregate number of subscribed clients in each bandwidth interval; The aggregate bandwidth information is pushed to a publishing client, and the aggregate bandwidth information is used by the publishing client to determine a streaming bitrate.

2. The method according to claim 1, in, Aggregating the plurality of discrete bandwidth information into aggregated bandwidth information includes: For any target bandwidth interval among the preset multiple bandwidth intervals, according to the multiple discrete bandwidth information, counting the aggregate number of subscribing clients whose available bandwidth is in the target bandwidth interval, and determining the candidate available bandwidth according to the multiple available bandwidths in the target bandwidth interval, wherein the interval information of the target bandwidth interval includes the aggregate number and the candidate available bandwidth; A set of interval information corresponding to each bandwidth interval in the preset multiple bandwidth intervals is aggregated into the aggregated bandwidth information.

3. The method according to claim 2, in, Determining candidate available bandwidths includes: Taking the maximum available bandwidth or the minimum available bandwidth among the multiple available bandwidths within the target bandwidth interval as the candidate available bandwidth; or A weighted sum is performed on multiple available bandwidths within the target bandwidth interval, and the obtained available bandwidth is used as a candidate available bandwidth.

4. The method according to claim 1, in, Generating discrete bandwidth information for the subscribing client includes: According to a plurality of preset bandwidth intervals, an interval discrete vector and a bandwidth discrete vector are generated, wherein the interval discrete vector The vector elements in the interval discrete vector and the bandwidth discrete vector correspond one-to-one to the preset multiple bandwidth intervals; Determine a bandwidth interval in which the available bandwidth allocated to the subscribing client is located, and set a mark value for a vector element corresponding to the bandwidth interval in the interval discrete vector, and set an available bandwidth value for a vector element corresponding to the bandwidth interval in the bandwidth discrete vector; The combination of the assigned interval discrete vector and the assigned bandwidth discrete vector is used as the discrete bandwidth information of the subscribing client.

5. The method according to claim 4, in, Aggregating the plurality of discrete bandwidth information into aggregated bandwidth information includes: Adding the interval discrete vectors in each of the discrete bandwidth information to obtain an interval aggregation vector; Traversing the preset multiple bandwidth intervals, for any target bandwidth interval therein, identifying each available bandwidth value corresponding to the target bandwidth interval in the bandwidth discrete vector of each discrete bandwidth information, and determining a candidate available bandwidth of the target bandwidth interval according to the identified each available bandwidth value; After determining a corresponding candidate available bandwidth for each bandwidth interval in the plurality of preset bandwidth intervals, generating a bandwidth aggregation vector including each candidate available bandwidth; A combination of the interval aggregation vector and the bandwidth aggregation vector is used as the aggregated bandwidth information obtained by aggregation.

6. The method according to any one of claims 1 to 5, in, After aggregating the plurality of discrete bandwidth information into aggregated bandwidth information, the method further includes: The aggregated bandwidth information is uploaded to a next-level media server, so that the next-level media server aggregates the received aggregated bandwidth information again, and pushes the aggregated bandwidth information obtained by the aggregation again to the publishing client.

7. The method according to any one of claims 1 to 6, further comprising: include: When receiving first aggregate bandwidth information uploaded by multiple upper-level media servers, the multiple first aggregate bandwidth information are aggregated again into second aggregate bandwidth information, and the second aggregate bandwidth information is pushed to the publishing client, so that the publishing client The bandwidth information determines the streaming bit rate, and the audio and video streams are encoded according to the streaming bit rate.

8. The method according to claim 7, in, Aggregating the plurality of first aggregated bandwidth information into second aggregated bandwidth information again includes: For any target bandwidth interval among the preset multiple bandwidth intervals, according to the multiple first aggregated bandwidth information, the sum of the aggregated quantities of subscribed clients in the target bandwidth interval is accumulated, and according to the multiple first candidate available bandwidths corresponding to the target bandwidth interval, a second candidate available bandwidth after re-aggregation is determined; The sum of the aggregation quantities and the second candidate available bandwidth are used as the interval information after re-aggregation of the target bandwidth interval. After generating corresponding re-aggregated interval information for each of the preset multiple bandwidth intervals, a set of the generated re-aggregated interval information is used as the second aggregated bandwidth information.

9. The method according to claim 7, further comprising: include: The second aggregate bandwidth information is uploaded to a next-level media server, so that the next-level media server re-aggregates each received second aggregate bandwidth information, and pushes the re-aggregated third aggregate bandwidth information to the publishing client.

10. A bit rate control device, include: A discrete bandwidth information generating unit, configured to generate discrete bandwidth information for a plurality of subscribing clients based on available bandwidth information of the subscribing clients, wherein the discrete bandwidth information indicates the available bandwidth allocated to the subscribing clients and the bandwidth interval in which the available bandwidth is located; an aggregation unit, configured to aggregate the plurality of discrete bandwidth information into aggregate bandwidth information, wherein the aggregate bandwidth information indicates a candidate available bandwidth for each bandwidth interval and an aggregate number of subscribed clients in each bandwidth interval; The pushing unit is configured to push the aggregate bandwidth information to the publishing client, where the aggregate bandwidth information is used by the publishing client to determine a streaming bitrate.

11. A media server comprising a memory and a processor, in, The memory is used to store a computer program, and when the computer program is executed by the processor, the method according to any one of claims 1 to 9 is implemented.

12. A rate control method, include: receiving aggregate bandwidth information from a media server, the aggregate bandwidth information indicating candidate available bandwidths for each bandwidth interval and an aggregate number of subscribed clients in each of the bandwidth intervals; Determine a streaming bitrate according to the aggregated bandwidth information; Encoding the audio and video streams according to the streaming bit rate; Push the encoded audio and video streams to each subscribing client.

13. The method according to claim 12, in, Determining the streaming bitrate according to the aggregated bandwidth information includes: The maximum candidate available bandwidth or the minimum candidate available bandwidth in the aggregate bandwidth information is used as the streaming bitrate; or A target bandwidth interval with the largest aggregate number of subscribing clients is determined in the aggregate bandwidth information, and a candidate available bandwidth corresponding to the target bandwidth interval is used as a streaming bitrate.

14. The method according to claim 12 or 13, further comprising: include: When there is a preset streaming bit rate, the audio and video streams are encoded according to the determined streaming bit rate and the preset streaming bit rate to form multi-bitrate audio and video streams, and the multi-bitrate audio and video streams are pushed to each subscribing client.

15. A bit rate control device, include: An information receiving unit, configured to receive aggregate bandwidth information from a media server, wherein the aggregate bandwidth information indicates a candidate available bandwidth for each bandwidth interval and an aggregate number of subscribed clients in each of the bandwidth intervals; A bit rate determination unit, configured to determine a streaming bit rate according to the aggregated bandwidth information, and encode the audio and video streams according to the streaming bit rate; The audio and video stream push unit is used to push the encoded audio and video stream to each subscribing client.

16. A terminal device comprising a memory and a processor, in, The memory is used to store a computer program, and when the computer program is executed by the processor, the method according to any one of claims 12 to 14 is implemented.

17. A computer-readable storage medium, in, The computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, it implements the method according to any one of claims 1 to 9 or the method according to any one of claims 12 to 14.

Citation Information

Patent Citations

  • Code rate control method and device, media server, terminal equipment and storage medium

    CN118524091A

  • Method and system for adjusting video encoding rates

    CN106658072A

  • Code rate control method and device in video coding, mobile terminal and storage medium

    CN111385574A

  • Method, computer device, and storage medium for media code rate self-adaptation

    US20210051350A1