CN117119229A - Delay measurement method and device - Google Patents

Delay measurement method and device Download PDF

Info

Publication number
CN117119229A
CN117119229A CN202311177334.1A CN202311177334A CN117119229A CN 117119229 A CN117119229 A CN 117119229A CN 202311177334 A CN202311177334 A CN 202311177334A CN 117119229 A CN117119229 A CN 117119229A
Authority
CN
China
Prior art keywords
live
time
module
link
data frame
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311177334.1A
Other languages
Chinese (zh)
Inventor
沈家辉
廖大达
张捷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Bilibili Technology Co Ltd
Original Assignee
Shanghai Bilibili Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Bilibili Technology Co Ltd filed Critical Shanghai Bilibili Technology Co Ltd
Priority to CN202311177334.1A priority Critical patent/CN117119229A/en
Publication of CN117119229A publication Critical patent/CN117119229A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/24Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
    • H04N21/2407Monitoring of transmitted content, e.g. distribution time, number of downloads
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • H04N21/8547Content authoring involving timestamps for synchronizing content

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the application provides a delay measurement method and a delay measurement device, comprising the following steps: performing time checking processing on each module in the live link; when a live stream data frame is transmitted, each module in the live link is controlled to insert an SEI timestamp in the live stream data frame; and determining the local delay of each module and the overall delay of the live link according to the SEI timestamp corresponding to each module recorded in the live stream data frame. By time correction, delay monitoring of the whole live link due to non-uniform influence of clocks is avoided; SEI time stamps are inserted into data frames transmitted by all modules of the live link so as to measure delay of the transmitted data frames based on the SEI time stamps, time consumption of the whole live link is guaranteed to be accurately measured, time consumption of each module in the live link is recorded in detail, time consumption of each module in the live link can be intuitively analyzed, and local optimization of the live link is facilitated.

Description

