Bandwidth measurement method and device applied to DASH low-delay live streaming

文档序号:1878599 发布日期:2021-11-23 浏览:16次 中文

阅读说明:本技术 一种应用于dash低延迟直播流的带宽测量方法和设备 (Bandwidth measurement method and device applied to DASH low-delay live streaming ) 是由 汤传吉 李磊 高锐 孙晔 于 2021-08-25 设计创作,主要内容包括:本申请公开了一种应用于DASH低延迟直播流的带宽测量方法和设备,在客户端接收到数据包时,首先过滤不饱和发送的数据包;然后在过滤后的数据包中,寻找数据大小以及传输速率的稳定区域,并基于数据大小以及传输速率的稳定区域计算当前带宽。应用本申请公开的技术方案,能够提高带宽测量的准确性。(The application discloses a bandwidth measuring method and device applied to DASH low-delay live streaming, wherein when a client receives a data packet, the data packet sent in an unsaturated mode is filtered; then, in the filtered data packet, a stable region of the data size and the transmission rate is found, and the current bandwidth is calculated based on the stable region of the data size and the transmission rate. By applying the technical scheme disclosed by the application, the accuracy of bandwidth measurement can be improved.)

1. A bandwidth measurement method applied to DASH low-delay live streaming is characterized in that the following operations are executed when a client receives a current data packet:

filtering the data packets sent in an unsaturated mode;

in the filtered data packet, a stable region of the data size and the transmission rate is found, and the current bandwidth is calculated based on the data size and the stable region of the transmission rate.

2. The method of claim 1, wherein filtering the understeered transmitted packets comprises:

calculating the set time ToThe average value of the data size of the data packets received in the receiver, and if the data size of the current data packet is smaller than or equal to the average value of the data size, filtering the current data packetAnd (6) data packet.

3. The method according to claim 2, wherein the calculating a data size average of the received data packets within a set time, and if the data size of the current data packet is smaller than or equal to the data size average, the filtering the current data packet specifically includes:

calculating the transmission time of the current data packet;

inserting the data size and transmission time of the current data packet into a bidirectional queue QoThe tail of (a);

if inserted into queue QoThe time of the queue element at the head is more than the set time T from the current timeoThen the queue Q is deletedoA queue element of the head;

calculate the queue QoAverage of median data size;

if the data size of the current data packet is larger than the average value of the data sizes, inserting the data size and the transmission time of the current data packet into a bidirectional queue QfThe tail of (2).

4. The method of claim 3, wherein the finding of the stable region of the data size and the transmission rate in the filtered data packets, and the calculating of the current bandwidth based on the stable region of the data size and the transmission rate specifically comprises:

for the queue QfSorting according to the data size;

traversing the sorted queue QfAcquiring a group of queue elements with the same data size and the maximum number, and recording the queue elements in a queue QfPosition (2): starting position PbEnd position PeAnd the number of elements Cmax

If said C ismaxIf the value is greater than or equal to the set value C, the queue Q is alignedfMiddle PbTo PeThe queue elements in the region are sorted according to the transmission time and obtained based on the sorting resultTaking a stable region of a transmission rate, accumulating the data size of the stable region of the transmission rate to obtain S, accumulating the transmission time of the stable region of the transmission rate to obtain T, and calculating B as S/T as the current bandwidth;

if said C ismaxIf the value is less than the set value C, accumulating the queue QoThe total data size S is obtained from the data size in the queue, and a queue Q is accumulatedoThe total transmission time T is obtained from the transmission time in (1), and B ═ S/T is calculated as the current bandwidth.

5. The method of claim 4, wherein the obtaining the stable region of the transmission rate based on the sorting result comprises:

taking the N1 queue elements at 1/4 and the N2 queue elements at 3/4 of the sorting result, the N1+ N2 queue elements form a stable region of the transmission rate.

6. The method of claim 4, wherein the obtaining the stable region of the transmission rate based on the sorting result comprises:

calculating PbTo PeMiddle position P of the regionm=(Pe–Pb) /2 if PmRounding it up or down if not an integer;

based on PbTo PeSequencing result of region, traverse queue QfIn the slave PbTo Pm-10 queue elements, calculating the variance of the transmission time of each queue element and the transmission time of the following 9 data, obtaining a group of queue elements with the smallest variance;

