Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a video code rate identification method, a video playing index estimation method and a video playing index estimation device for an encrypted video.
In order to achieve the above purpose, the technical scheme adopted by the invention is as follows:
The technical scheme is as follows:
a video code rate identification method for encrypted video comprises the following steps of
Aggregating the captured video transmission data packets based on the three granularities of the Request granularity, the Extremum granularity and the time window granularity, and judging a downloading mode;
Aiming at the downloading mode, estimating the video code rate in a time window to obtain a reference code rate R B of the video;
further, the method for aggregating the grabbed video transmission data packets based on the Request granularity, extremum granularity and the time window granularity comprises the following steps:
s21, aggregation and statistics of Request granularity data packets are carried out
S22, extremum granularity data packet aggregation and statistics
S23, identifying a downloading mode.
Further, in S21, the specific method for aggregation and statistics of the Request granularity data packet is as follows:
Counting the grabbed video transmission data packets, defining two uplink downloading Request data packets and a downlink data packet in the period of the two uplink downloading Request data packets as a Request counting granularity, and acquiring counting characteristics of the Request granularity;
In S22, the Extremum granularity packet aggregation and statistics method is as follows:
S221, identifying the minimum value of the Request;
S222, carrying out Extremum granularity polymerization on the basis of the Request granularity;
In S23, the method of identifying the download mode is;
s231, identifying a valid Request;
S232, accumulating a section of video data which meets the requirement that the total time length of the effective requests is greater than or equal to 3×T 0 seconds to form a set R, and calculating the download time duty ratio R d in the set R and the duty ratio R s of the effective requests with the time length of the requests being greater than T 0;
S233, judging a downloading mode based on a downloading time duty ratio r d and a duty ratio r s of an effective Request with the time length of the Request being longer than T 0;
where T 0 is the video block duration.
Further, in S231, the minimum value of the Request needs to satisfy the following conditions:
1) The download data volume of the Request is smaller than that of the previous Request;
2) The downloaded data volume of the Request is smaller than the downloaded data volume of the subsequent Request;
3) The downloaded data amount of the Request is less than 250kB.
Further, in S222, extremum granularity aggregation is performed by defining all requests between two Request minima as one Extremum granularity and obtaining a statistical feature of Extremum granularity.
Further, the statistical features of Extremum granularity include:
1) Initiating an extremum Request;
2) Terminating the extremum Request;
3) The Request sequence List < Request > from start to end;
4) Total amount of Request download data in Extremum granularity.
Further, in S231, the valid Request satisfies the following conditions at the same time:
1) The amount of data downloaded by the Request is more than 10kB;
2) The non-downloading time length of the Request is less than T 0/2;
where T 0 is the video block duration.
Further, the statistical features of the Request granularity include:
1) A start Request timestamp t start;
2) Terminating the Request timestamp t end;
3) Download completion timestamp t download_over in Request;
4) The amount of download data in the Request.
Further, in S232, the calculation formula of the download time duty cycle r d is as follows: wherein R is a set of valid requests;
the calculation formula of the duty ratio r s of the effective Request with the Request time length larger than T 0 is as follows:
wherein, The number of valid requests with the Request time length being longer than T 0 in the set R;
the total number of valid requests in set R.
Further, in S233, based on the download time duty ratio r d and the duty ratio r s of the effective Request with the Request time longer than T 0, the method for determining the download mode is as follows:
Firstly, judging the downloading time duty ratio r d, and judging a smooth downloading mode when r d is smaller than a threshold th 1;
When r d is more than or equal to a threshold th 1, judging a ratio r s of the Request time length to be larger than T 0, and when r s is less than the threshold th 2, judging a balanced downloading mode;
And when r s is more than or equal to a threshold th 2, judging that the mode is a cartoon downloading mode.
Further, the method for aggregating the grabbed video transmission data packets based on the Request granularity, extremum granularity and the time window granularity further comprises the step of S24, aggregating and counting the data packets with the time window granularity.
Further, in S24, the method for aggregation and statistics of the time window granularity data packet is as follows:
s241, identifying valid Extremum;
s242, polymerizing the time window granularity on the basis of Extremum granularity;
Further, in S241, the requirement of the effective Extremum satisfies the following conditions:
1) Extremum the total amount of downloaded data is more than 250kB;
2) When a chunking download mode or a balanced download mode has been determined, the Extremum download time duty cycle should be greater than 0.8.
Further, in S242, the length of the aggregation time window is smaller than the smaller value of th n valid Extremum time lengths and the time length threshold th t.
Further, for the download mode, the method for estimating the video code rate in the time window comprises the following steps:
1) When the downloading mode is a periodic downloading mode, the real-time code rate estimation is carried out by adopting a real-time code rate estimation method under the periodic downloading mode, wherein the periodic downloading mode comprises a smooth downloading mode and a cartoon downloading mode.
2) When the downloading mode is the non-periodic downloading mode, firstly, calculating the size variation coefficients c v of all valid requests in the time window;
wherein sigma is the standard deviation of the size of the Request, and mu is the average value of the size of the Request;
Then, setting a threshold th cv, when c v>thcv, estimating the code rate by using a real-time code rate estimation method in a periodic download mode, and when c v≤thcv, continuously estimating the real-time code rate by using a real-time code rate estimation method in an aperiodic download mode;
The aperiodic download mode includes a balanced download mode.
Further, the real-time code rate estimation method in the period downloading mode is that the real-time code rate is estimated based on Extremum granularity in a time window.
Further, the real-time code rate estimation method in the period downloading mode specifically comprises the steps of in the period downloading mode, calculating the data size of all effective Extremum in a time window, taking the median of the effective Extremum as a reference value V 0 of the video segment size, and calculating the reference code rate R B=V0/T0 in the time window;
where T 0 is the video block duration.
Further, the real-time code rate estimation method in the non-periodic downloading mode is that the real-time code rate is estimated based on the Request granularity in a time window.
Further, calculating the data size of all effective requests in a time window, taking the median of the effective requests as a reference value V 0 of the video clip size, and a reference code rate R B=V0/T0 in the time window;
where T 0 is the video block duration.
Further, the method for obtaining the video block duration T 0 includes the steps of observing captured video transmission data, determining the size of an audio block and a preset audio sampling rate, estimating the video block duration, setting the size of the audio block to be H, and setting the audio sampling rate to be M, wherein the video block duration T 0 =h/M, and H/M is an integer.
The second technical scheme is as follows:
a method for estimating encrypted video playing index includes
The captured video transmission data packet is subjected to statistics to generate an actual downloading integral curve;
Identifying the video code rate by adopting the video code rate identification method of the encrypted video;
generating a theoretical play integral curve;
Estimating an actual playing integral curve;
various video playing indexes are calculated.
The method comprises the steps of accumulating the sizes of data packets which are downloaded before each time point in time sequence, and drawing by taking the downloading time as an abscissa and the total amount of the sizes of the data packets which are downloaded before each time point as an ordinate to form a downloaded data amount integrating curve.
Further, the drawing method of the theoretical playing integral curve comprises the following steps:
s41, assuming that video is played without any clip, in a time window, drawing by taking video playing time as an abscissa and taking a reference code rate in the time window as a slope to form a theoretical playing integral curve, wherein the ordinate is the total number of data amounts accumulated and played until the current video playing time;
s42, connecting the theoretical playing integral curves of each time window drawn in the S41 in time sequence to form a theoretical playing integral curve of the whole video.
Further, the estimation of the actual playing integral curve is performed based on the theoretical playing integral curve and the downloaded integral curve.
Further, the method for estimating the actual playing integral curve comprises the following steps:
S51, setting a buffer time length t buf parameter,
S52, moving the theoretical playing curve to the right, placing the theoretical playing curve under the actual downloading integral curve, and ensuring that the downloading curve is larger than the playing curve by the video data amount corresponding to the buffer time t buf at the time point of initial playing and katon recovery, so that the actual playing integral curve can be obtained.
Further, the video playing index includes video duration, initial buffer duration, a pause time point, a pause recovery time point and a pause duration.
Further, the calculation of the video playing index is performed based on an actual playing curve.
Further, 1) video duration, i.e., the theoretical playback curve end time point;
2) The initial buffer time length is the time point of the video data volume of the first download time length t buf on the actual playing curve;
3) A cartoon time point, namely a time point corresponding to an intersection point of an actual playing curve and an actual downloading curve, namely an actual downloading data amount = actual playing data amount time point;
4) A stuck recovery time point, namely a time point of downloading the video data amount with the time length t buf after being stuck on an actual playing curve;
5) The blocking duration is obtained from the blocking recovery time point of the time and the blocking time point of the time.
The technical scheme is as follows:
A video code rate recognition device for encrypted video comprises
The data packet aggregation and statistics module is used for aggregating the grabbed video transmission data packets based on the three granularities of the Request granularity, the Extremum granularity and the time window granularity, and judging a downloading mode;
And the video code rate estimation module is used for estimating the video code rate of videos in different downloading modes in a time window.
Further, the data packet aggregation and statistics module is used for aggregating and counting the data packets with the Request granularity, aggregating and counting the data packets with the Extremum granularity, identifying a downloading mode, and aggregating and counting the data packets with the time window granularity.
Further, the video code rate estimation module is used for estimating the real-time code rate based on Extremum granularity in a periodic downloading mode and estimating the real-time code rate based on Request granularity in an aperiodic downloading mode.
The technical scheme is as follows:
an encrypted video playing index estimation device comprises
The download integral curve generating module is used for generating an actual download integral curve by counting the grabbed video transmission data packets;
The video code rate recognition device of the encrypted video as described above;
The theoretical playing integral curve generating module is used for generating a theoretical playing integral curve according to the estimated video code rate in the time window;
And the video playing index estimation module is used for estimating the actual playing integral curve based on the actual downloading integral curve and the theoretical playing integral curve and calculating the video playing index.
Compared with the prior art, the invention has the beneficial effects that:
According to the invention, for video transmission data packet capturing, an actual downloading integral curve is generated by statistics of the captured data packets, the captured data packets are aggregated based on three granularities of Request granularity, extremum granularity and time window granularity, the video code rate is estimated in the time window, a theoretical playing integral curve is generated, and finally the actual playing integral curve and various video playing indexes are estimated; the method and the device can accurately identify the normal play or the occurrence of the jamming of the video for the encrypted video, accurately estimate the real-time code rate of the video, and estimate various jamming indexes including video duration, initial buffer duration, jamming time point, jamming recovery time point, jamming duration and the like.
Detailed Description
The following description of the embodiments of the present invention will be made apparent and fully in view of the accompanying drawings, in which some, but not all embodiments of the invention are shown. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. are based on the directions or positional relationships shown in the drawings, are merely for convenience of describing the present invention and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present invention, unless explicitly stated or limited otherwise, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally connected, mechanically connected, electrically connected, directly connected, indirectly connected via an intervening medium, or in communication between two elements. The specific meaning of the above terms in the present invention will be understood in specific cases by those of ordinary skill in the art.
The present invention will be described in further detail with reference to the accompanying drawings.
An embodiment of a video playback index estimation method according to the present invention as shown in fig. 1, 3,7, 8 includes
S1, generating an actual download integral curve by statistics of captured video transmission data packets;
The sizes of the data packets which are downloaded before each time point are accumulated in time sequence, and the downloading time is plotted by taking the total size (unit: bytes) of the data packets which are downloaded before each time point as an ordinate, and a downloaded data amount integrating curve is formed as shown in fig. 2. In the figure, the slope of the tangent to each point represents the real-time rate of the current time data download.
S2, aggregating the captured video transmission data packets based on three granularities, namely a Request granularity, a Extremum granularity and a time window granularity, and judging a downloading mode;
s21, aggregation and statistics of Request granularity data packets are carried out
Specifically, the terminal applies for downloading the video clip and needs to send a downloading request in an uplink mode, then the video data is transmitted in a downlink mode, and after the video transmission is completed, the next video clip is downloaded in the uplink sending request. Counting the grabbed video transmission data packets, defining the data packets of the two uplink downloading requests and the downlink data packets during the data packets of the two uplink downloading requests as a Request counting granularity, and acquiring counting characteristics of the Request granularity;
The statistical features of the Request granularity include:
1) A start Request timestamp t start;
2) Terminating the Request timestamp t end;
3) Download completion timestamp t download_over in Request;
4) The amount of download data (bytes) in the Request;
Wherein the ending Request timestamp t end is the starting Request timestamp t start of the next Request granularity;
s22, extremum granularity data packet aggregation and statistics
S221, identifying the minimum value of the Request,
The minimum value of the Request needs to simultaneously meet the following conditions:
1) The Request is smaller than the previous Request;
2) The Request is smaller than the latter Request;
3) The Request is less than 250kB (about 144P video 10s video size).
S222, carrying out Extremum granularity polymerization on the basis of the Request granularity;
the sizes of the requests show a periodic variation rule, extremum granularity aggregation is that all requests between two minimum values of the requests are defined as one Extremum granularity on the basis of the granularity of the requests, and statistical characteristics of Extremum granularity are obtained;
The statistical features of Extremum granularity include:
1) Initiating an extremum Request;
2) Terminating the extremum Request;
3) The Request sequence List < Request > from start to end;
4) The total amount of data downloaded by the Request (with the starting extremum Request and the ending extremum Request) in Extremum granularity.
To clearly reveal the above statistical features, it is now expressed in terms of a histogram:
Specifically, the captured video transmission data packet is drawn into a histogram of data block downloading according to the statistical characteristics of the Request granularity, as shown in fig. 4-6, wherein each column is a data block and corresponds to the Request, the upper edge of the column is the beginning downloading time of the data block, namely, the beginning Request time stamp t start, the lower edge of the column is the ending downloading time of the data block, namely, the downloading completion time stamp t download_over in the Request, the column width represents the actual downloading time of the data block, and the column height represents the size of the data block, namely, the downloading data amount (bytes) in the Request;
By observing the download histogram of the different video transport data blocks, the encrypted video download mode is defined as 3 classes, namely a fluent download mode, a cartoon download mode and a balanced download mode.
In the smooth downloading mode, video playing is smooth, video and audio transmission is alternately performed in the video transmission process, the size of a Request presents a periodic variation rule, and in fig. 4, the Request is presented as a large data block and a small data block alternate transmission, the size of the data block presents a periodic variation rule, and the period is usually 5s or 10s. Typically, large data blocks are video data blocks and small data blocks are audio data blocks. The downloading duty ratio is very small, the bandwidth can fully meet the video downloading requirement, and the video is smoothly played. 3 requests outlined by box a (solid line box) in fig. 4 are aggregated into one Extremum;
In the churning download mode, the video playing is churning, which is shown in fig. 5, that is, large data blocks and small data blocks are alternately transmitted, the size of the data blocks shows a periodic variation rule (the periodic size is not constant, usually greater than 10s and is related to the bandwidth limitation degree), the audio and the video are transmitted in the large data blocks, and the small data blocks only transmit request messages. The download duty cycle is very large, the bandwidth becomes the bottleneck of video transmission, and video playing is blocked.
In the balanced download mode, as shown in fig. 6, the data block size does not show a significant periodic rule (the data block interval is usually 5s to 10 s), and one data block corresponds to one video block and one audio block of a time slice. The downloading rate is equal to the video playing rate, the downloading duty ratio is large, and the video playing is normal.
S23, identifying a downloading mode.
The download mode identification is based on the statistics of the download data packet of a certain time to determine that the download data packet belongs to one of the three download modes. The downloading mode is determined to at least require that the data accumulation meets the requirement that the effective Request total duration is not less than 3×T 0 seconds, and a set R is formed, wherein T 0 is the video block duration.
S231, a valid Request is identified,
The effective Request satisfies the following conditions simultaneously:
1) The amount of data downloaded by the Request is more than 10kB;
2) The non-downloading time length of the Request is less than T 0/2;
where T 0 is the duration of the video block.
S232, accumulating a section of video data which meets the requirement that the total time length of the effective requests is greater than or equal to 3×T 0 seconds to form a set R, and calculating the download time duty ratio R d in the set R and the duty ratio R s of the effective requests with the time length of the requests being greater than T 0;
1) The downloading time duty ratio R d is the duty ratio of the total time length of effective Request downloading to the total time length of the Request in the set R;
The calculation formula is as follows: wherein R is a set of valid requests;
2) The ratio R s of the effective requests with the time length of the requests being longer than T 0 is the ratio of the number of the effective requests with the time length of the requests being longer than T 0 in the collection R in the total number of the requests in the statistical time;
The calculation formula is as follows:
wherein, The number of valid requests with the Request time length being longer than T 0 in the set R;
for the total number of valid requests in set R,
Wherein T 0 is the video block downloading time length and is a configurable parameter;
The method for acquiring the video block downloading time length T 0 comprises the steps of observing the grabbed video transmission data, determining the size of an audio block and a preset audio sampling rate, estimating the video block downloading time length T 0, setting the size of the audio block as H, and setting the audio sampling rate as M, wherein the video block time length T 0 =H/M, and H/M is an integer.
The method for obtaining the video block download duration T 0 is described in the following by a specific example, from the overall consideration of the video playing index estimation problem, knowing the download data amount, and the video duration must be estimated first when the playing rate is to be found. In the smooth download mode, video blocks and audio blocks can be distinguished, the video block size varies greatly with sharpness, but the sampling rate of audio is usually not very different. The video duration can thus be estimated by the size of the audio block and the preset audio sample rate. Taking a Youtube Android platform as an example, setting an audio sampling rate m=128 kbps=16 kBps, observing from data to find that the size of an audio block is generally about h=161 kB, the video duration is about T 0 =h/m=161/16+.10s, namely t0=10s, and the video block duration is also 10s in a katon downloading mode and a balanced downloading mode, so that the video block duration 10s is used as a precondition of downloading mode judgment and code rate estimation later.
S233, judging the downloading mode based on the downloading time duty ratio r d and the duty ratio r s of the effective Request with the longer Request time than T 0.
The three download modes may be classified using a binary tree based on the two features extracted above, as shown in figure 7,
Firstly, judging the duty ratio rd of the downloading time, and judging a smooth downloading mode when rd is smaller than a threshold th 1;
When r d is more than or equal to a threshold th 1, judging a ratio r s of the Request time length to be larger than T 0, and when r s is less than the threshold th 2, judging a balanced downloading mode;
when r s is more than or equal to a threshold th 2, judging that the card is in a downloading mode;
Wherein th 1 and th 2 are configurable parameters, and usually, th 1=0.8,th2 =0.1 is taken.
S24, aggregation and statistics of the time window granularity data packets.
S241, identification is valid Extremum
The requirement of an effective Extremum satisfies the following conditions at the same time:
1) The total amount of Extremum downloaded data is more than 250kB;
2) The Extremum download time duty cycle should be greater than 0.8 when either the chunking download mode or the balanced download mode has been determined.
Wherein Extremum download time duty cycle refers to the duty cycle of the total duration of Extremum for the duration of download in Extremum.
S242, polymerizing the time window granularity on the basis of Extremum granularity;
The aggregate time window is of length to take the smaller of th n (usually th n =5) valid Extremum time lengths, and the time length threshold th t (usually th t =150)
In order to clearly explain the definition of valid Extremum, the following presents the identification result of valid Extremum according to the three download modes shown in fig. 4-6,
The fluent download mode, as shown in fig. 4, is outlined by box B (dashed box) as a window of time. This time window includes 5 valid Extremum and 1 invalid Extremum (the amount of downloaded data does not satisfy condition 1)
The cartoon download mode, as shown in fig. 5, is outlined by box C (dashed box) as a time window. This time window includes 2 valid Extremum and a plurality of invalid Extremum (condition 1 is not satisfied at box D (solid line circle), and condition 2 is not satisfied at box E (dashed line circle).
The balanced download mode, as shown in fig. 6, has a video download duration of 115m seconds, 2 valid Extremum and 1 invalid Extremum (condition 2 is not satisfied at box F (dashed box), the extremum download time duty cycle should be greater than 0.8), and only 1 time window is shown in fig. 6 in the video download.
S3, aiming at the downloading mode, estimating the video code rate in a time window to obtain a reference code rate R B of the video;
the video download duration T 0 has been estimated in the foregoing, where the foregoing three download modes, i.e., the smooth download mode and the caton download mode may be unified into a periodic download mode, where each period corresponds to one Extremum, and one video block of duration T 0 is downloaded, and the caton download mode corresponds to a non-periodic download mode, and each Request (corresponds to downloading one video block of duration T 0. The periodic and non-periodic download modes employ different play rate estimation methods.
1) When the downloading mode is a periodic downloading mode, the real-time code rate estimation is carried out by adopting a real-time code rate estimation method under the periodic downloading mode, wherein the periodic downloading mode comprises a smooth downloading mode and a cartoon downloading mode.
The real-time code rate estimation method in the period downloading mode comprises estimating the real-time code rate based on Extremum granularity in a time window;
Specifically, in the period downloading mode, a plurality of effective Extremum are arranged in a time window, the data size of all effective Extremum in the time window is calculated, the median of the size of the effective Extremum is taken as a reference value V 0 of the video clip size, the video duration is also taken as T 0, the same as the video block duration, and the reference code rate R B=V0/T0 in the time window;
The method for obtaining the size median of the valid Extremum includes that in all valid Extremum, valid Extremum is ordered according to data size, when the number of valid Extremum is odd, the size median of the valid Extremum is the data size value of valid Extremum at the most middle position, and when the number of valid Extremum is even, the size median of the valid Extremum is the average value of the data size values of 2 valid Extremum at the most middle position.
2) When the downloading mode is the non-periodic downloading mode, firstly, calculating the size variation coefficient c v of all effective requests in the time window, wherein the variation coefficient represents the degree of data dispersion, and the larger the variation coefficient is, the more the representative data dispersion is.
Wherein sigma is the standard deviation of the size of the Request, and mu is the average value of the size of the Request;
Then, setting a threshold th cv (usually taking th cv =0.5), and when c v>thcv, estimating the code rate by using a real-time code rate estimation method in a periodic download mode, and when c v≤thcv, continuously estimating the real-time code rate by using a real-time code rate estimation method in an aperiodic download mode;
The aperiodic download mode includes a balanced download mode.
The real-time code rate estimation method under the non-periodic downloading mode comprises estimating the real-time code rate based on the Request granularity in a time window;
specifically, the data size of all effective requests in a time window is calculated, and the median of the effective requests is taken as a reference value V 0 of the video clip size in all the effective requests, wherein the video duration is also taken as T 0, the same as the video block duration and the reference code rate R B=V0/T0 in the time window;
the method for obtaining the size median of the effective requests comprises the steps of sequencing the effective requests according to the data size in all the effective requests, wherein the size median of the effective requests is the data size value of the effective requests at the most middle position when the number of the effective requests is odd, and the size median of the effective requests is the average value of the data size values of the 2 effective requests at the most middle position when the number of the effective requests is even.
S4, generating a theoretical playing integral curve;
s41, assuming that video is played without any clip, in a time window, drawing by taking video playing time as an abscissa and taking a reference code rate in the time window as a slope to form a theoretical playing integral curve, wherein the ordinate is the total number of data amounts accumulated and played until the current video playing time;
s42, connecting the theoretical playing integral curves of each time window drawn in the S41 in time sequence to form a theoretical playing integral curve of the whole video.
S5, estimating an actual playing integral curve;
The estimation of the actual playing integral curve is carried out based on the theoretical playing integral curve and the downloading integral curve;
s51, a buffer duration t buf parameter is set, (t buf =5s is usually taken). When the video is initially buffered, the video is required to be loaded with enough t buf video and then played, and when the video is blocked, the video is required to be loaded with enough t buf video and then blocked and restored.
S52, as shown in FIG. 10, the theoretical playing integral curve is shifted to the right and placed under the actual downloading integral curve, and the downloading curve is ensured to be larger than the playing curve by the video data amount corresponding to the buffer time t buf at the time point of initial playing and the stopping recovery, so that the actual playing integral curve can be obtained. h 0 is the size of the time length data of the initial buffer t buf of the video, and h 1 is the size of the time length data of t buf which needs to be buffered after the video is played and is blocked at the moment t 1.
Specifically, S521 is drawn through the bottommost end of the theoretical playing integral curve, i.e. the initial point, drawing a line segment X parallel to the X axis, where the end point X 'of the line segment X is the data size corresponding to the buffer t buf duration when the distance from the actual downloading curve corresponds to the initial playing or the pause, then moving the theoretical playing curve to the right of the end point X' of the line segment X, i.e. completing the right movement of the theoretical playing curve once, S522, when the theoretical playing integral curve after the right movement still has a cross with the actual downloading integral curve, intercepting the part above the actual downloading integral curve at the cross point X ", repeating step S521 until all the theoretical integral curve after the right movement is moved to the lower part of the actual playing curve, which is to connect the multi-segment theoretical playing curve after the right movement with the line segment X, and then obtaining the actual playing integral curve as shown in fig. 10-11.
S6, calculating various video playing indexes.
The video playing index is calculated based on an actual playing curve.
1) Video duration, i.e., theoretical playback curve end time point (e.g., t v in fig. 10);
2) Initial buffer duration, i.e., the time point (such as t 0 in fig. 10) of the video data amount (h 0) of the first download duration t buf on the actual playing curve;
3) A click time point, namely a time point corresponding to an intersection point of the actual playing curve and the actual downloading curve, namely an actual downloading data amount=an actual playing data amount time point (such as t 1、t3、t5、t7 in fig. 10);
4) A time point of the pause recovery, i.e. a time point of downloading the video data amount of the time period t buf after the pause on the actual playing curve (such as t 2、t4、t6、t8 in fig. 10);
5) The blocking duration is obtained from the blocking recovery time point of the time and the blocking time point of the time.
In the above-mentioned encrypted video playing index estimation, S2 is used for aggregating the captured video transmission data packets based on three granularities of Request granularity, extremum granularity and time window granularity and judging a downloading mode, S3 is used for estimating the video code rate in the time window according to the downloading mode to obtain the reference code rate R B of the video, and the method is a flow of the video code rate identification method of the encrypted video.
In order to implement the above method, as shown in fig. 12, the present invention also provides an encrypted video playing index estimation device,
The download integral curve generating module 1 is used for generating an actual download integral curve by statistics of the captured video transmission data packets;
The data packet aggregation and statistics module 2 is used for aggregating the grabbed video transmission data packets based on the three granularities of the Request granularity, the Extremum granularity and the time window granularity, and judging a downloading mode;
and the video code rate estimation module 3 is used for estimating the video code rate in a time window for videos in different downloading modes.
The theoretical playing integral curve generating module 4 is used for generating a theoretical playing integral curve according to the estimated video code rate in the time window;
and the video playing index estimation module 5 is used for estimating the actual playing integral curve based on the actual downloading integral curve and the theoretical playing integral curve and calculating the video playing index.
Wherein the data packet aggregation and statistics module and the video code rate estimation module are video code rate estimation devices of the encrypted video,
Specifically, the data packet aggregation and statistics module 2 is configured to aggregate and count Request granularity data packets, aggregate and count Extremum granularity data packets, identify a download mode, and aggregate and count time window granularity data packets.
The video code rate estimation module 3 is used for estimating the real-time code rate based on Extremum granularity in a periodic downloading mode and estimating the real-time code rate based on Request granularity in an aperiodic downloading mode.
The above described embodiments are only preferred examples of the invention and are not exhaustive of the possible implementations of the invention. Any obvious modifications thereof, which would be apparent to those skilled in the art without departing from the principles and spirit of the present invention, should be considered to be included within the scope of the appended claims.