Delay measurement method and device
Technical Field
The embodiment of the application relates to the technical field of streaming media, in particular to a delay measurement method, a delay measurement device, computer equipment and a computer readable storage medium.
Background
In the current live broadcast architecture, live broadcast full links divide data frames of live broadcast contents from a main broadcast, go to a streaming media cloud server, go to a downlink CDN network, and finally render and present the data frames at a terminal player of a spectator. The time consumption of the live whole link refers to the time interval between a live stream data frame from a push stream end to a player end, in the current link time consumption measurement, a time stamp is inserted into push stream data through SEI, and the time consumption of the live link is calculated by using the time stamp, but the measurement mode has the following defects:
1. the integration of the live link module is not standard, the SEI timestamp insertion time and the update time are inaccurate, the delay measurement from the push end to the player end is not really realized, and the delay data are easy to be inaccurate.
2. The time precision of each module of the live link is not uniform, and uniform and standard time proofreading is not carried out.
3. The measurement of time consumption in each module in the live link is missing, and local time consumption optimization of the live link is not realized.
Disclosure of Invention
An object of an embodiment of the present application is to provide a method, an apparatus, a computer device, and a computer readable storage medium for delay measurement, which are used for solving the following problems: the time measured by the time-consuming measurement mode of the existing live whole link is inaccurate and incomplete, so that the live link cannot be comprehensively monitored and optimized in a delayed manner.
An aspect of an embodiment of the present application provides a method for measuring a delay, which is applied to a live link, where the live link includes a plurality of modules, and the method includes:
performing time checking processing on each module in the live link;
when a live stream data frame is transmitted, each module in the live link is controlled to insert an SEI timestamp into the live stream data frame based on the checked time;
and determining the local delay of each module and the overall delay of the live link according to the SEI timestamp corresponding to each module recorded in the live stream data frame.
Optionally, the performing time proofreading processing on each module in the live link includes:
and carrying out time checking processing on each module in the live link by calling a time checking interface in a preset time checking service.
Optionally, the time checking processing is performed on each module in the live link by calling a time checking interface in a preset time checking service, including:
respectively determining the time consumption of each module in the live link for calling the preset time setting service;
under the condition that the time consumption for calling the preset time setting service is less than or equal to the preset time length, determining that time correction is successful on each module in the live link; or alternatively, the first and second heat exchangers may be,
And under the condition that the time consumption for calling the preset time setting service is longer than the preset time length, determining that the time checking of each module in the live link fails.
Optionally, the plurality of modules included in the live link include: the system comprises a plug flow module, a streaming media service module, a CDN content distribution module and a playing module.
Optionally, when transmitting the live stream data frame, controlling each module in the live link to insert an SEI timestamp in the live stream data frame based on the calibrated time, including:
when a live stream data frame is transmitted, controlling a plug flow module in the live stream link to determine a first timestamp before encoding the live stream data frame based on the time after correction;
and inserting an SEI information array in the live stream data frame, and inserting the first timestamp in the SEI information array.
Optionally, the method further comprises:
and determining the time consumption of the live stream data frame encoded by a push stream module in the live stream link according to the first time stamp.
Optionally, when transmitting the live stream data frame, controlling each module in the live link to insert an SEI timestamp in the live stream data frame based on the calibrated time, and further includes:
And controlling a streaming media service module in the live link to determine a second timestamp of the received live streaming data frame based on the checked time, and inserting the second timestamp into the SEI information array.
Optionally, when transmitting the live stream data frame, controlling each module in the live link to insert an SEI timestamp in the live stream data frame based on the calibrated time, and further includes:
and controlling a CDN content distribution module in the live link to determine a third timestamp of the received live stream data frame based on the checked time, and inserting the third timestamp into the SEI information array.
Optionally, when transmitting the live stream data frame, controlling each module in the live link to insert an SEI timestamp in the live stream data frame based on the calibrated time, and further includes:
and controlling a play module in the live link to determine a fourth timestamp of the received live stream data frame based on the checked time, and inserting the fourth timestamp into the SEI information array.
Optionally, the method further comprises:
and controlling a play module in the live link to report the SEI information array to a preset database.
Optionally, the method further comprises:
and monitoring the local delay of each module and the overall delay of the live link.
An aspect of the embodiment of the present application further provides a delay measurement device, which is applied to a live link, where the live link includes a plurality of modules, and the device includes:
the time checking unit is used for performing time checking processing on each module in the live link;
the time stamp inserting unit is used for controlling each module in the live link to insert the SEI time stamp in the live stream data frame when the live stream data frame is transmitted;
and the delay determining unit is used for determining the local delay of each module and the overall delay of the live link according to the SEI timestamp corresponding to each module recorded in the live stream data frame.
An aspect of an embodiment of the present application further provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method of delay measurement as described above when the computer program is executed.
An aspect of the embodiments of the present application further provides a computer readable storage medium having stored thereon a computer program executable by at least one processor to cause the at least one processor to perform the steps of the method of delay measurement as described above when the computer program is executed.
The method, the device, the equipment and the computer readable storage medium for measuring the delay provided by the embodiment of the application ensure the unified time standard of each module by carrying out time checking on each module in the live link, realize the consistency of the time standard, the time zone and the like of each module in the live link, improve the uniformity and the accuracy of the delay measurement of the live link, and avoid the error of delay records caused by the non-uniformity of clocks, thereby influencing the overall delay monitoring of the live link; the SEI time stamps are inserted into the data frames transmitted by each module of the live link strictly, so that the delay of the transmitted data frames is measured based on the SEI time stamps, the time consumption of the whole live link is accurately measured, the loss and excessive measurement of the link are ensured, and the credibility of delay data is improved; the time consumption of each module in the live link is recorded in detail, the time consumption of each module in the live link can be intuitively analyzed, and the module with longer time consumption in the live link can be accurately positioned, so that the live link can be locally optimized conveniently.
Drawings
Fig. 1 schematically illustrates a schematic diagram of a live overall link;
FIG. 2 schematically illustrates an application environment diagram of a method of delay measurement according to an embodiment of the application;
FIG. 3 schematically illustrates a flow chart of a method of delay measurement according to a first embodiment of the application;
FIG. 4 schematically illustrates a schematic diagram of delay monitoring of a live link;
fig. 5 schematically shows a block diagram of an apparatus for delay measurement according to a second embodiment of the application; a kind of electronic device with high-pressure air-conditioning system
Fig. 6 schematically shows a hardware architecture diagram of a computer device adapted to implement a method of latency measurement according to a third embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
It should be noted that the descriptions of "first," "second," etc. in the embodiments of the present application are for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be considered to be absent and not within the scope of protection claimed in the present application.
In the current live broadcast architecture, live broadcast full links divide data frames of live broadcast contents from a main broadcast, go to a streaming media cloud server, go to a downlink CDN network, and finally render and present the data frames at a terminal player of a spectator. As shown in fig. 1, which is a schematic diagram of a live broadcast overall link, after a push IP is obtained from a scheduling system by a host broadcast through a push end tool, a stream is pushed to a streaming media service of a cloud edge computing node, and the cloud streaming media service is divided into an uplink push streaming service and a downlink CDN content delivery service. And the audience performs pulling and watching from a downstream CDN content delivery service back source to an upstream pushing service through a player to form a live broadcast full link from a pushing end to a playing end. The time consumption of the live whole link refers to the time interval between a live stream data frame from a push stream end to a player end, in the current link time consumption measurement, a time stamp is inserted into push stream data through SEI, and the time consumption of the live link is calculated by using the time stamp, but the measurement mode has the following defects:
(1) the integration of the live link module is not standard, the SEI timestamp insertion time and the update time are inaccurate, the time-consuming measurement from the plug-flow end to the player end is not really realized, and the delay data are easy to be inaccurate. For the transmission of the data frames in the live link, the recording of the time stamp is carried out by the SEI, but the insertion and updating of the time stamp in the SEI are not strictly calibrated, so that the measurement link is incomplete and inaccurate. For example, in the anchor, if the time stamp information of the SEI is inserted after the encoding of the data frame is finished, the loss of the live link can be caused; or on the audience side, when the data frames are rendered and the pictures are presented, the SEI time stamp is updated, so that a live measurement link is increased; these all result in inaccurate integration of the live whole link module and inaccurate measured time consumption.
(2) The time precision of each module of the live link is not uniform, and uniform and standard time proofreading is not carried out. In the live whole link, the live whole link is divided into modules such as a push end, a streaming media server, a CDN content distribution network and a player, and multiple parts are formed in each module, but when time consumption of live modules is measured, unified time calibration is not carried out on each module, so that time accuracy and time zone of each module are inconsistent, time consumption measurement of the live whole link is affected, for example, the push end uses eight-east time, the streaming media server enables coordinated Universal Time (UTC), the player adopts local time of a user, the local time is controlled by the user and is easy to modify, and thus time consumption measurement of the live whole link is directly inaccurate.
(3) The time consumption measurement inside each module of the live link is deleted, and local time consumption optimization of the live link is not realized by a method. For measurement of time consumption of a live whole link, the purpose is to optimize after obtaining the time consumption, so that the time consumption of the whole link is continuously reduced, and the viewing experience of a user is improved. However, in the current time delay measurement architecture, only the time consumption of the whole process is reflected, and the time consumption measurement of each part is not carried out, so that when the link optimization is carried out, the research personnel cannot go down, the time consumption data of the link only has viewing significance, and the local optimization and the whole optimization of the link are not carried out according to the time consumption.
(4) There is no detailed live full link delay large disk monitoring and local link large disk monitoring. Due to inaccuracy and incompleteness of delay data measurement, the delay large disc data of the built live broadcast integral link are inaccurate and incompleteness after data reporting, and large disc monitoring data such as local links, missing transcoding links and the like are avoided.
For the problems in the prior art, the inventor finds that the contradiction point is mainly concentrated on the inconsistency of the time standard of each module in the live link, and the unified time calibration of the time of each module is not realized; the division of the live whole link is not strict, SEI time stamp insertion and update time of a live stream data frame are inaccurate, time-consuming measurement from a push side to a play side is not standardized, and incomplete or excessive measurement of live link delay measurement is caused; the time consumption of each module of the live link cannot be recorded in detail, and the whole time delay from the push end to the playing side can be only obtained, but the time consumption of each module and the time consumption inside the module cannot be calculated, so that the module with longer time consumption in the live link cannot be analyzed, and the local optimization of the live link cannot be carried out. Aiming at the contradiction point, the inventor finds that the scheme of the invention for measuring the time consumption of the whole link and the local module from the live push end to the playing end can be designed by taking SEI supplemental enhancement information of a live stream data frame as an access point.
Specifically, the application aims to provide a delay measurement method, which performs time correction processing on each module in the live link; when a live stream data frame is transmitted, each module in the live link is controlled to insert an SEI timestamp into the live stream data frame based on the checked time; and determining the local delay of each module and the overall delay of the live link according to the SEI timestamp corresponding to each module recorded in the live stream data frame. By performing time correction on each module in the live link, the unified time standard of each module is ensured, the consistency of the time standard, time zone and the like of each module in the live link is realized, the uniformity and accuracy of the delay measurement of the live link are improved, and the error of delay records caused by non-uniform clocks is avoided, so that the overall delay monitoring of the live link is influenced; the insertion and updating time of SEI time stamps in live stream data frames is strictly regulated, so that the time consumption of the whole live link is accurately measured, the link is ensured not to be lost and excessively measured, and the credibility of delay data is improved; the time consumption of each module in the live link is recorded in detail, the local time consumption of the link can be intuitively analyzed, and the module with longer time consumption in the live link can be accurately positioned, so that local optimization is performed.
The present application provides various embodiments to further introduce schemes for delay measurement, with particular reference to the following.
In the description of the present application, it should be understood that the numerical references before the steps do not identify the order in which the steps are performed, but are merely used to facilitate description of the present application and to distinguish between each step, and thus should not be construed as limiting the present application.
The following is a term explanation of the present application:
live stream: the live broadcast and push process is a long link unless the host broadcasting actively stops, otherwise, the live broadcast is continuous.
Live full link: refers to the complete live transmission process from the video source to the viewer. The process involves a number of links and technical components including acquisition, encoding, transmission, distribution, and playback.
Pushing flow end: refers to a device or software for transmitting video, audio, or other media content onto a network. The plug-flow end can be a hardware device or a software application program.
A player: is a software or application for decoding, rendering and playing various media content including video, audio, streaming media, etc. The player runs on the viewing end device and provides a user interface and control functions to allow a user to conveniently view and manage media files.
Cloud: refers to remote computing and storage resources based on cloud computing technology. It provides the ability to access and manage computing resources, memory space, and applications over a network without relying on the physical storage and processing capabilities of the local device.
Data frame: refers to the data units transmitted in the live stream. In a live video or live audio process, media data is divided into small segments of data frames and then transmitted over a network. These data frames are recombined at the receiving end to achieve a live experience in real time.
SEI: supplemental Enhancement Information, supplemental enhancement information, is a mechanism for transmitting additional information.
NTP: network Time Protocol, network time protocol, is a protocol used to time synchronize computers, which allows computers to time synchronize their servers.
OTC: universal Time Coordinated, also called universal time, universal standard time, international coordination time.
Fig. 2 schematically shows an environmental application schematic according to an embodiment of the application. As shown in fig. 2:
the computer device 10000 can be connected to the client 30000 via a network 20000.
The computer device 10000 can provide services such as network debugging, or return the result data of delay measurement to the client 30000, etc.
The computer device 10000 can be located in a data center such as a single venue or distributed in different geographic locations (e.g., in multiple venues). The computer device 10000 can provide services via one or more networks 20000. Network 20000 includes various network devices such as routers, switches, multiplexers, hubs, modems, bridges, repeaters, firewalls, proxy devices, and/or the like. Network 20000 may include physical links such as coaxial cable links, twisted pair cable links, fiber optic links, combinations thereof, and the like. Network 20000 may include wireless links such as cellular links, satellite links, wi-Fi links, and the like.
The computer device 10000 can be implemented by one or more computing nodes. One or more computing nodes may include virtualized computing instances. Virtualized computing instances may comprise emulation of virtual machines, e.g., computer systems, operating systems, servers, etc. The computing node may load the virtual machine by the computing node based on the virtual image and/or other data defining the particular software (e.g., operating system, dedicated application, server) used for the emulation. As the demand for different types of processing services changes, different virtual machines may be loaded and/or terminated on one or more computing nodes. A hypervisor may be implemented to manage the use of different virtual machines on the same computing node.
The client 30000 may be configured to access the content and services of the computer device 10000. Client 30000 can include any type of electronic device, such as a mobile device, tablet device, laptop computer, workstation, virtual reality device, gaming device, set top box, digital streaming media device, vehicle terminal, smart television, set top box, and the like.
The client 30000 can output (e.g., display, render, present) the result data of the latency measurement, etc., to a user.
The network debugging scheme will be described below by way of various embodiments. The scheme may be implemented by the computer device 10000.
Example 1
Fig. 3 schematically shows a flow chart of a method of delay measurement according to a first embodiment of the application. Is applied to a live link, wherein the live link comprises a plurality of modules, the method comprises steps S302-S306, and the method comprises the steps of,
step S302, performing time checking processing on each module in the live link;
in this embodiment, the same time standard may be used to perform time calibration processing on each module in the live link, so as to unify the time standard of each module in the live link, and achieve that the time standard, time zone, and the like of each module in the live link are kept consistent.
Step S304, when a live stream data frame is transmitted, each module in the live link is controlled to insert an SEI timestamp in the live stream data frame based on the checked time;
in this embodiment, in order to calculate the delay of transmitting the live stream data frame for each module in the live link, it is specified that each module in the live link needs to insert an SEI timestamp in the live stream data frame when transmitting the live stream data frame. The push flow module can record the time before the data frame is packaged, and SEI information is inserted according to the time before the data frame is packaged; and the streaming media service module, the CDN content distribution module and the playing module can record the time of receiving the data frame and insert SEI information according to the time of receiving the data frame.
Step S306, determining the local delay of each module and the overall delay of the live link according to the SEI time stamp corresponding to each module recorded in the live stream data frame.
Specifically, when the transmission of the live stream data frame is completed, the receiving end can obtain SEI time stamps written in by each module respectively by analyzing the live stream data frame, and the time consumption, namely the local delay, of each module for transmitting the live stream data frame can be obtained by calculating according to the SEI time stamps; the time difference between the first module and the last module is calculated, so that the overall delay of the live link can be obtained, the delay of each module in the live link can be recorded in a concrete mode, the local delay of the link can be analyzed intuitively, and the module with longer delay in the live link can be positioned accurately, so that local optimization is performed.
Several alternative embodiments are provided below for the method of optimizing the delay measurement, in particular as follows:
in a preferred embodiment of the present application, the performing a time proofing process on each module in the live link includes:
and carrying out time checking processing on each module in the live link by calling a time checking interface in a preset time checking service.
The preset time setting service is a micro-service deployed in advance and is used for time checking of each module in the live link, and specifically, the preset time setting service can be deployed in a central server. The preset time setting service is to provide the current time for time proofreading in real time by taking universal time standard (UTC) as a standard.
In the time consuming measurement process of the live whole link, the time standard is a very important part, if the time proofreading of each module in the live whole link is not uniform, the situation that the time delay measurement is bigger or smaller can occur, for example, the time of the push side is almost consistent with the time of the central server, but the time of the audience side is greatly different from the time of the central server after being modified by a user, thus the calculated time delay of the live whole link can be bigger, and if the situation is too much, the accuracy of the time delay data of the whole live whole link can be affected. In this embodiment, by calling a time checking interface in a preset time checking service to perform time checking processing on each module in the live link, the consistency of time standards, time zones and the like of each module in the live link is realized, the uniformity and accuracy of time delay measurement of the live link are improved, and errors in time delay records caused by non-uniformity of clocks are avoided.
In a preferred embodiment of the present application, the time proofing process for each module in the live link by calling a time proofing interface in a preset time proofing service includes:
respectively determining the time consumption of each module in the live link for calling the preset time setting service;
under the condition that the time consumption for calling the preset time setting service is less than or equal to the preset time length, determining that time correction is successful on each module in the live link; or alternatively, the first and second heat exchangers may be,
and under the condition that the time consumption for calling the preset time setting service is longer than the preset time length, determining that the time checking of each module in the live link fails.
In order to prevent inaccuracy in time calibration caused by time consumption of the interface link of the time setting service, for example, when time 1 requests the interface of the preset time setting service, the interface link needs time to respond, the interface returns to time 2, and the two times have deviation, so that the time calibration is considered to be unsuccessful.
In this embodiment, the problem of inaccurate time correction caused by time consumption of interface requests is further optimized and compatible, and by calculating the time consumption of calling preset time setting service by the module according to each module, whether the time consumption of calling the preset time setting service is greater than a preset time length or not is judged, wherein the preset time length is a preset time consumption critical value, such as 250 milliseconds. Under the condition that the time consumption for calling the preset time setting service is less than or equal to the preset time length, determining that the time correction of each module in the live link is successful; or under the condition that the time consumption for calling the preset time setting service is longer than the preset time length, determining that the time checking of each module in the live link fails.
In a specific implementation, by respectively recording time of a process of requesting a time setting service interface by each module of a live link, a request end (each module of the live link) records time of sending a time setting request and receiving a time setting response, and time of receiving the request and returning a response result is recorded by the time setting service, and then time consuming calculation of the request link is performed at the request end. As an example, as shown in fig. 4, a schematic diagram of a time record of a time setting process is shown, where Client is a Client that requests a time setting service, and may be a live linkIs provided; the Server is a Server for responding to the time setting service, and can be the time setting service. Time t recorded by Client 0 Time t representing time of sending time-setting request 3 Indicating the time of receipt of the time-to-time response; time t recorded by Server 1 Indicating the time at which the received request was sent, t 2 Indicating the time at which the response result was returned. From FIG. 4, it can be derived (t 3 -t 0 )-(t 2 -t 1 ) For the time consumption of the time synchronization request sending and receiving process, the calculation request end and the time synchronization service time error formula is obtained by the above steps:
from the above formula, it can be seen that the lower the time consumption of the process of requesting the time-to-time service, the smaller the clock gap between the requesting end and the time-to-time service. In a specific implementation, the calculation of the maximum error of the time synchronization can be performed at the request end according to the time consumption of the conventional request link, and the establishment of the maximum error of the time synchronization is considered successful in time calibration of the request end as long as the maximum error of the time synchronization is less than 250 milliseconds, that is, the preset duration is set to be 250 milliseconds. Through the time correction formula, each module of the live link can calculate the maximum error according to the time returned by the request of the time synchronization service, if the calculated error is greater than the preset time length, the discarding of the SEI time stamp is directly carried out, the inaccuracy of the whole delay data of the live link caused by the recording of error data is prevented, and if the error is less than the preset time length, the insertion or updating of the SEI time stamp of the live stream data frame can be continuously carried out.
In a preferred embodiment of the present application, the modules included in the live link include: the system comprises a plug flow module, a streaming media service module, a CDN content distribution module and a playing module.
The live broadcast stream data is sent to the streaming media service module by the streaming media service module, the streaming media service module is used for managing and monitoring the live broadcast stream data, the CDN content distribution module is used for distributing the live broadcast stream data to a player of the user side, and the playing module is used for acquiring the live broadcast stream data, rendering and displaying the live broadcast stream data for the user to watch live broadcast.
In a preferred embodiment of the present application, the controlling each module in the live link to insert an SEI timestamp in a live stream data frame based on the calibrated time when the live stream data frame is transmitted includes:
when a live stream data frame is transmitted, controlling a plug flow module in the live stream link to determine a first timestamp before encoding the live stream data frame based on the time after correction;
and inserting an SEI information array in the live stream data frame, and inserting the first timestamp in the SEI information array.
In this embodiment, the insertion of the SEI timestamp is performed by the push module in the live link, and when the live stream data frame is transmitted, the push module in the live link is controlled to determine a first timestamp before encoding the live stream data frame based on the time after the calibration, then insert the SEI information array in the live stream data frame, and insert the first timestamp in the SEI information array.
In a specific implementation, the format of the SEI supplemental enhancement information is optimized, and the SEI information of the current link module is inserted according to a preset data structure when the format of the SEI is updated to an array mode. Wherein the preset data structure is used for defining a template of the inserted SEI information, the preset data structure may contain a necessary field and an optional field, and as an example, the preset data structure may be as follows:
{“curr_ms”=1666165726294,
“author”:“mg”,
“author_ver”:“v1.2.3”,
“clock_max_error_ms”:20,
“buffer_ms”:1000,
“protocol”:srt,
“muxer”:bmt,
“desc”:“”}
wherein curr_ms is used to define the timestamp of the current writing SEI, author is used to define the service name, author_ver is used to define the service version number, clock_max_error_ms is used to define the possible delay error, buffer_ms is used to define the known buffer size that would lead to an increase in delay, protocol is used to define the protocol layer type, mux is used to define the encapsulation layer type, desc is used to describe the information additionally. Wherein, curr_ms, author and author_ver are the necessary fields, clock_max_error_ms, buffer_ms, protocol, mux and desc are the optional fields.
In a preferred embodiment of the application, the method further comprises:
and determining the time consumption of the live stream data frame encoded by a push stream module in the live stream link according to the first time stamp.
Specifically, after encoding the live stream data frame, the push stream module in the live link records the time stamp of encoding completion, and the time consumption for encoding the live stream data frame is obtained by calculating the first time stamp and the time stamp of encoding completion.
By calibrating the time stamp before encoding the live broadcast content, after encoding the live broadcast stream data frame successfully, matching is performed according to the key frame label of the data frame, and the SEI time stamp is updated to be the time stamp recorded before encoding, so that the integrity of a live broadcast link can be ensured, the encoding time consumption of a push tool can be recorded, and related developers can check conveniently.
In a preferred embodiment of the present application, when transmitting a live stream data frame, the controlling each module in the live link to insert an SEI timestamp in the live stream data frame based on the calibrated time further includes:
and controlling a streaming media service module in the live link to determine a second timestamp of the received live streaming data frame based on the checked time, and inserting the second timestamp into the SEI information array.
In this embodiment, after the push module pushes the live stream data frame to the streaming media service module in the cloud, when the streaming media service module looks at the live stream data frame, after finding a specific SEI embedded point, the streaming media service module inserts information such as time taken to the live stream data frame as a small unit into the overall SEI embedded point information. If a codec operation is required, such as a transcoding service, the respective time stamp units are inserted before and after encoding.
In a preferred embodiment of the present application, when transmitting a live stream data frame, the controlling each module in the live link to insert an SEI timestamp in the live stream data frame based on the calibrated time further includes:
and controlling a CDN content distribution module in the live link to determine a third timestamp of the received live stream data frame based on the checked time, and inserting the third timestamp into the SEI information array.
In this embodiment, after receiving the live stream data frame, the CDN content delivery module discovers a specific SEI buried point, and inserts information such as a time taken to the live stream data frame as a small unit into the overall SEI buried point information. If a codec operation is required, such as a transcoding service, the respective time stamp units are inserted before and after encoding.
In a preferred embodiment of the present application, when transmitting a live stream data frame, the controlling each module in the live link to insert an SEI timestamp in the live stream data frame based on the calibrated time further includes:
and controlling a play module in the live link to determine a fourth timestamp of the received live stream data frame based on the checked time, and inserting the fourth timestamp into the SEI information array.
In this embodiment, after receiving the live stream data frame, the playing module discovers a specific SEI buried point, and inserts information such as a time taken to the live stream data frame as a small unit into the overall SEI buried point information.
In a preferred embodiment of the application, the method further comprises:
and controlling a play module in the live link to report the SEI information array to a preset database.
The playing module is the end point of the transmission of the live stream data frame, and the decoding of the live stream data frame has a great relation with the user equipment, and the rendering process of the live stream data frame does not belong to a live link, so that the whole SEI information module can be reported when the playing module receives the data frame with SEI information.
In a preferred embodiment of the application, the method further comprises:
and monitoring the local delay of each module and the overall delay of the live link.
In a specific implementation, for the SEI information reported by the playing module, the timestamp corresponding to each module may be distinguished according to the author field in the format, so as to calculate the delay of each module, and meanwhile, the delay of the whole live link may also be determined according to the first and the last of the whole array. And the local delay of each module and the overall delay of the live link are monitored to output the delay of the overall live link, so that a user can intuitively check the overall link delay and the local delay from the live link to the playing end, and a developer can conveniently check and locally optimize the delay. Fig. 4 is a schematic diagram of delay monitoring of a live link.
Example two
Fig. 5 schematically shows a block diagram of an apparatus for delay measurement according to a second embodiment of the application, which may be divided into one or more program modules, which are stored in a storage medium and executed by one or more processors, to complete the embodiment of the application. Program modules in the embodiments of the present application may be referred to as a series of computer program instruction segments capable of performing particular functions, and the following description may be presented in terms of their respective functions.
As shown in fig. 5, the apparatus 500 for delay measurement may include the following modules:
a time checking unit 510, configured to perform time checking processing on each module in the live link;
a timestamp inserting unit 520, configured to control each module in the live link to insert an SEI timestamp in the live stream data frame based on the calibrated time when the live stream data frame is transmitted;
and the delay determining unit 530 is configured to determine the local delay of each module and the overall delay of the live link according to the SEI timestamp corresponding to each module recorded in the live stream data frame.
In a preferred embodiment of the present application, the time proofing unit 510 includes:
and the time checking subunit is used for performing time checking processing on each module in the live link by calling a time checking interface in a preset time checking service.
In a preferred embodiment of the application, the time proofing subunit comprises:
the time consumption determination subunit is used for respectively determining the time consumption of each module in the live link for calling the preset time setting service;
the verification success subunit is used for determining that the time verification of each module in the live link is successful when the time consumption for calling the preset time setting service is less than or equal to the preset time length; or alternatively, the first and second heat exchangers may be,
and the verification failure subunit is used for determining that the time verification of each module in the live link fails under the condition that the time consumption for calling the preset time setting service is longer than the preset time length.
In a preferred embodiment of the present application, the modules included in the live link include: the system comprises a plug flow module, a streaming media service module, a CDN content distribution module and a playing module.
In a preferred embodiment of the present application, the time stamp inserting unit 520 includes:
The first timestamp inserting subunit is used for controlling a plug flow module in the live link to determine a first timestamp before encoding the live stream data frame based on the time after the correction when the live stream data frame is transmitted; and inserting an SEI information array in the live stream data frame, and inserting the first timestamp in the SEI information array.
In a preferred embodiment of the application, the device further comprises:
and the encoding time consumption determining subunit is used for determining the time consumption of encoding the live stream data frame by the push stream module in the live stream link according to the first time stamp.
In a preferred embodiment of the present application, the timestamp inserting unit 520 further includes:
and the second timestamp inserting subunit is used for controlling the streaming media service module in the live link to determine the second timestamp of the received live stream data frame based on the checked time, and inserting the second timestamp in the SEI information array.
In a preferred embodiment of the present application, the timestamp inserting unit 520 further includes:
and the third timestamp inserting subunit is used for controlling the CDN content distribution module in the live link to determine the third timestamp of the received live stream data frame based on the checked time, and inserting the third timestamp in the SEI information array.
In a preferred embodiment of the present application, the timestamp inserting unit 520 further includes:
and the fourth timestamp inserting subunit is used for controlling a playing module in the live link to determine fourth timestamps of the received live stream data frames based on the calibrated time, and inserting the fourth timestamps in the SEI information array.
In a preferred embodiment of the application, the device further comprises:
and the SEI information reporting unit is used for controlling a playing module in the live link to report the SEI information array to a preset database.
In a preferred embodiment of the application, the device further comprises:
and the delay monitoring unit is used for monitoring the local delay of each module and the overall delay of the live link.
Example III
Fig. 6 schematically shows a hardware architecture diagram of a computer device 10000 adapted to implement a method of latency measurement according to a third embodiment of the present application. In this embodiment, the computer device 10000 is a device capable of automatically performing numerical calculation and/or information processing in accordance with an instruction set or stored in advance. For example, the server may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack-mounted server, a blade server, a tower server, or a cabinet server (including a FEN independent server or a server cluster formed by a plurality of servers), etc. As shown in fig. 6, computer device 10000 includes at least, but is not limited to: the memory 10010, processor 10020, network interface 10030 may be communicatively linked to each other via a system bus. Wherein:
Memory 10010 includes at least one type of computer-readable storage medium including flash memory, hard disk, multimedia card, card memory (e.g., SD or DX memory, etc.), random Access Memory (RAM), static Random Access Memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, memory 10010 may be an internal storage module of computer device 10000, such as a hard disk or memory of computer device 10000. In other embodiments, the memory 10010 may also be an external storage device of the computer device 10000, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like. Of course, the memory 10010 may also include both an internal memory module of the computer device 10000 and an external memory device thereof. In this embodiment, the memory 10010 is typically used for storing an operating system installed on the computer device 10000 and various application software, such as program codes of a delay measurement method. In addition, the memory 10010 may be used to temporarily store various types of data that have been output or are to be output.
The processor 10020 may be a central processing unit (Central Processing Unit, simply CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 10020 is typically configured to control overall operation of the computer device 10000, such as performing control and processing related to data interaction or communication with the computer device 10000. In this embodiment, the processor 10020 is configured to execute program codes or process data stored in the memory 10010.
The network interface 10030 may comprise a wireless network interface or a wired network interface, which network interface 10030 is typically used to establish a communication link between the computer device 10000 and other computer devices. For example, the network interface 10030 is used to connect the computer device 10000 to an external terminal through a network, establish a data transmission channel and a communication link between the computer device 10000 and the external terminal, and the like. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a global system for mobile communications (Global System of Mobile communication, abbreviated as GSM), wideband code division multiple access (Wideband Code Division Multiple Access, abbreviated as WCDMA), a 4G network, a 5G network, bluetooth (Bluetooth), wi-Fi, etc.
It should be noted that fig. 6 only shows a computer device having components 10010-10030, but it should be understood that not all of the illustrated components are required to be implemented, and more or fewer components may be implemented instead.
In this embodiment, the method of delay measurement stored in the memory 10010 may be further divided into one or more program modules and executed by one or more processors (the processor 10020 in this embodiment) to complete the embodiment of the application.
Example IV
The embodiments of the present application also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of delay measurement in the embodiments.
In this embodiment, the computer-readable storage medium includes a flash memory, a hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the computer readable storage medium may be an internal storage unit of a computer device, such as a hard disk or a memory of the computer device. In other embodiments, the computer readable storage medium may also be an external storage device of a computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card), etc. that are provided on the computer device. Of course, the computer-readable storage medium may also include both internal storage units of a computer device and external storage devices. In this embodiment, the computer readable storage medium is typically used to store an operating system installed on a computer device and various types of application software, such as program codes of the delay measurement method in the embodiment. Furthermore, the computer-readable storage medium may also be used to temporarily store various types of data that have been output or are to be output.
It will be apparent to those skilled in the art that the modules or steps of the embodiments of the application described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may alternatively be implemented in program code executable by computing devices, so that they may be stored in a storage device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than what is shown or described, or they may be separately fabricated into individual integrated circuit modules, or a plurality of modules or steps in them may be fabricated into a single integrated circuit module. Thus, embodiments of the application are not limited to any specific combination of hardware and software.
The foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the application, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (14)