based on PbTo PeSequencing result of region, traverse queue QfIn the slave Pm+1 to Pe-10 queue elements, calculating the variance of the transmission time of each queue element and the transmission time of the following 9 data, obtaining a group of queue elements with the smallest variance;

the two sets of queue elements obtained constitute a stable region of transmission rate.

7. A bandwidth measurement device applied to DASH low-delay live streaming, comprising:

the filtering module is used for filtering the data packets which are not sent in a saturation mode when the current data packets are received;

and the bandwidth calculating module is used for searching a stable area of the data size and the transmission rate in the filtered data packet and calculating the current bandwidth based on the data size and the stable area of the transmission rate.

8. The apparatus of claim 7, wherein the filtering module is specifically configured to:

calculating the set time ToAnd if the data size of the current data packet is smaller than or equal to the data size average value, filtering the current data packet.

9. The apparatus of claim 8, wherein the filtering module is specifically configured to:

calculating the transmission time of the current data packet;

inserting the data size and transmission time of the current data packet into a bidirectional queue QoThe tail of (a);

if inserted into queue QoIf the time distance between the queue element at the head and the current time is greater than the set time To, deleting the queue QoA queue element of the head;

calculate the queue QoAverage of median data size;

if the data size of the current data packet is larger than the average value of the data sizes, inserting the data size and the transmission time of the current data packet into a bidirectional queue QfThe tail of (2).

10. The device of claim 9, wherein the bandwidth calculation module is specifically configured to:

for the queue QfSorting according to the data size;

traversing the sorted queue QfAcquiring a group of queue elements with the same data size and the maximum number, and recording the queue elements in a queue QfPosition (2): starting position PbEnd position PeAnd the number of elements Cmax

If said C ismaxIf the value is greater than or equal to the set value C, the queue Q is alignedfMiddle PbTo PeSequencing queue elements in the region according to the transmission time, acquiring a stable region of the transmission rate based on a sequencing result, accumulating the data size of the stable region of the transmission rate to obtain S, accumulating the transmission time to obtain T, and calculating B as S/T as the current bandwidth;

if said C ismaxIf the value is less than the set value C, accumulating the queue QoThe total data size S is obtained from the data size in the queue, and a queue Q is accumulatedoThe total transmission time T is obtained from the transmission time in (1), and B ═ S/T is calculated as the current bandwidth.

11. The device of claim 10, wherein the bandwidth calculation module is specifically configured to:

taking the N1 queue elements at 1/4 and the N2 queue elements at 3/4 of the sorting result, the N1+ N2 queue elements form a stable region of the transmission rate.

12. The device of claim 10, wherein the bandwidth calculation module is specifically configured to:

calculating PbTo PeMiddle position P of the regionm=(Pe–Pb) /2 if PmRounding it up or down if not an integer;

based on PbTo PeSequencing result of region, traverse queue QfIn the slave PbTo Pm-10 queue elements, calculating the variance of the transmission time of each queue element and the transmission time of the following 9 data, obtaining a group of queue elements with the smallest variance;

based on PbTo PeSequencing result of region, traverse queue QfIn the slave Pm+1 to Pe-10 queue elements, calculating the variance of the transmission time of each queue element and the transmission time of the following 9 data, obtaining a group of queue elements with the smallest variance;

the two sets of queue elements obtained constitute a stable region of transmission rate.

Technical Field

The present application relates to the field of computer application technologies, and in particular, to a bandwidth measurement method and device applied to DASH low-delay live streaming.

Background

Currently, dynamic adaptive transport streaming over hypertext transfer protocol (HTTP) (DASH) has been widely used. Thanks to the feature of downloading and playing, DASH is also widely used in the field of live streaming, and the demand for low delay follows. One approach to meeting this requirement is block coded transmission (Chunked Transfer Encoding) using HTTP. How to accurately measure the bandwidth in the playing process of the DASH low-delay live streaming based on HTTP chunked encoding transmission is a difficult problem.

Currently, there are related technologies in the art that can solve the above problems, namely ACTE: adaptive double Streaming (ABR) for rounded transferred Encoding, see specifically https:// doi.org/10.1145/3304112.3325611, Bandwidth prediction for low-latency packetized streams (Bandwidth prediction in low-latency rounded Streaming). The technique calculates the transmission rate of each chunk and the average rate of segment downloads, discards (i.e., filters) the rate of the chunk when the transmission rate of the chunk is 80% to 120% of the average rate of segment downloads, and then calculates the current bandwidth according to the filtered chunk rate.

