CN106656642A - Round trip time measurement method, round trip time measurement device and round trip time measurement system - Google Patents

Round trip time measurement method, round trip time measurement device and round trip time measurement system Download PDF

Info

Publication number
CN106656642A
CN106656642A CN201510715860.8A CN201510715860A CN106656642A CN 106656642 A CN106656642 A CN 106656642A CN 201510715860 A CN201510715860 A CN 201510715860A CN 106656642 A CN106656642 A CN 106656642A
Authority
CN
China
Prior art keywords
packet
threshold value
time
value
rtt
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
CN201510715860.8A
Other languages
Chinese (zh)
Other versions
CN106656642B (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201510715860.8A priority Critical patent/CN106656642B/en
Publication of CN106656642A publication Critical patent/CN106656642A/en
Application granted granted Critical
Publication of CN106656642B publication Critical patent/CN106656642B/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)

Abstract

An embodiment of the invention provides a round trip time measurement method, a round trip time measurement device and a round trip time measurement system, wherein the method, the device and the system relate to the communication field, and improve RTT measurement accuracy to a certain extent. The method comprises the steps of acquiring first time in receiving a data packet A on a TCP link, wherein the first data packet A is a first data packet in a first packet group which is transmitted from the transmitting end to the receiving end; after a confirmation packet of the data packet A is received, calculating a packet transmitting time interval between a data packet C and a data packet D which are transmitted from the transmitting end, wherein the data packet C is behind the data packet A, and the data packet D is behind the data packet C and is adjacent with the data packet C; and if the packet transmitting time interval between the data packet C and the data packet D is larger than a first threshold value and smaller than a second threshold value, using a difference between second time in receiving the data packet C and the first time as the RTT value of the TCP link at this time.

Description

