Bandwidth probing method and apparatus, electronic device, and storage medium

By using the bit rate of the gear flow in the network live broadcast system to determine the target detection bandwidth value and perform network bandwidth detection, the problem of inaccurate bandwidth prediction in the prior art is solved, and more accurate bandwidth prediction and better user experience are achieved.

WO2025148499A1PCT designated stage expired Publication Date: 2025-07-17TAOBAO CHINA SOFTWARE
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/130677
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-01-11
Filing Date
2024-11-08
Publication Date
2025-07-17

AI Technical Summary

Technical Problem

The existing network bandwidth prediction methods are not accurate enough in network live broadcast scenarios, resulting in poor bit rate decision making and affecting the user's viewing experience, especially when the network state changes greatly.

Method used

By obtaining the code rates of multiple gear flows, the probability of the detection bandwidth value to be selected is determined, and the target detection bandwidth value is determined based on these probabilities, and the network bandwidth is actively detected to obtain a more accurate current network bandwidth prediction value.

Benefits of technology

It improves the accuracy and timeliness of network bandwidth prediction, reduces waste of traffic costs, avoids image quality jumps, and improves user viewing experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024130677_17072025_PF_FP_ABST
    Figure CN2024130677_17072025_PF_FP_ABST
Patent Text Reader

Abstract

The present application discloses a bandwidth probing method and apparatus, an electronic device, and a storage medium. The method comprises: acquiring bitrates of streams of multiple levels; obtaining the bitrate of the current played stream for a target user among the streams of multiple levels; using the bitrates of the streams of multiple levels as probed bandwidth values to be selected, and determining a probability that each of said probed bandwidth values is selected as a target probed bandwidth value; determining the target probed bandwidth value on the basis of the probability that each of said probed bandwidth values is selected as the target probed bandwidth value; and probing the network bandwidth of the target user on the basis of the target probed bandwidth value. The bandwidth probing method can quickly and accurately obtain the current network bandwidth predicted value.
Need to check novelty before this filing date? Find Prior Art

Description

Bandwidth detection method, device, electronic device and storage medium

[0001] Cross-references

[0002] This application refers to Chinese Patent Application No. 2024100481645, filed on January 11, 2024, entitled “A Bandwidth Detection Method, Device, Electronic Device and Storage Medium”, which is incorporated into this application in its entirety by reference. Technical Field

[0003] The present application relates to the field of network transmission technology, and more particularly to a bandwidth detection method, a bandwidth detection device, an electronic device, and a storage medium. Background Art

[0004] In live streaming scenarios, the complex and diverse environments in which viewers operate lead to ever-changing network conditions. Therefore, the streaming bitrate must be adaptively adjusted based on the user's network status. The live streaming system's adaptive bitrate algorithm dynamically determines the appropriate bitrate based on factors such as the current network bandwidth forecast, the size of the player's buffer, and the real-time bitrates of different streams. This allows users to stream live at varying bitrates under varying network conditions, achieving an optimal experience with both image quality and smoothness.

[0005] The current network bandwidth prediction value, as important input information for the bitrate adaptation algorithm, can be obtained by detecting or estimating the network bandwidth. However, the current network bandwidth prediction value obtained by existing bandwidth detection or estimation methods is usually very inaccurate, resulting in poor bitrate decisions and making it difficult to provide a good viewing experience in scenarios where the user's network status fluctuates significantly.

[0006] Summary of the Invention

[0007] The present application provides a bandwidth detection method to solve the problem of inaccurate current network bandwidth prediction values ​​obtained by existing methods. The present application also provides a bandwidth detection device, an electronic device, and a storage medium.

[0008] The present application provides a bandwidth detection method, comprising: obtaining bit rates of multiple gear streams; obtaining the bit rate of a current playback stream for a target user among the multiple gear streams; using the bit rates of the multiple gear streams as candidate detection bandwidth values, and determining the probability of each candidate detection bandwidth value being selected as a target detection bandwidth value; determining a target detection bandwidth value based on the probability of each candidate detection bandwidth value being selected as the target detection bandwidth value; and detecting the network bandwidth of the target user based on the target detection bandwidth value.

[0009] Optionally, obtaining the bit rate of the current playback stream for the target user among the multiple gear streams includes: obtaining an identifier of the current playback stream for the target user; and obtaining the bit rate corresponding to the identifier of the current playback stream among the multiple gear streams as the bit rate of the current playback stream.

[0010] Optionally, the method further includes: obtaining a current network bandwidth prediction value; using the bit rates of the multiple gear streams as candidate detection bandwidth values, and determining the probability of each candidate detection bandwidth value being selected as the target detection bandwidth value, including: if the ratio of the bit rate of the current playback stream to the current network bandwidth prediction value is less than a preset threshold, using the bit rates of the multiple gear streams as candidate detection bandwidth values, and determining the probability of each candidate detection bandwidth value being selected as the target detection bandwidth value.

[0011] Optionally, the probability that a candidate detection bandwidth value greater than the bit rate of the current playback stream is selected as the target detection bandwidth value is determined by the following steps: obtaining the sum of the candidate detection bandwidth values ​​greater than the bit rate of the current playback stream as the sum of the candidate detection bandwidth values; arranging the candidate detection bandwidth values ​​greater than the bit rate of the current playback stream in ascending order to obtain a forward queue, and arranging the candidate detection bandwidth values ​​greater than the bit rate of the current playback stream in descending order to obtain a reverse queue; for any candidate detection bandwidth value greater than the bit rate of the current playback stream, obtaining a candidate detection bandwidth value in the reverse queue that has the same position as the candidate detection bandwidth value in the forward queue as the candidate detection bandwidth value corresponding to the candidate detection bandwidth value; and obtaining a ratio of the candidate detection bandwidth value corresponding to the candidate detection bandwidth value to the sum of the candidate detection bandwidth values ​​as the probability that the candidate detection bandwidth value is selected as the target detection bandwidth value.

[0012] Optionally, it is determined that the probability of a candidate detection bandwidth value that is less than or equal to the bit rate of the current playback stream being selected as the target detection bandwidth value is 0.

[0013] Optionally, determining the target detection bandwidth value according to the probability of each candidate detection bandwidth value being selected as the target detection bandwidth value includes: extracting the candidate detection bandwidth value as the target detection bandwidth value using an unequal probability sampling method according to the probability of each candidate detection bandwidth value being selected as the target detection bandwidth value.

[0014] Optionally, it further includes: determining a target detection period according to the target detection bandwidth value; detecting the network bandwidth of the target user according to the target detection bandwidth value includes: detecting the network bandwidth of the target user according to the target detection bandwidth value when the target detection period arrives.

[0015] Optionally, the target detection period corresponding to when a candidate detection bandwidth value greater than the bit rate of the current playback stream is selected as the target detection bandwidth value is determined by the following steps: determining the detection period corresponding to the maximum candidate detection bandwidth value among the candidate detection bandwidth values ​​greater than the bit rate of the current playback stream; obtaining a ratio of the target detection bandwidth value to the maximum candidate detection bandwidth value as the detection bandwidth value ratio; and obtaining the product of the detection bandwidth value ratio and the detection period corresponding to the maximum candidate detection bandwidth value as the target detection period.

[0016] Optionally, the method further includes: obtaining a data receiving rate during detection of the network bandwidth of the target user; and if the data receiving rate is equal to the target detection bandwidth value, updating the current network bandwidth prediction value to the target detection bandwidth value.

[0017] Optionally, the method further includes: if the ratio of the bit rate of the current playback stream to the current network bandwidth prediction value is greater than or equal to the preset threshold, updating the current network bandwidth prediction value using a bandwidth estimation method.

[0018] Optionally, obtaining the bit rates of the multiple gear streams includes: receiving the multiple gear streams, and calculating the average bit rate of each gear stream in real time to obtain the bit rates of the multiple gear streams.