The inventor of the present application finds that the prior ACTE has the following technical problems in the process of implementing the present application:

a. each calculation is carried out after the whole segment downloading is finished, and when the segment downloading time is longer, the real-time performance of bandwidth measurement is influenced.

b. The algorithm directly uses the transmission rate of the chunk, and does not consider the situation that the transmission rate of the chunk is too large or too small due to network fluctuation or server performance influence in actual network transmission.

c. The algorithm uses a simple filtering method, and cannot well estimate the bandwidth value close to the average speed of segment downloading.

d. The algorithm directly accumulates a plurality of bandwidth values and then divides by the number of bandwidth values, namely: the accuracy of the average bandwidth is not ideal.

Disclosure of Invention

The application aims to provide a bandwidth measurement method and device applied to DASH low-delay live streaming so as to improve the accuracy of DASH low-delay live streaming bandwidth measurement.

The application discloses a bandwidth measurement method applied to DASH low-delay live streaming, which executes the following operations when a client receives a current data packet:

filtering the data packets sent in an unsaturated mode;

in the filtered data packet, a stable region of the data size and the transmission rate is found, and the current bandwidth is calculated based on the data size and the stable region of the transmission rate.

The application also discloses a bandwidth measurement device applied to DASH low-delay live streaming, including:

the filtering module is used for filtering the data packets which are not sent in a saturation mode when the current data packets are received;

and the bandwidth calculating module is used for searching a stable area of the data size and the transmission rate in the filtered data packet and calculating the current bandwidth based on the data size and the stable area of the transmission rate.

As can be seen from the above technical solutions, according to the technical solution for measuring bandwidth applied to DASH low-delay live streaming, when a client receives a data packet, the client first filters the data packet sent in an unsaturated manner; and then, in the filtered data packet, searching for a stable area of the data size and the transmission rate, and calculating the current bandwidth based on the stable area of the data size and the transmission rate, so that the influence of a large amount of data fragments and network fluctuation or instable instantaneous transmission rate caused by server performance can be effectively avoided, the defects of the conventional bandwidth calculation method are overcome, and the accuracy of measuring the bandwidth of the DASH low-delay live streaming is improved. The improvement of the bandwidth measurement accuracy is beneficial to selecting accurate resolution ratio when the DASH live stream is played, and further the watching experience of a user is improved.

Drawings

Fig. 1 is a schematic diagram of a bandwidth measurement method applied to DASH low-delay live streaming in the present application;

FIG. 2 is a flow chart illustrating a preferred embodiment of the present invention for filtering understandably transmitted packets from received packets;

FIG. 3 is a schematic flow chart illustrating a preferred embodiment of the present invention for finding stable areas of data size and transmission rate in a pre-filtered data packet and calculating the current bandwidth;

fig. 4 is a schematic structural diagram of a bandwidth measurement device applied to a DASH low-delay live stream;

fig. 5 is a schematic view of a third scenario in the present application;

fig. 6 to 8 show that the technical scheme of the present application is compared with the bandwidth measurement result in the prior art under different live stream bit rates and network bandwidth conditions.

Detailed Description

In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is further described in detail below by referring to the accompanying drawings and examples.

The technical scheme is that unsaturated data packets are filtered, and a stable area of saturated data packets is searched for to calculate the bandwidth. The stable region includes a stable region of a data size of the data packet and a stable region of a transmission rate. The technical scheme provided by the application can effectively avoid the influence of instable instantaneous transmission rate caused by a large amount of data fragments and network fluctuation or server performance, and overcome the defects of the conventional bandwidth calculation method, thereby improving the accuracy of DASH low-delay live streaming bandwidth measurement. The improvement of the bandwidth measurement accuracy is beneficial to selecting accurate resolution ratio when the DASH live stream is played, and further the watching experience of a user is improved.

In view of the problems of the existing ATCE algorithm, the present application provides a bandwidth measurement method applied to a DASH low-delay live stream based on the characteristic that an HTTP chunk encodes and transmits the DASH low-delay live stream, the method is applied to a client, a flowchart of the method is shown in fig. 1, and after receiving a data packet, the client performs the following operations:

step 1: and preliminarily filtering unsaturated transmission of the server side from the received data packet. In other words, partially unsaturated transmitted data packets, i.e. received data fragments, are filtered out;