1. A method of delay measurement, applied to a live link, the live link including a plurality of modules, the method comprising:
Performing time checking processing on each module in the live link;
when a live stream data frame is transmitted, each module in the live link is controlled to insert an SEI timestamp into the live stream data frame based on the checked time;
and determining the local delay of each module and the overall delay of the live link according to the SEI timestamp corresponding to each module recorded in the live stream data frame.
2. The method for delay measurement according to claim 1, wherein the performing a time proofing process on each module in the live link includes:
and carrying out time checking processing on each module in the live link by calling a time checking interface in a preset time checking service.
3. The method for measuring delay according to claim 2, wherein the time proofing process for each module in the live link by calling a time proofing interface in a preset time proofing service comprises:
respectively determining the time consumption of each module in the live link for calling the preset time setting service;
under the condition that the time consumption for calling the preset time setting service is less than or equal to the preset time length, determining that time correction is successful on each module in the live link; or alternatively, the first and second heat exchangers may be,
And under the condition that the time consumption for calling the preset time setting service is longer than the preset time length, determining that the time checking of each module in the live link fails.
4. The method of latency measurement of claim 1, wherein the plurality of modules included in the live link comprises: the system comprises a plug flow module, a streaming media service module, a CDN content distribution module and a playing module.
5. The method of latency measurement according to claim 4, wherein controlling each module in the live link to insert an SEI timestamp in a live stream data frame based on the calibrated time when transmitting the live stream data frame comprises:
when a live stream data frame is transmitted, controlling a plug flow module in the live stream link to determine a first timestamp before encoding the live stream data frame based on the time after correction;
and inserting an SEI information array in the live stream data frame, and inserting the first timestamp in the SEI information array.
6. The method of latency measurement of claim 5, further comprising:
and determining the time consumption of the live stream data frame encoded by a push stream module in the live stream link according to the first time stamp.
7. The method of latency measurement according to claim 5, wherein the controlling each module in the live link to insert an SEI timestamp in a live stream data frame based on the collated time when transmitting the live stream data frame further comprises:
and controlling a streaming media service module in the live link to determine a second timestamp of the received live streaming data frame based on the checked time, and inserting the second timestamp into the SEI information array.
8. The method of latency measurement according to claim 5, wherein the controlling each module in the live link to insert an SEI timestamp in a live stream data frame based on the collated time when transmitting the live stream data frame further comprises:
and controlling a CDN content distribution module in the live link to determine a third timestamp of the received live stream data frame based on the checked time, and inserting the third timestamp into the SEI information array.
9. The method of latency measurement according to claim 5, wherein the controlling each module in the live link to insert an SEI timestamp in a live stream data frame when transmitting the live stream data frame further comprises:
And controlling a play module in the live link to determine a fourth timestamp of the received live stream data frame based on the checked time, and inserting the fourth timestamp into the SEI information array.
10. The method of latency measurement of claim 9, further comprising:
and controlling a play module in the live link to report the SEI information array to a preset database.
11. The method of latency measurement of claim 1, further comprising:
and monitoring the local delay of each module and the overall delay of the live link.
12. An apparatus for delay measurement, for use in a live link, the live link including a plurality of modules, the apparatus comprising:
the time checking unit is used for performing time checking processing on each module in the live link;
the time stamp inserting unit is used for controlling each module in the live link to insert SEI time stamps into the live stream data frames based on the calibrated time when the live stream data frames are transmitted;
and the delay determining unit is used for determining the local delay of each module and the overall delay of the live link according to the SEI timestamp corresponding to each module recorded in the live stream data frame.
13. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor executes the steps of the method for delay measurement according to any of claims 1 to 11.
14. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program executable by at least one processor to cause the at least one processor to perform the steps of the method of delay measurement according to any of claims 1 to 11.
CN202311177334.1A 2023-09-12 2023-09-12 Delay measurement method and device Pending CN117119229A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311177334.1A CN117119229A (en) 2023-09-12 2023-09-12 Delay measurement method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311177334.1A CN117119229A (en) 2023-09-12 2023-09-12 Delay measurement method and device