[0019] Optionally, the method is applied to a server, which is used to send the live stream obtained from the push end to the pull end corresponding to the target user; the method also includes: the server sends the current network bandwidth prediction value updated after detecting the network bandwidth of the target user to the pull end; the server obtains a bit rate level update request generated by the pull end according to the updated current network bandwidth prediction value; the server sends the live stream with the updated bit rate level to the pull end according to the bit rate level update request.

[0020] Optionally, the method is applied to the stream pulling end corresponding to the target user, and the stream pulling end is used to receive the live stream obtained by the server end from the stream pushing end; the network bandwidth of the target user is detected according to the target detection bandwidth value, including: the stream pulling end sends the target detection bandwidth value to the server end, so that the server end detects the network bandwidth of the target user according to the target detection bandwidth value.

[0021] The present application also provides a bandwidth detection method, comprising: obtaining bit rates of multiple gear streams; obtaining the bit rate of a current playback stream for a target user among the multiple gear streams; using the bit rates of the multiple gear streams as candidate detection bandwidth values, and determining a target detection bandwidth value based on the candidate detection bandwidth values; determining a target detection period based on the target detection bandwidth value; and detecting the network bandwidth of the target user based on the target detection bandwidth value when the target detection period arrives.

[0022] Optionally, the target detection period corresponding to when a candidate detection bandwidth value greater than the bit rate of the current playback stream is selected as the target detection bandwidth value is determined by the following steps: determining the detection period corresponding to the maximum candidate detection bandwidth value among the candidate detection bandwidth values ​​greater than the bit rate of the current playback stream; obtaining a ratio of the target detection bandwidth value to the maximum candidate detection bandwidth value as the detection bandwidth value ratio; and obtaining the product of the detection bandwidth value ratio and the detection period corresponding to the maximum candidate detection bandwidth value as the target detection period.

[0023] Optionally, it also includes: obtaining a current network bandwidth prediction value; using the bit rates of the multiple gear streams as candidate detection bandwidth values, and obtaining a target detection bandwidth value based on the candidate detection bandwidth values, including: if the ratio of the bit rate of the current playback stream to the current network bandwidth prediction value is less than a preset threshold, using the bit rates of the multiple gear streams as candidate detection bandwidth values, and obtaining a target detection bandwidth value based on the candidate detection bandwidth value.

[0024] The present application also provides a bandwidth detection device, comprising: a first determination unit, configured to obtain bit rates of multiple gear streams; obtain the bit rate of a current playback stream for a target user among the multiple gear streams; use the bit rates of the multiple gear streams as candidate detection bandwidth values, and determine the probability of each candidate detection bandwidth value being selected as a target detection bandwidth value; determine a target detection bandwidth value based on the probability of each candidate detection bandwidth value being selected as the target detection bandwidth value; and a first detection unit, configured to detect the network bandwidth of the target user based on the target detection bandwidth value.

[0025] The present application also provides a bandwidth detection device, including: a second determination unit, configured to obtain the bit rates of multiple gear streams; obtain the bit rate of a current playback stream for a target user among the multiple gear streams; use the bit rates of the multiple gear streams as candidate detection bandwidth values, and determine a target detection bandwidth value based on the candidate detection bandwidth values; determine a target detection period based on the target detection bandwidth value; and a second detection unit, configured to detect the network bandwidth of the target user based on the target detection bandwidth value when the target detection period arrives.

[0026] The present application also provides an electronic device, including a processor and a memory; the memory is used to store programs and data, and the processor calls the program stored in the memory to execute the above-mentioned bandwidth detection method.

[0027] The present application also provides a storage medium, which stores a program and data. The program is executed by a processor to implement the above-mentioned bandwidth detection method.

[0028] Compared with the prior art, this application has the following advantages:

[0029] The bandwidth detection method provided in this application obtains the bit rates of multiple gear streams, uses the bit rates of the multiple gear streams as candidate detection bandwidth values, and determines the target detection bandwidth value from them, so as to detect on demand and quickly and accurately obtain the current network bandwidth prediction value. Among them, the probability of a candidate detection bandwidth value that is greater than the bit rate of the current playback stream being selected as the target detection bandwidth value is negatively correlated with the size of the candidate detection bandwidth value. This can avoid the waste of traffic costs caused by unreasonable setting of the target detection bandwidth value, and can also avoid excessive changes in the current network bandwidth prediction value obtained in this way, which may cause excessive switching of the bit rate gear of the live stream, resulting in image quality jumps and affecting the user's viewing experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1-a is a schematic diagram of the network live broadcast system provided by this application;

[0031] FIG1 is a flowchart of the network live broadcast system provided by the present application;

[0032] FIG2 is a flowchart showing the specific implementation of some steps in the workflow of the network live broadcast system provided by this application;

[0033] FIG3 is a flow chart of a network live broadcast system provided by the present application that implements bandwidth detection through a stream pulling end;

[0034] FIG4 is a flow chart of a bandwidth detection method provided by the first embodiment of the present application;

[0035] FIG5 is a flowchart of a bandwidth detection method provided by a second embodiment of the present application;

[0036] FIG6 is a flowchart of a bandwidth detection method provided in a third embodiment of the present application;

[0037] FIG7 is a schematic diagram of a bandwidth detection device provided in a fourth embodiment of the present application;

[0038] FIG8 is a schematic diagram of a bandwidth detection device provided in a fifth embodiment of the present application;

[0039] FIG9 is a schematic diagram of an electronic device provided in a sixth embodiment of the present application. DETAILED DESCRIPTION

[0040] To make the purpose, advantages, and features of the present application more clearly apparent, the present application is further described in detail below in conjunction with the accompanying drawings and specific embodiments. In the following description, many specific details are set forth to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotations of the present application. Therefore, the present application is not limited to the specific embodiments disclosed below.

[0041] It should be noted that, in the description of this application, the terms "first", "second", etc. are used for descriptive purposes only and are not to be understood as indicating or implying relative importance, or a specific order or precedence. For those skilled in the art, the specific meanings of the above terms in this application can be understood in specific circumstances. In addition, in the description of this application, unless otherwise specified, the term "plurality" refers to two or more. The term "and / or" describes the association relationship of associated objects and indicates that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. The terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or are inherent to these processes, methods, products or devices.

[0042] Existing online live streaming systems generally include a streaming end that provides multiple live streams, a CDN server responsible for distributing multiple live streams, and a streaming end responsible for users watching live streams.

[0043] The streaming server (also called transcoding server) is responsible for collecting multiple live streams, performing a series of processing such as transcoding, merging, and encryption on them, and then outputting them to the CDN server.

[0044] CDN (Content Delivery Network) servers are responsible for receiving multiple live streams from the push end and distributing them to different pull ends. Due to their widespread distribution, CDN servers can quickly transmit live streams to users in different regions.

[0045] The streaming end is the application or device that users use to watch live broadcasts. They can obtain multiple live streams from the CDN server and display them on the screen for users to watch.

[0046] Streaming clients typically send live streams of the same live content at different bitrates to CDN servers to accommodate varying network conditions and user devices. The CDN server selects the appropriate bitrate for distribution and playback based on the user's network status and device capabilities. If the user has a high network bandwidth, the CDN server can select a high-bitrate live stream to provide higher quality. Conversely, if the user's network bandwidth is limited, the CDN server can select a lower bitrate live stream to ensure smooth playback.

