CN105610652A - Method and device for acquiring data transmission delay - Google Patents

Method and device for acquiring data transmission delay Download PDF

Info

Publication number
CN105610652A
CN105610652A CN201610101530.4A CN201610101530A CN105610652A CN 105610652 A CN105610652 A CN 105610652A CN 201610101530 A CN201610101530 A CN 201610101530A CN 105610652 A CN105610652 A CN 105610652A
Authority
CN
China
Prior art keywords
time
packet
transmission
delay
stamp
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.)
Granted
Application number
CN201610101530.4A
Other languages
Chinese (zh)
Other versions
CN105610652B (en
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201610101530.4A priority Critical patent/CN105610652B/en
Publication of CN105610652A publication Critical patent/CN105610652A/en
Application granted granted Critical
Publication of CN105610652B publication Critical patent/CN105610652B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

The invention relates to a method and a device for acquiring data transmission delay. The method comprises the following steps: acquiring transmission delay of a first data packet to serve as reference transmission delay; and calculating transmission delay of a second data packet according to the reference transmission delay, transmission time and receiving time of the first data packet, and transmission time and receiving time of the second data packet, wherein the transmission time of the first data packet precedes the transmission time of the second data packet. In the embodiment of the invention, the transmission delay of one data packet is taken as the reference transmission delay, so that transmission delay of subsequent other data packets can be calculated; a confirmation message does not need to be sent to every data packet; time delay of data transmission among non-synchronous equipment can be calculated rapidly; and a bandwidth load and transmission flow can also be reduced.

Description

The acquisition methods of transfer of data time delay and device
Technical field
The present invention relates to communication technical field, relate in particular to a kind of acquisition methods and dress of transfer of data time delayPut.
Background technology
In the process of transfer of data, because the clock of two equipment cannot be accomplished Complete Synchronization, can adoptCarry out the time delay of statistical data packet transmission by packet round-trip transmission. Concrete grammar is that receiving equipment is received numberAccording to after reply again and confirm that (ack), to transmitting apparatus, records two-way time by transmitting apparatus, then with roundTime is obtained transmission delay divided by 2.
But, adopt packet round-trip transmission to carry out the method for statistical time lag, every transmission one number of transmitting apparatusAll the laggard line delay statistics of receiving equipment reply ack need to waited for according to bag. Like this, not only pass to dataDefeated channel has increased the bandwidth burden of a times, and only transmitting apparatus receive receiving equipment replyThe statistics that just can provide time delay after ack, real-time is not high.
Summary of the invention
Technical problem
In view of this, the technical problem to be solved in the present invention is how to improve obtaining of transfer of data time delaySpeed.
Solution
In order to solve the problems of the technologies described above, according to one embodiment of the invention, provide a kind of transfer of dataThe acquisition methods of time delay, comprising:
The transmission delay that obtains the first packet is as with reference to transmission delay;
According to transmitting time and the time of reception of described reference transmission time delay, described the first packet, andThe transmitting time of the second packet and time of reception, calculate the transmission delay of described the second packet;
Wherein, the transmitting time of described the first packet is before the transmitting time of described the second packet.
For said method, in a kind of possible implementation, obtain the transmission delay of the first packetAs with reference to transmission delay, comprising:
Send synchronization packets, and record sends the transmitting time stamp of described synchronization packets;
In the situation that receiving described the first packet, the time of reception of described the first packet received in recordStamp, the confirmation message that described the first packet returns for the described synchronization packets of response;
According to the time of reception stamp and the transmission of sending described synchronization packets of receiving described the first packetTimestamp, calculates the two-way time of transmitting;
According to calculating described reference transmission time delay described two-way time.
For said method, in a kind of possible implementation, according to described reference transmission time delay, instituteState transmitting time and the time of reception of the first packet, and the transmitting time of the second packet and receive timeBetween, calculate the transmission delay of described the second packet, comprising:
In the situation that receiving described the second packet, from described the second packet, obtain and send describedThe transmitting time stamp of two packets, and the time of reception stamp of described the second packet received in record;
According to the transmitting time stamp of described reference transmission time delay, described the first packet and time of reception stamp,And the transmitting time of described the second packet is stabbed and time of reception stamp, calculate the biography of described the second packetDefeated time delay.
For said method, in a kind of possible implementation, according to described reference transmission time delay, instituteState transmitting time stamp and the time of reception stamp of the first packet, and the transmitting time of described the second packetStamp and time of reception stab, and calculate the transmission delay of described the second packet, comprising:
Employing following formula 1 calculates the transmission delay of described the second packet,
Dn=(tn'-t1')-(tn-t1)+d1 formula 1,
Wherein, t1 is the transmitting time stamp of described the first packet, and t1' is the reception of described the first packetTimestamp, tn is the transmitting time stamp of described the second packet, when tn' is the reception of described the second packetBetween stamp, d1 is described reference transmission time delay, dn is the transmission delay of described the second packet.
For said method, in a kind of possible implementation, also comprise:
At interval of the time cycle of setting, resend once described synchronization packets;
Transmission delay at the first packet of this calculating is less than setting threshold, adopts thisThe transmission delay of the first packet calculating is as described reference transmission time delay.
For said method, in a kind of possible implementation, also comprise:
Be greater than setting threshold at the transmission delay of this calculating, adopt the transmission of last time calculating to prolongReference transmission time delay described in Shi Zuowei.
The present invention also provides a kind of acquisition device of transfer of data time delay, comprising:
Acquisition module, for the transmission delay that obtains the first packet as with reference to transmission delay;
Computing module, is connected with described acquisition module, for according to described reference transmission time delay, describedThe transmitting time of one packet and time of reception, and the transmitting time of the second packet and time of reception,Calculate the transmission delay of described the second packet;
Wherein, the transmitting time of described the first packet is before the transmitting time of described the second packet.
For said apparatus, in a kind of possible implementation, described acquisition module comprises:
The first transmitting element, for sending synchronization packets, and record sends sending out of described synchronization packetsSend timestamp;
The first receiving element, in the situation that receiving described the first packet, record receives described theThe time of reception stamp of one packet, described the first packet is returned really by the described synchronization packets of responseRecognize message;
The first computing unit, is connected respectively with described the first transmitting element and described the first receiving element, usesIn the time stabbing and send the transmission of described synchronization packets according to the time of reception of receiving described the first packetBetween stamp, calculate transmission two-way time;
The second computing unit, is connected with described the first computing unit, for according to calculating described two-way timeDescribed reference transmission time delay.
For said apparatus, in a kind of possible implementation, described computing module comprises:
The second receiving element, in the situation that receiving described the second packet, from described the second dataIn bag, obtain the transmitting time stamp that sends described the second packet, and described the second packet received in recordTime of reception stamp;
The 3rd computing unit, connects with described the second receiving element, described the second computing unit and described firstReceive unit and connect respectively, for according to the transmitting time of described reference transmission time delay, described the first packetStamp and time of reception stamp, and the transmitting time of described the second packet stamp and time of reception stamp, calculate instituteState the transmission delay of the second packet.
For said apparatus, in a kind of possible implementation, described the 3rd computing unit adopts following formula1 calculates the transmission delay of described the second packet,
Dn=(tn'-t1')-(tn-t1)+d1 formula 1,
Wherein, t1 is the transmitting time stamp of described the first packet, and t1' is the reception of described the first packetTimestamp, tn is the transmitting time stamp of described the second packet, when tn' is the reception of described the second packetBetween stamp, d1 is described reference transmission time delay, dn is the transmission delay of described the second packet.
For said apparatus, in a kind of possible implementation, also comprise:
More new module, for the time cycle at interval of setting, resends once described synchronization packets;Transmission delay at the first packet of this calculating is less than setting threshold, adopts this calculatingThe transmission delay of the first packet as described reference transmission time delay.
For said apparatus, in a kind of possible implementation, described more new module is also at thisThe transmission delay calculating is greater than in the situation of setting threshold, adopts the transmission delay last time calculating as describedReference transmission time delay.
Beneficial effect
The embodiment of the present invention, using the transmission delay of a packet as with reference to transmission delay, can calculateGo out the transmission delay of follow-up other packets, without each packet is all sent to confirmation message, can be fastSpeed is calculated the time delays of asynchronous equipment room transfer of data, can also reduce bandwidth load and delivery flow rate.
According to below with reference to accompanying drawing to detailed description of illustrative embodiments, further feature of the present invention and sideIt is clear that face will become.
Brief description of the drawings
The accompanying drawing being included in description and form a part for description shows together with descriptionExemplary embodiment of the present invention, feature and aspect, and for explaining principle of the present invention.
Fig. 1 illustrates the schematic diagram of the acquisition methods of transfer of data time delay according to an embodiment of the invention;
Fig. 2 illustrates that the acquisition methods Chinese style 1 of transfer of data time delay according to an embodiment of the invention derivedThe schematic diagram of journey;
Fig. 3 illustrates the flow chart of the acquisition methods of transfer of data time delay according to another embodiment of the present invention;
Fig. 4 illustrates in the acquisition methods of transfer of data time delay according to another embodiment of the present invention and upgrades referenceThe flow chart of transmission delay;
Fig. 5 illustrates sync data in the acquisition methods of transfer of data time delay according to another embodiment of the present inventionThe schematic diagram of bag;
Fig. 6 illustrates the structured flowchart of the acquisition device of transfer of data time delay according to an embodiment of the invention;
Fig. 7 illustrates the structural frames of the acquisition device of transfer of data time delay according to another embodiment of the present inventionFigure.
Detailed description of the invention
Describe various exemplary embodiments of the present invention, feature and aspect in detail below with reference to accompanying drawing. AttachedThe identical same or analogous element of Reference numeral presentation function in figure. Although enforcement shown in the drawingsThe various aspects of example, but unless otherwise indicated, needn't draw in proportion accompanying drawing.
Here special word " exemplary " means " as example, embodiment or illustrative ". Here conduct" exemplary " illustrated any embodiment needn't be interpreted as being better than or being better than other embodiment.
In addition, for better explanation the present invention, in detailed description of the invention below, provided numerousDetail. It will be appreciated by those skilled in the art that and there is no some detail, the present invention equally canImplement. In some instances, method, means, element and the circuit known for those skilled in the artBe not described in detail, so that highlight purport of the present invention.
Embodiment 1
Fig. 1 illustrates the schematic diagram of the acquisition methods of transfer of data time delay according to an embodiment of the invention. AsShown in Fig. 1, the acquisition methods of this transfer of data time delay mainly comprises:
Step 101, obtain the first packet transmission delay as with reference to transmission delay;
Step 102, according to transmitting time and the reception of described reference transmission time delay, described the first packetTime, and the transmitting time of the second packet and time of reception, the transmission of calculating described the second packetTime delay;
Wherein, the transmitting time of described the first packet is before the transmitting time of described the second packet.
In a kind of possible implementation, step 101 specifically can comprise: send synchronization packets,And record sends the transmitting time stamp of described synchronization packets; In the situation of receiving described the first packetUnder, the time of reception stamp of described the first packet received in record, described the first packet is described same for respondingThe confirmation message that step data bag returns; According to receiving the time of reception stamp of described the first packet and sendingThe transmitting time stamp of described synchronization packets, calculates the two-way time of transmitting; According to counting described two-way timeCalculate described reference transmission time delay.
In a kind of possible implementation, step 102 specifically can comprise: receiving described the second numberIn situation according to bag, from described the second packet, obtain the transmitting time of sending described the second packetStamp, and the time of reception stamp of described the second packet received in record; According to described reference transmission time delay, instituteState transmitting time stamp and the time of reception stamp of the first packet, and the transmitting time of described the second packetStamp and time of reception stab, and calculate the transmission delay of described the second packet.
Particularly, can adopt following formula 1 to calculate the transmission delay of described the second packet,
Dn=(tn'-t1')-(tn-t1)+d1 formula 1,
Wherein, t1 is the transmitting time stamp of described the first packet, and t1' is the reception of described the first packetTimestamp, tn is the transmitting time stamp of described the second packet, when tn' is the reception of described the second packetBetween stamp, d1 is described reference transmission time delay, dn is the transmission delay of described the second packet.
The derivation of its Chinese style 1 is as follows:
As shown in Figure 2, suppose the packet p1 that transmitting apparatus sends, p2.....pn, transmitting time stamp isT1, t2......tn. The packet p1 that receiving equipment is received, p2......pn, time of reception stamp is t1 ', t2 ' ... tn '.
Suppose that m is the clock reference difference of transmitting apparatus and receiving equipment, d1 (reference) is p1 packetThe transmission delay of (example of the first packet), dn is the transmission delay of pn packet.
Referring to Fig. 2, transmitting time between two packets is poor and time of reception is poor can adopt X1~XnAnd X1 '~Xn ' represents, wherein X1=t2-t1, Xn=tn-t (n-1); X1'=t2'-t1',Xn'=tn'-t(n-1)'。
The time difference of the sending and receiving of each packet is as shown in the formula 2 to 4:
T1'-t1=m+d1 formula 2;
T2'-t2=t2'-(t1+x1)=t2'-(t1'-m-d1+x1)=t2'-t1'-x1+m+d1 formula 3;
……
tn ′ - t n = tn ′ - t 1 ′ - Σ i = 1 n - 1 X i + m + d 1 = ( tn ′ - t 1 ′ ) - ( t n - t 1 ) + m + d 1 = m + d n Formula 4;
Wherein, formula 2 is the time difference of packet p1, and formula 3 is the time difference of packet p2, and formula 4 is dataThe time difference of bag pn. Therefore, can obtain formula 1 by formula 4, dn=(tn'-t1')-(tn-t1)+d1.
From the reasoning results, prolong as long as obtain timestamp and the transmission of the packet p1 of transmission for the first timeTime, just can calculated for subsequent the transmission delay of other packets pn (n > 1) of transmission. Timestamp is willingSurely can obtain, key is exactly to obtain the transmission delay d1 of the packet p1 of transmission for the first time so.
In specific implementation, as long as do for the first time round-trip synchronization (sync) transmission, record t1, t1 ', and willObtain d1 divided by 2 two-way time, the follow-up transmission that just can calculate each packet of subsequent transmissionTime delay. For example, can initiate sync at receiving terminal and transmit to calculate d1, and calculate dn at receiving terminal,Refer to the associated description in following embodiment. But the present invention does not limit and calculates specifically establishing of d1 and dnStandby.
The acquisition methods of the transfer of data time delay of the present embodiment, using the transmission delay of a packet as ginsengExamine transmission delay, can calculate the transmission delay of follow-up other packets, without equal to each packetSend ack message, can calculate fast the time delays of asynchronous equipment room transfer of data, can also subtractFew bandwidth load and delivery flow rate.
Embodiment 2
Deriving according to above-mentioned formula 2 to formula 3, to obtain the process of formula 1 known, due to derivation result essence only with p1Transmitting time stamp, time of reception stamp and transmission delay relevant, as long as obtain, transmitting apparatus sendsThe transmission delay of p1, can calculate the transmission delay of the pn that transmitting apparatus sends after p1. ThisEmbodiment carries out the acquisition methods of transfer of data time delay of the present invention as example to calculate d1 at receiving equipmentExplanation. Calculate d1 at receiving equipment, can avoid result of calculation to be subject to the asynchronous shadow causing of two ends clockRing. Particularly, can send synchronization packets from receiving equipment, and wait for that transmitting apparatus returns to confirmationMessage, thus calculate d1, confirmation message can be regarded as to the first packet p1 here, specifically referring underDescription and Fig. 3 to Fig. 5 of face.
Fig. 3 illustrates the flow chart of the acquisition methods of transfer of data time delay according to another embodiment of the present invention.As the concrete example of embodiment 1, in the present embodiment at receiving equipment computing reference transmission delay, andCalculate the transfer of data time delay of a certain the second packet sending after the first packet at receiving equipment.
As shown in Figure 3, suppose in the present embodiment in receiving equipment computing reference transmission delay, step 101Specifically can comprise:
Step 301, receiving equipment send synchronization packets to transmitting apparatus, and record sends described synchronousThe transmitting time stamp of packet. Transmitting apparatus is received after this synchronization packets, can return really to receiving equipmentRecognize message, this confirmation message can be regarded as the first packet of the present invention.
Step 302, in the case of receiving the confirmation message that transmitting apparatus returns, receiving equipment record is receivedTo time of reception stamp and the transmitting time stamp of described confirmation message. Wherein, transmitting apparatus returns to transmitting apparatusWhile returning confirmation message, the transmitting time stamp that sends confirmation message can be carried in confirmation message, like this,Receiving equipment can obtain the transmitting time stamp of confirmation message from confirmation message.
Step 303, receiving equipment are according to receiving the time of reception stamp of described confirmation message and sending described sameThe transmitting time stamp of step data bag, calculates transmitting synchronous packet and confirmation message two-way time used.For example, receiving equipment deducts the transmitting time stamp of synchronization packets with the time of reception stamp of confirmation message,To two-way time.
Step 304, receiving equipment are according to described two-way time of computing reference transmission delay. For example, receiveEquipment with two-way time divided by 2 as with reference to transmission delay.
Preferably, in the present embodiment, also calculate a certain the of the first packet after transmission at receiving equipmentThe transfer of data time delay of two packets, step 102 specifically can comprise:
Step 305, in the situation that receiving the second packet, receiving equipment is from described the second packetObtain the transmitting time stamp that sends described the second packet, and record the reception of receiving described the second packetTimestamp. Can be by the second packet when wherein, transmitting apparatus sends the second packet to receiving equipmentTransmitting time stamp is packaged in the second packet, sends in the lump receiving equipment.
Step 306, receiving equipment are according to the transmitting time of described reference transmission time delay, described confirmation messageStamp and time of reception stamp, and the transmitting time of described the second packet stamp and time of reception stamp, calculate instituteState the transmission delay of the second packet.
In addition, as shown in Figure 4, the acquisition methods of the transfer of data time delay in above-described embodiment 1,2 also canTo comprise the step of upgrading reference transmission time delay:
Step 401, at interval of set time cycle, resend synchronization packets one time.
Step 402, the two-way time that sends synchronization packets and receive confirmation message according to this, calculateTransmission delay (can be regarded as the transmission delay of the first packet), and judge this calculating first numberWhether the transmission delay according to bag is less than setting threshold.
Step 403, be less than setting threshold at the transmission delay of the first packet of this calculating,Adopt the transmission delay of this calculating as described reference transmission time delay.
Step 404, be greater than setting threshold at the transmission delay of the first packet of this calculating,Adopt the transmission delay last time calculating as described reference transmission time delay.
Particularly, the acquisition methods of transfer of data time delay of the present invention is carried out to error analysis: main errorDepend on reference transmission time delay d1, d1 value be time of a round-trip transmission divided by 2, and cannot knowIn current round-trip transmission, whether sending and receiving has respectively taken for 1/2 time.
For example, as shown in Figure 5, receiving terminal sends sync packet in the t0 ' moment to transmitting terminal, andWait receiving end/sending end is received the ack message (ack that the transmitting terminal here returns returning after sync packetMessage can be thought p1). If receiving terminal is received the ack message that transmitting terminal returns, d1=at t1 '(t1 '-t0 ')/2. And receiving terminal can obtain transmitting terminal and send the timestamp t1 of ack. Then, ifTn ' receiving terminal is received pn, can obtain transmitting terminal send the timestamp tn of pn and receiving terminal receive pn timeBetween stab tn '. Finally, by t1, t1 ', tn, tn ' and d1 substitution formula 1dn=(tn'-t1')-(tn-t1)+d1,Can obtain the result of calculation of dn.
In actual software is realized, for example every 2s carries out one subsynchronous (sync) and (sends a numberAccording to wrap and wait for receive ack message), and increased the function of calibration (calibration). If sync passesThe defeated d1 obtaining > 5ms, abandon the d1 value of this calculating, continue the d1 value of calculating before using. Therefore,The error of time delay statistics can be selected d1 by setting a for example 5ms of threshold value, and d1 is greater than 5ms and losesAbandon. In actual test, find, the error of d1 can be controlled in 3ms.
After often executing the step of once upgrading reference transmission time delay, continue to carry out the ginseng of utilizing after upgradingExamine step (for example step 102, the step of the transmission delay of the packet that transmission delay calculated for subsequent receives305). Wherein, can upgrade reference transmission time delay at receiving terminal, also can upgrade with reference to passing at transmitting terminalAfter defeated time delay, send to again receiving terminal. Specifically can adjust according to the demand of practical application.
The acquisition methods of the transfer of data time delay of the present embodiment, as long as receiving terminal calculates a packetTransmission delay, just can calculate according to sending and receiving timestamp the biography of follow-up other packets of receivingDefeated time delay. Do round-trip transmission and come the mode of computation delay than each packet before, institute of the present inventionThe algorithm of describing can not increase any system bandwidth load, also need not be at every turn wait acknowledge message all, thereforeComputational speed is fast. Meanwhile, receiving terminal receives packet and can count the time delay of this packet, largeImprove greatly real-time.
Embodiment 3
Fig. 6 illustrates the structured flowchart of the acquisition device of transfer of data time delay according to an embodiment of the invention.As shown in Figure 6, the acquisition device of this transfer of data time delay mainly comprises:
Acquisition module 61, for the transmission delay that obtains the first packet as with reference to transmission delay;
Computing module 63, is connected with described acquisition module 61, for according to described reference transmission time delay, instituteState transmitting time and the time of reception of the first packet, and the transmitting time of the second packet and receive timeBetween, calculate the transmission delay of described the second packet;
Wherein, the transmitting time of described the first packet is before the transmitting time of described the second packet.
Particularly, the derivation to formula 1 in reference example 1 and Fig. 2, known, as long as obtainOnce timestamp and the transmission delay of packet p1 of transmission, other data of just can calculated for subsequent transmittingThe transmission delay of bag pn (n > 1). The acquisition device of the transfer of data time delay of the present embodiment, is obtaining mouldPiece 61 obtains the transmission delay of the first packet and determines that after reference transmission time delay, computing module 63 can rootAccording to transmitting time and the time of reception of described reference transmission time delay, described the first packet, and the second numberAccording to transmitting time and the time of reception of bag, calculate the transmission delay of described the second packet. Specific implementation is formerReason and example can be referring to the associated description of embodiment 1.
Embodiment 4
Fig. 7 illustrates the structural frames of the acquisition device of transfer of data time delay according to another embodiment of the present inventionFigure. The assembly that Fig. 7 is identical with Fig. 6 has identical implication, does not repeat them here.
Be with the main distinction of a upper embodiment, the acquisition device of the transfer of data time delay of the present embodiment is excellentElect as and be arranged on receiving equipment one side, the acquisition module 61 of this device can comprise:
The first transmitting element 611, for sending synchronization packets, and record sends described synchronization packetsTransmitting time stamp;
The first receiving element 613, in the case of the confirmation message of receiving described synchronization packets,The time of reception stamp of described confirmation message received in record, and described confirmation message is described the first packet;
The first computing unit 615, with 613 points of described the first transmitting element 611 and described the first receiving elementsNot Lian Jie, for according to the time of reception stamp of receiving described confirmation message with send described synchronization packetsTransmitting time stamp, calculates the two-way time of transmitting;
The second computing unit 617, is connected with described the first computing unit 615, for according to described when roundBetween calculate described reference transmission time delay.
Particularly, the first transmitting element 611 can send synchronization packets to transmitting apparatus, and recordSend the transmitting time stamp of described synchronization packets; Transmitting apparatus is received after synchronization packets, can return reallyRecognize message. The first receiving element 613 (can be regarded as in the confirmation message of receiving described synchronization packetsThe first packet) situation under, the time of reception stamp of described confirmation message received in record, can also be from reallyRecognize the transmitting time stamp that obtains transmitting terminal in message and send this confirmation message. The first computing unit 615, rootAccording to the time of reception stamp of the confirmation message of obtaining from the first receiving element 613 and from the first transmitting element 611The transmitting time stamp of the synchronization packets of obtaining, can calculate from sending synchronization packets and confirm to disappear to receivingThe two-way time of breath. Then, the second computing unit 617 can calculate ginseng divided by 2 by two-way timeExamine transmission delay.
In a kind of possible implementation, described computing module 63 comprises:
The second receiving element 631, in the situation that receiving described the second packet, from described secondIn packet, obtain the transmitting time stamp that sends described the second packet, and described the second data received in recordThe time of reception stamp of bag;
The 3rd computing unit 633, with described the second receiving element 631, described the second computing unit 617 andDescribed the first receiving element 613 connects respectively, for obtain confirmation message (from the first receiving element 613One packet) time of reception stamp and transmitting time stab, obtain reference transmission from the second computing unit 617Time delay, the transmitting time stamp and the time of reception that obtain the second packet from the second receiving element 631 stab, fromAnd according to the transmitting time stamp of described reference transmission time delay, described the first packet and time of reception stamp, withAnd the transmitting time of described the second packet stamp and time of reception stamp, the transmission of calculating described the second packetTime delay.
In a kind of possible implementation, described the 3rd computing unit 633 adopts following formula 1 to calculate describedThe transmission delay of two packets,
Dn=(tn'-t1')-(tn-t1)+d1 formula 1,
Wherein, t1 is the transmitting time stamp of described the first packet, and t1' is the reception of described the first packetTimestamp, tn is the transmitting time stamp of described the second packet, when tn' is the reception of described the second packetBetween stamp, d1 is described reference transmission time delay, dn is the transmission delay of described the second packet. Wherein to formula1 derivation can be referring to formula 2 relevant to formula 4 and Fig. 2.
In a kind of possible implementation, this device also comprises: more new module 65, and at interval of establishingThe fixed time cycle, resend synchronization packets one time; Transmission delay in this calculating is less than settingIn the situation of threshold value, adopt the transmission delay of this calculating as described reference transmission time delay.
In a kind of possible implementation, described more new module 65 is also prolonged for the transmission in this calculatingIn time, is greater than in the situation of setting threshold, adopts the transmission delay last time calculating to prolong as described reference transmissionTime. The more concrete principle of new module can be referring to Fig. 4 and associated description thereof.
The acquisition device of the transfer of data time delay of the present embodiment, as long as be arranged on the acquisition module meter of receiving terminalCalculate the transmission delay of a packet, computing module just can calculate according to sending and receiving timestampThe transmission delay of follow-up other packets of receiving. Do round-trip transmission than each packet beforeThe mode of computation delay, algorithm described in the invention can not increase any system bandwidth load, need not yetWait acknowledge message all at every turn, therefore computational speed is fast. Meanwhile, to receive packet passable for receiving terminalCount the time delay of this packet, greatly improved real-time.
The above be only the specific embodiment of the present invention, but protection scope of the present invention is not limited toIn this, any be familiar with those skilled in the art the present invention disclose technical scope in, can be easilyExpect changing or replacing, within all should being encompassed in protection scope of the present invention. Therefore, protection of the present inventionScope should be as the criterion with the protection domain of described claim.