step 2: and searching a stable region of the data size and the transmission rate in the data packet after the preliminary filtering, and calculating the bandwidth based on the stable region of the data size and the transmission rate.

The above steps will be described in detail with reference to the accompanying drawings.

Step1 shown in fig. 1 is that the client filters out partially unsaturated transmitted data packets from received data packets, and its main principle is as follows: and calculating the average value of the data size of the received data packet within the set time, and filtering the data packet if the data size of the currently received data packet is smaller than or equal to the average value of the data size. The present application provides a preferred flow for implementing the step, and the flow chart is shown in fig. 2, and includes the following steps:

step 1.1: calculating the transmission time of the data packet, namely: the time taken for the packet network to transmit.

Step 1.2: the data size and transmission time of the data packet are inserted into the bidirectional queue Q as a queue elementoThe tail of (2).

Step 1.3: if inserted into queue QoThe time of the queue element at the head is more than a set time T from the current timeoThen indicate queue QoThe duration of the accumulated queue element is longer than the set time ToAt this time, some old queue elements should be discarded, i.e., the queue element at the head of the queue is discarded, and step1.4 is performed; otherwise, step 1.5 is performed directly.

Step 1.4: delete queue QoA queue element at the head.

Step 1.5: compute queue QoMedium data sizeAverage value: savg=StotalAnd/count. Wherein S istotalIs queue QoThe total number of data sizes in, i.e. the total data size, count is queue QoNumber of middle queue elements.

Step 1.6, if the data size of the data packet in step1.1 is larger than the queue QoMean value of median data size SavgThen step 1.7 is executed to insert the data size and transmission time of the data packet as a queue element into the bidirectional queue QfThe tail of (2). Similar to step1.3, if queue Q is insertedfThe time of the queue element at the head is longer than a certain set time length T from the current timefThen indicate queue QfThe time length of the medium accumulation queue element is longer than the set time length TfAt this point, the queue element at the head of the queue should be discarded, i.e., queue Q is deletedfA queue element at the head.

Through the steps 1.1 to 1.6, the client can judge whether the received data packet is the data packet which is sent in an unsaturated way, and the data size and the transmission time information of the data packet which is sent in an unsaturated way cannot enter the queue QfThus, queue QfThe data packets which are sent in an unsaturated way are filtered from the buffered data packets.

In step2 shown in fig. 1, the client finds a stable region of the data size and a stable region of the transmission rate in the preliminarily filtered data packet, and calculates the current bandwidth based on the data size and the stable region of the transmission rate. The flow chart of this step is shown in fig. 3, and includes the following steps:

step 2.1: pair queue QfSorting by data size.

Step 2.2: traversing the sorted queue QfAcquiring a group of queue elements with the same data size and the maximum number, and recording the group of queue elements in QfPosition (2): starting position PbEnd position PeAnd the number of elements Cmax

Step 2.3: if C is presentmaxGreater than or equal to a set value C indicating the set of queue elements foundThe elements constitute a stable region of data size, on the basis of which the bandwidth can be calculated, step2.4 is performed; otherwise, if CmaxIf the value is less than the preset value C, step2.7 is executed.

Step 2.4: pair queue QfMiddle PbTo PeThe queue elements in the region are ordered by the size of the transmission time.

Step 2.5: and acquiring a stable region of the transmission rate based on the sequencing result of the step 2.4.

The transmission time reflects the transmission rate, and the present application provides the following two preferable methods for obtaining the stable region of the transmission rate based on the sorting result of step 2.4:

the first method comprises the following steps: and (5) simple calculation. For example, several queue elements at 1/4 and 3/4 that directly take the sorted results constitute a stable region of the transmission rate.

Here, 1/4 and 3/4 are more reasonable positions analyzed by experiments.

The initial and final positions may have too high or too low an impact value, and should be removed;

a sudden change in bandwidth at the middle 1/2 may occur, which is not suitable for calculation;

1/4 and 3/4 are two regions where the bandwidth rate is relatively stable, and using these values can make the bandwidth measurement more accurate.

The second method comprises the following steps: and (4) performing complex calculation, and acquiring a stable region of the transmission rate by calculating the variance value.

The specific method comprises the following steps:

1) calculating PbTo PeMiddle position P of the regionm=(Pe–Pb) /2 if PmInstead of being an integer, rounding may be up or down.