[0047] In live streaming scenarios, the complex and diverse environments in which viewers operate lead to ever-changing network conditions. Therefore, it's necessary to adaptively adjust the streaming bitrate based on the user's network conditions. The streaming bitrate refers to the data transmission rate for real-time video or audio content acquired over the network, typically measured in bits per second (bps). It's a key indicator of live streaming quality and directly impacts the user's viewing experience. During live streaming, the original audio and video are typically encoded into multiple versions at different bitrates to accommodate varying network environments and end devices. For users with low bandwidth, a low-bitrate version can be selected to ensure smoothness; for users with high bandwidth, a high-bitrate version can be provided for better image quality. The streaming bitrate is affected by multiple factors, including network bandwidth, server configuration, and player capabilities, and needs to be adjusted and optimized based on actual conditions. Generally speaking, a higher streaming bitrate improves image and audio quality, but also consumes more network resources. Therefore, in practical applications, it's important to comprehensively consider various factors and select an appropriate streaming bitrate.

[0048] The bitrate adaptation algorithm of the online live broadcast system generally dynamically determines the appropriate streaming bitrate based on the current network bandwidth prediction value, the size of the current player cache area, the real-time bitrate of different gear streams, etc., so as to provide users with live streams with different bitrates under different network conditions, thereby achieving an excellent comprehensive experience of picture quality and smoothness.

[0049] The current network bandwidth prediction value is an estimate or prediction of the current network bandwidth transmission speed. It serves as an important input to the bitrate adaptation algorithm and is obtained through network bandwidth detection or estimation. Failure to accurately predict available bandwidth can lead to data over-transmission, resulting in a larger amount of data being sent than the actual network capacity, causing video delays and freezes. Alternatively, the predicted bandwidth may be too low, causing the amount of data sent to fall far short of the actual network capacity, resulting in poor utilization of network bandwidth and ultimately unclear video quality.

[0050] Currently, network bandwidth prediction values ​​can generally be obtained through the following methods:

[0051] One is the GCC algorithm, a passive bandwidth estimation algorithm based on latency and packet loss. GCC (Google Congestion Control) is a network congestion control algorithm used for real-time media communications. Its purpose is to avoid network congestion in networks with high latency and packet loss by dynamically adjusting the transmission rate, thereby ensuring smooth transmission of audio and video data. This algorithm can quickly respond and reduce the network bandwidth prediction value when network quality is poor, but it cannot quickly increase the network bandwidth prediction value as the network continues to improve.

[0052] The other is the active probe algorithm, which sends data to the network at a specified target detection bandwidth value in a short period of time, observes the data reception rate in a short period of time, and uses this to quickly estimate the network available bandwidth, thereby determining the network bandwidth prediction value.