Claims (12)

1. an acquisition methods for transfer of data time delay, is characterized in that, comprising:
The transmission delay that obtains the first packet is as with reference to transmission delay;
According to transmitting time and the time of reception of described reference transmission time delay, described the first packet, andThe transmitting time of the second packet and time of reception, calculate the transmission delay of described the second packet;
Wherein, the transmitting time of described the first packet is before the transmitting time of described the second packet.
2. method according to claim 1, is characterized in that, obtains the transmission of the first packet and prolongsTime as with reference to transmission delay, comprising:
Send synchronization packets, and record sends the transmitting time stamp of described synchronization packets;
In the situation that receiving described the first packet, the time of reception of described the first packet received in recordStamp, the confirmation message that described the first packet returns for the described synchronization packets of response;
According to the time of reception stamp and the transmission of sending described synchronization packets of receiving described the first packetTimestamp, calculates the two-way time of transmitting;
According to calculating described reference transmission time delay described two-way time.
3. method according to claim 2, is characterized in that, according to described reference transmission time delay,The transmitting time of described the first packet and time of reception, and the transmitting time of the second packet and receptionTime, calculate the transmission delay of described the second packet, comprising:
In the situation that receiving described the second packet, from described the second packet, obtain and send describedThe transmitting time stamp of two packets, and the time of reception stamp of described the second packet received in record;
According to the transmitting time stamp of described reference transmission time delay, described the first packet and time of reception stamp,And the transmitting time of described the second packet is stabbed and time of reception stamp, calculate the biography of described the second packetDefeated time delay.
4. method according to claim 3, is characterized in that, according to described reference transmission time delay,The transmitting time stamp of described the first packet and time of reception stab, and when the transmission of described the second packetBetween stamp and time of reception stab, calculate the transmission delay of described the second packet, comprising:
Employing following formula 1 calculates the transmission delay of described the second packet,
Dn=(tn'-t1')-(tn-t1)+d1 formula 1,
Wherein, t1 is the transmitting time stamp of described the first packet, and t1' is the reception of described the first packetTimestamp, tn is the transmitting time stamp of described the second packet, when tn' is the reception of described the second packetBetween stamp, d1 is described reference transmission time delay, dn is the transmission delay of described the second packet.
5. according to the method described in any one in claim 2 to 4, it is characterized in that, also comprise:
At interval of the time cycle of setting, resend once described synchronization packets;
Transmission delay at the first packet of this calculating is less than setting threshold, adopts thisThe transmission delay of the first packet calculating is as described reference transmission time delay.
6. method according to claim 5, is characterized in that, also comprises:
Be greater than setting threshold at the transmission delay of this calculating, adopt the transmission of last time calculating to prolongReference transmission time delay described in Shi Zuowei.
7. an acquisition device for transfer of data time delay, is characterized in that, comprising:
Acquisition module, for the transmission delay that obtains the first packet as with reference to transmission delay;
Computing module, is connected with described acquisition module, for according to described reference transmission time delay, describedThe transmitting time of one packet and time of reception, and the transmitting time of the second packet and time of reception,Calculate the transmission delay of described the second packet;
Wherein, the transmitting time of described the first packet is before the transmitting time of described the second packet.
8. device according to claim 7, is characterized in that, described acquisition module comprises:
The first transmitting element, for sending synchronization packets, and record sends sending out of described synchronization packetsSend timestamp;
The first receiving element, in the situation that receiving described the first packet, record receives described theThe time of reception stamp of one packet, described the first packet is returned really by the described synchronization packets of responseRecognize message;
The first computing unit, is connected respectively with described the first transmitting element and described the first receiving element, usesIn the time stabbing and send the transmission of described synchronization packets according to the time of reception of receiving described the first packetBetween stamp, calculate transmission two-way time;
The second computing unit, is connected with described the first computing unit, for according to calculating described two-way timeDescribed reference transmission time delay.
9. device according to claim 8, is characterized in that, described computing module comprises:
The second receiving element, in the situation that receiving described the second packet, from described the second dataIn bag, obtain the transmitting time stamp that sends described the second packet, and described the second packet received in recordTime of reception stamp;
The 3rd computing unit, connects with described the second receiving element, described the second computing unit and described firstReceive unit and connect respectively, for according to the transmitting time of described reference transmission time delay, described the first packetStamp and time of reception stamp, and the transmitting time of described the second packet stamp and time of reception stamp, calculate instituteState the transmission delay of the second packet.
10. device according to claim 9, is characterized in that, described the 3rd computing unit adoptsFollowing formula 1 calculates the transmission delay of described the second packet,
Dn=(tn'-t1')-(tn-t1)+d1 formula 1,
Wherein, t1 is the transmitting time stamp of described the first packet, and t1' is the reception of described the first packetTimestamp, tn is the transmitting time stamp of described the second packet, when tn' is the reception of described the second packetBetween stamp, d1 is described reference transmission time delay, dn is the transmission delay of described the second packet.
Device in 11. according to Claim 8 to 10 described in any one, is characterized in that, also comprises:
More new module, for the time cycle at interval of setting, resends once described synchronization packets;Transmission delay at the first packet of this calculating is less than setting threshold, adopts this calculatingThe transmission delay of the first packet as described reference transmission time delay.
12. devices according to claim 11, is characterized in that, described more new module also forThe transmission delay of this calculating is greater than in the situation of setting threshold, adopts the transmission delay conduct of last time calculatingDescribed reference transmission time delay.
CN201610101530.4A 2016-02-24 2016-02-24 Method and device for acquiring data transmission delay Active CN105610652B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610101530.4A CN105610652B (en) 2016-02-24 2016-02-24 Method and device for acquiring data transmission delay

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610101530.4A CN105610652B (en) 2016-02-24 2016-02-24 Method and device for acquiring data transmission delay