2) P based on step2.4bTo PeSequencing result of region, traverse queue QfIn the slave PbTo Pm-10 queue elements, calculating the variance of the transmission time of each queue element and the transmission time of the next 9 data, and obtaining a group of queue elements with the minimum variance.

3) P based on step2.4bTo PeSequencing result of region, traverse queue QfIn the slave Pm+1 to Pe-10 queue elements, calculating the variance of the transmission time of each queue element and the transmission time of the next 9 data, and obtaining a group of queue elements with the minimum variance.

And the two groups of queue elements obtained in the step 2) and the step 3) form a stable region of the transmission rate.

Step 2.6: and based on the stable region of the transmission rate obtained in the step2.5, accumulating the data size to obtain S, accumulating the transmission time to obtain T, returning to the state that B is S/T as the current bandwidth, and ending the current flow.

Step 2.7: using queue QoAnd calculating the bandwidth.

In particular, the accumulation queue QoThe total data size S is obtained from the data size in the queue, and a queue Q is accumulatedoThe total transmission time T is obtained from the transmission time in (1), and B ═ S/T is calculated as the current bandwidth.

This concludes the current flow.

Corresponding to the foregoing method, the present application further discloses a device, and fig. 4 is a schematic diagram of a composition structure of a bandwidth measurement device applied to a DASH low-delay live stream, where the device includes a filtering module and a bandwidth calculating module, where:

the filtering module is used for filtering the data packets which are not sent in a saturation mode when the current data packets are received;

and the bandwidth calculating module is used for searching a stable area of the data size and the transmission rate in the filtered data packet and calculating the current bandwidth based on the data size and the stable area of the transmission rate.

Preferably, the filter module is specifically configured to:

calculating the set time ToAnd if the data size of the current data packet is smaller than or equal to the data size average value, filtering the current data packet.

Specifically, the filtering module is configured to perform the following operations:

calculating the transmission time of the current data packet;

inserting the data size and transmission time of the current data packet into a bidirectional queue QoThe tail of (a);

if inserted into queue QoIf the time distance between the queue element at the head and the current time is greater than the set time To, deleting the queue QoA queue element of the head;

calculate the queue QoAverage of median data size;

if the data size of the current data packet is larger than the average value of the data sizes, inserting the data size and the transmission time of the current data packet into a bidirectional queue QfThe tail of (2).

Preferably, the bandwidth calculating module is specifically configured to perform the following operations:

for the queue QfSorting according to the data size;

traversing the sorted queue QfAcquiring a group of queue elements with the same data size and the maximum number, and recording the queue elements in a queue QfPosition (2): starting position PbEnd position PeAnd the number of elements Cmax

If said C ismaxIf the value is greater than or equal to the set value C, the queue Q is alignedfMiddle PbTo PeSequencing queue elements in the region according to the transmission time, acquiring a stable region of the transmission rate based on a sequencing result, accumulating the data size of the stable region of the transmission rate to obtain S, accumulating the transmission time to obtain T, and calculating B as S/T as the current bandwidth;

if said C ismaxIf the value is less than the set value C, accumulating the queue QoThe total data size S is obtained from the data size in the queue, and a queue Q is accumulatedoThe total transmission time T is obtained from the transmission time in (1), and B ═ S/T is calculated as the current bandwidth.

When obtaining the stable region of the transmission rate based on the sorting result, the bandwidth calculating module is specifically configured to:

taking N1 queue elements at 1/4 and N2 queue elements at 3/4 of the sorting result, and forming a stable region of the transmission rate by the N1+ N2 queue elements;

or, calculating the variance value of the transmission time based on the sequencing result, and acquiring the stable region of the transmission rate.

The following three preferred embodiments are provided to illustrate the specific implementation of the technical solution of the present application.

The first embodiment is as follows:

in this embodiment, it is assumed that http chunked encoded transmission is used for a DASH live stream, and a scheme for measuring the bandwidth is as follows:

step1, the client receives the data packet, and filters out the partially unsaturated data packet sent, specifically including the following steps 1.1 to 1.4:

step1.1, calculating the time spent by the network transmission of the data packet, wherein the calculation method comprises the following steps:

a. if the data is received for the first time after the request is sent, the transmission time is as follows: time T of currently received data packetnowTime T of requesting databegin