Publications (1)

Publication Number Publication Date
CN117119229A true CN117119229A (en) 2023-11-24

Family

ID=88798324

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311177334.1A Pending CN117119229A (en) 2023-09-12 2023-09-12 Delay measurement method and device

Country Status (1)

Country Link
CN (1) CN117119229A (en)

Similar Documents

Publication Publication Date Title
CN112188225B (en) Bullet screen issuing method for live broadcast playback and live broadcast video bullet screen playback method
US6581110B1 (en) Method and system for reading and propagating authenticated time throughout a worldwide enterprise system
US9674562B1 (en) Quality evaluation of multimedia delivery in cloud environments
TW202008794A (en) Establishment and use of time mapping based on interpolation using low-rate fingerprinting, to help facilitate frame-accurate content revision
CN109656574B (en) Transaction time delay measurement method and device, computer equipment and storage medium
US20080052702A1 (en) Firmware update method and system utilizing digital broadcasting system
TWI717769B (en) Advanced preparation for content revision based on expected latency in obtaining new content
CN112968747B (en) Time calibration method and device, computer equipment and storage medium
WO2020248375A1 (en) Method and system for synchronizing data between databases, computer device and storage medium
CN111596721B (en) Data time tag synchronization method and device
US20150071620A1 (en) Identifying and rerecording only the incomplete units of a program broadcast recording
EP3800894A1 (en) Method and apparatus for detecting video playing quality
US20190045179A1 (en) Method and system for checking video call quality of mobile terminal
CN113626416A (en) Data verification method and device, computing equipment and storage medium
US8327028B1 (en) Method and apparatus for providing time synchronization in a data protection system
CN117119229A (en) Delay measurement method and device
CN110795495A (en) Data processing method and device, electronic equipment and computer readable medium
CN109660837B (en) Multimedia program scheduling method and device
CN111726650B (en) Video live broadcast method and device and computer storage medium
CN112948195B (en) Interface testing method, device, electronic equipment and storage medium
CN114416420A (en) Equipment problem feedback method and system
CN113207007A (en) Live broadcast recording method based on HLS protocol
CN114760116B (en) Verification method, verification device, electronic equipment and storage medium
CN112822515B (en) Video file replacement method and device
CN117873596A (en) Configuration file synchronization method, distributed server cluster and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination