CN115499342A - Time delay calculation method and device - Google Patents

Time delay calculation method and device Download PDF

Info

Publication number
CN115499342A
CN115499342A CN202210956625.XA CN202210956625A CN115499342A CN 115499342 A CN115499342 A CN 115499342A CN 202210956625 A CN202210956625 A CN 202210956625A CN 115499342 A CN115499342 A CN 115499342A
Authority
CN
China
Prior art keywords
delay
rtp
current reference
way transmission
transmission delay
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
CN202210956625.XA
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.)
New H3C Technologies Co Ltd
Original Assignee
New H3C Technologies 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 New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN202210956625.XA priority Critical patent/CN115499342A/en
Publication of CN115499342A publication Critical patent/CN115499342A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • H04L43/0858One way delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/04Processing captured monitoring data, e.g. for logfile generation
    • 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
    • H04L43/0864Round trip delays

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Mining & Analysis (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present application relates to the field of data transmission technologies, and in particular, to a time delay calculation method and apparatus. The method is applied to a first terminal device, a real-time transport protocol RTP runs between the first terminal device and a second terminal device, and the method comprises the following steps: determining a current reference time delay, wherein the current reference time delay is a loop time delay between the current reference time delay and the second terminal equipment, which is calculated based on an RTP control protocol message; calculating the one-way transmission delay for transmitting the RTP message based on the received receiving timestamp of the RTP message transmitted by the second terminal equipment and the transmitting timestamp of the RTP message transmitted by the second terminal equipment carried by the RTP message; determining the one-way transmission delay deviation of the two RTP messages based on the one-way transmission delay of the RTP message and the one-way transmission delay of the RTP message obtained by the last calculation; and adjusting the current reference time delay between the current reference time delay and the second terminal equipment based on the current reference time delay and the one-way transmission time delay deviation.

Description

Time delay calculation method and device
Technical Field
The present application relates to the field of data transmission technologies, and in particular, to a time delay calculation method and apparatus.
Background
RTP (Real-time Transport Protocol) provides an end-to-end transmission service for multimedia data that needs to be transmitted in Real time, such as voice and image over IP. The RTP standard defines two sub-protocols: RTP and RTCP (RTP control protocol). The data transmission protocol RTP is used for transmitting data in real time, and provides information including: time stamps (for synchronization), sequence numbers (for packet loss and reordering detection), and payload formats (to illustrate the coding format of the data); the RTCP control protocol is used for statistical information feedback and for synchronizing media streams, where one important information is network latency.
In multimedia scenarios, as the number of video/voice receivers increases, end-to-end RTCP traffic can constitute a large amount of bandwidth used on the sender's machine. The more participants, the more total internet bandwidth is used for these RTCP reports, which may exhaust the bandwidth of the RTP audio/video data itself. To avoid this, the protocol will reduce the sending frequency of the SR/RR messages of RTCP to ensure that it does not occupy too much bandwidth. This results in that when the SR/RR packet frequency of RTCP is low enough, the protocol may not be able to obtain the network delay information in real time, which affects the real-time evaluation of network quality.
Disclosure of Invention
The application provides a time delay calculation method and a time delay calculation device.
In a first aspect, the present application provides a time delay calculation method, which is applied to a first terminal device, where a real-time transport protocol RTP operates between the first terminal device and a second terminal device, and the method includes:
determining a current reference time delay, wherein the current reference time delay is a loop time delay between the current reference time delay and the second terminal equipment, which is calculated based on an RTP control protocol message;
if receiving the RTP message sent by the second terminal equipment, calculating the one-way transmission delay for transmitting the RTP message based on the receiving timestamp for receiving the RTP message and the sending timestamp carried by the RTP message and used for sending the RTP message by the second terminal equipment;
determining the one-way transmission delay deviation of the two RTP messages based on the one-way transmission delay of the RTP message and the one-way transmission delay of the RTP message obtained by the last calculation;
and adjusting the loop delay between the current reference delay and the second terminal equipment based on the current reference delay and the unidirectional transmission delay deviation, and taking the adjusted loop delay as a new current reference delay.
Optionally, the step of determining the one-way transmission delay deviation of the two RTP packets based on the one-way transmission delay of the RTP packet and the one-way transmission delay of the RTP packet calculated last time includes:
and determining the difference value between the one-way transmission delay of the RTP message and the one-way transmission delay of the RTP message obtained by the last calculation as the one-way transmission delay deviation of the two RTP messages.
Optionally, the step of adjusting the loop delay with the second terminal device based on the current reference delay and the one-way transmission delay offset includes:
and taking the sum of the current reference time delay and the deviation of twice the one-way transmission time delay as the current loop-back time delay between the current reference time delay and the second terminal equipment.
Optionally, the received RTP packet sent by the second terminal device is an extended RTP packet, and the extended RTP packet also carries the one-way transmission delay deviation of the two RTP packets calculated by the second terminal device; the method further comprises the following steps:
and adjusting the loop delay between the second terminal equipment and the one-way transmission delay deviation of the two RTP messages calculated by the second terminal equipment carried by the extended RTP message based on the current reference delay, the one-way transmission delay deviation and the one-way transmission delay deviation of the two RTP messages, and taking the adjusted loop delay as a new current reference delay.
Optionally, the step of adjusting, based on the current reference delay, the one-way transmission delay deviation and the one-way transmission delay deviation of the two RTP packets calculated by the second terminal device carried by the extended RTP packet, a loop delay with the second terminal device, and taking the adjusted loop delay as a new current reference delay includes:
and taking the current reference delay, the sum of the unidirectional transmission delay deviation and the unidirectional transmission delay deviation of the two RTP messages which are obtained by calculation of the second terminal equipment and carried by the extended RTP message as the current loop-back delay between the current reference delay and the second terminal equipment.
Optionally, the method further comprises:
if the RTP control protocol message is received, recalculating the loop delay between the RTP control protocol message and the second terminal equipment based on the received RTP control protocol message, and taking the calculated loop delay as a new current reference delay.
In a second aspect, the present application provides a delay calculating apparatus, which is applied to a first terminal device, where a real-time transport protocol RTP operates between the first terminal device and a second terminal device, and the apparatus includes:
a first determining unit, configured to determine a current reference delay, where the current reference delay is a loop delay between the second terminal device and a loop delay calculated based on an RTP control protocol packet;
if receiving an RTP packet sent by the second terminal device, the computing unit is configured to compute a one-way transmission delay for transmitting the RTP packet based on a receiving timestamp for receiving the RTP packet and a sending timestamp carried by the RTP packet and used by the second terminal device for sending the RTP packet;
a second determining unit, configured to determine a unidirectional transmission delay deviation of the two RTP packets based on the unidirectional transmission delay of the RTP packet and the unidirectional transmission delay of the RTP packet obtained through the last calculation;
and the adjusting unit is used for adjusting the loop delay between the second terminal equipment and the second terminal equipment based on the current reference delay and the unidirectional transmission delay deviation, and taking the adjusted loop delay as a new current reference delay.
Optionally, when determining the one-way transmission delay deviation of the two RTP packets based on the one-way transmission delay of the RTP packet and the one-way transmission delay of the RTP packet calculated last time, the second determining unit is specifically configured to:
and determining the difference value between the one-way transmission delay of the RTP message and the one-way transmission delay of the RTP message obtained by the last calculation as the one-way transmission delay deviation of the two RTP messages.
Optionally, based on the current reference delay and the one-way transmission delay deviation, adjusting a loop delay with the second terminal device, where the adjusting unit is specifically configured to:
and taking the sum of the current reference time delay and the deviation of twice the one-way transmission time delay as the current loop-back time delay between the current reference time delay and the second terminal equipment.
Optionally, the received RTP packet sent by the second terminal device is an extended RTP packet, and the extended RTP packet also carries the one-way transmission delay deviation of the two RTP packets calculated by the second terminal device; the adjustment unit is further configured to:
and adjusting the loop delay between the second terminal equipment and the one-way transmission delay deviation of the two RTP messages calculated by the second terminal equipment carried by the extended RTP message based on the current reference delay, the one-way transmission delay deviation and the one-way transmission delay deviation of the two RTP messages, and taking the adjusted loop delay as a new current reference delay.
Optionally, based on the current reference delay, the unidirectional transmission delay deviation and the unidirectional transmission delay deviation of the two RTP packets calculated by the second terminal device carried by the extended RTP packet, adjusting a loop delay with the second terminal device, and taking the adjusted loop delay as a new current reference delay, where the adjusting unit is specifically configured to:
and taking the current reference delay, the sum of the unidirectional transmission delay deviation and the unidirectional transmission delay deviation of the two RTP messages calculated by the second terminal equipment carried by the extended RTP message as the current loop-back delay between the current reference delay and the second terminal equipment.
Optionally, if an RTP control protocol packet is received, the calculating unit is further configured to recalculate a loop delay with the second terminal device based on the received RTP control protocol packet, and use the calculated loop delay as a new current reference delay.
In a third aspect, an embodiment of the present application provides a time delay calculation apparatus, where the time delay calculation apparatus includes:
a memory for storing program instructions;
a processor for calling program instructions stored in said memory and for executing the steps of the method according to any one of the above first aspects in accordance with the obtained program instructions.
In a fourth aspect, the present application further provides a computer-readable storage medium storing computer-executable instructions for causing a computer to perform the steps of the method according to any one of the above first aspects.
In summary, the delay calculation method provided in the embodiment of the present application is applied to a first terminal device, where a real-time transport protocol RTP operates between the first terminal device and a second terminal device, and the method includes: determining a current reference time delay, wherein the current reference time delay is a loop time delay between the current reference time delay and the second terminal equipment, which is calculated based on an RTP control protocol message; if receiving the RTP message sent by the second terminal equipment, calculating the one-way transmission delay for transmitting the RTP message based on the receiving timestamp for receiving the RTP message and the sending timestamp carried by the RTP message and used for sending the RTP message by the second terminal equipment; determining the one-way transmission delay deviation of the two RTP messages based on the one-way transmission delay of the RTP message and the one-way transmission delay of the RTP message obtained by the last calculation; and adjusting the loop delay between the current reference delay and the second terminal equipment based on the current reference delay and the unidirectional transmission delay deviation, and taking the adjusted loop delay as a new current reference delay.
By adopting the time delay calculation method provided by the embodiment of the application, the message time delay is calculated in real time by combining the RTP and the RTCP, and the real-time performance of monitoring the network time delay condition can be ensured under the condition that the RTCP frequency is reduced. And the network delay condition can be reflected in real time under the condition that the SR/RR messages are partially lost. Meanwhile, the method can reduce the requirement of the RTP on the sending frequency of the RTCP protocol messages to a certain extent, and less RTCP messages can enable more bandwidths to be used for the transmission of the RTP messages, thereby improving the network quality.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments of the present application or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to the drawings of the embodiments of the present application.
Fig. 1 is a detailed flowchart of a delay calculation method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a delay calculating apparatus according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of a hardware architecture of a latency calculating apparatus according to an embodiment of the present disclosure.
Detailed Description
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein is meant to encompass any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in the embodiments of the present application to describe various information, the information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. Depending on the context, moreover, the word "if" is used may be interpreted as "at … …" or "at … …" or "in response to a determination".
Exemplarily, referring to fig. 1, a detailed flowchart of a delay calculation method provided in an embodiment of the present application is shown, where the method is applied to a first terminal device, and a real-time transport protocol RTP is operated between the first terminal device and a second terminal device, and the method includes the following steps:
step 100: and determining the current reference time delay, wherein the current reference time delay is the loop time delay between the current reference time delay and the second terminal equipment, which is calculated based on the RTP control protocol message.
In this embodiment of the present application, a first terminal device first determines a current reference delay, that is, an initial delay, between itself and a second terminal device, and in practical applications, the first terminal device and the second terminal device perform delay detection based on an RTCP protocol, so that the current reference delay may be a loop delay between the first terminal device and the second terminal device, which is calculated based on an RTP control protocol packet.
For example, at time t1, the S end (e.g., the first terminal device) sends an SR message to the C end, and after receiving the SR message, the C end (e.g., the second terminal device) sends an SR/RR message to the S end, where the message carries a DLSR (time interval from the last time the SR message is received to the current time the SR/RR message is sent). After receiving the SR/RR message sent by the C end, the S end records the current time t2, and the t2-t1-DLSR is the loop-back time delay TTL of the message at the t2 moment; and meanwhile, the RTP time delay is updated to TTL (current reference time delay).
Step 110: and if the RTP message sent by the second terminal equipment is received, calculating the one-way transmission delay for transmitting the RTP message based on the receiving timestamp for receiving the RTP message and the sending timestamp carried by the RTP message and used for sending the RTP message by the second terminal equipment.
In practical application, in order to enable the RTCP message to occupy no too much bandwidth and reduce the RTCP message sending frequency, in this embodiment of the application, the first terminal device may correct and adjust the loop delay between the first terminal device and the second terminal device based on the RTP message sent between the first terminal device and the second terminal device.
Specifically, the first terminal device may process a received RTP packet sent by the second terminal device based on a preset rule, record a receiving timestamp for receiving the RTP packet, analyze the RTP packet, obtain a sending timestamp, carried in the RTP packet, of the RTP packet sent by the second terminal device, and calculate a one-way transmission delay for transmitting the RTP packet based on the receiving timestamp and the sending timestamp.
It should be noted that, the first terminal device may process each received RTP packet sent by the second terminal device to obtain a one-way transmission delay corresponding to the RTP packet, or may process the received RTP packet sent by the second terminal device without a preset time interval to obtain the one-way transmission delay corresponding to the RTP packet.
Step 120: and determining the unidirectional transmission delay deviation of the two RTP messages based on the unidirectional transmission delay of the RTP message and the unidirectional transmission delay of the RTP message obtained by the last calculation.
In this embodiment of the present application, when determining the one-way transmission delay deviation of the two RTP packets based on the one-way transmission delay of the RTP packet and the one-way transmission delay of the RTP packet obtained by the previous calculation, a preferred implementation manner is: and determining the difference value between the one-way transmission delay of the RTP message and the one-way transmission delay of the RTP message obtained by the last calculation as the one-way transmission delay deviation of the two RTP messages.
In the embodiment of the application, after the first terminal device determines the current reference delay between the first terminal device and the second terminal device according to the RTP control protocol message and calculates the one-way transmission delay of the RTP message for the first time according to the RTP message sent by the second terminal device based on the preset rule, the one-way transmission delay of the RTP message is calculated for the second time, and the one-way transmission delay deviation of the RTP message calculated for two adjacent times is determined.
For example, the first calculated one-way transmission delay of the RTP packet is X 1 =(T 2 -T 1 ) Wherein, T 2 Time, T, of receiving RTP message for first terminal equipment 1 The time of sending the RTP message for the second terminal device carried by the RTP is, similarly, the one-way transmission delay of the RTP message calculated for the second time is X 2 =(T 4 -T 3 ) Wherein, T 4 Time, T, of receiving RTP message for first terminal equipment 3 And sending the RTP message to the second terminal equipment carried by the RTP. Then, X 2 And X 1 The difference e1 is the one-way transmission delay deviation between the one-way transmission delay of the RTP packet calculated for the second time and the one-way transmission delay of the RTP packet calculated for the first time, i.e. the RTP packet transmitted by the second terminal device to the first terminal device for the second time is larger than the one transmitted by the second terminal deviceThe end device transmits more/less RTP messages to the first terminal device last time, and the e1 time is spent.
Similarly, the third calculated one-way transmission delay of the RTP packet is X 3 =(T 6 -T 5 ) Wherein, T 6 Time, T, of receiving RTP message for first terminal equipment 5 And sending the RTP message to the second terminal equipment carried by the RTP. Then, X 3 And X 3 The difference e2 is the unidirectional transmission delay deviation between the third calculated unidirectional transmission delay of the RTP packet and the second calculated unidirectional transmission delay of the RTP packet, that is, the second terminal device transmits the RTP packet to the first terminal device for the third time, and it takes more/less e2 time than the second terminal device transmits the RTP packet to the first terminal device for the last time.
Step 130: and adjusting the loop delay between the current reference delay and the second terminal equipment based on the current reference delay and the unidirectional transmission delay deviation, and taking the adjusted loop delay as a new current reference delay.
In the embodiment of the present application, when the loop delay with the second terminal device is adjusted based on the current reference delay and the one-way transmission delay offset, a preferable implementation manner is that a sum of the current reference delay and twice the one-way transmission delay offset is used as the current loop delay with the second terminal device.
That is to say, after determining the current reference delay between the first terminal device and the second terminal device based on the RTP control protocol packet, if a subsequent RTP control protocol packet is not received for a long time, the first terminal device may adjust the current reference delay based on the RTP control protocol packet, specifically, calculate the unidirectional transmission delay deviation of two adjacent RTP packets according to the unidirectional transmission delay of the received RTP packet, and then adjust the current reference delay according to the calculated unidirectional transmission delay deviation of the RTP packet to obtain a new current reference delay. And calculating the one-way transmission delay of the two RTP messages according to the one-way transmission delay of the RTP message calculated at the time and the one-way transmission delay of the RTP message calculated at the last time, and then adjusting the current reference delay according to the calculated one-way transmission delay.
And iteratively executing the step of adjusting the current reference delay based on the one-way elaboration delay deviation of the RTP message until a RTP control protocol message is received, determining the loop delay between the RTP control protocol message and the second terminal equipment based on the RTP control protocol message, and taking the loop delay as the current reference delay.
Specifically, if an RTP control protocol packet is received, the loop delay with the second terminal device is recalculated based on the received RTP control protocol packet, and the calculated loop delay is used as a new current reference delay.
Further, in this embodiment of the application, the received RTP packet sent by the second terminal device is an extended RTP packet, and the extended RTP packet also carries a one-way transmission delay deviation of two RTP packets calculated by the second terminal device; then, the delay calculation method may further include the steps of:
and adjusting the loop delay between the second terminal equipment and the one-way transmission delay deviation of the two RTP messages calculated by the second terminal equipment carried by the extended RTP message based on the current reference delay, the one-way transmission delay deviation and the one-way transmission delay deviation of the two RTP messages, and taking the adjusted loop delay as a new current reference delay.
That is to say, the second terminal device may also calculate, based on the same rule, a unidirectional transmission delay deviation of a transmission link between the first terminal device and the second terminal device for an RTP packet sent by the first terminal device, and notify the calculated unidirectional transmission delay deviation of the transmission link to the first terminal device through the extended RTP packet, and then, according to the current reference delay, the first terminal device locally calculates an obtained unidirectional transmission delay of the transmission link between the second terminal device and the first terminal device, and an obtained unidirectional transmission delay between the first terminal device and the second terminal device, and adjusts a loop delay between the first terminal device and the second terminal device, so as to obtain an adjusted current reference delay.
Certainly, the first terminal device calculates the one-way transmission delay variation of the two RTP packets, and may also notify the second terminal device of the one-way transmission delay variation carried in the extended RTP packet.
In this embodiment of the application, based on the current reference delay, the one-way transmission delay deviation and the one-way transmission delay deviation of the two RTP packets calculated by the second terminal device carried by the extended RTP packet, the loop delay with the second terminal device is adjusted, and the adjusted loop delay is used as a new current reference delay, which is preferably implemented by using the sum of the current reference delay, the one-way transmission delay deviation and the one-way transmission delay deviation of the two RTP packets calculated by the second terminal device carried by the extended RTP packet as the current loop delay with the second terminal device.
Exemplarily, referring to fig. 2, a schematic structural diagram of a delay calculating apparatus provided in an embodiment of the present application is shown, where the apparatus is applied to a first terminal device, and a real-time transport protocol RTP is operated between the first terminal device and a second terminal device, and the apparatus includes:
a first determining unit 20, configured to determine a current reference delay, where the current reference delay is a loop delay between the second terminal device and the current reference delay calculated based on the RTP control protocol packet;
a calculating unit 21, configured to calculate a one-way transmission delay for transmitting the RTP packet based on a receiving timestamp for receiving the RTP packet and a sending timestamp, carried by the RTP packet, for sending the RTP packet, where the RTP packet is sent by the second terminal device, if the RTP packet sent by the second terminal device is received;
a second determining unit 22, configured to determine a unidirectional transmission delay deviation of the two RTP packets based on the unidirectional transmission delay of the RTP packet and the unidirectional transmission delay of the RTP packet obtained by the last calculation;
an adjusting unit 23, configured to adjust a loop delay with the second terminal device based on the current reference delay and the one-way transmission delay deviation, and use the adjusted loop delay as a new current reference delay.
Optionally, when determining the one-way transmission delay deviation of the two RTP packets based on the one-way transmission delay of the RTP packet and the one-way transmission delay of the RTP packet calculated last time, the second determining unit 22 is specifically configured to:
and determining the difference value between the one-way transmission delay of the RTP message and the one-way transmission delay of the RTP message obtained by the last calculation as the one-way transmission delay deviation of the two RTP messages.
Optionally, based on the current reference delay and the one-way transmission delay deviation, adjusting a loop delay with the second terminal device, where the adjusting unit 23 is specifically configured to:
and taking the sum of the current reference time delay and the deviation of twice the one-way transmission time delay as the current loop-back time delay between the current reference time delay and the second terminal equipment.
Optionally, the received RTP packet sent by the second terminal device is an extended RTP packet, and the extended RTP packet also carries the one-way transmission delay deviation of the two RTP packets calculated by the second terminal device; the adjusting unit 23 is further configured to:
and adjusting the loop delay between the second terminal equipment and the one-way transmission delay deviation of the two RTP messages calculated by the second terminal equipment carried by the extended RTP message based on the current reference delay, the one-way transmission delay deviation and the one-way transmission delay deviation of the two RTP messages, and taking the adjusted loop delay as a new current reference delay.
Optionally, based on the current reference delay, the unidirectional transmission delay offset, and the unidirectional transmission delay offset of the two RTP packets calculated by the second terminal device carried in the extended RTP packet, the loop delay between the second terminal device and the adjusted loop delay is adjusted, and the adjusted loop delay is used as a new current reference delay, where the adjusting unit 23 is specifically configured to:
and taking the current reference delay, the sum of the unidirectional transmission delay deviation and the unidirectional transmission delay deviation of the two RTP messages calculated by the second terminal equipment carried by the extended RTP message as the current loop-back delay between the current reference delay and the second terminal equipment.
Optionally, if an RTP control protocol packet is received, the calculating unit is further configured to recalculate a loop delay with the second terminal device based on the received RTP control protocol packet, and use the calculated loop delay as a new current reference delay.
The above units may be one or more integrated circuits configured to implement the above methods, for example: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), among others. For another example, when one of the above units is implemented in the form of a Processing element scheduler code, the Processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. For another example, these units may be integrated together and implemented in the form of a system-on-a-chip (SOC).
Further, in the latency calculation apparatus provided in the embodiment of the present application, from a hardware level, a schematic diagram of a hardware architecture of the latency calculation apparatus may be shown in fig. 3, where the latency calculation apparatus may include: a memory 30 and a processor 31 for storing data,
the memory 30 is used for storing program instructions; the processor 31 calls the program instructions stored in the memory 30 and executes the above-described method embodiments in accordance with the obtained program instructions. The specific implementation and technical effects are similar, and are not described herein again.
Optionally, the present application also provides a terminal device, including at least one processing element (or chip) for executing the above method embodiments.
Optionally, the present application also provides a program product, such as a computer-readable storage medium, which stores computer-executable instructions for causing the computer to perform the above-mentioned method embodiments.
Here, a machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and so forth. For example, the machine-readable storage medium may be: RAM (random Access Memory), volatile Memory, non-volatile Memory, flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the various elements may be implemented in the same one or more pieces of software and/or hardware in the practice of the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Furthermore, these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (12)