b. If it is not the first packet data (i.e. it does not belong to the case a above), the transmission time is: time T of currently received datanowTime T of last data receptionprevious

Step1.2, buffering data size of data packet in Step1.1 and generated transmission time information to bidirectional queue QoTail, if QoIf the accumulated time is more than a certain time, such as 1.5s, the data at the head of the queue is popped.

Step1.3, calculation queue QoAverage value of medium data size: savg=StotalAnd/count. Wherein S istotalIs queue QoIs the queue QoNumber of middle queue elements.

Step1.4, if the data size of the data packet in Step1.1 is larger than the average value S of the data sizes generated in Step1.3avgThen buffer the data size and transmission time information of the data packet to the bidirectional queue QfTail, if queueQfIf the time of accumulating queue elements is more than a certain time, such as 1.5s, the queue Q is poppedfData of the header.

Step2, queue Q generated from Step1 in the bandwidth calculation threadfSpecifically, the following Step2.1 to Step2.6 were included. The loop call interval may be set to 250ms,500ms, as the case may be.

Step2.1, queue Q generated for Step1.4fSorting by data size.

Step2.2, traversing the queue Q sorted by step2.1fAcquiring a group of queue elements with the same data size and the maximum number, and recording the queue elements in a queue QfPosition (2): starting position Pb,PeAnd the number of elements Cmax

Step2.3, if C obtained in Step2.2maxIf the number is less than 30, the queue Q generated in Step1.2 is usedoCalculating the bandwidth: accumulation queue QoThe data size in (1) is S, and the queue Q is accumulatedoThe transmission time information in the step (1) obtains T, and returns B to S/T as the current bandwidth; if C is presentmaxIf the ratio is more than or equal to 30, the process continues to step 2.4.

Step2.4, P produced for Step2.2bTo PeThe data in the region is sorted by the size of the transmission time.

Step2.5, P produced in Step2.4bTo PeIn the sorting result of the region, three queue elements near 1/4 and three queue elements near 3/4 are taken.

And step2.6, accumulating the data size of 6 queue elements taken by step2.5 to obtain S, accumulating the time information of S to obtain T, and returning B to be S/T as the current bandwidth.

Example two:

in this embodiment, it is assumed that http chunked encoded transmission is used for a DASH live stream, and a scheme for measuring the bandwidth is as follows:

step1, the client receives the data packet, and filters out the partially unsaturated data packet sent, specifically including the following steps 1.1 to 1.4:

step1.1, calculating the time spent by the data network transmission, wherein the calculation method comprises the following steps:

a. if the data is received for the first time after the request is sent, the transmission time is as follows: time T of currently received data packetnowTime T of requesting databegin

b. If the data is not the first packet data, the transmission time is as follows: time T of currently received datanowTime T of last data receptionprevious

Step1.2, buffering data size of data packet in Step1.1 and generated transmission time information to bidirectional queue QoTail, if QoIf the accumulated time is more than a certain time, such as 1.5s, the data at the head of the queue is popped.

Step1.3, calculation queue QoAverage value of medium data size: savg=StotalAnd/count. Wherein S istotalIs the total data size in the queue Qo, and count is the number of queue elements in the queue Qo.

Step1.4, if the data size of the data packet in Step1.1 is larger than the average value S of the data sizes generated in Step1.3avgThen buffer the data size and transmission time information of the data packet to the bidirectional queue QfTail, if queue QfIf the time of accumulating queue elements is more than a certain time, such as 1.5s, the queue Q is poppedfData of the header.

Step2, queue Q generated from Step1 in the bandwidth calculation threadfSpecifically, the following Step2.1 to Step2.6 were included. The loop call interval may be set to 250ms,500ms, as the case may be.

Step2.1, Q generated for Step1.4fSorting by data size.

Step2.2, traversing the queue Q sorted by step2.1fAcquiring a group of queue elements with the same data size and the maximum number, and recording the queue elements in a queue QfPosition (2): starting position Pb,PeAnd the number of elements Cmax

Step2.3, if C obtained in Step2.2maxIf the number is less than 30, the queue Q generated in Step1.2 is usedoCalculating the bandwidth: accumulation queue QoThe data size in the queue is S, the transmission time information in the queue Qo is accumulated to obtain T, and B is returned to be S/T as the current bandwidth; if C is presentmaxIf the ratio is more than or equal to 30, the process continues to step 2.4.