[0053] In real-time audio and video calls or conferences, where the source bitrate is controlled, the output rate of the audio and video encoder is generally equal to the predicted network bandwidth, allowing the GCC algorithm to accurately estimate the network bandwidth. However, in scenarios where the source bitrate is uncontrolled, the encoder output rate is significantly lower than the predicted network bandwidth, and the GCC algorithm often makes inaccurate estimates of the network bandwidth. In these cases, WebRTC (Web Real-Time Communications, Google's open-source audio and video project) detects an application-limited region (ALR), where the source bitrate is lower than the network bandwidth, and initiates periodic active probing.

[0054] In the ALR state, the source bitrate is relatively low. To detect a higher target detection bandwidth, some padding data is often added during active detection (blank data is sent to supplement bandwidth detection). This results in significant traffic waste and increases the overall traffic cost of the live streaming system. Furthermore, if the detection period is too short during periodic active detection in the ALR state, padding data will be frequently sent, resulting in increased traffic cost. However, if the detection period is too long, the response to network status will be delayed, making it impossible to quickly adjust the bitrate when the network status changes.

[0055] In addition, in the prior art, the network bandwidth prediction value can also be obtained by the following method:

[0056] While the streaming end is downloading media data, it collects network status using a fixed sampling point model. This means that at fixed intervals (T (ms)), the actual amount of data downloaded (S (bytes)) is counted. This yields a bandwidth sampling point (B (kbps)) = S * 8 / T (typically, T = 500ms). Based on these bandwidth sampling points, filtering and prediction algorithms are used to estimate the actual network bandwidth, thereby determining the predicted network bandwidth value.

[0057] This method relies solely on the download rate at the application layer on the streaming end to estimate network bandwidth. To quickly respond to changes in network bandwidth, it uses a relatively short sampling period of 500ms. However, because the application layer uses frame-level statistics for download data, the sampling points within the 500ms period still contain significant noise, placing high demands on the filtering algorithm and making it difficult to predict changing trends in network status. Furthermore, estimating network bandwidth at the streaming end cannot accurately perceive the actual sending rate of the CDN server, resulting in a certain lag.

[0058] In summary, in live streaming systems, the current network bandwidth prediction value obtained through existing bandwidth detection or estimation methods is usually very inaccurate, resulting in poor bitrate decisions and making it difficult to provide a good viewing experience in scenarios where the user's network status changes significantly.

[0059] To solve the above problems, the present application provides a bandwidth detection method. By obtaining the bit rates of multiple gear streams, the bit rates of the multiple gear streams are used as candidate detection bandwidth values, and a target detection bandwidth value is determined therefrom. The network bandwidth is detected, thereby quickly and accurately determining the current network bandwidth prediction value, and reducing the traffic cost during the bandwidth detection process, providing a better viewing experience for live viewing users.

[0060] The bandwidth detection method provided by this application is introduced below with respect to the application scenario of the network live broadcast system. As shown in Figure 1-a, the network live broadcast system includes a push stream end 101, a CDN server 102 and a pull stream end 103. The push stream end 101 is responsible for collecting real-time audio and video original data, encoding and encapsulating it, obtaining live streams with different bit rates, and sending the live streams with different bit rates to the CDN server 102. The CDN server 102 receives live streams with different bit rates, and sends the live stream with one bit rate to the pull stream end 103. The pull stream end 103 receives and plays the live stream. It can be understood that different service platforms can correspond to their own network live broadcast systems. For the network live broadcast system corresponding to any service platform, it can also include multiple push stream ends, CDN servers and pull stream ends. This application mainly describes the method for bandwidth detection of the network used by any pull stream end when playing the live stream.

[0061] For example, when a user uses a mobile phone to log in to an application on a service platform to watch a live program, the push end of the live program is continuously sending live streams of different bit rates for the live program to the CDN server, that is, live streams of different bit rate levels. The picture quality clarity of live streams with different bit rate levels is different. For example, a live stream with a high bit rate level corresponds to 1080p picture quality, a live stream with a medium bit rate level corresponds to 720p picture quality, and a live stream with a low bit rate level corresponds to 480p picture quality, etc., where p represents the video format. If the user is currently watching a live stream with a medium bit rate level, that is to say, the current CDN server will continuously send the live stream with a medium bit rate level among the multiple live streams with bit rate levels it has received to the pull end used by the user. The push end of the live program, the CDN server, and the pull end used by the user are all part of the online live broadcast system corresponding to the service platform. The network live broadcast system corresponding to the service platform can adopt the method provided in this application to detect the current bandwidth of the transmission network between the CDN server and the stream pulling end used by the user, obtain the current network bandwidth prediction value, and thus dynamically adjust the bit rate level of the live broadcast stream, ensuring that the user's viewing quality is good while ensuring smooth viewing for the user.

[0062] As shown in FIG1 , the workflow of the network live broadcast system using the bandwidth detection method provided by this application is as follows:

[0063] S101: The streaming client sends multiple live streams with different bitrates to the CDN server.

[0064] S102, the CDN server counts the average bitrate of each gear stream in real time;

[0065] S103, the CDN server updates the current network bandwidth prediction value based on bandwidth detection or bandwidth estimation;

[0066] S104, the CDN server notifies the stream puller of the updated current network bandwidth prediction value;

[0067] S105: The stream puller uses a bitrate adaptive algorithm to determine which bitrate level to select for the live stream.

[0068] S106, the stream pulling end sends a request to the CDN server to stop the original stream and pull the target stream;

[0069] S107: The CDN server responds to the request of the stream pulling end and sends the target stream to the stream pulling end.

[0070] To determine the current network bandwidth forecast, you can use bandwidth probing or bandwidth estimation. Bandwidth probing involves sending a series of probe packets to the network and observing information such as their propagation time and packet loss rate to assess the actual available bandwidth. Bandwidth estimation, on the other hand, involves analyzing network data packet propagation time, packet loss, and other factors to estimate the maximum available bandwidth.

[0071] In the above workflow, steps S102 and S103 are specifically implemented by the following steps, as shown in FIG2 :

[0072] S201: The CDN server obtains the bit rates of multiple streams, the identifier of the current playing stream, and the current network bandwidth prediction value.

[0073] Specifically, the CDN server receives multiple gear streams and counts the average bit rate of each gear stream in real time, that is, it counts the data volume (unit: bits) of each gear stream within a unit time window (every second or every 500ms or every 250ms, this application does not limit the specific value of the unit time window) in real time, and then calculates the average bit rate of each gear stream (unit: bps = bits per second, bit rate) to obtain the bit rate of multiple gear streams.

[0074] The CDN server obtains the identifier of the current playback stream for the target user, such as the ID of the current playback stream, and obtains the bit rate corresponding to the identifier of the current playback stream from the bit rates of multiple gear streams as the bit rate of the current playback stream.

[0075] The CDN server obtains the current network bandwidth prediction value, that is, the network bandwidth prediction value obtained before the current round of bandwidth detection or bandwidth estimation.

[0076] S202: Determine whether the current network usage state is the ALR state.

[0077] If the bitrate of the current stream is less than ω*the current predicted network bandwidth, the current network usage status is determined to be ALR, indicating insufficient network bandwidth utilization. ω is a hyperparameter related to ALR status and is set to 0.8 by default. If the bitrate of the current stream is greater than or equal to ω*the current predicted network bandwidth, the current network usage status is determined to be non-ALR.

[0078] S203: If the current network usage state is the ALR state, determine a target detection bandwidth value according to the bit rates of the multiple gear streams.

[0079] Since the bitrate of the current playback stream is lower than the current network bandwidth prediction value in the ALR state, it is necessary to detect a higher network bandwidth value so that the bitrate adaptive algorithm can decide on a live stream with a higher bitrate.

[0080] The bit rates of multiple gear streams are used as candidate detection bandwidth values, and the probability of each candidate detection bandwidth value being selected as the target detection bandwidth value is determined. The probability of determining that a candidate detection bandwidth value greater than the bit rate of the currently played stream is selected as the target detection bandwidth value is negatively correlated with the size of the candidate detection bandwidth value, and the probability of determining that a candidate detection bandwidth value less than or equal to the bit rate of the currently played stream is selected as the target detection bandwidth value is 0.

[0081] Specifically, the probability of each candidate detection bandwidth value being selected as the target detection bandwidth value can be determined according to the following steps:

[0082] If the bit rates of multiple streams as candidate detection bandwidth values ​​are r1, r2, ..., r n , where r1 <r2<…<r n , n represents the number of bit rate levels, r i Indicates the bitrate of the current playback stream, i represents the bitrate level of the current playback stream, 1≤i≤n.

[0083] Then the detection bandwidth value r j The probability p of being selected as the target detection bandwidth value j for:

[0084] Wherein, k=i+1,…,n.

[0085] The above formula (1) indicates that since the current network usage state is ALR state, it is necessary to select a higher network bandwidth value for detection, so r is selected. j The probability of (1≤j≤i) is 0, that is, the probability that the candidate detection bandwidth value that is less than or equal to the bit rate of the current playback stream is selected as the target detection bandwidth value is 0. j (i+1≤j≤n), that is, the probability of a candidate detection bandwidth value greater than the bit rate of the current playback stream being selected as the target detection bandwidth value is negatively correlated with the size of the candidate detection bandwidth value. In other words, the larger the candidate detection bandwidth value, the smaller the probability of being selected. The purpose is to avoid network congestion caused by excessive detection bandwidth, and to avoid image quality fluctuations caused by a large difference between the original stream and the target stream, which affects the user's viewing experience.

[0086] After determining the probability of each candidate detection bandwidth value being selected as the target detection bandwidth value, an unequal probability sampling method may be used to extract the candidate detection bandwidth value as the target detection bandwidth value.

[0087] S204: Determine a target detection period according to the target detection bandwidth value.

[0088] When a candidate detection bandwidth value greater than the bit rate of the current playback stream is determined to be selected as the target detection bandwidth value, a corresponding target detection period is positively correlated with the size of the candidate detection bandwidth value.

[0089] Specifically, the target detection period can be determined according to the following steps:

[0090] If the bit rates of multiple streams as candidate detection bandwidth values ​​are r1, r2, ..., r n , where r1 <r2<…<r n , n represents the number of bit rate levels, r i Indicates the bitrate of the current playback stream, i represents the bitrate level of the current playback stream, 1≤i≤n.

[0091] Determine the maximum bit rate r among the bit rates of multiple gear streams n The corresponding detection period T n , you can set T n =5s.

[0092] Then the target detection bandwidth value r j Corresponding target detection period T j for:

[0093] The above formula (2) indicates that since the current network usage state is ALR state, it is necessary to select a higher network bandwidth value for detection, so r is selected. j When (1≤j≤i) is the target detection bandwidth value, the corresponding target detection period is +∞, indicating that a smaller network bandwidth value will not be detected. j When (i+1≤j≤n) is the target detection bandwidth value, that is, the candidate detection bandwidth value that is greater than the bit rate of the current playback stream is selected as the target detection bandwidth value. The corresponding target detection period is positively correlated with the size of the candidate detection bandwidth value. In other words, the larger the target detection bandwidth value, the longer the target detection period. The purpose is to avoid excessive traffic costs caused by sending padding data during the bandwidth detection process.

[0094] S205: Actively detect the network bandwidth according to the target detection bandwidth value and the target detection period.

[0095] When the target detection period arrives, the CDN server sends data according to the target detection bandwidth value, and determines whether the current network bandwidth reaches the target detection bandwidth value by calculating the data receiving rate, thereby determining the current network bandwidth prediction value.

[0096] S206: If the current network usage state is not the ALR state, a bandwidth estimation method is used to predict the network bandwidth.

[0097] Specifically, the GCC algorithm or the BBR (Bottleneck Bandwidth and Round-trip propagation time, an algorithm for congestion control) algorithm may be used to estimate the network bandwidth.

[0098] S207: Update the current network bandwidth prediction value.

[0099] When actively probing the network bandwidth based on the target detection bandwidth value and target detection period, if the data reception rate is equal to the target detection bandwidth value, the current network bandwidth is greater than or equal to the target detection bandwidth value, and the current network bandwidth prediction value is updated to the target detection bandwidth value. If the data reception rate is less than the target detection bandwidth value, the current network bandwidth is less than the target detection bandwidth value, and the current network bandwidth prediction value is updated to the data reception rate.

[0100] After the network bandwidth is predicted using the bandwidth estimation method, the current network bandwidth prediction value is updated to the estimated network bandwidth value.

[0101] It can be seen from the above steps that by determining the target detection bandwidth value according to the bit rates of multiple gear streams and detecting the network bandwidth on demand, a more accurate current network bandwidth prediction value can be obtained. The accuracy here does not mean that the current network bandwidth prediction value is equal to the actual network bandwidth value, but that the current network bandwidth prediction value meets the required network bandwidth value. In addition, determining the target detection bandwidth value according to the bit rates of multiple gear streams can avoid the waste of traffic costs caused by unreasonable setting of the target detection bandwidth value, and at the same time avoid causing excessive gear switching and resulting in picture quality jumps, affecting the user's viewing experience. The target detection period is positively correlated with the bit rate of different gear streams. The target detection period corresponding to the high bit rate gear is large, and the target detection period corresponding to the low bit rate gear is small. The traffic cost overhead caused by the detection bandwidth can be flexibly adjusted. The present application relates to active bandwidth detection based on the packet level. The network bandwidth detection has higher accuracy and timeliness, and is more likely to provide a smoother bit rate adaptive experience in scenarios where the user's network bandwidth fluctuates.

[0102] In some cases, if the CDN server's algorithm logic update iteration cycle is slow or the CDN vendor does not support modification of the CDN algorithm logic, the steps of determining the target detection bandwidth value and target detection period in the bandwidth detection method provided in this application can be implemented on the streaming end, and then the CDN server will detect the network bandwidth based on the target detection bandwidth value and target detection period. As shown in Figure 3, the specific process is as follows:

[0103] S301: The stream pulling end obtains the bit rates of multiple streams, the identifier of the current playing stream, and the current network bandwidth prediction value;

[0104] S302: The stream source determines a target detection bandwidth value based on the bit rates of the multiple gear streams.

[0105] S303: The stream-pulling end determines the target detection period according to the target detection bandwidth value;

[0106] S304: The stream puller notifies the CDN server of the target detection bandwidth value and target detection period.

[0107] S305: The CDN server actively detects the network bandwidth according to the target detection period and the target detection period.

[0108] S306: Update the current network bandwidth prediction value.

[0109] The stream-pulling end determines the target detection bandwidth value and target detection period. The CDN server then actively detects the network bandwidth based on these values ​​and determines the current network bandwidth prediction. For details on how the stream-pulling end determines the target detection bandwidth value and target detection period, see steps S201-S204.

[0110] The above is an introduction to the application scenario embodiment of the bandwidth detection method provided by this application, which is described in detail below through specific embodiments.

[0111] First embodiment

[0112] The first embodiment of the present application provides a bandwidth detection method, which is applied to a server, such as a CDN server, which is used to send a live stream obtained from a push terminal to a pull terminal corresponding to a target user. As shown in Figure 4, the method includes the following steps:

[0113] S401: Obtain bit rates of multiple bit streams.

[0114] First, the server obtains multiple stream levels. That is, for the same live content, the pusher sends multiple live streams with different bitrate levels to the server, including the original stream and various transcoded streams, to adapt to different network conditions and user devices.

[0115] The bitrate of a live stream refers to the speed or bit rate at which live data is transmitted during a live broadcast. It represents the amount of information transmitted per unit time (usually measured in seconds). A higher bitrate means more data is transmitted, theoretically providing higher image quality, but it also increases the demand for network bandwidth.

[0116] The server receives the multiple gear streams sent by the streaming end, and counts the average bit rate of each gear stream in the multiple gear streams in real time, that is, the bit rate of each gear stream, thereby obtaining the bit rates of the multiple gear streams.

[0117] Specifically, the server can obtain the bit rates of multiple gear streams by real-time counting the data volume (unit: bits) of each gear stream within a unit time window (every second or every 500ms or every 250ms, this application does not limit the specific value of the unit time window), and then calculating the average bit rate of each gear stream (unit: bps = bits per second).

[0118] S402: Obtain the bit rate of the current playback stream for the target user among the multiple gear streams.

[0119] The server sends one of the multiple streams it receives to the target user's corresponding streaming client for viewing. The live stream currently being sent to the target user's corresponding streaming client is the current playback stream for the target user. The bitrate of the current playback stream is the bitrate of the live stream currently being played by the target user's corresponding streaming client.

[0120] There are many ways to obtain the bitrate of the current playback stream. For example, according to the network live broadcast protocol, the bitrate information is carried in the feedback data, or the sent bitrate information is indirectly calculated by recording and analyzing the log files of the CDN server, or third-party tools and services are used to help monitor network traffic and bitrate, or the bitrate information of a live stream is directly queried by calling the interface.

[0121] In this embodiment, the bitrate of the currently playing stream can be obtained by the following steps: First, an identifier of the currently playing stream, such as the ID of the currently playing stream, is obtained. The identifier of the currently playing stream is used to distinguish the live content corresponding to the currently playing stream and the bitrate level of the currently playing stream. Then, among the bitrates of the multiple stream levels, the bitrate corresponding to the identifier of the currently playing stream is obtained, which is the bitrate of the currently playing stream.

[0122] S403: Using the bit rates of the multiple gear streams as candidate detection bandwidth values, and determining the probability of each candidate detection bandwidth value being selected as the target detection bandwidth value.

[0123] In this embodiment, before obtaining the target detection bandwidth value based on the bit rates of the multiple gear streams, it is also necessary to obtain the current network bandwidth prediction value, and determine the current network usage status based on the current network bandwidth prediction value and the bit rate of the current playback stream.

[0124] In this embodiment, the target detection bandwidth value is determined based on the bitrates of multiple streams in order to detect a higher network bandwidth value, mainly for situations where the current network usage status indicates insufficient network bandwidth utilization. Of course, the target detection bandwidth value can also be determined based on the bitrates of multiple streams in order to detect a higher network bandwidth value in other network usage statuses, thereby achieving the purpose of on-demand detection.

[0125] If the ratio of the bitrate of the current playback stream to the current predicted network bandwidth is less than a preset threshold (i.e., bitrate of the current playback stream < ω * predicted current network bandwidth), the current network usage status is determined to be ALR (ALR), indicating insufficient network bandwidth utilization. ω is a hyperparameter related to the ALR state, with a default setting of 0.8. At this point, the bitrates of the multiple gear streams are used as candidate detection bandwidth values, and the probability of each candidate detection bandwidth value being selected as the target detection bandwidth value is obtained.

[0126] Since the bit rate of the current playback stream is lower than the current network bandwidth prediction value in the ALR state, a higher network bandwidth value needs to be detected. Therefore, the target detection bandwidth value is determined from the candidate detection bandwidth values ​​that are greater than the bit rate of the current playback stream.

[0127] It is determined that the probability of a candidate detection bandwidth value greater than the bit rate of the current playback stream being selected as the target detection bandwidth value is negatively correlated with the size of the candidate detection bandwidth value. Specifically, the probability that the candidate detection bandwidth value greater than the bit rate of the current playback stream is selected as the target detection bandwidth value can be determined by the following steps: obtaining the sum of the candidate detection bandwidth values ​​greater than the bit rate of the current playback stream as the sum of the candidate detection bandwidth values; arranging the candidate detection bandwidth values ​​greater than the bit rate of the current playback stream in ascending order to obtain a forward queue, and arranging the candidate detection bandwidth values ​​greater than the bit rate of the current playback stream in descending order to obtain a reverse queue; for any candidate detection bandwidth value greater than the bit rate of the current playback stream, obtaining a candidate detection bandwidth value in the reverse queue that has the same position as the candidate detection bandwidth value in the forward queue as the candidate detection bandwidth value corresponding to the candidate detection bandwidth value; and obtaining a ratio of the candidate detection bandwidth value corresponding to the candidate detection bandwidth value to the sum of the candidate detection bandwidth values ​​as the probability that the candidate detection bandwidth value is selected as the target detection bandwidth value.

[0128] The specific implementation steps are as follows:

[0129] If the bit rates of multiple streams as candidate detection bandwidth values ​​are r1, r2, ..., r n , where r1 <r2<…<r n , n represents the number of bit rate levels, r i Indicates the bitrate of the current playback stream, i represents the bitrate level of the current playback stream, 1≤i≤n;

[0130] The candidate detection bandwidth value r is greater than the bit rate of the current playback stream j The probability p of being selected as the target detection bandwidth value j The calculation is as follows:

[0131] Among them, i+1≤j≤n, k=i+1,...,n.

[0132] The probability determined by formula (3) above indicates that the probability of a candidate detection bandwidth value greater than the bit rate of the current playback stream being selected as the target detection bandwidth value is negatively correlated with the size of the candidate detection bandwidth value. That is, the larger the candidate detection bandwidth value, the smaller the probability of being selected. However, in actual applications, every candidate detection bandwidth value greater than the bit rate of the current playback stream has a certain probability of being selected as the target detection bandwidth value.

[0133] It is determined that the probability of a candidate detection bandwidth value that is less than or equal to the bit rate of the current playback stream being selected as the target detection bandwidth value is 0. Of course, the probability of a candidate detection bandwidth value that is less than or equal to the bit rate of the current playback stream being selected as the target detection bandwidth value can also be set to a smaller value so that a candidate detection bandwidth value that is less than or equal to the bit rate of the current playback stream will not be selected as the target detection bandwidth value.

[0134] S404: Determine the target detection bandwidth value according to the probability of each candidate detection bandwidth value being selected as the target detection bandwidth value.

[0135] After determining the probability of each candidate detection bandwidth value being selected as the target detection bandwidth value, an unequal probability sampling method may be used to extract the candidate detection bandwidth value as the target detection bandwidth value.

[0136] Unequal probability sampling is a random sampling method, that is, the probability of each unit in the population being selected into the sample is different, which means that before the sample is drawn, each unit in the population is given a specific probability of being selected, and these probabilities can be distributed according to various principles. The purpose of unequal probability sampling is to improve sampling efficiency or accuracy, especially when the research objects have significant differences. Unequal probability sampling is divided into two cases: with replacement and without replacement. Unequal probability sampling with replacement: This type of sampling allows the same unit to be selected multiple times. The most common case is to determine the probability of selection according to the size of the population unit. Unequal probability sampling without replacement: In this process, once a unit is selected, it cannot be selected again, so that the number and probability of the remaining units will change after each sampling.

[0137] In this embodiment, after any candidate detection bandwidth value is selected as the target detection bandwidth value, the network bandwidth can be detected according to the target detection bandwidth value to obtain a current network bandwidth prediction value.

[0138] In this embodiment, the network bandwidth is detected based on the target detection bandwidth value, primarily using the WebRTC active detection method. Specifically, data is sent within a short period of time according to the specified target detection bandwidth value. The network bandwidth is then determined based on the data reception rate to determine whether it has reached the target detection bandwidth value. If the data reception rate is equal to the target detection bandwidth value, the network bandwidth is greater than or equal to the target detection bandwidth value. If the data reception rate is less than the target detection bandwidth value, packet loss has occurred on the network and the network bandwidth is less than the target detection bandwidth value.

[0139] Regarding the timing of active detection, active detection can be performed according to a fixed detection period. In order to avoid setting the detection period too short, resulting in excessive traffic costs, or setting the detection period too long, resulting in untimely response to network status, this application provides a method for flexibly setting the detection period.

[0140] Specifically, a target detection period is determined based on the target detection bandwidth value, wherein a candidate detection bandwidth value that is greater than the bit rate of the current playback stream is selected as the target detection bandwidth value. The target detection period corresponding to the target detection bandwidth value is positively correlated with the size of the candidate detection bandwidth value. That is, the larger the target detection bandwidth value, the longer the target detection period, thereby avoiding excessive traffic costs caused by sending padding data during the bandwidth detection process.

[0141] Furthermore, the target detection period can be determined according to the following steps: determining the detection period corresponding to the maximum candidate detection bandwidth value among the candidate detection bandwidth values ​​that are greater than the bit rate of the current playback stream; obtaining the ratio of the target detection bandwidth value to the maximum candidate detection bandwidth value as the detection bandwidth value ratio; obtaining the product of the detection bandwidth value ratio and the detection period corresponding to the maximum candidate detection bandwidth value as the target detection period.

[0142] At this point, two important pieces of information for active detection, namely the target detection bandwidth value and the target detection period, have been determined, and the network bandwidth can be detected.

[0143] S405: Detect the network bandwidth of the target user according to the target detection bandwidth value.

[0144] When the target detection period arrives, the network bandwidth of the target user is actively detected according to the target detection bandwidth value, and a data receiving rate in the process of detecting the network bandwidth of the target user is obtained.

[0145] If the data receiving rate is equal to the target detection bandwidth value, the current network bandwidth prediction value is updated to the target detection bandwidth value. If the data receiving rate is less than the target detection bandwidth value, the current network bandwidth prediction value is updated to the data receiving rate.

[0146] Furthermore, after the current network bandwidth prediction value is updated, the server sends the updated current network bandwidth prediction value after detecting the network bandwidth of the target user to the stream pulling end, so that the stream pulling end can use the bitrate adaptive algorithm to determine the bitrate level of the live stream. The server receives a bitrate level update request generated by the stream pulling end based on the updated current network bandwidth prediction value, and sends the live stream with the updated bitrate level to the stream pulling end based on the bitrate level update request for playback by the stream pulling end.

[0147] So far, we've detailed the process of using the bitrates of multiple streams as candidate detection bandwidth values, determining a target detection bandwidth value from these, and determining a target detection period based on the target detection bandwidth value, thereby detecting the network bandwidth and determining the current network bandwidth prediction value. Insufficient network bandwidth utilization indicates that the bitrate of the current playback stream can be increased. However, blindly setting a large target detection bandwidth value may cause network congestion or a drop in user viewing quality during the detection process. Therefore, determining a target detection bandwidth value from multiple streams achieves on-demand detection and avoids wasted traffic costs. The resulting current network bandwidth prediction value is more accurate, meaning that the current network bandwidth prediction value meets the required network bandwidth value. The probability of a candidate detection bandwidth value greater than the bitrate of the current playback stream being selected as the target detection bandwidth value is negatively correlated with the size of the candidate detection bandwidth value. This increases the chances of a candidate detection bandwidth value with a bitrate close to the current playback stream being selected as the target detection bandwidth value. This prevents network congestion or a drop in user viewing quality during the active detection process. Different target detection cycles are determined according to different target detection bandwidth values, which can flexibly adjust the traffic cost overhead caused by the detection bandwidth. This avoids excessive traffic costs caused by too frequent detection when the target detection bandwidth value is large, and also ensures timely response to network status.

[0148] Furthermore, if the ratio of the bitrate of the currently playing stream to the current network bandwidth prediction value is greater than or equal to a preset threshold (i.e., bitrate of the currently playing stream ≥ ω * current network bandwidth prediction value), then the current network usage state is determined to be not in the ALR state. In this case, a bandwidth estimation method such as GCC or BBR can be used to update the current network bandwidth prediction value.

[0149] Similarly, the server sends the current network bandwidth prediction value updated by the bandwidth estimation method to the stream sourcing end, so that the stream sourcing end can use the bitrate adaptive algorithm to determine the bitrate level of the live stream. The server receives a bitrate level update request generated by the stream sourcing end based on the updated current network bandwidth prediction value, and sends the live stream with the updated bitrate level to the stream sourcing end based on the bitrate level update request for playback by the stream sourcing end.

[0150] Second embodiment

[0151] The second embodiment of the present application provides a bandwidth detection method, which is applied to a server, such as a CDN server, and is used to send a live stream obtained from a push terminal to a pull terminal corresponding to the target user. As shown in Figure 5, the method includes the following steps:

[0152] S501, obtaining bit rates of multiple gear streams;

[0153] S502, obtaining the bit rate of the current playback stream for the target user among the multiple gear streams;

[0154] S503: Using the bit rates of the multiple gear streams as candidate detection bandwidth values, and determining a target detection bandwidth value based on the candidate detection bandwidth values;

[0155] S504, determining a target detection period according to the target detection bandwidth value;

[0156] S505 : When the target detection period arrives, detect the network bandwidth of the target user according to the target detection bandwidth value.

[0157] Optionally, the target detection period corresponding to when a candidate detection bandwidth value greater than the bit rate of the current playback stream is selected as the target detection bandwidth value is determined by the following steps: determining the detection period corresponding to the maximum candidate detection bandwidth value among the candidate detection bandwidth values ​​greater than the bit rate of the current playback stream; obtaining a ratio of the target detection bandwidth value to the maximum candidate detection bandwidth value as the detection bandwidth value ratio; and obtaining the product of the detection bandwidth value ratio and the detection period corresponding to the maximum candidate detection bandwidth value as the target detection period.

[0158] Optionally, the method further includes: obtaining a current network bandwidth prediction value;

[0159] The step of using the bit rates of the multiple gear streams as candidate detection bandwidth values ​​and obtaining a target detection bandwidth value based on the candidate detection bandwidth values ​​includes: if a ratio of the bit rate of the current playback stream to the current network bandwidth prediction value is less than a preset threshold, using the bit rates of the multiple gear streams as candidate detection bandwidth values, and obtaining a target detection bandwidth value based on the candidate detection bandwidth values.

[0160] The bandwidth detection method provided in this embodiment mainly provides a more flexible setting means for the target detection period. For its specific implementation method and technical effects, please refer to the first embodiment.

[0161] Third embodiment

[0162] The third embodiment of the present application provides a bandwidth detection method, which is applied to the stream pulling end corresponding to the target user, and the stream pulling end is used to receive the live stream obtained by the server from the stream pushing end. As shown in Figure 6, the method includes the following steps:

[0163] S601, obtaining bit rates of multiple gear streams;

[0164] S602, obtaining the bit rate of the current playback stream for the target user among the multiple gear streams;

[0165] S603: Using the bit rates of the multiple gear streams as candidate detection bandwidth values, and determining the probability of each candidate detection bandwidth value being selected as the target detection bandwidth value;

[0166] S604, determining the target detection bandwidth value according to the probability of each candidate detection bandwidth value being selected as the target detection bandwidth value;

[0167] S605: Send the target detection bandwidth value to a server, so that the server detects the network bandwidth of the target user according to the target detection bandwidth value.

[0168] Optionally, the method further includes: determining a target detection period according to the target detection bandwidth value; sending the target detection period to the server; and when the target detection period arrives, the server detects the network bandwidth of the target user according to the target detection bandwidth value.

[0169] The bandwidth detection method provided in this embodiment is to determine the important information required for active detection at the streaming end, namely the target detection bandwidth value and the target detection period, in cases where the update iteration cycle of the algorithm logic of the CDN server is slow or the CDN manufacturer does not support the modification of the CDN algorithm logic. The streaming end sends the target detection bandwidth value and the target detection period to the CDN server, and the CDN server detects the network bandwidth based on the target detection bandwidth value and the target detection period determined by the streaming end, and determines the current network bandwidth prediction value. Of course, the CDN server needs to send the current network bandwidth prediction value to the streaming end so that the streaming end can use the bitrate adaptive algorithm to decide the bitrate level of the live stream. For related content, please refer to the first embodiment.

[0170] Fourth embodiment

[0171] The fourth embodiment of the present application provides a bandwidth detection device, as shown in Figure 7. This device corresponds to the bandwidth detection method provided in the first embodiment. Since the device embodiment and the method embodiment are similar, the description here is relatively simple. For relevant details, please refer to the content of the first embodiment.

[0172] The bandwidth detection device 700 provided in this embodiment includes:

[0173] The first determination unit 701 is configured to obtain bit rates of multiple gear streams; obtain the bit rate of a current playback stream for a target user from the multiple gear streams; use the bit rates of the multiple gear streams as candidate detection bandwidth values, determine the probability of each candidate detection bandwidth value being selected as a target detection bandwidth value; and determine the target detection bandwidth value based on the probability of each candidate detection bandwidth value being selected as the target detection bandwidth value.

[0174] The first detection unit 702 is configured to detect the network bandwidth of the target user according to the target detection bandwidth value.

[0175] The above is an introduction to a bandwidth detection device provided in the fourth embodiment of the present application.

[0176] Fifth embodiment

[0177] The fifth embodiment of the present application provides a bandwidth detection device, as shown in Figure 8. This device corresponds to the bandwidth detection method provided in the second embodiment. Since the device embodiment and the method embodiment are similar, the description here is relatively simple. For relevant details, please refer to the content of the second embodiment.

[0178] The bandwidth detection device 800 provided in this embodiment includes:

[0179] The second determining unit 801 is configured to obtain bit rates of multiple gear streams; obtain the bit rate of a current playback stream for a target user from the multiple gear streams; use the bit rates of the multiple gear streams as candidate detection bandwidth values, determine a target detection bandwidth value based on the candidate detection bandwidth values; and determine a target detection period based on the target detection bandwidth value.

[0180] The second detection unit 802 is configured to detect the network bandwidth of the target user according to the target detection bandwidth value when the target detection period arrives.

[0181] The above is an introduction to a bandwidth detection device provided in the fifth embodiment of the present application.

[0182] Sixth embodiment

[0183] The sixth embodiment of the present application provides an electronic device, as shown in Figure 9. The electronic device includes: at least one processor 901, at least one memory 902, at least one communication interface 903 and at least one communication bus 904. Optionally, the processor 901 may be a processor CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application. The memory 902 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. The communication interface 903 can be an interface of a communication module, such as an interface of a GSM module. The memory 902 stores programs and data, and the processor 901 calls the program stored in the memory 902 to execute the above-mentioned bandwidth detection method.

[0184] Seventh embodiment

[0185] A seventh embodiment of the present application provides a storage medium, wherein the storage medium stores a program and data. The program is executed by a processor to implement the above-mentioned bandwidth detection method.

[0186] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0187] Although several modules or units for action execution are mentioned in the detailed description above, this division is not mandatory. In fact, according to the specific implementation of the application, the features and functions of two or more modules or units described above can be concretized in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.