1. A time delay calculation method is applied to a first terminal device, a real-time transport protocol (RTP) is operated between the first terminal device and a second terminal device, and the method comprises the following steps:
determining a current reference time delay, wherein the current reference time delay is a loop time delay between the current reference time delay and the second terminal equipment, which is calculated based on an RTP control protocol message;
if receiving the RTP message sent by the second terminal equipment, calculating the one-way transmission delay for transmitting the RTP message based on the receiving timestamp for receiving the RTP message and the sending timestamp carried by the RTP message and used for sending the RTP message by the second terminal equipment;
determining the one-way transmission delay deviation of the two RTP messages based on the one-way transmission delay of the RTP message and the one-way transmission delay of the RTP message obtained by the last calculation;
and adjusting the loop delay between the current reference delay and the second terminal equipment based on the current reference delay and the unidirectional transmission delay deviation, and taking the adjusted loop delay as a new current reference delay.
2. The method of claim 1, wherein the step of determining the one-way transmission delay deviation of two RTP packets based on the one-way transmission delay of the RTP packet and the one-way transmission delay of the RTP packet calculated last time comprises:
and determining the difference value between the one-way transmission delay of the RTP message and the one-way transmission delay of the RTP message obtained by the last calculation as the one-way transmission delay deviation of the two RTP messages.
3. The method of claim 2, wherein the step of adjusting the loop delay with the second terminal device based on the current reference delay and the one-way transmission delay offset comprises:
and taking the sum of the current reference time delay and the deviation of twice the one-way transmission time delay as the current loop-back time delay between the current reference time delay and the second terminal equipment.
4. The method according to claim 1, wherein the received RTP packet sent by the second terminal device is an extended RTP packet, and the extended RTP packet further carries a one-way transmission delay offset of two RTP packets calculated by the second terminal device; the method further comprises the following steps:
and adjusting the loop delay between the second terminal equipment and the one-way transmission delay deviation of the two RTP messages calculated by the second terminal equipment carried by the extended RTP message based on the current reference delay, the one-way transmission delay deviation and the one-way transmission delay deviation of the two RTP messages, and taking the adjusted loop delay as a new current reference delay.
5. The method of claim 4, wherein the step of adjusting the loop delay with the second terminal device based on the current reference delay, the one-way transmission delay offset and the one-way transmission delay offset of the two RTP packets calculated by the second terminal device carried by the extended RTP packet, and using the adjusted loop delay as the new current reference delay comprises:
and taking the current reference delay, the sum of the unidirectional transmission delay deviation and the unidirectional transmission delay deviation of the two RTP messages calculated by the second terminal equipment carried by the extended RTP message as the current loop-back delay between the current reference delay and the second terminal equipment.
6. The method of claim 1, wherein the method further comprises:
if the RTP control protocol message is received, recalculating the loop delay between the RTP control protocol message and the second terminal equipment based on the received RTP control protocol message, and taking the calculated loop delay as a new current reference delay.
7. A time delay calculation device is applied to a first terminal device, a real-time transport protocol (RTP) runs between the first terminal device and a second terminal device, and the device comprises:
a first determining unit, configured to determine a current reference delay, where the current reference delay is a loop delay between the second terminal device and a loop delay calculated based on an RTP control protocol packet;
if receiving an RTP packet sent by the second terminal device, the computing unit is configured to compute a one-way transmission delay for transmitting the RTP packet based on a receiving timestamp for receiving the RTP packet and a sending timestamp carried by the RTP packet and used by the second terminal device for sending the RTP packet;
a second determining unit, configured to determine a unidirectional transmission delay deviation of the two RTP packets based on the unidirectional transmission delay of the RTP packet and the unidirectional transmission delay of the RTP packet obtained through the last calculation;
and the adjusting unit is used for adjusting the loop delay between the second terminal equipment and the second terminal equipment based on the current reference delay and the unidirectional transmission delay deviation, and taking the adjusted loop delay as a new current reference delay.
8. The apparatus according to claim 7, wherein when determining the one-way transmission delay deviation of two RTP packets based on the one-way transmission delay of the RTP packet and the one-way transmission delay of the RTP packet calculated last time, the second determining unit is specifically configured to:
and determining the difference value between the one-way transmission delay of the RTP message and the one-way transmission delay of the RTP message obtained by the last calculation as the one-way transmission delay deviation of the two RTP messages.
9. The apparatus of claim 8, wherein the adjusting unit is configured to adjust a loop-back delay with the second terminal device based on the current reference delay and the one-way transmission delay offset, and is specifically configured to:
and taking the sum of the current reference time delay and the deviation of twice the one-way transmission time delay as the current loop-back time delay between the current reference time delay and the second terminal equipment.
10. The apparatus according to claim 7, wherein the RTP packet received and sent by the second terminal device is an extended RTP packet, and the extended RTP packet further carries a one-way transmission delay offset of two RTP packets calculated and obtained by the second terminal device; the adjustment unit is further configured to:
and adjusting the loop delay between the second terminal equipment and the one-way transmission delay deviation of the two RTP messages calculated by the second terminal equipment carried by the extended RTP message based on the current reference delay, the one-way transmission delay deviation and the one-way transmission delay deviation of the two RTP messages, and taking the adjusted loop delay as a new current reference delay.
11. The apparatus of claim 10, wherein based on the current reference delay, the one-way transmission delay offset, and a one-way transmission delay offset of two RTP packets calculated by the second terminal device carried by the extended RTP packet, the adjusting unit is specifically configured to adjust a loop delay with the second terminal device, and use the adjusted loop delay as a new current reference delay, and the adjusting unit is further configured to:
and taking the current reference delay, the sum of the unidirectional transmission delay deviation and the unidirectional transmission delay deviation of the two RTP messages calculated by the second terminal equipment carried by the extended RTP message as the current loop-back delay between the current reference delay and the second terminal equipment.
12. The apparatus of claim 7,
if receiving the RTP control protocol packet, the calculating unit is further configured to recalculate the loop delay with the second terminal device based on the received RTP control protocol packet, and use the calculated loop delay as a new current reference delay.
CN202210956625.XA 2022-08-10 2022-08-10 Time delay calculation method and device Pending CN115499342A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210956625.XA CN115499342A (en) 2022-08-10 2022-08-10 Time delay calculation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210956625.XA CN115499342A (en) 2022-08-10 2022-08-10 Time delay calculation method and device

