Disclosure of Invention
The embodiment of the invention provides a measuring method and a measuring device for a multimedia stream, which can measure parameters related to the multimedia stream in the transmission or distribution process of multimedia content, such as pause, delay or playing time length.
In one aspect, a measurement method for multimedia stream is provided, wherein the method includes: the network equipment receives a request message flow from a request party, wherein the request message flow is used for requesting to acquire a multimedia flow; the network device receiving the multimedia stream; the network equipment performs virtual buffering and virtual playing on the multimedia stream; and in the process of virtually buffering and virtually playing the multimedia stream, determining the value of a parameter related to the multimedia stream at a measurement moment, wherein the parameter comprises one or more of the accumulated pause time of the multimedia stream, the accumulated lag time of the multimedia stream, the playing time of the multimedia stream which is accumulated and requested by the requester, the playing time of the multimedia stream which is accumulated and obtained by the network equipment, and the accumulated playing time of the fragment with the same quality.
Optionally, when the parameter includes a cumulative pause time of the multimedia stream, the determining a value of the parameter related to the multimedia stream at the measurement time includes:
if the network equipment performs virtual playing at the measuring time and the first virtual buffering performed by the network equipment is regarded as stuck, the network equipment determines the accumulated stuck time in the period from the beginning of receiving the request message flow to the measuring time according to a first formula, wherein the first formula is
If the network device performs virtual playing at the measuring time and the first virtual buffering performed by the network device is not considered to be stuck, the network device determines the accumulated stuck time from the beginning of receiving the request message flow to the measuring time according to a second formula, wherein the second formula is that the accumulated stuck time is within the period of time from the beginning of receiving the request message flow
Wherein in the first formula and the second formula, T
1Indicates that the request message stream is received from the beginning to the endThe accumulated stuck time during this time of the moment is measured,
indicating the end time of the mth virtual buffer,
the starting time of the mth virtual buffer is shown, and n is the number of virtual buffers which are accumulated in the period from the beginning of receiving the request message flow to the measuring time.
Optionally, when the parameter includes a cumulative pause time of the multimedia stream, the determining a value of the parameter related to the multimedia stream at the measurement time further includes:
if the network equipment performs virtual buffering at the measuring time and the first virtual buffering performed by the network equipment is regarded as stuck, the network equipment determines the accumulated stuck time in the period from the beginning of receiving the request message flow to the measuring time according to a third formula, wherein the third formula is
If the network equipment performs virtual buffering at the measuring time and the first virtual buffering performed by the network equipment is not regarded as stuck, the network equipment determines the accumulated stuck time in the period from the beginning of receiving the request message flow to the measuring time according to a fourth formula, wherein the fourth formula is
Wherein in the third and fourth formulas, T
1Representing the cumulative stuck time from the beginning of the flow of the request messages to the measurement instant,
indicates the end time of the m-th virtual buffering, T
tWhich represents the moment of measurement,
the starting time of the mth virtual buffer is shown, and n is the number of virtual buffers which are accumulated in the period from the beginning of receiving the request message flow to the measuring time.
Optionally, when the parameter includes an accumulated lag time of the multimedia stream, determining a value of a parameter related to the multimedia stream at a measurement time includes:
if the network device performs virtual playing at the measuring time, the network device determines the accumulated lag time from the beginning of receiving the request message flow to the measuring time according to a fifth formula, wherein the fifth formula is
In the fifth formula, T
(delay)Representing the cumulative lag time, T, from the start of the reception of said request message stream to said measurement time
D0Which represents the initial lag time of the system,
indicating the end time of the mth virtual buffer,
the starting time of the mth virtual buffer is shown, and n is the number of virtual buffers which are accumulated in the period from the beginning of receiving the request message flow to the measuring time.
Optionally, when the parameter includes an accumulated lag time of the multimedia stream, determining a value of a parameter related to the multimedia stream at a measurement time further includes:
if the network device performs virtual buffering at the measurement time, the network device determines an accumulated lag time from the beginning of receiving the request message flow to the measurement time according to a sixth formula, where the sixth formula is
In the sixth formula, T
(delay)Representing the cumulative lag time, T, from the start of the reception of said request message stream to said measurement time
D0Represents the initial lag time, T, of the system
tWhich represents the moment of measurement,
indicating the end time of the mth virtual buffer,
the starting time of the mth virtual buffer is shown, and n is the number of virtual buffers which are accumulated in the period from the beginning of receiving the request message flow to the measuring time.
Optionally, when the parameter includes a playing duration of the multimedia stream requested by the requester in an accumulated manner, the determining a value of the parameter related to the multimedia stream at the measurement time includes:
when the playing time lengths of the fragments of the multimedia stream requested by the request message stream in the period from the beginning of receiving the request message stream to the measurement time are equal, the network device determines the playing time length of the multimedia stream requested by the requester according to a first fragment number and the equal playing time length, wherein the first fragment number is the number of the fragments of the multimedia stream requested by the request message stream in the period from the beginning of receiving the request message stream to the measurement time.
Optionally, when the parameter includes the playing duration of the multimedia stream accumulated and obtained by the network device, the determining a value of the parameter related to the multimedia stream at the measurement time includes:
when the playing time lengths of the fragments of the multimedia stream received by the network device in the period from the beginning of receiving the request message stream to the measurement time are equal, the network device determines the number of the fragments of the multimedia stream received in the period from the beginning of receiving the request message stream to the measurement time, and determines the playing time length of the multimedia stream accumulated and obtained by the network device according to the number of the received fragments of the multimedia stream and the equal playing time length.
Optionally, when the parameter is the cumulative playing time of the slices with the same quality, the determining the value of the parameter related to the multimedia stream at the measurement time includes:
when the playing time lengths of the fragments of the multimedia stream requested by the request message stream in the period from the beginning of receiving the request message stream to the measurement time are equal, the network device determines the accumulated playing time length of the fragments with the same quality according to a second fragment number and the equal playing time length, wherein the second fragment number is the fragment number of a group of fragments with the same quality in the fragments of the multimedia stream requested by the request message stream in the period from the beginning of receiving the request message stream to the measurement time.
Optionally, the virtually buffering and virtually playing the multimedia stream by the network device includes:
step 1, network equipment virtually caches the received multimedia stream, virtually caches the multimedia stream to a virtual cache region to realize virtual buffering, but does not perform virtual playing;
step 2, when the data volume of the multimedia stream in the virtual buffer area is greater than or equal to a first threshold value, the network equipment continues to perform virtual buffer on the multimedia stream and performs virtual playing on the multimedia stream in the virtual buffer area;
and 3, when the data volume of the multimedia stream in the virtual buffer area is less than or equal to a second threshold value, executing the step 1.
In another aspect, a measuring apparatus for multimedia streaming is provided, wherein the measuring apparatus includes: a receiving unit, configured to receive a request packet stream for requesting to acquire a multimedia stream from a requester, and receive the multimedia stream; the virtual processing unit is used for virtually buffering and virtually playing the multimedia stream; and the determining unit is used for determining the value of a parameter related to the multimedia stream at a measuring moment in the process of virtually buffering and virtually playing the multimedia stream, wherein the parameter comprises one or more of the accumulated pause time of the multimedia stream, the accumulated lag time of the multimedia stream, the playing time of the multimedia stream cumulatively requested by the requester, the playing time of the multimedia stream cumulatively acquired by the receiving unit and the accumulated playing time of the slices with the same quality.
Optionally, when the parameter includes a cumulative pause time of the multimedia stream, the determining unit determines a value of a parameter related to the multimedia stream at a measurement time by:
if the virtual processing unit performs virtual playing at the measuring time and the first virtual buffering performed by the virtual processing unit is regarded as stuck, determining the accumulated stuck time in the period from the beginning of receiving the request message flow to the measuring time according to a first formula, wherein the first formula is that
If the virtual processing unit performs virtual playing at the measuring time and the first virtual buffering performed by the virtual processing unit is not considered to be stuck, determining accumulation in the period from the beginning of receiving the request message flow to the measuring time according to a second formulaThe time of the seizure, the second formula is
Wherein in the first formula and the second formula, T
1Representing the cumulative stuck time from the beginning of the flow of the request messages to the measurement instant,
indicating the end time of the mth virtual buffer,
the starting time of the mth virtual buffer is shown, and n is the number of virtual buffers which are accumulated in the period from the beginning of receiving the request message flow to the measuring time.
Optionally, when the parameter includes a cumulative pause time of the multimedia stream, the determining unit further determines a value of a parameter related to the multimedia stream at a measurement time by:
if the virtual processing unit performs virtual buffering at the measuring time and the first virtual buffering performed by the virtual processing unit is regarded as stuck, determining the accumulated stuck time in the period from the beginning of receiving the request message flow to the measuring time according to a third formula, wherein the third formula is that
If the virtual processing unit performs virtual buffering at the measurement time and the first virtual buffering performed by the virtual processing unit is not considered to be stuck, determining an accumulated stuck time in a period from the start of receiving the request message flow to the measurement time according to a fourth formula, wherein the fourth formula is
Wherein in the third and fourth formulas, T
1Representing the cumulative stuck time from the beginning of the flow of the request messages to the measurement instant,
indicates the end time of the m-th virtual buffering, T
tWhich represents the moment of measurement,
the starting time of the mth virtual buffer is shown, and n is the number of virtual buffers which are accumulated in the period from the beginning of receiving the request message flow to the measuring time.
Optionally, when the parameter includes an accumulated lag time of the multimedia stream, the determining unit determines a value of a parameter related to the multimedia stream at a measurement time by:
if the virtual processing unit performs virtual playing at the measuring time, determining the accumulated lag time from the beginning of receiving the request message flow to the measuring time according to a fifth formula, wherein the fifth formula is
In the fifth formula, T
(delay)Representing the cumulative lag time, T, from the start of the reception of said request message stream to said measurement time
D0Which represents the initial lag time of the system,
indicating the end time of the mth virtual buffer,
represents the start time of the mth virtual buffer, and n represents the accumulation of the time from the beginning of receiving the request message flow to the measurement timeNumber of times virtual buffering occurs.
Optionally, when the parameter includes an accumulated lag time of the multimedia stream, the determining unit further determines a value of a parameter related to the multimedia stream at a measurement time by:
if the virtual processing unit performs virtual buffering at the measurement time, determining an accumulated lag time from the beginning of receiving the request message flow to the measurement time according to a sixth formula, where the sixth formula is
In the sixth formula, T
(delay)Representing the cumulative lag time, T, from the start of the reception of said request message stream to said measurement time
D0Represents the initial lag time, T, of the system
tWhich represents the moment of measurement,
indicating the end time of the mth virtual buffer,
represents the start time of the m-th virtual buffer, and n represents the reception of the request message from the beginningThe number of times the virtual buffering occurs is accumulated during the period from the text flow to the measurement time.
Optionally, when the parameter includes a playing duration of the multimedia stream requested by the requester, the determining unit determines a value of a parameter related to the multimedia stream at the measurement time by:
when the playing time lengths of all the fragments of the multimedia stream requested by the request message stream in the period from the beginning of receiving the request message stream to the measurement time are equal, determining the playing time length of the multimedia stream requested by the requester according to a first fragment number and the equal playing time length, wherein the first fragment number is the number of the fragments of the multimedia stream requested by the request message stream in the period from the beginning of receiving the request message stream to the measurement time.
Optionally, when the parameter includes the playing duration of the multimedia stream accumulated and obtained by the receiving unit, the determining unit determines a value of a parameter related to the multimedia stream at the measurement time by:
when the playing time lengths of the fragments of the multimedia stream received by the receiving unit in the period from the beginning of receiving the request message stream to the measuring time are equal, determining the number of the fragments of the multimedia stream received in the period from the beginning of receiving the request message stream to the measuring time, and determining the playing time length of the multimedia stream accumulated and obtained by the receiving unit according to the number of the received fragments of the multimedia stream and the equal playing time length.
Optionally, when the parameter is the cumulative playing time of the slices with the same quality, the determining unit determines a value of the parameter related to the multimedia stream at the measurement time by:
when the playing time lengths of the fragments of the multimedia stream requested by the request message stream in the period from the beginning of receiving the request message stream to the measurement time are equal, determining the accumulated playing time length of the fragments with the same quality according to a second fragment number and the equal playing time length, wherein the second fragment number is the fragment number of a group of fragments with the same quality in the fragments of the multimedia stream requested by the request message stream in the period from the beginning of receiving the request message stream to the measurement time.
Optionally, the virtual processing unit performs the virtual buffering and the virtual playing on the multimedia stream by:
the first operation is that the received multimedia stream is virtually cached, and the multimedia stream is virtually cached to a virtual cache region to realize virtual buffering, but virtual playing is not carried out;
second operation, when the data volume of the multimedia stream in the virtual buffer area is greater than or equal to a first threshold value, continuing to perform virtual buffer on the multimedia stream, and performing virtual playing on the multimedia stream in the virtual buffer area;
and performing a third operation, wherein the first operation is performed when the data volume of the multimedia stream in the virtual buffer area is less than or equal to a second threshold.
The embodiment of the invention can perform virtual processing including virtual buffering and virtual playing on the multimedia stream, and determine parameters related to the multimedia stream according to information in the virtual processing process, such as pause, delay or playing time length, so as to monitor the quality of the multimedia stream.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flow chart illustrating a measurement method 100 for multimedia streams according to an embodiment of the present invention. The measurement method 100 can be used for any network device through or to which the multimedia stream passes during transmission, distribution or reception, which may be, for example, a gateway, an edge server, a transmission line, a mobile terminal, or the like. The content in the multimedia stream may include one or more of various content such as video, audio, images, or other content.
The measurement method 100 for multimedia streams may include: the network equipment receives a request message flow from a requester, wherein the request message flow is used for requesting to acquire a multimedia flow (110); the network device receiving the multimedia stream (120); the network device virtually buffers and virtually plays (130) the multimedia stream; and in the process of virtually buffering and virtually playing the multimedia stream, determining the value of a parameter related to the multimedia stream at a measurement moment, wherein the parameter comprises one or more of the accumulated pause time of the multimedia stream, the accumulated lag time of the multimedia stream, the playing time of the multimedia stream which is accumulated and requested by the requester, the playing time of the multimedia stream which is accumulated and obtained by the network equipment and the accumulated playing time of the fragment with the same quality (140).
In 110, the network device receives a request message stream from a requesting party, where the request message stream is used to request to obtain a multimedia stream. As an example, when a playback terminal as a requestor wishes to play back a certain video file, it issues a request message stream, e.g., "10.164.12.59: 2396 → 172.19.6.47:80 GET", to a network server as a network devicehttp://mediad1.microsoft.com/mediad1/iisnet/smoothmedia/Experience/BigBuckB unny_720p.ism(350000) fragments (video =0) ", wherein" 10.164.12.59:2396 → 172.19.6.47:80 "indicates the source and destination of the multimedia stream; "GET" indicates that the multimedia stream is an upstream requested multimedia stream;http://mediad1.microsoft.com/mediad1/iisnet/smoothmedia/Experience/BigBuckB unny_720p.isma name indicating a multimedia object or a link thereof for distinguishing the multimedia object from other multimedia objects; "QualityLevels (350000)" indicates a bitrate of the multimedia stream, which can be used to represent the quality of the multimedia stream; "fragments = 0" indicates that the multimedia type is video, and the slice start time thereof is 0. Adaptive streaming technology employs fragmentation of equal length.
At 120, the network device receives the multimedia stream. And as a response to the request message stream, the network device receives the multimedia stream requested to be acquired in the request message stream. The response message flow of the request message flow illustrated in 110 is, for example, "172.19.6.47: 80 → 10.164.12.59:2396HTTP/1.1200 OK Content length: 90710", where "HTTP/1.1200 OK" is response status information and "Content length: 90710" is multimedia Content information indicating the Content length of the response multimedia stream, here 90710 bytes (fragment length), which may also be a fragment sequence number. A slice in the multimedia stream may also be represented by the playing duration of the slice, for example, the playing duration of one slice is 2 seconds. Typically, the playing time lengths of the respective slices in the multimedia stream are equal.
In 130, the network device virtually buffers and virtually plays the multimedia stream. Based on the request message stream and the received multimedia stream, virtual processing (i.e., virtual buffering and virtual playing) is performed in the network device to mimic the buffering and playing processing performed in a playing terminal, thereby determining parameters related to the multimedia stream. Specifically, the 130 includes: the method comprises the following steps that firstly, network equipment performs virtual caching on received multimedia streams, virtually caches the multimedia streams to a virtual cache region, but does not perform virtual playing, namely a specific process of performing virtual buffering, and data in the virtual cache region cannot be reduced in the process; a second step, when the data volume of the multimedia stream in the virtual buffer area is larger than or equal to a first threshold value Tthreshold1When the multimedia stream is played, the network equipment continues to perform virtual caching on the multimedia stream and performs virtual playing on the multimedia stream in the virtual caching area; and a third step of executing the first step when the data volume of the multimedia stream in the virtual buffer area is less than or equal to a second threshold value. The virtual buffering and virtual playing of the multimedia stream by the network device are described in detail below with reference to fig. 2.
Fig. 2 is a flowchart illustrating a virtualization process 200 in the measurement method according to an embodiment of the present invention. This virtual processing 200 (i.e., the virtual buffering and virtual playing of the multimedia stream by the network device) includes: the network equipment virtually caches the received multimedia stream, virtually caches the multimedia stream to a virtual cache region, but does not virtually play the multimedia stream so as to realize virtual buffering (210); determining whether the data volume of the multimedia stream in the virtual buffer is greater than or equal to a first threshold Tthreshold1(220) (ii) a When it is determined in 220 that the data size of the multimedia stream in the virtual buffer is greater than or equal to the first threshold Tthreshold1If yes in 220, the network equipment continues to perform virtual buffering on the multimedia stream and performs virtual playing on the multimedia stream in the virtual buffering area (230); determining whether an amount of data of the multimedia stream in the virtual buffer is less than or equal to a second threshold (240); upon determining that the amount of data of the multimedia stream in the virtual buffer is less than or equal to a second threshold (yes in 230), 210 is performed.
A virtual Buffering (Buffering) of the received multimedia stream by the network device is implemented in 210. The first threshold T at 220threshold1Is the minimum amount of data in the virtual buffer required to start virtual play, and can be measured in terms of the decoded sustainable play time, and can be preset. When the data amount accumulated and buffered after the buffer is started is larger than or equal to the first threshold value Tthreshold1Then an end-of-buffering event occurs (end of virtual buffering) and virtual play-out is entered (230). In 240, it is determined whether the amount of data of the multimedia stream in the virtual buffer (i.e. the amount of data buffered in the virtual buffer minus the amount of data consumed in the virtual buffer) is less than or equal to a second threshold Tthreshold2Said second threshold value Tthreshold2Is the minimum amount of data in the virtual buffer needed to maintain the virtual play-out, which may be, for example, zero and may be preset. After entering virtual play in 230, in the virtual cacheWhile the zone continues to perform virtual caching, the data in the virtual cache zone is also consumed due to virtual play. When the data volume of the multimedia stream in the virtual buffer area is less than or equal to a second threshold value Tthreshold2The decoding and playing are not maintained enough, the virtual playing cannot be carried out due to underflow events, and the virtual buffering is restarted.
In 140, during the virtual buffering and the virtual playing of the multimedia stream, a value of a parameter related to the multimedia stream at a measurement time is determined, where the parameter includes one or more of an accumulated pause time of the multimedia stream, an accumulated lag time of the multimedia stream, a playing time of the multimedia stream that is cumulatively requested by the requester, a playing time of the multimedia stream that is cumulatively acquired by the network device, and an accumulated playing time of a slice with the same quality.
During the virtual buffering and virtual playing (130) of the multimedia stream by the network device, the network device can determine the occurrence of a buffering end event (virtual buffering ends and virtual playing starts) and an underflow event (virtual playing ends and virtual buffering starts) and the time point T thereof according to the received request message stream and multimedia streameAnd TuAnd further determines whether the ongoing virtual processing is virtual buffering or virtual playing. In a specific practice, the network device may perform the determination according to the format and sampling appropriate manner of the information in the received request message stream and multimedia stream, and the specific determination manner does not constitute a limitation to the present invention.
In the above measurement method for a multimedia stream according to the embodiment of the present invention, parameters related to the multimedia stream, including pause, delay, or play time, are determined by performing virtual processing including virtual buffering and virtual playing on the multimedia stream and various information obtained in the virtual processing, so as to monitor the quality of the multimedia stream.
The determination of various parameters associated with the multimedia stream is described in detail below for a more complete disclosure of the present invention.
FIG. 3 is a schematic diagram illustrating virtual processing over time in an embodiment of the invention. In fig. 3, the OTT live video service is taken as an example for explanation, t1 is the time when the live screen starts, and t2 is the start time of the first virtual buffer B1 in the network device
(T2-T1) is the initial lag time T of the system
D0For a fluidized system, it is a fixed value (e.g., 8 seconds). At time T3, an end-of-buffering event occurs (the amount of data cumulatively buffered is greater than or equal to the first threshold T
threshold1) Starting the virtual play, the time t3 is the end time of the first virtual buffer B1
At time T4, an underflow event occurs (the amount of data of the multimedia stream in the virtual buffer is less than or equal to a second threshold T)
threshold2) The second virtual buffer B2 is started, and time t4 is the starting time of the second virtual buffer B2
At time t5, a buffer end event occurs and virtual playback begins, at time t5, which is the end time of the second virtual buffer B2
By analogy, time t6 is the start time of the third virtual buffer B3
Time t7 is the end time of the third virtual buffer B3
And so on.
FIG. 4 is a block diagram of the method of determining accumulation in the measurement method according to an embodiment of the present inventionGraph of the accumulation stuck time. Obtaining a measurement time T of a network devicetThe virtual processing (410) performed; then determining whether the virtual processing is virtual buffering or virtual playing (420); when the virtual processing is virtual play, further determining whether the first virtual buffer (B1 in fig. 3) is considered stuck (430); when the first virtual buffer is regarded as katton, the network device determines from the start of receiving the request message flow T2 to the measurement time T according to the following formula 1tThe accumulated stuck time T in this period1(i.e., the sum of the durations of the virtual buffers):
equation 1
Wherein,
indicating the end time of the mth virtual buffer,
representing the starting time of the mth virtual buffer, and n representing the number of virtual buffers accumulated in the period from the beginning of receiving the request message flow to the measuring time (440); the network device root when the first virtual buffer is not considered as a checkpointDetermining from the beginning of receiving the request message flow T2 to the measurement time T according to the following formula 2
tThe accumulated stuck time T in this period
1(i.e., the sum of the durations of the virtual buffers from the second virtual buffer):
equation 2
Wherein,
and n has the same meaning as before (450); when the virtual processing isDuring virtual buffering, whether the first virtual buffering (B1 in FIG. 3) is regarded as stuck is further determined (460); when the first virtual buffer is regarded as katton, the network device determines from the start of receiving the request message flow T2 to the measurement time T according to the following equation 3
tThe accumulated stuck time T in this period
1:
Equation 3
Wherein,n has the same meaning as above, TtRepresents a measurement instant (470); when the first virtual buffer is not regarded as a checkpoint, the network device determines from the start of receiving the request message flow T2 to the measurement time T according to the following equation 4tThe accumulated stuck time T in this period1:
Equation 4
Wherein,
T
tand n has the same meaning as before (480). For equations 3 and 4, because at the measurement time T
tThe nth virtual buffering is being performed, so the duration of the nth virtual buffering is
The accumulated stuck time T
1Is the sum of the durations of the virtual buffers before the nth virtual buffer plus the value of the current buffer
Determining the cumulative stuck time in connection with a virtual processing state at a measurement instant when the parameter relating to the multimedia stream comprises the cumulative stuck time of the multimedia stream is described above in connection with fig. 4. In specific practice, the accumulated stuck time can be determined in other ways according to actual situations, and the specific determination way does not limit the invention.
The accumulated lag time T will be explained below by taking the OTT video live broadcast service of fig. 3 as an example(delay)And (4) determining. Accumulated lag time T(delay)Is the system initial lag time TD0(in FIG. 3, TD0T 2-t 1) plus the duration of each virtual buffer. As previously mentioned, for a fluidized system, the system initial lag time TD0Is a fixed value and can be predetermined.
Fig. 5 is a schematic diagram of determining an accumulated lag time in the measurement method according to an embodiment of the present invention. In fig. 5, the acquisition network device is at measurement time TtThe virtual processing (510) performed; then determining whether the virtual process is virtual buffering or virtual playing (520); when the virtual process is virtual play, the network device determines from the beginning of receiving the request message stream (T1) to the measurement time T according to formula 5tAccumulated lag time T during this period(delay):
Equation 5
Wherein, T
D0Which represents the initial lag time of the system,
indicating the end time of the mth virtual buffer,
representing the start time of the mth virtual buffer, and n representing the number of virtual buffers accumulated in the period from the start of receiving the request message flow to the measurement time (530); when the virtual processing is virtual buffering, the network device determines the accumulated lag time T from the beginning of receiving the request message flow to the measurement time according to formula 6
(delay):
Equation 6
Wherein, TD0、Tt、n has the same meaning as above (540).
For other parameters related to the multimedia stream, for example, the playing duration of the multimedia stream requested by the requesting party cumulatively, the playing duration of the multimedia stream cumulatively obtained by the network device, and the cumulative playing duration of the fragments with the same quality, the following description will be made only by way of example and for simplicity, in which the playing duration of each fragment of the multimedia stream requested by the request message stream is equal during the period from the beginning of receiving the request message stream to the measurement time. In the typical case, the network device may determine the playing duration of the multimedia stream requested by the requester according to a first number of fragments and the equal playing duration, where the first number of fragments is the number of fragments of the multimedia stream requested by the request message stream in a period from the start of receiving the request message stream to the measurement time; the network device may determine the number of fragments of the multimedia stream received in the period from the start of receiving the request packet stream to the measurement time, and determine the playing time of the multimedia stream accumulated and obtained by the network device according to the number of the received fragments of the multimedia stream and the equal playing time; and the network device may determine the cumulative playing time lengths of the slices with the same quality (for example, the same code rate) according to a second number of slices and the equal playing time length, where the second number of slices is the number of slices of a group of slices with the same quality in the slices of the multimedia stream requested by the request message stream from the beginning of receiving the request message stream to the measurement time. It is noted that in specific practice, the respective playing time lengths may be determined in other manners according to actual situations, and the specific determination manner does not limit the present invention.
Fig. 6 is a block diagram illustrating a measuring apparatus 600 for multimedia stream according to an exemplary embodiment of the present invention. The measuring means 600 may be used for any network device through or to which the multimedia stream passes during transmission, distribution or reception, which may be for example a gateway, an edge server, a transmission line, a mobile terminal or the like. As previously mentioned, the content in the multimedia stream may include one or more of various content such as video, audio, images, etc., or other content.
The measuring device 600 for multimedia stream may include: a receiving unit 610, configured to receive a request packet stream for requesting to obtain a multimedia stream from a requesting party, and receive the multimedia stream; a virtual processing unit 620, configured to perform virtual buffering and virtual playing on the multimedia stream; a determining unit 630, configured to determine, during the virtual buffering and the virtual playing of the multimedia stream, values of parameters related to the multimedia stream at a measurement time, where the parameters include one or more of an accumulated pause time of the multimedia stream, an accumulated lag time of the multimedia stream, a playing time of the multimedia stream that is cumulatively requested by the requesting party, a playing time of the multimedia stream that is cumulatively obtained by the network device, and an accumulated playing time of a slice with the same quality.
The receiving unit 610 may receive a request message stream for requesting to obtain a multimedia stream from a requesting party, and receive the multimedia stream. For an example of the request message stream and the multimedia stream, please refer to the description above in connection with 110 and 120 of fig. 1. It is noted that the descriptions in 110 and 120 of fig. 1 are merely examples, and in a specific application, the request message stream and the multimedia stream will have different forms according to different use environments and protocols.
The virtual processing unit 620 performs virtual buffering and virtual playing on the multimedia stream. Based on the request packet stream and the received multimedia stream, the virtual processing unit 620 performs virtual processing (i.e., virtual buffering and virtual playing) to mimic buffering and playing processing performed in a playing terminal, thereby determining parameters related to the multimedia stream.
As an example, the virtual processing unit 620 may perform the virtual buffering and the virtual playing on the multimedia stream by: the method comprises the following steps of firstly, performing virtual caching on the received multimedia stream, virtually caching the multimedia stream to a virtual cache region, but not performing virtual playing, namely performing a specific process of virtual caching, wherein data in the virtual cache region cannot be reduced in the process; a second operation, when the data volume of the multimedia stream in the virtual buffer area is greater than or equal to a first threshold Tthreshold1If so, continuing to virtually cache the multimedia stream, and virtually playing the multimedia stream in the virtually cached area; a third operation, when the data volume of the multimedia stream in the virtual buffer is less than or equal to a second threshold Tthreshold2The first operation is executed. The first threshold value Tthreshold1Is the minimum amount of data in the virtual buffer required to start virtual play, and can be measured in terms of the decoded sustainable play time, and can be preset. The second threshold value Tthreshold2Is the minimum amount of data in the virtual buffer needed to maintain the virtual play-out, which may be, for example, zero and may be preset. Detailed operations with respect to the virtual processing unit 620Reference is made to the description in connection with fig. 2, which is not described in detail here.
The determining unit 630 may determine values of parameters related to the multimedia stream at a measuring time during the virtual buffering and the virtual playing of the multimedia stream. The parameters include one or more of an accumulated pause time of the multimedia stream, an accumulated lag time of the multimedia stream, a play time of the multimedia stream that the requester has accumulated a request, a play time of the multimedia stream that the receiving unit has accumulated and acquired, and an accumulated play time of a slice of the same quality.
In the process of virtually buffering and virtually playing the multimedia stream by the virtual processing unit 620, the determining unit 630 may determine the occurrence of a buffering end event (virtual buffering ends and virtual playing starts) and an underflow event (virtual playing ends and virtual buffering starts) and the time point T thereof according to the received request packet stream and multimedia streameAnd TuAnd further determines whether the ongoing virtual processing is virtual buffering or virtual playing. In a specific practice, the determining unit 630 may perform the determination according to the format and sampling appropriate manner of the information in the received request message stream and multimedia stream, and the specific determining manner does not constitute a limitation to the present invention.
The following describes how the determining unit 630 determines the value of the parameter related to the multimedia stream at the measurement time by taking OTT video live broadcast service as an example.
For the accumulated pause time of the multimedia stream among the parameters related to the multimedia stream, the determining unit 630 may determine its value at the measurement time by: if the virtual processing unit 620 performs virtual play-back at the measurement time and the first virtual buffer performed by the virtual processing unit 620 is regarded as stuck, determining the cumulative stuck time (i.e. the sum of the durations of the virtual buffers) in the period from the beginning of receiving the request message flow to the measurement time according to the aforementioned formula 1; if the virtual processing unit 620 performs virtual play-back at the measurement time and the first virtual buffering performed by the virtual processing unit 620 is not considered to be stuck, determining an accumulated stuck time (i.e. the sum of the durations of the virtual buffering from the second virtual buffering) in the period from the start of receiving the request message stream to the measurement time according to the aforementioned formula 2; if the virtual processing unit 620 performs virtual buffering at the measurement time and the first virtual buffering performed by the virtual processing unit 620 is regarded as stuck, determining an accumulated stuck time from the beginning of receiving the request message flow to the measurement time according to the aforementioned formula 3; and if the virtual processing unit 620 performs virtual buffering at the measurement time and the first virtual buffering performed by the virtual processing unit 620 is not considered to be stuck, determining an accumulated stuck time from the beginning of receiving the request message flow to the measurement time according to the aforementioned formula 4. As for the detailed operation of the determination unit 630 to determine the accumulated stuck time, reference may be made to the description made above in conjunction with fig. 4. It is noted that in specific practice, the accumulated stuck time may be determined in other ways according to actual situations, and the specific determination way does not constitute a limitation to the present invention.
For the accumulated lag time of the multimedia stream among the parameters related to the multimedia stream, the determining unit 630 may determine its value at the measurement time by: if the virtual processing unit 620 performs virtual playing at the measurement time, determining an accumulated lag time from the beginning of receiving the request message stream to the measurement time according to the foregoing formula 5; and if the virtual processing unit 620 performs virtual buffering at the measurement time, determining an accumulated lag time from the start of receiving the request message stream to the measurement time according to the aforementioned formula 6. For a detailed operation of the determining unit 630 to determine the accumulated lag time of the multimedia stream, reference may be made to the description above in connection with fig. 5.
For the requester among the parameters related to the multimedia stream to accumulate the playing time of the requested multimedia stream, the determining unit 630 may determine the value at the measurement time by: when the playing time lengths of all the fragments of the multimedia stream requested by the request message stream in the period from the beginning of receiving the request message stream to the measurement time are equal, determining the playing time length of the multimedia stream requested by the requester according to a first fragment number and the equal playing time length, wherein the first fragment number is the number of the fragments of the multimedia stream requested by the request message stream in the period from the beginning of receiving the request message stream to the measurement time.
For the receiving unit 610 among the parameters related to the multimedia stream to accumulate the playing time of the acquired multimedia stream, the determining unit 630 may determine the value at the measuring time by: when the playing time lengths of the segments of the multimedia stream received by the receiving unit 610 from the beginning of receiving the request packet stream to the measurement time are equal, determining the number of the segments of the multimedia stream received from the beginning of receiving the request packet stream to the measurement time, and determining the playing time length of the multimedia stream accumulated and obtained by the receiving unit according to the number of the received segments of the multimedia stream and the equal playing time length.
For the cumulative playing time of the slices of the same quality in the parameters related to the multimedia stream, the determining unit 630 may determine the value at the measuring time by: when the playing time lengths of the fragments of the multimedia stream requested by the request message stream in the period from the beginning of receiving the request message stream to the measurement time are equal, determining the accumulated playing time length of the fragments with the same quality according to a second fragment number and the equal playing time length, wherein the second fragment number is the fragment number of a group of fragments with the same quality in the fragments of the multimedia stream requested by the request message stream in the period from the beginning of receiving the request message stream to the measurement time.
It is noted that the above described manner of determining the parameters related to the multimedia stream is merely illustrative. In specific practice, the parameters related to the multimedia stream may be determined in other ways according to actual situations, and the specific determination way does not limit the present invention.
In the measuring apparatus 600 for multimedia stream according to the embodiment of the present invention, the multimedia stream is virtually buffered and virtually played, and various information obtained during the virtual processing process is used to determine parameters related to the multimedia stream, including pause, delay, or playing duration, so as to monitor the quality of the multimedia stream.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, the division of the units is only one logical functional division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed.
The units described as separate parts may or may not be physically separate, i.e. may be located in one place, or may be distributed over a plurality of network elements. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.