[0188] Furthermore, although the steps of the method of the present application are described in a particular order in the accompanying drawings, this does not require or imply that the steps must be performed in this particular order, or that all steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0189] It should be noted that the embodiments of the present application can be implemented by hardware, software, or a combination of software and hardware. The hardware portion can be implemented using dedicated logic; the software portion can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. Those skilled in the art will appreciate that the above-mentioned devices and methods can be implemented using computer-executable instructions and / or contained in processor control code, for example, such as a carrier medium such as a disk, CD or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. Such code is provided on the device and its modules of the present application can be implemented by hardware circuits such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., can also be implemented by software executed by various types of processors, or can be implemented by a combination of the above-mentioned hardware circuits and software, such as firmware.

[0190] The above is only a specific implementation method of the present application, but the scope of protection of the present application is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with this technical field within the technical scope disclosed in the present application and within the spirit and principles of the present application should be covered by the scope of protection of the present application.

Claims

1. A bandwidth detection method, characterized in that, Including: Obtaining bitrates of multiple gear streams; Obtaining the bitrate of the current playback stream for a target user among the multiple gear streams; Using the bitrates of the multiple gear streams as candidate detection bandwidth values and determining the probability that each candidate detection bandwidth value is selected as the target detection bandwidth value; Determining the target detection bandwidth value according to the probabilities that each candidate detection bandwidth value is selected as the target detection bandwidth value; Detecting the network bandwidth of the target user according to the target detection bandwidth value.

2. The bandwidth detection method according to claim 1, wherein The obtaining the bitrate of the current playback stream for a target user among the multiple gear streams includes: Obtaining the identifier of the current playback stream for the target user; Among the bitrates of the multiple gear streams, obtaining the bitrate corresponding to the identifier of the current playback stream as the bitrate of the current playback stream.

3. The bandwidth detection method according to claim 1, wherein Also including: Obtaining the current network bandwidth prediction value; The using the bitrates of the multiple gear streams as candidate detection bandwidth values and determining the probability that each candidate detection bandwidth value is selected as the target detection bandwidth value includes: If the ratio of the bitrate of the current playback stream to the current network bandwidth prediction value is less than a preset threshold, using the bitrates of the multiple gear streams as candidate detection bandwidth values and determining the probability that each candidate detection bandwidth value is selected as the target detection bandwidth value.

4. The bandwidth detection method according to claim 1, characterized in that The probability that a candidate detection bandwidth value greater than the bitrate of the current playback stream is selected as the target detection bandwidth value is determined through the following steps: Obtaining the sum of the candidate detection bandwidth values greater than the bitrate of the current playback stream as the sum of candidate detection bandwidth values; Arranging the candidate detection bandwidth values greater than the bitrate of the current playback stream in ascending order to obtain an ascending queue, and arranging the candidate detection bandwidth values greater than the bitrate of the current playback stream in descending order to obtain a descending queue; For any candidate detection bandwidth value among the candidate detection bandwidth values greater than the bitrate of the current playback stream, obtaining the candidate detection bandwidth value in the descending queue that has the same position as the any candidate detection bandwidth value in the ascending queue as the candidate detection bandwidth value corresponding to the any candidate detection bandwidth value; Obtaining the ratio of the candidate detection bandwidth value corresponding to the any candidate detection bandwidth value to the sum of candidate detection bandwidth values as the probability that the any candidate detection bandwidth value is selected as the target detection bandwidth value.