Publications (1)

Publication Number Publication Date
CN115499342A true CN115499342A (en) 2022-12-20

Family

ID=84465910

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210956625.XA Pending CN115499342A (en) 2022-08-10 2022-08-10 Time delay calculation method and device

Country Status (1)

Country Link
CN (1) CN115499342A (en)

Similar Documents

Publication Publication Date Title
US7583666B2 (en) Protocol information processing system and method information processing device and method recording medium and program
KR100750669B1 (en) Method and device for multimedia streaming
CN101356814B (en) Communication processing device, communication control method
EP3329641B1 (en) Monitoring network conditions
JP2004266840A (en) Controlling admission of data stream onto network based on end-to-end measurement
GB2525948A (en) Packet loss and bandwidth coordination
US8873590B2 (en) Apparatus and method for correcting jitter
WO2016090632A1 (en) Method and apparatus for detecting operating state of node
CN111741248A (en) Data transmission method, device, terminal equipment and storage medium
US10419332B2 (en) Feedback management in a multipath communication network
JP2023522895A (en) Method and server for audio and/or video content delivery
US11064511B2 (en) Dejittering system
CN110233856B (en) Message processing method and device and computer readable storage medium
WO2019044065A1 (en) Video playback bit rate estimation device and method, non-transitory computer-readable medium containing program, and communication quality measurement device
JP3871661B2 (en) Multimedia content receiving apparatus and multimedia content receiving method
US11190430B2 (en) Determining the bandwidth of a communication link
CN108933768B (en) Method and device for acquiring sending frame rate of video frame
CN115499342A (en) Time delay calculation method and device
GB2543840A (en) Method and server for managing the transmission of packets over a plurality of paths
CN111385081B (en) End-to-end communication method and device, electronic equipment and medium
WO2005053227A1 (en) Methods and system for measuring the round trip time in packet switching telecommunication networks
US10171209B2 (en) Method for communicating media data between two devices incorporating effectiveness of error correction strategies and associated computer program, communication quality module and device
US10772010B2 (en) Transmission apparatus, method for controlling transmission, and recording medium
CN112839240B (en) Bandwidth detection method and system based on video stream
WO2021144139A1 (en) Method, apparatus and computer program product providing for signaling of viewport orientation timing in panoramic video delivery

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