A kind of measuring method of round-trip delay, apparatus and system
Technical field
The present invention relates to the communications field, more particularly to a kind of measuring method of round-trip delay, device and it is System.
Background technology
Transmission control protocol (Transmission Control Protocol, TCP) is a kind of towards even Transport layer communication protocol connecing, reliable, based on byte stream.It provides reliable by retransmission mechanism Communication, specifically, TCP arranges a sequence number for each packet, when receiving terminal is successfully received The confirmation bag (ACK) of packet A is sent to transmitting terminal to after packet A, is taken in the confirmation bag Sequence number with packet A, if transmitting terminal does not receive within a certain period of time the confirmation of packet A Bag, then, transmitting terminal then thinks that packet A loses, and then retransmits packet A.
In order to avoid network congestion, TCP adopts sliding window current limliting, the mechanism of bulk transfer.Specifically, Transmitting terminal is some according to the byte Batch sending that sliding window (Sliding Window, SW) specifies Packet (i.e. Bao Qun), after the completion of the bag pocket transmission of a batch, transmitting terminal stops sending data Bag, after a round-trip delay (Round-Trip Time, RTT), i.e., transmitting terminal receives reception After confirmation bag of the end to the bag pocket transmission of last batch, restart the bag pocket transmission of new lot.
The important finger that round-trip delay is decision TCP transmission speed is can be seen that from above-mentioned transmission mechanism Mark, as shown in figure 1, when the RTT of TCP links is measured, generally transmitting terminal and receiving terminal it Between monitoring point is set, between the packet A that monitoring point is received and the confirmation bag B of packet A Time difference as RTT.
But, above-mentioned RTT measuring methods can only obtain monitoring point to the RTT values between receiving terminal, The RTT values between transmitting terminal and receiving terminal can not be truly measured, if monitoring point is away from transmitting terminal End is farther out, then, the RTT value errors that above-mentioned RTT measuring methods measurement is obtained are larger.
The content of the invention
Embodiments of the invention provide a kind of measuring method of round-trip delay, apparatus and system, can be with one Determine the degree of accuracy that RTT measurements are improved in degree.
To reach above-mentioned purpose, embodiments of the invention are adopted the following technical scheme that:
In a first aspect, embodiments of the invention provide a kind of measuring method of round-trip delay, methods described For measuring the RTT that TCP between transmitting terminal and receiving terminal is chained, including:Obtain in the TCP Chain the very first time for receiving packet A, the packet A connects for the transmitting terminal to described First packet in the first bag group that receiving end sends;In the confirmation bag for receiving the packet A Afterwards, the time interval of giving out a contract for a project between the packet C and packet D of the transmitting terminal transmission is calculated, The packet C is the packet after the packet A, and the packet D is described The packet adjacent with the packet C after packet C;If the packet C and the number According to the time interval of giving out a contract for a project between bag D more than the first threshold value, and less than the second threshold value, then will connect The difference of the second time and the very first time that receive the packet C is linked as the TCP This RTT value.
So, the mechanism based on TCP bulk transfers, if monitoring packet C and packet Time interval of giving out a contract for a project between D is more than the first threshold value, and during less than the second threshold value, it is determined that number It is first packet in the second bag group after the first bag group according to bag D, now, will receives Second time of packet D and the difference of the very first time for receiving packet A, that is, receive first This RTT value that time difference between the bag groups of Bao Qunyu second links as the TCP, so as to certain The degree of accuracy of RTT measurements is improved in degree.
With reference in a first aspect, in the first possible implementation of first aspect, obtaining described TCP chains the very first time for receiving the packet A, can obtain especially by the following manner: Calculating chains giving out a contract for a project between the time between the packet E and packet A ' for receiving in the TCP Every the packet A ' is adjacent with packet E packet after the packet E; If the time interval of giving out a contract for a project between the packet E and the packet A ' is more than first thresholding Value, and during less than second threshold value, then the packet A ' is defined as into the packet A; Inquire-receive to the packet A the reception time, and using the reception time as described first when Between.
Wherein, inquire-receive to the packet A the reception time, and using the reception time as The very first time, may particularly include:According to the sequence number of the packet A, the data are inquired about Whether the confirmation bag of bag A is unique;If the confirmation bag of the packet A is unique, inquire-receive is to institute The reception time of packet A is stated, and using the reception time as the very first time.
So, it is whether unique by inquiring about the confirmation bag of packet A, you can to exclude packet A The situation that receiving end repeatedly confirms because packet A receiving ends can produce when repeatedly confirming it is multiple Confirm bag, and pass through this it is multiple confirm bag cannot accurately determine receiving terminal confirm be which packet, In turn resulting in the RTT values accuracy obtained when RTT is measured reduces.
With reference in a first aspect, in second possible implementation of first aspect, by receiving State that second time of packet D and the difference of the very first time linked as the TCP this After RTT values, also include:Described first threshold value and described is updated according to described this RTT value Second threshold value, wherein, first threshold value after renewal be the first proportionality coefficient with it is described this The product of RTT values, second threshold value after renewal is the second proportionality coefficient and described this RTT The product of value, first proportionality coefficient is less than second proportionality coefficient.
With reference in a first aspect, in the third possible implementation of first aspect, will receive The sheet that second time of the packet D links with the difference of the very first time as the TCP After secondary RTT values, also include:To what is obtained before described this RTT value and this RTT measurement N number of history RTT value averaged, N is the integer more than 0;Updated according to the mean value First threshold value and second threshold value, wherein, first threshold value after renewal is the The product of one proportionality coefficient and the mean value, second threshold value after renewal is the second ratio system The product with the mean value is counted, first proportionality coefficient is less than second proportionality coefficient.
When RTT measurements next time are carried out, the above-mentioned update method of execution still can be circulated, also, The first threshold value and the second threshold value updated after last time RTT measurements can be used, by what is obtained Time interval of giving out a contract for a project with update after the first threshold value and the second threshold value be compared, and then dynamic survey Each RTT values that amount TCP is chained.
With reference in a first aspect, in the 4th kind of possible implementation of first aspect, obtaining Before TCP chains the very first time for receiving the packet A, also include:Institute is set up in calculating State Initial R TT value when TCP is linked;First threshold value is arranged according to the Initial R TT value With second threshold value, wherein, first threshold value is that the first proportionality coefficient is initial with described The product of RTT values, second threshold value is the second proportionality coefficient and the Initial R TT value is taken advantage of Product, first proportionality coefficient is less than second proportionality coefficient.
Appointing in reference to possible implementation in the first to fourth of first aspect and first aspect A kind of implementation, in the 5th kind of possible implementation of first aspect, is monitoring the transmission After time interval of giving out a contract for a project between the packet C and packet D of end transmission, also include:If institute The time interval of giving out a contract for a project between packet C and the packet D is stated less than first threshold value, Then continue to calculate the time interval of giving out a contract for a project between the packet D and packet H, the packet H It is adjacent with packet D packet after the packet D;If the packet C Time interval of giving out a contract for a project between the packet D then abandons this more than second threshold value RTT is measured.
Appointing in reference to possible implementation in the first to fourth of first aspect and first aspect A kind of implementation, in the 6th kind of possible implementation of first aspect, is monitoring the transmission After time interval of giving out a contract for a project between the packet C and packet D of end transmission, also include:If institute Time interval of giving out a contract for a project is stated more than the first threshold value, and during less than the second threshold value, then by the packet Size of the difference of the sequence number of D and the sequence number of the packet A as SW.
In addition to being the important indicator for determining TCP transmission speed except RTT, SW is also to determine The important indicator of TCP transmission speed, thus, it will be seen that RTT provided in an embodiment of the present invention Measuring method, can relatively accurately measure the size of RTT values and SW simultaneously, and the method is suitable for In all TCP links, and it is possible to carry out multiple RTT to the data flow that a TCP is chained Measurement, realizes the dynamic tracking to RTT.
Second aspect, embodiments of the invention provide a kind of measurement apparatus of round-trip delay, described device For measuring the round-trip delay RTT that transmission control protocol TCP between transmitting terminal and receiving terminal is chained, Including:Acquiring unit, for obtaining when the TCP chains receive packet A first Between, the packet A is first that the transmitting terminal is wrapped in group to the receiving terminal sends first Packet;Computing unit, for after the confirmation bag for receiving the packet A, calculating described Time interval of giving out a contract for a project between the packet C and packet D of transmitting terminal transmission, the packet C It is the packet after the packet A, the packet D is after the packet C The packet adjacent with the packet C;The computing unit, if being additionally operable to the packet C Time interval of giving out a contract for a project between the packet D is more than the first threshold value, and less than the second thresholding Value, then will receive second time of the packet C and the difference of the very first time as described This RTT value of TCP links.
With reference to second aspect, in the first possible implementation of second aspect, described device is also Including determining unit and query unit, wherein, the computing unit is additionally operable to calculate in the TCP Chain the time interval of giving out a contract for a project between the packet E and packet A ' for receiving, the packet A ' It is adjacent with packet E packet after the packet E;The determining unit, uses If the time interval of giving out a contract for a project between the packet E and the packet A ' is more than described first Limit value, and during less than second threshold value, then the packet A ' is defined as into the packet A; The query unit, for the reception time of inquire-receive to the packet A, and by the reception Time is used as the very first time.
Wherein, whether the query unit, the confirmation bag specifically for inquiring about the packet A is unique; If the confirmation bag of the packet A is unique, the reception time of inquire-receive to the packet A, And using the reception time as the very first time.
With reference to second aspect, in second possible implementation of second aspect, described device is also Including:Updating block, for updating described first threshold value and described according to described this RTT value Second threshold value, wherein, first threshold value after renewal be the first proportionality coefficient with it is described this The product of RTT values, second threshold value after renewal is the second proportionality coefficient and described this RTT The product of value, first proportionality coefficient is less than second proportionality coefficient.
With reference to second aspect, in the third possible implementation of second aspect, described device is also Including updating block, wherein, the computing unit is additionally operable to the institute obtained to this RTT measurement The N number of history RTT value averaged obtained before this RTT value is measured with this RTT is stated, N is the integer more than 0;The updating block, for updating described first according to the mean value Limit value and second threshold value, wherein, first threshold value after renewal is the first proportionality coefficient With the product of the mean value, second threshold value after renewal is that the second proportionality coefficient is flat with described The product of average, first proportionality coefficient is less than second proportionality coefficient.
With reference to second aspect, in the 4th kind of possible implementation of second aspect, described device is also Including setting unit, wherein, the computing unit, when being additionally operable to calculating and setting up the TCP and link Initial R TT value;The setting unit, for arranging described first according to the Initial R TT value Threshold value and second threshold value, wherein, first threshold value be the first proportionality coefficient with it is described The product of Initial R TT value, second threshold value is the second proportionality coefficient and the Initial R TT value Product, first proportionality coefficient be less than second proportionality coefficient.
Appointing in reference to the first to fourth kind possible implementation of second aspect and second aspect A kind of implementation, in the 5th kind of possible implementation of second aspect, the computing unit, If the time interval of giving out a contract for a project being additionally operable between the packet C and the packet D is less than described the One threshold value, then continue to calculate the time interval of giving out a contract for a project between the packet D and packet H, The packet H is adjacent with packet D packet after the packet D;If Time interval of giving out a contract for a project between the packet C and the packet D is more than second threshold value, Then abandon this RTT measurement.
Appointing in reference to the first to fourth kind possible implementation of second aspect and second aspect A kind of implementation, in the 6th kind of possible implementation of second aspect, the computing unit, If being additionally operable to the time interval of giving out a contract for a project more than the first threshold value, and during less than the second threshold value, then will The difference of the sequence number of the packet D and the sequence number of the packet A is used as sliding window SW Size.
The third aspect, embodiments of the invention provide a kind of measuring system of round-trip delay, including above-mentioned The measurement apparatus of the round-trip delay any one of second aspect, and the survey with the round-trip delay The connected receiving terminal of amount device and transmitting terminal.
Embodiments of the invention provide a kind of measuring method of round-trip delay, apparatus and system, can be used for The RTT that TCP is chained between measurement transmitting terminal and receiving terminal, first, can obtain in the TCP chains The very first time for receiving packet A is connected, packet A is that transmitting terminal sends to receiving terminal First packet in one bag group;After the confirmation bag for receiving packet A, calculate and send Time interval of giving out a contract for a project between the packet C and packet D of end transmission, packet C is to count According to the packet after bag A, packet D is adjacent with packet C after packet C Packet;If the time interval of giving out a contract for a project between packet C and packet D is more than the first thresholding Value, and during less than the second threshold value, then will receive second time and the very first time of packet D Difference as TCP link this RTT value.So, based on TCP bulk transfers Mechanism, if monitoring time interval of giving out a contract for a project between packet C and packet D more than first Limit value, and during less than the second threshold value, it is determined that packet D is the second bag after the first bag group First packet in group, now, will receive second time of packet D and receives data The difference of the very first time of bag A, that is, received for the first time difference wrapped between group and the second bag group as this This RTT value of TCP links, so as to improve the degree of accuracy of RTT measurements to a certain extent.
Description of the drawings
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be right The accompanying drawing to be used needed for embodiment or description of the prior art is briefly described.
Fig. 1 is the schematic diagram of RTT measuring methods in prior art;
Fig. 2 is the configuration diagram that RTT measurements are carried out in the embodiment of the present invention;
Fig. 3 is a kind of flow chart one of the measuring method of round-trip delay provided in an embodiment of the present invention;
Fig. 4 is the schematic diagram of RTT measuring methods provided in an embodiment of the present invention;
Fig. 5 is a kind of flowchart 2 of the measuring method of round-trip delay provided in an embodiment of the present invention;
Fig. 6 is the schematic diagram of three-way handshake mechanism provided in an embodiment of the present invention;
Fig. 7 is a kind of structural representation of the measurement apparatus of round-trip delay provided in an embodiment of the present invention One;
Fig. 8 is a kind of structural representation of the measurement apparatus of round-trip delay provided in an embodiment of the present invention Two;
Fig. 9 is a kind of structural representation of the measurement apparatus of round-trip delay provided in an embodiment of the present invention Three;
Figure 10 is a kind of structural representation of the measurement apparatus of round-trip delay provided in an embodiment of the present invention Four;
Figure 11 is a kind of structural representation of the measuring system of round-trip delay provided in an embodiment of the present invention Figure;
Figure 12 is that a kind of hardware configuration of the measurement apparatus of round-trip delay provided in an embodiment of the present invention shows It is intended to.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is entered Row is clearly and completely described, it is clear that described embodiment is only a part of embodiment of the invention, Rather than the embodiment of whole.
In addition, term " first ", " second " are only used for describing purpose, and it is not intended that referring to Show or imply relative importance or the implicit quantity for indicating indicated technical characteristic.Thus, limit There is " first ", one or more being somebody's turn to do can be expressed or be implicitly included to the feature of " second " Feature.In describing the invention, unless otherwise stated, " multiple " are meant that two or two More than.
The terms "and/or", only it is a kind of description affiliated partner incidence relation, expression can There are three kinds of relations, for example, A and/or B can be represented:Individualism A, while there is A And B, individualism B these three situations.In addition, character "/" herein, closes before and after typicallying represent Connection pair as if a kind of relation of "or".
As shown in Fig. 2 Transmission Control Protocol has the mechanism of bulk transfer, specifically, receiving terminal with send Pass through " three-way handshake (three times handshake between end;three-way handshake) Mechanism " sets up TCP links, and after the TCP links are set up, transmitting terminal transmits a Bao Qun, the bag Group in include several packets, receiving terminal after the packet for receiving transmitting terminal Batch sending, to Transmitting terminal is replied and confirms bag (ACK), and a new wheel bag is started after transmitting terminal receives the confirmation bag The transmission of group.
And RTT is referred to:A packet is sent from transmitting terminal in Transmission Control Protocol, to receiving receiving terminal The experienced time is wrapped in the confirmation of transmission, that is, transmitting terminal continuously transmits the time twice between Bao Qun Interval, i.e. R1 in Fig. 2, for RTT measurement apparatus point, between transmitting terminal and receiving terminal In the RTT that the TCP is chained, refer to:First packet in the first bag group is monitored, To the time difference for monitoring first packet in the second bag group, i.e. R2 in Fig. 2, therefore, this The RTT measuring methods that inventive embodiment is provided are calculated transmitting terminal and are connect by identification bag group interval The RTT chained in the TCP between receiving end, the method can continuously measure the TCP links On RTT values each time, and easily in a network between realize on optional position.
It should be noted that the packet A being related in embodiments of the present invention, packet A ', number According in the packets such as bag B, packet C, the English alphabet such as A, B, C is only used for distinguishing packet, The attributive character such as the order of packet, size will not be limited.
Embodiment 1
Embodiments of the invention provide a kind of measuring method of round-trip delay, as shown in figure 3, including:
101st, the very first time for receiving packet A, packet A are chained in acquisition in TCP First packet in group is wrapped to receiving terminal sends first for transmitting terminal.
102nd, after the confirmation bag for receiving packet A, the packet that transmitting terminal sends is calculated Time interval of giving out a contract for a project between C and packet D, packet C is the number after packet A According to bag, packet D is adjacent with packet C packet after packet C.
If the time interval of giving out a contract for a project the 103, between packet C and packet D is more than the first threshold value, And during less than the second threshold value, then will receive second time and the very first time of packet D This RTT value of difference as the TCP links.
In a step 101, RTT measurement apparatus be located between receiving terminal and transmitting terminal, when receiving terminal with Set up after TCP links by " three-way handshake mechanism " between transmitting terminal, RTT measurement apparatus can divide Do not monitor transmitting terminal to each data in the Bao Qun (such as the first bag group) of receiving terminal Batch sending Bag reaches the time of RTT measurement apparatus, and the packet that receives for each of receiving terminal is to sending out The confirmation bag that sending end sends reaches the time of RTT measurement apparatus.
Now, if receiving the first of receiving terminal transmission first packet wrapped in group, (present invention is real Apply and be referred to as packet A in example) confirmation bag, RTT measurement apparatus can be obtained from transmitting terminal in the TCP Chain the very first time T1 (T1 > 0) for receiving packet A, i.e., first in the first bag group Packet reaches the time of RTT measurement apparatus.
Specifically, RTT measurement apparatus can record the reception time of each packet for receiving, and will The reception time of each packet is stored to the memory cell of itself, also, RTT measurement apparatus can The time interval between each packet for receiving is calculated in real time, and the time interval is transmitting terminal and sends out The time interval of giving out a contract for a project between each packet is given, because Transmission Control Protocol has the mechanism of bulk transfer, That is, when transmitting terminal by first bag group be transmitted end after, when transmitting terminal receive this first After the confirmation bag of the packet in Bao Qun, just start the transmission of a new wheel Bao Qun (the i.e. second bag group), Therefore, giving out a contract for a project between first packet of last packet of the first bag group and the second bag group Time interval of giving out a contract for a project in interval time, typically larger than each Bao Qun between packet, then, when RTT measurement apparatus monitor that the previous packet of packet A (is referred to as counted in the embodiment of the present invention According to bag E) time interval of giving out a contract for a project and packet A between is more than the first threshold value, and less than second During threshold value, then it is believed that packet E is the previous Bao Qun (i.e. three guarantees group) of the first bag group In last packet.
Now, RTT measurement apparatus inquire about packet A confirmation bag it is whether unique, that is, exclude data The situation that bag A receiving ends repeatedly confirm, because packet A receiving ends can produce when repeatedly confirming Multiple to confirm bag, RTT measurement apparatus cannot accurately determine what receiving terminal confirmed by this multiple confirmation bag It is which packet, in turn resulting in the RTT values accuracy obtained when RTT is measured reduces.
Specifically, because TCP arranges a sequence number for each packet, when receiving terminal is successfully received To after packet A, the confirmation bag of packet A is sent to transmitting terminal, in the confirmation bag number is also carried According to the sequence number of bag A, therefore, RTT measurement apparatus can parse the sequence of each packet for monitoring The sequence number of row number and each confirmation bag, by contrast, determines whether the confirmation bag of packet A is unique, If the confirmation bag of packet A is unique, the reception then recorded from memory of RTT measurement apparatus should The reception time of packet A is used as very first time T1.
Exemplary, as shown in figure 4, down direction represents that transmitting terminal sends each number to receiving terminal According to bag, up direction represents that receiving terminal sends corresponding confirmation bag, RTT measurement apparatus meetings to transmitting terminal The reception time of each packet for receiving is recorded, when monitoring to chain reception in the TCP To packet E and packet A ' between time interval J1 of giving out a contract for a project (J1 > 0) more than the first thresholding Value, and during less than second threshold value, it is determined that packet A ' is transmitting terminal to the receiving terminal Send first bag group in first packet, i.e. packet A, now, RTT measurement apparatus from Search on up direction and confirm whether bag B is unique with the sequence number identical of packet A, if packet The confirmation bag B of A is unique, and RTT measurement apparatus are then by reception recorded in the memory packet The reception time of A is used as very first time T1.
Wherein, the concrete value of the first threshold value and the second threshold value can be by those skilled in the art's root Carry out according to practical experience it is preset, or, the concrete value of the first threshold value and the second threshold value can be with It is the RTT values obtained according to a front RTT measurement of this RTT measurement by RTT measurement apparatus Calculate, subsequent embodiment of the present invention will be described in detail to this, therefore here is omitted.
So far, RTT measurement apparatus get from transmitting terminal and chain receiving data bag A in the TCP Very first time T1.
In a step 102, because the second bag group that transmitting terminal sends must receive the first bag group Confirmation bag after send, that is to say, that after the confirmation bag that transmitting terminal receives packet A, First packet of the second bag group can be just sent, therefore, in the confirmation bag for receiving packet A Afterwards, RTT measurement apparatus can Continuous plus transmitting terminal send packet C and packet D between Time interval of giving out a contract for a project, packet C and packet D be the packet after data Ah Bai A, And packet D is that (present invention is implemented adjacent with packet C packet after packet C The adjacent data bag of indication, refers to and is continuously connect according to the sequencing RTT measurement apparatus of time in example Two packets for receiving).
Further, because transmitting terminal specifies according to sliding window (Sliding Window, SW) Byte send Bao Qun, and the most of packets in Bao Qun are all packaged according to predetermined bite size (i.e. packet for full bag), and the size of last or the several packets in each Bao Qun may The predetermined bite size can be less than, the situation of non-full bag occurs.
And because the propagation delay time of non-full bag (the possibly minimum bag of size) may be with the transmission of full bag Time delay has difference, therefore, in order to increase the accuracy of RTT measurements, RTT measurement apparatus can be continuous It is the time interval of giving out a contract for a project between the packet C of full bag and packet D to calculate packet.
In step 103, if calculating in a step 102 between packet C and packet D Time interval J2 of giving out a contract for a project (J2 > 0) more than the first threshold value, and during less than the second threshold value, RTT Measurement apparatus then record the second time T2 for receiving packet D, in order to calculate the TCP links This RTT value.
Exemplary, still as shown in figure 4, working as RTT measurement apparatus in the downstream direction, calculate To packet A confirmation bag B after packet C and adjacent packet D between when giving out a contract for a project Between be spaced J2 and be more than the first threshold value, and during less than second threshold value, it is believed that packet D is first packet in the Bao Qun (and second bag group) after the first bag group, now, RTT Measurement apparatus record receives the second time T2 of packet D.
Certainly, after step 102, if sending out between the packet C for monitoring and packet D Bag time interval J2 is less than first threshold value, that is, illustrate that packet D is still fallen within the first bag group Packet, then, RTT measurement apparatus can continue to monitor packet D with follow-up adjacent data Time interval of giving out a contract for a project between bag H;Or, if the packet C for monitoring and packet D it Between time interval J2 of giving out a contract for a project more than second threshold value, that is, think that currently transmitted end no data bag is sent out Send, now, RTT measurement apparatus can abandon this RTT measurement.
And for RTT measurement apparatus, chain in the TCP between transmitting terminal and receiving terminal RTT, refers to:First packet in the first bag group is monitored, to monitoring in the second bag group R2 in the time difference of first packet, i.e. Fig. 2, therefore, chain this in the TCP During RTT values (i.e. this RTT value) R2=the second time T2- the first of RTT measurement apparatus measurement Between T1.
So far, embodiments of the invention provide a kind of measuring method of round-trip delay, can be used for measurement and send out The RTT that TCP is chained between sending end and receiving terminal, first, can obtain to be chained in the TCP and connect The very first time of packet A is received, packet A is that transmitting terminal wraps group to receiving terminal sends first In first packet;After the confirmation bag for receiving packet A, calculate transmitting terminal and send Packet C and packet D between time interval of giving out a contract for a project, packet C is in packet A Packet afterwards, packet D is adjacent with packet C packet after packet C; If the time interval of giving out a contract for a project between packet C and packet D is more than the first threshold value, and little When the second threshold value, then the difference of the second time and the very first time that receive packet D is made For this RTT value of the TCP links.So, the mechanism based on TCP bulk transfers, If the time interval of giving out a contract for a project between packet C and packet D is monitored more than the first threshold value, and During less than the second threshold value, it is determined that packet D is the in the second bag group after the first bag group One packet, now, will receive second time of packet D and receives packet A's The difference of the very first time, that is, received for the first time difference wrapped between group and the second bag group as the TCP This RTT value of link, so as to improve the degree of accuracy of RTT measurements to a certain extent.
Embodiment 2
Embodiments of the invention provide a kind of measuring method of round-trip delay, as shown in figure 5, including:
201st, Initial R TT value when setting up TCP links is calculated.
202nd, the first threshold value and the second threshold value are arranged according to the Initial R TT value, wherein, first Threshold value is the product of the first proportionality coefficient and Initial R TT value, and the second threshold value is the second ratio system The product of number and Initial R TT value.
203rd, the very first time for receiving packet A, packet A are chained in acquisition in TCP First packet in group is wrapped to receiving terminal sends first for transmitting terminal.
204th, after the confirmation bag for receiving packet A, the packet that transmitting terminal sends is calculated Time interval of giving out a contract for a project between C and packet D.
If the 205th, the time interval of giving out a contract for a project is more than the first threshold value, and during less than the second threshold value, then Record receives second time of packet D.
206th, this RTT for linking second time as the TCP with the difference of the very first time Value.
207th, according to this, this RTT value updates first threshold value and second threshold value, wherein, The first threshold value after renewal is the product of the first proportionality coefficient and this RTT value, after renewal Two threshold values are the product of the second proportionality coefficient and this RTT value.
If the 208th, the time interval of giving out a contract for a project is more than the first threshold value, and during less than the second threshold value, then Using the difference of the sequence number of packet D and the sequence number of packet A as SW size.
Specifically, RTT measurement apparatus are located between receiving terminal and transmitting terminal, and receiving terminal and transmitting terminal Between by " three-way handshake mechanism " set up TCP link.
Wherein, the mechanism of so-called three-way handshake, refers to provide reliable data transmission, receives End and transmission of the transmitting terminal to every secondary data are held consultation, and make data sends and receives synchronization.As schemed Shown in 6, shake hands refer to for the first time, when TCP links are set up, transmitting terminal sends SYN (synchronous) message is to receiving terminal, the configuration linked comprising the TCP in the SYN messages Information, so that receiving terminal carries out initial configuration according to configuration information.Second handshake is referred to, connect Receiving end carries out transmission response message (i.e. SYN messages+ACK) after initial configuration and indicates that transmitting terminal should The configuration of TCP links is completed.Third time is shaken hands and is referred to, transmitting terminal is received after the response message of receiving terminal Confirmation (i.e. ACK) is sent, receiving terminal TCP links is indicated it has been established that preparing transmission Data.
As can be seen that transmitting terminal and receiving terminal (i.e. should setting up Initial R TT value when TCP is linked The first time RTT value that TCP is chained), it is RTT measurement apparatus from receiving transmitting terminal first It is secondary that SYN messages are sent when shaking hands, the response message of receiving terminal transmission is received to RTT measurement apparatus Time W1, and RTT measurement apparatus are from receiving the response message of receiving terminal transmission to RTT Measurement apparatus receive the time W2 of the confirmation of transmitting terminal transmission.
Therefore, in step 201, RTT measurement apparatus according to above-mentioned W1 and W2, building by calculating Found the Initial R TT value when TCP is linked, i.e. RTT measurement apparatus=W1+W2.
However, the Initial R TT value obtained in step 201, can only represent the TCP and chain transmission Data flow in the RTT values of start time, chain entirely in the TCP in order to kinetic measurement The change of RTT values when carrying out data is activation and receiving of data flow, can further execution step 202-207。
In step 202., RTT measurement apparatus are according to the Initial R TT value obtained in step 201, First threshold value and the second threshold value are set, wherein, the first threshold value be the first proportionality coefficient with it is initial The product of RTT values, the second threshold value is the product of the second proportionality coefficient and Initial R TT value, and this One proportionality coefficient is less than the second proportionality coefficient.I.e.:
First threshold value M1=the first proportionality coefficient * Initial R TT values
Second threshold value M2=the second proportionality coefficient * Initial R TT values
For example, the first proportionality coefficient can be the arbitrary value in the range of 0.2-0.3, the second proportionality coefficient Can be the arbitrary value in the range of 2-3, those skilled in the art can be according to practical experience or specific The proportionality coefficient of algorithms selection first and the second proportionality coefficient, the embodiment of the present invention is not limited this.
In step 203, RTT measurement apparatus can be obtained to be chained in the TCP and receive the data The very first time T1 (T1 > 0) of bag A, i.e., first packet in the first bag group reaches RTT The time of measurement apparatus, specifically can be found in the associated description in step 101.
In step 204, after the confirmation bag for receiving packet A, RTT measurement apparatus Can Continuous plus transmitting terminal send packet C and packet D between time interval J2 of giving out a contract for a project, Packet C adjacent before and after being with packet D packet, specifically can be found in step 102 Associated description.
In step 205, can further by give out a contract for a project time interval and the step that obtain in step 204 The first threshold value and the second threshold value calculated in 202 is compared, if packet C and packet D Between time interval J2 of giving out a contract for a project more than the first threshold value, and during less than the second threshold value, RTT is surveyed Amount device then records the second time T2 for receiving packet D.
Exemplary, as shown in figure 4, working as RTT measurement apparatus in the downstream direction, monitor number According to giving out a contract for a project between the time between the packet C and adjacent packet D after the confirmation bag B of bag A It is more than the first threshold value every J2, and during less than second threshold value, it is believed that packet D is First packet in Bao Qun (and second bag group) after first bag group, now, RTT measurements Device record receives the second time T2 of packet D.
In step 206, for RTT measurement apparatus, at this between transmitting terminal and receiving terminal The RTT that TCP is chained, refers to:First packet in the first bag group is monitored, to prison Measure the time difference of first packet in the second bag group, i.e. R2 in Fig. 2, therefore, in the TCP Chain RTT values (i.e. this RTT value) times of R2=second of this RTT measurement apparatus measurement T2- very first time T1.
In step 207, in order to ensure the first threshold value that follow-up RTT uses when measuring and this Two threshold values are more accurate, and RTT measurement apparatus can be according to this RTT obtained in step 206 Value, updates first threshold value and second threshold value, wherein, the first threshold value after renewal is the The product of one proportionality coefficient and this RTT value, the second threshold value after renewal is the second proportionality coefficient With the product of this RTT value.I.e.:
First the first proportionality coefficient of threshold value M3=* this RTT value after renewal
Second the second proportionality coefficient of threshold value M4=* this RTT value after renewal
So, when RTT measurements next time are carried out after step 207, RTT measurement apparatus are still The method in execution step 203-206 can be circulated, except for the difference that, in circulation execution step 205 When, RTT measurement apparatus can use last time RTT measurement after update the first threshold value M3 with Second threshold value M4, by give out a contract for a project time interval and the first thresholding after renewal that obtain in step 204 Value M3 and the second threshold value M4 are compared.
Or, RTT measurement apparatus can also to this RTT value obtained in step 206 with enter (this puts down the individual history RTT value averageds of N (N > 0) obtained before capable this RTT measurement Average can be arithmetic mean of instantaneous value, or geometrical mean);Further, according to the mean value more New first threshold value and the second threshold value, wherein, first threshold value is that the first proportionality coefficient is put down with this The product of average, second threshold value is the product of the second proportionality coefficient and the mean value.
Further, in Transmission Control Protocol, the byte batch that transmitting terminal specifies according to sliding window SW Amount sends some packets (i.e. Bao Qun), and after the completion of the bag pocket transmission of a batch, transmitting terminal stops Packet is only sent, after a RTT, transmitting terminal restarts the bag pocket transmission of new lot.
Can be seen that except RTT is the important finger of decision TCP transmission speed from above-mentioned transmission mechanism Outside mark, SW is also the important indicator for determining TCP transmission speed.
Therefore, in a step 208, in order to calculate the size that the TCP chains SW, step is worked as Time interval J2 of giving out a contract for a project monitored in 204 is more than the first threshold value, and less than the second threshold value, Because the packet that the TCP is chained is sent successively according to the size of sequence number, therefore, RTT measurement apparatus can be by the sequence number of packet D and the difference of the sequence number of packet A As the size of the SW, the i.e. sequence number by first packet in the first bag group and the second bag group In first packet sequence number difference, calculate the size of the SW.
As can be seen that RTT measuring methods provided in an embodiment of the present invention, can be simultaneously more accurate The size of ground measurement RTT values and SW, the method is linked suitable for all TCP, and it is possible to Multiple RTT measurements are carried out to the data flow that a TCP is chained, the dynamic tracking to RTT is realized.
It should be noted that step 208 can be between step 205-207 random time perform, The embodiment of the present invention is not restricted to this.
So far, embodiments of the invention provide a kind of measuring method of round-trip delay, can be used for measurement and send out The RTT that TCP is chained between sending end and receiving terminal, first, can obtain to be chained in the TCP and connect The very first time of packet A is received, packet A is that transmitting terminal wraps group to receiving terminal sends first In first packet;After the confirmation bag for receiving packet A, calculate transmitting terminal and send Packet C and packet D between time interval of giving out a contract for a project, packet C is in packet A Packet afterwards, packet D is adjacent with packet C packet after packet C; If the time interval of giving out a contract for a project between packet C and packet D is more than the first threshold value, and little When the second threshold value, then the difference of the second time and the very first time that receive packet D is made For this RTT value of the TCP links.So, the mechanism based on TCP bulk transfers, If the time interval of giving out a contract for a project between packet C and packet D is monitored more than the first threshold value, and During less than the second threshold value, it is determined that packet D is the in the second bag group after the first bag group One packet, now, will receive second time of packet D and receives packet A's The difference of the very first time, that is, received for the first time difference wrapped between group and the second bag group as the TCP This RTT value of link, so as to improve the degree of accuracy of RTT measurements to a certain extent.
Embodiment 3
Embodiments of the invention provide a kind of measurement apparatus of round-trip delay (i.e. RTT measurement apparatus), The device is used to measure the RTT that TCP between transmitting terminal and receiving terminal is chained, as shown in fig. 7, The device includes:
Acquiring unit 11, for obtaining when the TCP chains receive packet A first Between, the packet A is first that the transmitting terminal is wrapped in group to the receiving terminal sends first Packet;
Computing unit 12, for after the confirmation bag for receiving the packet A, calculating described Time interval of giving out a contract for a project between the packet C and packet D of transmitting terminal transmission, the packet C It is the packet after the packet A, the packet D is after the packet C The packet adjacent with the packet C;And, if the packet C and packet D Between time interval of giving out a contract for a project more than the first threshold value, and less than the second threshold value, then will receive institute State that second time of packet C and the difference of the very first time linked as the TCP this RTT values.
Further, as shown in figure 8, described device also includes determining unit 13 and query unit 14, Wherein,
The computing unit 12, is additionally operable to calculating and the packet E for receiving is chained in the TCP Time interval of giving out a contract for a project and packet A ' between, the packet A ' is after the packet E The packet adjacent with the packet E;
The determining unit 13, if for packet E described in the computing unit 12 and the number According to the time interval of giving out a contract for a project between bag A ' more than first threshold value, and less than second threshold value When, then the packet A ' is defined as into the packet A;
The query unit 14, for the reception time of inquire-receive to the packet A, and will The reception time is used as the very first time.
Further, the query unit 14, specifically for the sequence number according to the packet A, Whether the confirmation bag for inquiring about the packet A is unique;If the confirmation bag of the packet A is unique, Inquire-receive to the packet A the reception time, and using the reception time as described first when Between.
Further, as shown in figure 9, described device also includes:
Updating block 15, for updating described first threshold value and described according to described this RTT value Second threshold value, wherein, first threshold value after renewal be the first proportionality coefficient with it is described this The product of RTT values, second threshold value after renewal is the second proportionality coefficient and described this RTT The product of value, first proportionality coefficient is less than second proportionality coefficient.
Or, as shown in figure 9, the computing unit 12, is additionally operable to measure this RTT To described this RTT value and this RTT measurement before N number of history RTT value for obtaining ask for Mean value, N is the integer more than 0;
The updating block 15, for the mean value in the computing unit 12 described the is updated One threshold value and second threshold value, wherein, first threshold value after renewal is the first ratio The product of coefficient and the mean value, second threshold value after renewal is the second proportionality coefficient and institute The product of mean value is stated, first proportionality coefficient is less than second proportionality coefficient.
Further, as shown in Figure 10, described device also includes setting unit 16, wherein,
The computing unit 12, is additionally operable to calculate the Initial R TT value set up when the TCP is linked;
The setting unit 16, is arranged for the Initial R TT value in the computing unit 12 First threshold value and second threshold value, wherein, first threshold value is the first ratio system The product with the Initial R TT value is counted, second threshold value is that the second proportionality coefficient is first with described The product of beginning RTT value, first proportionality coefficient is less than second proportionality coefficient.
Further, the computing unit 12, if being additionally operable to the packet C and the packet Time interval of giving out a contract for a project between D continue to calculate less than first threshold value, then the packet D with Time interval of giving out a contract for a project between packet H, the packet H be after the packet D with The packet D adjacent packet;If sending out between the packet C and the packet D Bag time interval is more than second threshold value, then abandon this RTT measurement.
Further, the computing unit 12, if being additionally operable to the time interval of giving out a contract for a project more than first Threshold value, and during less than the second threshold value, then by the sequence number of the packet D and the packet Size of the difference of the sequence number of A as sliding window SW.
So far, embodiments of the invention provide a kind of measurement apparatus of round-trip delay, can be used for measurement and send out The RTT that TCP is chained between sending end and receiving terminal, first, can obtain to be chained in the TCP and connect The very first time of packet A is received, packet A is that transmitting terminal wraps group to receiving terminal sends first In first packet;After the confirmation bag for receiving packet A, calculate transmitting terminal and send Packet C and packet D between time interval of giving out a contract for a project, packet C is in packet A Packet afterwards, packet D is adjacent with packet C packet after packet C; If the time interval of giving out a contract for a project between packet C and packet D is more than the first threshold value, and little When the second threshold value, then the difference of the second time and the very first time that receive packet D is made For this RTT value of the TCP links.So, the mechanism based on TCP bulk transfers, If the time interval of giving out a contract for a project between packet C and packet D is monitored more than the first threshold value, and During less than the second threshold value, it is determined that packet D is the in the second bag group after the first bag group One packet, now, will receive second time of packet D and receives packet A's The difference of the very first time, that is, received for the first time difference wrapped between group and the second bag group as the TCP This RTT value of link, so as to improve the degree of accuracy of RTT measurements to a certain extent.
Embodiment 4
Figure 11 is a kind of structural representation of the measuring system of round-trip delay provided in an embodiment of the present invention Figure, the system includes the measurement apparatus (i.e. RTT measurement apparatus) 100 of any of the above-described kind of round-trip delay, And the receiving terminal 200 that is connected with the equal data of measurement apparatus 100 of the round-trip delay and transmitting terminal 300。
Specifically, system provided in an embodiment of the present invention can be used for implementing shown in above-mentioned Fig. 1-Fig. 6 The method that various embodiments of the present invention are realized, for convenience of description, illustrate only and embodiment of the present invention phase The part of pass, particular technique details is not disclosed, and refer to each enforcement of the present invention shown in Fig. 1-Fig. 6 Example, therefore here is omitted.
Exemplary, Figure 12 is a kind of reality of RTT measurement apparatus 100 provided in an embodiment of the present invention Body structural representation, RTT measurement apparatus 100 provided in an embodiment of the present invention can be used in enforcement The method that the various embodiments of the present invention shown in Fig. 1-Fig. 6 are realized is stated, for convenience of description, be illustrate only The part related to the embodiment of the present invention, particular technique details is not disclosed, and refer to Fig. 1-Fig. 6 institutes The various embodiments of the present invention shown.
Wherein, the RTT measurement apparatus 100 include processor 21, transceiver 22 and memory 23, also, the processor 21, transceiver 22 and memory 23 communicated by bus 24.
Specifically, transceiver 22 is obtained from transmitting terminal from memory 23 and receives packet A's The very first time, the packet A is first packet in the first bag group;Connect in transceiver 22 After receiving the confirmation bag of the packet A, processor 21 calculates the data that the transmitting terminal sends The time interval of giving out a contract for a project between C and packet D is wrapped, the packet C is with the packet D Adjacent packet in front and back;If the time interval of giving out a contract for a project is more than the first threshold value, and less than second During limit value, processor 21 then records the second time for receiving the packet D in memory 23 In;Further, processor 21 calculates second time and the very first time by processor 21 Difference, and the sheet that second time is linked with the difference of the very first time as the TCP Secondary RTT values.
Further, transceiver 22 is obtained from transmitting terminal from memory 23 and receives packet A The very first time, specifically include step:Processor 21 is calculated and chains what is received in the TCP Time interval of giving out a contract for a project between packet E and packet A ', the packet A ' is in the number According to packet adjacent with the packet E after bag E;If the packet E and the data Time interval of giving out a contract for a project between bag A ' is more than first threshold value, and less than second threshold value When, processor 21 then determines the packet A ' for the packet A, now, processor 21 Inquire-receive to the packet A the reception time, and using the reception time as described first when Between.
Specifically, processor 231 first according to the sequence number of the packet A can inquire about the data Whether the confirmation bag of bag A is unique;If the confirmation bag of the packet A is unique, inquire-receive is to institute The reception time of packet A is stated, and using the reception time as the very first time.
Further, processor 21 using the difference of second time and the very first time as After this round-trip delay RTT values of the TCP links, step can also be included:Processor 21 First threshold value and second threshold value are updated according to described this RTT value, and will be updated The first threshold value and the second threshold value afterwards is stored into memory 23, wherein, it is described after renewal First threshold value is the product of the first proportionality coefficient and this RTT value, described after renewal Two threshold values are the product of the second proportionality coefficient and this RTT value, first proportionality coefficient Less than second proportionality coefficient.
Further, processor 21 using the difference of second time and the very first time as After this round-trip delay RTT values of the TCP links, step can also be included:Processor 21 The N that this RTT value described in obtaining to this RTT measurement is obtained before measuring with this RTT Individual history RTT value averaged, N is the integer more than 0;Further, processor 21 is according to institute State mean value and update first threshold value and second threshold value, and by renewal after the first thresholding Value and the second threshold value are stored to memory 23, wherein, first threshold value after renewal is the The product of one proportionality coefficient and the mean value, second threshold value after renewal is the second ratio system The product with the mean value is counted, first proportionality coefficient is less than second proportionality coefficient.
Further, in transceiver 22 then by processor 21, obtain from memory 23 from sending out Before the very first time of sending end receiving data bag A, step can also be included:Processor 21 is calculated and built Initial R TT value when the vertical TCP is linked;Also, processor 21 is according to Initial R TT Value arranges first threshold value and second threshold value, wherein, first threshold value is first The product of proportionality coefficient and the Initial R TT value, second threshold value be the second proportionality coefficient with The product of the Initial R TT value, first proportionality coefficient is less than second proportionality coefficient.
Further, the packet C and packet D that the transmitting terminal sends is calculated in processor 21 Between time interval of giving out a contract for a project after, step can also be included:If the time interval of giving out a contract for a project is less than institute The first threshold value is stated, processor 21 then continues to calculate the packet D with follow-up adjacent packet Between time interval of giving out a contract for a project;If the time interval of giving out a contract for a project is more than second threshold value, processor 21 are abandoned this RTT measurement.
Further, the packet C and packet D that the transmitting terminal sends is monitored in processor 21 Between time interval of giving out a contract for a project after, step can also be included:If the time interval of giving out a contract for a project is more than the One threshold value, and during less than the second threshold value, then processor 21 passes through processor 21 by the data Size of the difference of sequence number and the sequence number of the packet A of bag D as SW.
So far, embodiments of the invention provide a kind of measurement apparatus and system of round-trip delay, can be used for The RTT that TCP is chained between measurement transmitting terminal and receiving terminal, first, can obtain in the TCP chains The very first time for receiving packet A is connected, packet A is that transmitting terminal sends to receiving terminal First packet in one bag group;After the confirmation bag for receiving packet A, calculate and send Time interval of giving out a contract for a project between the packet C and packet D of end transmission, packet C is to count According to the packet after bag A, packet D is adjacent with packet C after packet C Packet;If the time interval of giving out a contract for a project between packet C and packet D is more than the first thresholding Value, and during less than the second threshold value, then will receive second time and the very first time of packet D Difference as TCP link this RTT value.So, based on TCP bulk transfers Mechanism, if monitoring time interval of giving out a contract for a project between packet C and packet D more than first Limit value, and during less than the second threshold value, it is determined that packet D is the second bag after the first bag group First packet in group, now, will receive second time of packet D and receives data The difference of the very first time of bag A, that is, received for the first time difference wrapped between group and the second bag group as this This RTT value of TCP links, so as to improve the degree of accuracy of RTT measurements to a certain extent.
Those skilled in the art can be understood that, for convenience and simplicity of description, only with The division of above-mentioned each functional module is illustrated, in practical application, can as desired will be upper State function distribution to be completed by different functional modules, will the internal structure of device be divided into different work( Energy module, to complete all or part of function described above.The system of foregoing description, device and The specific work process of unit, may be referred to the corresponding process in preceding method embodiment, and here is no longer Repeat.
In several embodiments provided herein, it should be understood that disclosed system, device And method, can realize by another way.For example, device embodiment described above is only Be it is schematic, for example, the division of the module or unit, only a kind of division of logic function, Can have other dividing mode when actually realizing, such as multiple units or component can with reference to or can To be integrated into another system, or some features can be ignored, or not perform.It is another, it is shown Or the coupling each other that discusses or direct-coupling or communication connection can be the dresses by some interfaces Put or unit INDIRECT COUPLING or communication connection, can be electrical, mechanical or other forms.
It is described as separating component explanation unit can be or may not be it is physically separate, Can be as the part that unit shows or may not be physical location, you can with positioned at a ground Side, or can also be distributed on multiple NEs.Can according to the actual needs select therein Some or all of unit is realizing the purpose of this embodiment scheme.
In addition, each functional unit in each embodiment of the invention can be integrated in a processing unit In, or unit be individually physically present, it is also possible to two or more units are integrated in In one unit.Above-mentioned integrated unit both can be realized in the form of hardware, it would however also be possible to employ soft The form of part functional unit is realized.
If the integrated unit is realized and as independent product using in the form of SFU software functional unit When selling or using, during a computer read/write memory medium can be stored in.Based on such reason Solution, part or the skill that technical scheme substantially contributes in other words to prior art The all or part of art scheme can be embodied in the form of software product, the computer software product In being stored in a storage medium, including some instructions are used so that a computer equipment (can be Personal computer, server, or network equipment etc.) or processor (processor) perform sheet Invent all or part of step of each embodiment methods described.And aforesaid storage medium includes:U Disk, portable hard drive, read-only storage (ROM, Read-Only Memory), arbitrary access are deposited Reservoir (RAM, Random Access Memory), magnetic disc or CD etc. are various can be stored The medium of program code.
The above, specific embodiment only of the invention, but protection scope of the present invention not office Be limited to this, any those familiar with the art the invention discloses technical scope in, can Change or replacement are readily occurred in, all should be included within the scope of the present invention.Therefore, the present invention Protection domain should be defined by the scope of the claims.

Claims (17)

1. a kind of measuring method of round-trip delay, it is characterised in that methods described is used to measure transmitting terminal The round-trip delay RTT that transmission control protocol TCP is chained between receiving terminal, methods described includes:
The very first time for receiving packet A is chained in acquisition in the TCP, and the packet A is The transmitting terminal wraps first packet in group to the receiving terminal sends first;
After the confirmation bag for receiving the packet A, the packet C that the transmitting terminal sends is calculated Time interval of giving out a contract for a project between packet D, the packet C is after the packet A Packet, the packet D is adjacent with packet C data after the packet C Bag;
If the time interval of giving out a contract for a project between the packet C and the packet D is more than the first threshold value, And less than the second threshold value, then will receive second time and the very first time of the packet C This RTT value for linking as the TCP of difference.
2. method according to claim 1, it is characterised in that acquisition is chained in the TCP The very first time of the packet A is received, including:
Calculating chains giving out a contract for a project the time between the packet E and packet A ' for receiving in the TCP Interval, the packet A ' is adjacent with packet E packet after the packet E;
If the time interval of giving out a contract for a project between the packet E and the packet A ' is more than described first Limit value, and during less than second threshold value, then the packet A ' is defined as into the packet A;
Inquire-receive to the packet A the reception time, and using the reception time as described first Time.
3. method according to claim 2, it is characterised in that inquire-receive is to the packet The reception time of A, and using the reception time as the very first time, including:
According to the sequence number of the packet A, whether the confirmation bag for inquiring about the packet A is unique;
If the confirmation bag of the packet A is unique, during the reception of inquire-receive to the packet A Between, and using the reception time as the very first time.
4. the method stated according to any one of claim 1-3, it is characterised in that institute will received State that second time of packet D and the difference of the very first time linked as the TCP this After RTT values, also include:
First threshold value and second threshold value are updated according to described this RTT value, wherein, First threshold value after renewal is the product of the first proportionality coefficient and this RTT value, is updated Second threshold value afterwards is the product of the second proportionality coefficient and this RTT value, described first Proportionality coefficient is less than second proportionality coefficient.
5. the method according to any one of claim 1-3, it is characterised in that will receive Second time of the packet D and the difference of the very first time link as the TCP this After RTT values, also include:
The N number of history RTT value obtained before measuring with this RTT described this RTT value is asked for Mean value, N is the integer more than 0;
First threshold value and second threshold value are updated according to the mean value, wherein, after renewal First threshold value be the first proportionality coefficient and the mean value product, described second after renewal Threshold value is the product of the second proportionality coefficient and the mean value, and first proportionality coefficient is less than described the Two proportionality coefficients.
6. the method according to any one in claim 1-5, it is characterised in that exist obtaining Before the TCP chains the very first time for receiving packet A, also include:
The Initial R TT value when TCP is linked is set up in calculating;
First threshold value and second threshold value are arranged according to the Initial R TT value, wherein, First threshold value is the product of the first proportionality coefficient and the Initial R TT value, second thresholding It is worth the product with the Initial R TT value for the second proportionality coefficient, first proportionality coefficient is less than described Second proportionality coefficient.
7. the method according to any one of claim 1-6, it is characterised in that described calculating After time interval of giving out a contract for a project between the packet C and packet D of transmitting terminal transmission, also include:
If the time interval of giving out a contract for a project between the packet C and the packet D is less than described first Limit value, then continue to calculate the time interval of giving out a contract for a project between the packet D and packet H, the number It is adjacent with packet D packet after the packet D according to bag H;
If the time interval of giving out a contract for a project between the packet C and the packet D is more than described second Limit value, then abandon this RTT measurement.
8. the method according to any one of claim 1-6, it is characterised in that described calculating After time interval of giving out a contract for a project between the packet C and packet D of transmitting terminal transmission, also include:
If the time interval of giving out a contract for a project is more than the first threshold value, and during less than the second threshold value, then will be described The difference of the sequence number of packet D and the sequence number of the packet A is used as the big of sliding window SW It is little.
9. a kind of measurement apparatus of round-trip delay, it is characterised in that described device is used to measure transmitting terminal The round-trip delay RTT that transmission control protocol TCP is chained between receiving terminal, described device includes:
Acquiring unit, the very first time for receiving packet A is chained for obtaining in the TCP, The packet A is first data that the transmitting terminal is wrapped in group to the receiving terminal sends first Bag;
Computing unit, for after the confirmation bag for receiving the packet A, calculating the transmitting terminal Time interval of giving out a contract for a project between the packet C and packet D of transmission, the packet C is described Packet after packet A, the packet D be after the packet C with the data Bag C adjacent packet;
The computing unit, if be additionally operable between the packet C and the packet D when giving out a contract for a project Between interval be more than the first threshold value, and less than the second threshold value, then will receive the packet C's This RTT value that second time linked with the difference of the very first time as the TCP.
10. device according to claim 9, it is characterised in that described device also includes determining single Unit and query unit, wherein,
The computing unit, is additionally operable to calculating and the packet E sums for receiving is chained in the TCP According to bag A ' between time interval of giving out a contract for a project, the packet A ' be after the packet E with it is described Packet E adjacent packet;
The determining unit, if for giving out a contract for a project the time between the packet E and the packet A ' Interval is more than first threshold value, and during less than second threshold value, then by the packet A ' It is defined as the packet A;
The query unit, for the reception time of inquire-receive to the packet A, and connects described As the very first time between the time receiving.
11. devices according to claim 10, it is characterised in that
The query unit, specifically for the sequence number according to the packet A, inquires about the packet Whether the confirmation bag of A is unique;If the confirmation bag of the packet A is unique, inquire-receive is to the number According to the reception time of bag A, and using the reception time as the very first time.
12. devices according to any one of claim 9-11, it is characterised in that described device Also include:
Updating block, for updating first threshold value and described second according to described this RTT value Threshold value, wherein, first threshold value after renewal is the first proportionality coefficient and described this RTT The product of value, second threshold value after renewal is the second proportionality coefficient and described this RTT value Product, first proportionality coefficient is less than second proportionality coefficient.
13. devices according to any one of claim 9-11, it is characterised in that described device Also include updating block, wherein,
The computing unit, is additionally operable to what is obtained before measuring described this RTT value and this RTT N number of history RTT value averaged, N is the integer more than 0;
The updating block, for updating first threshold value and described second according to the mean value Limit value, wherein, first threshold value after renewal is the product of the first proportionality coefficient and the mean value, Second threshold value after renewal is the product of the second proportionality coefficient and the mean value, first ratio Example coefficient is less than second proportionality coefficient.
14. devices according to any one of claim 9-13, it is characterised in that described device Also include setting unit, wherein,
The computing unit, is additionally operable to calculate the Initial R TT value set up when the TCP is linked;
The setting unit, for arranging first threshold value and described according to the Initial R TT value Second threshold value, wherein, first threshold value is the first proportionality coefficient and the Initial R TT value Product, second threshold value is the product of the second proportionality coefficient and the Initial R TT value, described One proportionality coefficient is less than second proportionality coefficient.
15. devices according to any one of claim 9-14, it is characterised in that
The computing unit, if be additionally operable between the packet C and the packet D when giving out a contract for a project Between interval be less than first threshold value, then continue to calculate between the packet D and packet H Give out a contract for a project time interval, the packet H is adjacent with the packet D after the packet D Packet;If the time interval of giving out a contract for a project between the packet C and the packet D is more than described Second threshold value, then abandon this RTT measurement.
16. devices according to any one of claim 9-14, it is characterised in that
The computing unit, if the time interval of giving out a contract for a project is additionally operable to more than the first threshold value, and less than the During two threshold values, then by the difference of the sequence number of the packet D and the sequence number of the packet A As the size of sliding window SW.
17. a kind of measuring systems of round-trip delay, it is characterised in that include as in claim 9-16 The measurement apparatus of the round-trip delay described in any one, and be connected with the measurement apparatus of the round-trip delay Receiving terminal and transmitting terminal.
CN201510715860.8A 2015-10-28 2015-10-28 Method, device and system for measuring round trip delay Active CN106656642B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510715860.8A CN106656642B (en) 2015-10-28 2015-10-28 Method, device and system for measuring round trip delay

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510715860.8A CN106656642B (en) 2015-10-28 2015-10-28 Method, device and system for measuring round trip delay

Publications (2)

Publication Number Publication Date
CN106656642A true CN106656642A (en) 2017-05-10
CN106656642B CN106656642B (en) 2020-06-02

Family

ID=58830791

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510715860.8A Active CN106656642B (en) 2015-10-28 2015-10-28 Method, device and system for measuring round trip delay

Country Status (1)

Country Link
CN (1) CN106656642B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108809766A (en) * 2018-06-22 2018-11-13 北京奇艺世纪科技有限公司 A kind of method, apparatus and system obtaining RTT
CN109218122A (en) * 2017-06-30 2019-01-15 华为技术有限公司 A kind of methods, devices and systems for realizing transmission performance detection
CN111245578A (en) * 2020-01-03 2020-06-05 北京字节跳动网络技术有限公司 Data packet transmission method and device, electronic equipment and storage medium
WO2021008473A1 (en) * 2019-07-12 2021-01-21 华为技术有限公司 System, method, and apparatus for evaluating round-trip time
CN113364646A (en) * 2021-06-03 2021-09-07 杭州朗和科技有限公司 Method, device and system for determining round-trip delay, storage medium and electronic equipment
CN115208866A (en) * 2022-06-24 2022-10-18 深圳市瑞云科技有限公司 Method for transmitting VR data by automatically selecting transmission mode

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1467953A (en) * 2002-06-18 2004-01-14 ���µ�����ҵ��ʽ���� Receiver-based rtt measurement in tcp
CN101572634A (en) * 2009-06-04 2009-11-04 北京邮电大学 Method for utilizing cross-correlation function to passively measure TCP connection round-trip delay
CN103152278A (en) * 2013-01-31 2013-06-12 北京星网锐捷网络技术有限公司 Congestion determination method, congestion determination device and congestion determination network equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1467953A (en) * 2002-06-18 2004-01-14 ���µ�����ҵ��ʽ���� Receiver-based rtt measurement in tcp
CN101572634A (en) * 2009-06-04 2009-11-04 北京邮电大学 Method for utilizing cross-correlation function to passively measure TCP connection round-trip delay
CN103152278A (en) * 2013-01-31 2013-06-12 北京星网锐捷网络技术有限公司 Congestion determination method, congestion determination device and congestion determination network equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
张轶博等: "一种被动式RTT测量算法", 《北京邮电大学学报》 *
杨乐: "TCP往返时延被动测量方法综述", 《大众商务》 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109218122A (en) * 2017-06-30 2019-01-15 华为技术有限公司 A kind of methods, devices and systems for realizing transmission performance detection
CN108809766A (en) * 2018-06-22 2018-11-13 北京奇艺世纪科技有限公司 A kind of method, apparatus and system obtaining RTT
WO2021008473A1 (en) * 2019-07-12 2021-01-21 华为技术有限公司 System, method, and apparatus for evaluating round-trip time
US11611498B2 (en) 2019-07-12 2023-03-21 Huawei Technologies Co., Ltd. Round-trip time evaluation system, method, and apparatus
CN111245578A (en) * 2020-01-03 2020-06-05 北京字节跳动网络技术有限公司 Data packet transmission method and device, electronic equipment and storage medium
CN113364646A (en) * 2021-06-03 2021-09-07 杭州朗和科技有限公司 Method, device and system for determining round-trip delay, storage medium and electronic equipment
CN113364646B (en) * 2021-06-03 2022-05-17 杭州网易智企科技有限公司 Method, device and system for determining round-trip delay, storage medium and electronic equipment
CN115208866A (en) * 2022-06-24 2022-10-18 深圳市瑞云科技有限公司 Method for transmitting VR data by automatically selecting transmission mode
CN115208866B (en) * 2022-06-24 2023-08-29 深圳市瑞云科技有限公司 Method for automatically selecting transmission mode to transmit VR data

Also Published As

Publication number Publication date
CN106656642B (en) 2020-06-02

Similar Documents

Publication Publication Date Title
CN106656642A (en) Round trip time measurement method, round trip time measurement device and round trip time measurement system
US4539677A (en) Multiple access data communication system
US10084699B2 (en) Transferring data
CN103109491B (en) Communication device and delay detection method
EP2151955B1 (en) Link band estimation device and link band estimation method
CN111343039B (en) Communication synchronization method and node in distributed acquisition system
US6795401B1 (en) Band width measuring method and apparatus for a packet switching network
CN102404187A (en) Congestion control method and system as well as network equipment
US20130039209A1 (en) Data transfer
CN104158760B (en) A kind of method and system of the unilateral acceleration of wide area network TCP
CN111245675B (en) Network delay and lost data packet detection method and system
CN104901851B (en) A kind of method and system of detection network quality
CN103259696A (en) Network bandwidth detecting method and device and network devices
CN111343228B (en) Distributed time synchronization protocol for asynchronous communication system
WO2014140673A1 (en) Congestion avoidance and control for udp-based protocols
JP6670851B2 (en) Network event timer optimization technology
EP1059774A3 (en) Method and apparatus for queue modeling
CN103152278A (en) Congestion determination method, congestion determination device and congestion determination network equipment
CN107359972B (en) A kind of data receiver method and device
CN110248379A (en) The performance test methods and device of base station in WLAN
CN107911263A (en) It is a kind of to measure ethernet delay and the message of congestion at the same time
CN104615573B (en) A kind of communication means and device
CN106375155B (en) The control method and control system of MAC simulating, verifying model
CN104753640B (en) A kind of adaptation method and device based on network transmission link
CN112073472B (en) Soft zero clearing processing method for counter

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
GR01 Patent grant
GR01 Patent grant