Publications (2)

Publication Number Publication Date
CN105610652A true CN105610652A (en) 2016-05-25
CN105610652B CN105610652B (en) 2021-01-15

Family

ID=55990197

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610101530.4A Active CN105610652B (en) 2016-02-24 2016-02-24 Method and device for acquiring data transmission delay

Country Status (1)

Country Link
CN (1) CN105610652B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107196821A (en) * 2017-05-24 2017-09-22 深圳市乃斯网络科技有限公司 The method of calibration and system of time delay in network link
CN108259364A (en) * 2016-12-29 2018-07-06 中国移动通信集团浙江有限公司 A kind of network congestion determines method and device
WO2018214056A1 (en) * 2017-05-24 2018-11-29 深圳市乃斯网络科技有限公司 Method and system for verifying delay in network link
CN109688059A (en) * 2017-10-19 2019-04-26 深圳市中兴微电子技术有限公司 A kind of congestion management of exchange network, device and computer storage medium
CN110336713A (en) * 2019-07-02 2019-10-15 中国联合网络通信集团有限公司 A kind of method and terminal device detecting honeycomb Internet of Things end-to-end time delay and rate
WO2019196810A1 (en) * 2018-04-09 2019-10-17 华为技术有限公司 Data transmission method, related device, and communications system
CN113132041A (en) * 2019-12-31 2021-07-16 中移(成都)信息通信科技有限公司 Data transmission delay calculation method and device
WO2022174770A1 (en) * 2021-02-20 2022-08-25 中国移动通信有限公司研究院 Delay measurement method and device
CN117294832A (en) * 2023-11-22 2023-12-26 湖北星纪魅族集团有限公司 Data processing method, device, electronic equipment and computer readable storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100459529C (en) * 2005-09-12 2009-02-04 华为技术有限公司 Time delay characteristic measuring method in data communication network
CN101534222A (en) * 2008-03-10 2009-09-16 中国移动通信集团公司 End-to-end network delay jitter measuring method, device and system thereof
CN102227110B (en) * 2011-06-17 2014-06-25 华为技术有限公司 Measurement one way delay method and equipment thereof, and communication system

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108259364A (en) * 2016-12-29 2018-07-06 中国移动通信集团浙江有限公司 A kind of network congestion determines method and device
CN107196821A (en) * 2017-05-24 2017-09-22 深圳市乃斯网络科技有限公司 The method of calibration and system of time delay in network link
WO2018214056A1 (en) * 2017-05-24 2018-11-29 深圳市乃斯网络科技有限公司 Method and system for verifying delay in network link
CN109688059A (en) * 2017-10-19 2019-04-26 深圳市中兴微电子技术有限公司 A kind of congestion management of exchange network, device and computer storage medium
CN109688059B (en) * 2017-10-19 2022-02-01 深圳市中兴微电子技术有限公司 Congestion management method and device for switching network and computer storage medium
WO2019196810A1 (en) * 2018-04-09 2019-10-17 华为技术有限公司 Data transmission method, related device, and communications system
CN110336713A (en) * 2019-07-02 2019-10-15 中国联合网络通信集团有限公司 A kind of method and terminal device detecting honeycomb Internet of Things end-to-end time delay and rate
CN113132041A (en) * 2019-12-31 2021-07-16 中移(成都)信息通信科技有限公司 Data transmission delay calculation method and device
CN113132041B (en) * 2019-12-31 2022-03-04 中移(成都)信息通信科技有限公司 Data transmission delay calculation method and device
WO2022174770A1 (en) * 2021-02-20 2022-08-25 中国移动通信有限公司研究院 Delay measurement method and device
CN117294832A (en) * 2023-11-22 2023-12-26 湖北星纪魅族集团有限公司 Data processing method, device, electronic equipment and computer readable storage medium
CN117294832B (en) * 2023-11-22 2024-03-26 湖北星纪魅族集团有限公司 Data processing method, device, electronic equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN105610652B (en) 2021-01-15