5. The bandwidth detection method according to claim 1, characterized in that Determining that the probability that a candidate detection bandwidth value less than or equal to the bitrate of the current playback stream is selected as the target detection bandwidth value is 0.

6. The bandwidth detection method according to claim 1, wherein The determining the target detection bandwidth value according to the probabilities that each candidate detection bandwidth value is selected as the target detection bandwidth value includes: According to the probabilities that each candidate detection bandwidth value is selected as the target detection bandwidth value, using the method of unequal probability sampling to extract a candidate detection bandwidth value as the target detection bandwidth value.

7. The bandwidth detection method according to claim 1, wherein Also including: Determining the target detection period according to the target detection bandwidth value; The detecting the network bandwidth of the target user according to the target detection bandwidth value includes: When the target detection period arrives, detecting the network bandwidth of the target user according to the target detection bandwidth value.

8. The bandwidth detection method according to claim 7, wherein When a candidate detection bandwidth value greater than the bitrate of the current playback stream is selected as the target detection bandwidth value, the corresponding target detection period is determined through the following steps: Determine the detection period corresponding to the maximum candidate detection bandwidth value among the candidate detection bandwidth values greater than the bitrate of the current playback stream; Obtain the ratio of the target detection bandwidth value to the maximum candidate detection bandwidth value as the detection bandwidth value ratio; Obtain the product of the detection bandwidth value ratio and the detection period corresponding to the maximum candidate detection bandwidth value as the target detection period.

9. The bandwidth detection method according to claim 1, wherein Further included: Obtain the data reception rate during the detection of the network bandwidth of the target user; If the data reception rate is equal to the target detection bandwidth value, update the current network bandwidth prediction value to the target detection bandwidth value.

10. The bandwidth detection method according to claim 3, characterized in that, Further included: If the ratio of the bitrate of the current playback stream to the current network bandwidth prediction value is greater than or equal to the preset threshold, update the current network bandwidth prediction value by using a bandwidth estimation method.

11. The bandwidth detection method according to claim 1, wherein The obtaining of the bitrates of multiple gear streams includes: Receive multiple gear streams, and statistically calculate the average bitrate of each gear stream in the multiple gear streams in real time to obtain the bitrates of the multiple gear streams.

12. The bandwidth detection method according to claim 1, wherein The method is applied to a server, and the server is used to send the live stream obtained from the pushing end to the pulling end corresponding to the target user; The method further includes: The server sends the updated current network bandwidth prediction value after detecting the network bandwidth of the target user to the pulling end; The server obtains the bitrate gear update request generated by the pulling end according to the updated current network bandwidth prediction value; The server sends the live stream with the updated bitrate gear to the pulling end according to the bitrate gear update request.

13. The method according to claim 1, wherein The method is applied to the pulling end corresponding to the target user, and the pulling end is used to receive the live stream obtained by the server from the pushing end; The detecting of the network bandwidth of the target user according to the target detection bandwidth value includes: The pulling end sends the target detection bandwidth value to the server so that the server detects the network bandwidth of the target user according to the target detection bandwidth value.

14. A bandwidth detection method, characterized in that, Included: Obtain the bitrates of multiple gear streams; Obtain the bitrate of the current playback stream for the target user among the multiple gear streams; Use the bitrates of the multiple gear streams as candidate detection bandwidth values, and determine the target detection bandwidth value according to the candidate detection bandwidth values; Determine the target detection period according to the target detection bandwidth value; When the target detection period arrives, detect the network bandwidth of the target user according to the target detection bandwidth value.

15. The bandwidth detection method according to claim 14, characterized in that, When a candidate detection bandwidth value greater than the bitrate of the current playback stream is selected as the target detection bandwidth value, the corresponding target detection period is determined through the following steps: Determine the detection period corresponding to the maximum candidate detection bandwidth value among the candidate detection bandwidth values greater than the bitrate of the current playback stream; Obtain the ratio of the target detection bandwidth value to the maximum candidate detection bandwidth value as the detection bandwidth value ratio; Obtain the product of the ratio of the detected bandwidth value and the detection period corresponding to the maximum candidate detected bandwidth value as the target detection period.

16. The bandwidth detection method according to claim 14, characterized in that, It further includes: Obtain the predicted value of the current network bandwidth; The step of using the bitrates of the multiple gear streams as candidate detected bandwidth values and obtaining the target detected bandwidth value according to the candidate detected bandwidth values includes: If the ratio of the bitrate of the current playback stream to the predicted value of the current network bandwidth is less than a preset threshold, then use the bitrates of the multiple gear streams as candidate detected bandwidth values and obtain the target detected bandwidth value according to the candidate detected bandwidth values.

17. A bandwidth detection device, characterized in that It includes: A first determination unit, configured to obtain the bitrates of multiple gear streams; obtain the bitrate of the current playback stream for the target user among the multiple gear streams; Use the bitrates of the multiple gear streams as candidate detected bandwidth values, determine the probability of each candidate detected bandwidth value being selected as the target detected bandwidth value; determine the target detected bandwidth value according to the probability of each candidate detected bandwidth value being selected as the target detected bandwidth value. A first detection unit, configured to detect the network bandwidth of the target user according to the target detected bandwidth value.

18. A bandwidth detection device, characterized in that, It includes: A second determination unit, configured to obtain the bitrates of multiple gear streams; obtain the bitrate of the current playback stream for the target user among the multiple gear streams; Use the bitrates of the multiple gear streams as candidate detected bandwidth values and determine the target detected bandwidth value according to the candidate detected bandwidth values; Determine the target detection period according to the target detected bandwidth value; A second detection unit, configured to detect the network bandwidth of the target user according to the target detected bandwidth value when the target detection period arrives.

19. An electronic device, characterized in that, It includes a processor and a memory; The memory is used to store programs and data, and the processor calls the programs stored in the memory to execute the bandwidth detection method according to any one of claims 1-16.

20. A storage medium, characterized in that, The storage medium stores programs and data, and the programs are executed by the processor to implement the bandwidth detection method according to any one of claims 1-16.

Citation Information

Patent Citations

  • Method and system for measuring real-time packet loss rate of link

    CN111245670A

  • Code rate determination method and device, equipment and storage medium

    CN113301392A

  • Data coding rate adaptive adjustment method and device, equipment and storage medium

    CN114390320A

  • Path detection method, device and equipment and computer readable storage medium

    CN116938694A

  • Streaming media playing method and device, electronic equipment, storage medium and program product

    CN116980662A