Step2.4, P produced for Step2.2bTo PeThe data in the region is sorted by the size of the transmission time.

Step2.5, P produced in Step2.4bTo PeIn the region, P is calculatedbTo PeMiddle position P of the regionm=(Pe–Pb) /2 if PmAnd if not, rounding down.

Step2.6, P based on Step2.4bTo PeSequencing result of region, traverse queue QfIn the slave PbTo Pm-10 queue elements, calculating the variance of the transmission time of each queue element and the transmission time of the next 9 data, and obtaining a group of queue elements with the minimum variance.

Step2.7, P based on Step2.4bTo PeSequencing result of region, traverse queue QfIn the slave Pm+1 to Pe-10 queue elements, calculating the variance of the transmission time of each queue element and the transmission time of the next 9 data, and obtaining a group of queue elements with the minimum variance.

And step2.8, accumulating the data size of two groups of queue elements generated by step2.6 and step2.8 to obtain S, accumulating the time information of the S to obtain T, and returning B to be S/T as the current bandwidth time.

Example three:

accurate measurement of bandwidth helps to select resolution-matched video streams for playback:

the high-resolution video stream is selected to be played in high bandwidth, so that the video quality can be improved on the premise of keeping smooth playing;

and the low-resolution video stream is selected to be played in low bandwidth, so that smooth playing of the video in low bandwidth can be ensured.

The embodiment shows the significance of the technical scheme provided by the application in a real scene through complete scene description. Fig. 5 is a scene diagram of a third embodiment of the present application, which is shown in fig. 5:

step1, recording a football game by a camera, encoding the football game into a DASH Live stream, and storing the DASH Live stream on a DASH Live Server (DASH Live Server), wherein the DASH Live stream comprises three code rates and three resolutions: 8Mbps/UHD, 5Mbps/FHD, 1 Mbps/HD.

And Step2, the client TV requests the DASH live broadcast server to play the live broadcast stream, and the DASH live broadcast server transmits the DASH media file in an HTTP chunk coding transmission mode.

And Step 3, during initial playing, because the bandwidth size is not clear, in order to ensure that the video playing is smooth, the video stream with low code rate is transmitted at 1Mbps/HD, the video resolution is lower, and the user experience is poorer.

Step 4, the client TV uses the technical scheme provided by the application to calculate the bandwidth, and the current bandwidth value is about 10 Mbps.

Step 5, the client TV requests the DASH live broadcast server for the high-bit-rate video stream.

Step 6, DASH live broadcast server transmits 8Mbps/UHD video stream to client TV, the video stream is played smoothly and has high resolution, and user experience is improved.

If the prior art is used, the calculated bandwidth is approximately equal to the code rate of a video stream 1Mbps, a client TV cannot request a video with higher resolution, and at the moment, a user can only watch a HD live stream, so that the experience is poor.

Fig. 6 to 8 show that, under different live stream code rates and network bandwidths, the bandwidth measurement result of the present application is compared with that of the prior art, and the comparison shows that the present application has an obvious performance improvement compared with the prior bandwidth measurement method. Wherein:

dark lines indicate: the existing measurement method directly obtains a bandwidth value through data size/transmission time;

the light line indicates: the bandwidth value obtained by calculation by applying the technical scheme of the application.

In fig. 6, the bit rate of the live stream is: 1500kbps, network bandwidth: 800 kbps.

The measurement result of the existing measurement method is about 700kbps, and the measurement result of the scheme of the application is about 750 kbps. The measurement results of the two are not much different, but the scheme of the application is closer to the actual network bandwidth.

In fig. 7, the bit rate of the live stream is: 2000kbps, network bandwidth: 5000 kbps.

The measurement result of the existing measurement method is about 2000kbps, which is close to the code rate of the live stream, and the network bandwidth can not be accurately measured; and the measurement result of the scheme of the application is 4700kbps, which is close to the actual network bandwidth.

In fig. 8, the bit rate of the live stream is: 1000kbps, network bandwidth: cycling from 200kbps to 8 Mbps.

The maximum bandwidth measured by the existing measuring method is about 3Mbps, and the maximum network bandwidth cannot be accurately measured; the maximum bandwidth obtained by the scheme of the application is about 8Mbps and is close to the actual maximum bandwidth value.

The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:流媒体点播方法和系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类