Similar Documents

Publication Publication Date Title
CN105610652A (en) Method and device for acquiring data transmission delay
CN106488550B (en) Determine the method and apparatus of terminal Yu base station clock time deviation
CN102136900B (en) Time synchronization method for passive optical network, device and system
CN104918319B (en) Clock synchronization simplified information interaction method applied to wireless sensor network
CN108880723B (en) Clock synchronization method and device
KR20150143801A (en) Timestamp generating method, device and system
CN103236893A (en) Network message synchronizing method for process levels of intelligent substation
US20150078405A1 (en) Monitoring clock accuracy in asynchronous traffic environments
JP6575529B2 (en) Usable band estimation system, usable band estimation method, receiving apparatus, and control program for receiving apparatus
CN101378278A (en) Channel measurement for wireless multi-input multi-output communication system
CN102201983A (en) Method, terminal and system for measuring asymmetric time delay of transmission link
EP3720053B1 (en) Flexible ethernet delay measurement method and related device
WO2021057756A1 (en) Delay measurement method, system and storage medium
CN104243079A (en) Microsecond clock synchronization method for real-time Ethernet
US9014214B2 (en) Dynamic link adjustment method and link managing device
CN105281860A (en) Data synchronous acquisition method based on Ethernet passive optical network
WO2021018407A1 (en) Clock synchronization in packet communications networks
US20230328675A1 (en) Transmission Management
CN104270218A (en) Frequency correcting method
CN103647615A (en) Method and apparatus for delay jitter elimination during message transmission process
CN109257243B (en) Method and device for determining round trip delay and computer readable storage medium
CN111327657A (en) Method, apparatus and computer readable medium for data buffering
US11343007B2 (en) Time synchronization method and device
CN105530065B (en) For system and method at IEEE1588 pairs of PRP/HSR
CN105792236B (en) Time delay obtaining method and device, baseband unit and communication system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant