CN116016282A - Time delay measurement method and device, computer equipment and storage medium - Google Patents
Time delay measurement method and device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN116016282A CN116016282A CN202211686156.0A CN202211686156A CN116016282A CN 116016282 A CN116016282 A CN 116016282A CN 202211686156 A CN202211686156 A CN 202211686156A CN 116016282 A CN116016282 A CN 116016282A
- Authority
- CN
- China
- Prior art keywords
- delay
- intermediate forwarding
- round trip
- forwarding
- forwarding device
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention provides a time delay measuring method and device, computer equipment and storage medium, wherein the method comprises the following steps: under the condition that second network equipment sends a target request message to first network equipment, acquiring first forwarding time delay of forwarding the target request message by first intermediate forwarding equipment, and acquiring first round trip time delay corresponding to the first intermediate forwarding equipment and second round trip time delay corresponding to the second intermediate forwarding equipment; the first round trip time delay is the time length from the first intermediate forwarding device to the target response message corresponding to the target request message, and the second round trip time delay is the time length from the second intermediate forwarding device to the target response message corresponding to the target request message; and determining the path delay between the first intermediate forwarding device and the second intermediate forwarding device according to the first round trip delay, the second round trip delay and the first forwarding delay. The invention has the advantages of high time delay measurement precision, low measurement cost and the like.
Description
Technical Field
The invention relates to the technical field of network communication, in particular to a time delay measuring method and device, computer equipment and a storage medium.
Background
The network transmission delay is an important index for measuring the network transmission quality, and the operation state of the network can be known in time by monitoring and analyzing the network transmission delay. The corresponding equipment nodes or the operation strategies thereof are adjusted according to different time delay performances, so that the network quality is improved; or diagnosing and locating network faults due to excessive delays, may provide more reliable and stable network services.
In the related art, in the process of measuring network transmission delay, path delay between adjacent devices needs to be measured. For example, for between adjacent device node A and device node B, the time A at which the message was sent from device node A can be calculated out Time B when message enters device node B in And by the time difference B between them in -A out Path delays between adjacent device nodes a and B are determined. Although the related art can be implemented, the adjacent different equipment nodes are required to rely on high-precision clock synchronization to ensure that the obtained path delay is accurate. However, the high-precision clock synchronization scheme increases the networking complexity, and particularly for the situation that the networking complexity is higher under the condition that the number of equipment nodes is large, and the high-precision clock synchronization component is expensive, so that the related technology is often provided with the clock synchronization component with general precision or is not provided with the clock synchronization component, and the problem that the path delay measurement result in the related technology has low accuracy and the like exists.
Disclosure of Invention
In order to solve the problems of low accuracy of path delay measurement results and the like in the related art, the invention can provide a delay measurement method and device, computer equipment and a storage medium so as to avoid the dependence of a path delay measurement process on a high-precision clock and improve the accuracy of the path delay measurement results.
In order to achieve the technical purpose, the present invention provides a time delay measurement method, which is applied to a time delay analysis device, wherein a first network device and a second network device communicate through at least two intermediate forwarding devices, and after one of the first network device and the second network device sends a request message to an opposite end network device, the opposite end network device feeds back a response message corresponding to the request message to the network device; the method comprises the following steps: acquiring a first forwarding delay of forwarding the target request message by the first intermediate forwarding device under the condition that the second network device sends the target request message to the first network device; the first network device, the first intermediate forwarding device, the second intermediate forwarding device and the second network device are sequentially arranged, and the first intermediate forwarding device and the second intermediate forwarding device are any two adjacent intermediate forwarding devices in the at least two intermediate forwarding devices; acquiring a first round trip delay corresponding to the first intermediate forwarding device and a second round trip delay corresponding to the second intermediate forwarding device; the first round trip delay is a time length from the first intermediate forwarding device sending the target request message to receiving a target response message corresponding to the target request message, and the second round trip delay is a time length from the second intermediate forwarding device sending the target request message to receiving the target response message corresponding to the target request message; and determining the path delay between the first intermediate forwarding device and the second intermediate forwarding device according to the first round trip delay, the second round trip delay and the first forwarding delay.
In order to achieve the above technical objective, the present invention further provides a delay measurement apparatus, where a first network device and a second network device communicate with each other through at least two intermediate forwarding devices, and after one of the first network device and the second network device sends a request message to an opposite network device, the opposite network device feeds back a response message corresponding to the request message to the network device; the device comprises: a forwarding delay obtaining module, configured to obtain, when the second network device sends a target request packet to the first network device, a first forwarding delay of the first intermediate forwarding device for forwarding the target request packet; the first network device, the first intermediate forwarding device, the second intermediate forwarding device and the second network device are sequentially arranged, and the first intermediate forwarding device and the second intermediate forwarding device are any two adjacent intermediate forwarding devices in the at least two intermediate forwarding devices; the round trip delay acquisition module is used for acquiring a first round trip delay corresponding to the first intermediate forwarding equipment and a second round trip delay corresponding to the second intermediate forwarding equipment; the first round trip delay is a time length from the first intermediate forwarding device sending the target request message to receiving a target response message corresponding to the target request message, and the second round trip delay is a time length from the second intermediate forwarding device sending the target request message to receiving the target response message corresponding to the target request message; and the path delay determining module is used for determining the path delay between the first intermediate forwarding device and the second intermediate forwarding device according to the first round trip delay, the second round trip delay and the first forwarding delay.
To achieve the above object, the present invention also provides a computer device including a memory and a processor, where the memory stores computer readable instructions that, when executed by the processor, cause the processor to perform the delay measurement method according to any of the embodiments of the present invention.
To achieve the above object, the present invention may further provide a storage medium storing computer readable instructions that, when executed by one or more processors, cause the one or more processors to perform the delay measurement method according to any one of the embodiments of the present invention.
The beneficial effects of the invention include: in the delay measurement method provided by the embodiment of the invention, based on the acquired first forwarding delay of the first intermediate forwarding device for forwarding the target request message, the first round trip delay corresponding to the first intermediate forwarding device and the second round trip delay corresponding to the second intermediate forwarding device, the path delay between the first intermediate forwarding device and the second intermediate forwarding device is directly determined, so that the clock synchronization process is not needed in the whole implementation process, namely, the path delay between two adjacent intermediate forwarding devices is accurately obtained on the premise of not relying on a high-precision clock component; compared with the prior art, the method has the outstanding advantages of high time delay measurement precision, easy realization of the measurement process, low measurement cost and the like.
Drawings
Fig. 1 is a flow diagram of a method for delay measurement in accordance with one or more embodiments of the invention.
Fig. 2 is a schematic diagram of an implementation principle of measuring a path delay between a first intermediate forwarding device and a second intermediate forwarding device in one or more embodiments of the present invention.
Fig. 3 is a schematic diagram illustrating measurement principles of a first forwarding delay, a second forwarding delay, and a third forwarding delay in one or more embodiments of the present invention.
Fig. 4 is a schematic diagram illustrating measurement principles of a first round trip delay, a second round trip delay, a third round trip delay, and a fourth round trip delay in one or more embodiments of the present invention.
Fig. 5 is a schematic diagram of an implementation principle of determining a path delay according to a round trip delay in one or more embodiments of the present invention.
Fig. 6 is a schematic diagram of an implementation of measuring network transmission delay by combining RTT (Round Trip Time) with INT (In-band Telemetry) In one or more embodiments of the present invention.
Fig. 7 is a schematic diagram showing an internal structure of a delay analyzing apparatus in one or more embodiments of the present invention.
In the drawing the view of the figure,
101. A first network device; 102. a second network device; 103. a time delay analysis device; 201. a first intermediate forwarding device; 202. a second intermediate forwarding device; 203. and a third intermediate forwarding device.
Detailed Description
The time delay measuring method, the time delay measuring device, the computer equipment and the storage medium provided by the invention are explained and illustrated in detail below with reference to the attached drawings.
In the related art, the detection modes of network delay generally include three types: 1) active detection, 2) passive detection, 3) mixed detection. For the active detection mode, generally, the performance of the detection message is observed and measured by constructing the detection message, for example, TWAMP (Two-Way Active Measurement Protocol, bidirectional active measurement protocol) and the like; because the active detection mode is not used for measuring the real service flow, the detection accuracy is low; for the passive detection mode, the existing service message is observed and measured, for example, INT (In-band Telemetry) is detected along with the flow, and the INT message head is inserted into the mirror image original service message and information is acquired, and the INT message head is actively sent to the collector, so that the method has the advantages of good instantaneity, high detection precision and the like; for the hybrid detection mode, which refers to the combination of active detection and passive detection, by constructing a small amount of auxiliary detection messages, actual traffic flows, such as proprietary OAM (Operation Administration and Maintenance, operation, administration and maintenance), are measured, and the accuracy is also high because part of the detection is based on the actual traffic flows.
In the actual network transmission delay detection process, the above scheme often needs to measure the path delay between adjacent devices. For example, for a time B between adjacent device node A and device node B, if a message is used to enter device node B in Time A with message sent from equipment node A out The time difference between the two is taken as the path delay, so that the equipment node A and the equipment node B must have the same clock, namely, the path delay between the equipment measured by the conventional scheme depends on high-precision clock synchronization, but a high-precision clock synchronization component is expensive, and the clock synchronization technology can increase the complexity of networking.
As shown in fig. 1, and in conjunction with fig. 2 to fig. 6, at least one embodiment of the present invention can provide a delay measurement method, where the delay measurement method can be applied to a delay analysis apparatus 103, where a first network device 101 and a second network device 102 communicate with each other through at least two intermediate forwarding devices, and after a request packet is sent to an opposite network device, one of the first network device 101 and the second network device 102 feeds back a response packet corresponding to the request packet to the opposite network device. Wherein if one network device is the first network device 101, the opposite network device is the second network device 102; if one network device is the second network device 102, the peer network device is the first network device 101. As shown in connection with fig. 1 and 2, the delay measurement method may include, but is not limited to, the following steps S10 to S30.
Step S10, in the case that the second network device 102 sends the target request packet to the first network device 101, acquiring a first forwarding delay of the first intermediate forwarding device 201 for forwarding the target request packet; the first network device 101, the first intermediate forwarding device 201, the second intermediate forwarding device 202, and the second network device 102 are sequentially configured, where the first intermediate forwarding device 201 and the second intermediate forwarding device 202 are any two adjacent intermediate forwarding devices of the at least two intermediate forwarding devices.
As shown in fig. 2, at least one intermediate forwarding device or no intermediate forwarding device may be further disposed between the second intermediate forwarding device 202 and the second network device 102 in this embodiment, and communication may be performed between the second intermediate forwarding device 202 and the second network device 102, and at least one intermediate forwarding device or no intermediate forwarding device may be disposed between the first intermediate forwarding device 201 and the first network device 101, and communication may be performed between the first intermediate forwarding device 201 and the first network device 101.
For example, the first network device 101 and the second network device 102 may communicate with each other through the first intermediate forwarding device 201 and the second intermediate forwarding device 202 that are sequentially arranged, and the first intermediate forwarding device 201 and the second intermediate forwarding device 202 are respectively communicatively connected to the delay analysis apparatus 103.
It should be understood that the first network device 101 and the second network device 102 according to the present invention may be servers (servers), for example, the first network device 101 is a Server a, and the second network device 102 is a Server B, but not limited thereto.
As shown in fig. 3, a first intermediate forwarding device 201, a second intermediate forwarding device 202, and a third intermediate forwarding device 203 that are disposed between the first network device 101 and the second network device 102 are exemplarily provided, it should be understood that, in an embodiment of the present invention, the number of intermediate forwarding devices disposed between the first network device 101 and the second network device 102 may be greater than or equal to two, for example, 2, 3, 4, … ….
In at least one embodiment of the present invention, obtaining a first forwarding delay of forwarding a target request packet by the first intermediate forwarding device 201 includes: acquiring a first timestamp and a second timestamp corresponding to the first intermediate forwarding device 201; the first timestamp represents the time when the target request message enters the first intermediate forwarding device 201, the second timestamp represents the time when the target request message leaves the first intermediate forwarding device 201, and the difference between the second timestamp and the first timestamp is the first forwarding delay. The process of determining the forwarding delay of the corresponding intermediate forwarding device based on the time stamp does not involve the time stamp of the cross-device, so clock synchronization is not needed, and the device forwarding delay in the transmission path can be accurately obtained through the time stamp, so that the accuracy of the device forwarding delay is reliable.
In at least one embodiment of the present invention, obtaining a first timestamp and a second timestamp corresponding to the first intermediate forwarding device 201 includes: in-band telemetry messages sent by the first intermediate forwarding device 201 are received, the in-band telemetry messages encapsulating the first timestamp and the second timestamp. The message sent by the first intermediate forwarding device 201 to the delay analysis device 103 In this embodiment may specifically be an In-band Telemetry (INT) message; optionally, the in-band telemetry message for encapsulating the first timestamp and the second timestamp is sent to the delay analysis apparatus 103 through the second intermediate forwarding device 202; in-band telemetry in this embodiment is a network monitoring technique that collects data from the device. By the above scheme, the delay analysis device 103 can be ensured to determine the accurate first forwarding delay.
Step S20, acquiring a first round trip delay corresponding to the first intermediate forwarding device 201 and a second round trip delay corresponding to the second intermediate forwarding device 202; the first round trip delay is a time period from when the first intermediate forwarding device 202 sends the target request message to when the target response message corresponding to the target request message is received, and the second round trip delay is a time period from when the second intermediate forwarding device 202 sends the target request message to when the target response message corresponding to the target request message is received.
In this embodiment, the first network device 101 sends a request message to the second network device 102 and the second network device 102 sends a response message for responding to the request message to the first network device 101, or the second network device 102 sends a request message to the first network device 101 and the first network device 101 sends a response message for responding to the request message to the second network device 102.
In at least one embodiment of the present invention, acquiring a first round trip delay corresponding to the first intermediate forwarding device 201 and a second round trip delay corresponding to the second intermediate forwarding device 202 includes: a first round trip delay collected by the first intermediate forwarding device 201 and uploaded via remote telemetry is received, and a second round trip delay collected by the second intermediate forwarding device 202 and uploaded via remote telemetry is received. In this embodiment, the second network device 102 may send a request packet to the first network device 101 and the first network device 101 replies a corresponding response packet, and the accuracy of the acquisition result is improved obviously by using the first round trip delay acquired and uploaded by the first intermediate forwarding device 201 and the second round trip delay acquired and uploaded by the second intermediate forwarding device 202, which is based on the manner that the intermediate forwarding devices acquire respective round trip delays.
The remote Telemetry (teletechnology) in the embodiment of the invention is particularly a technology for remotely acquiring data from physical equipment or virtual equipment at a high speed. The embodiment can accurately acquire the first round trip delay acquired and uploaded by the first intermediate forwarding device 201 and the second round trip delay acquired and uploaded by the second intermediate forwarding device 202 based on the remote telemetry. The embodiment can not only accurately determine the round trip delay of each intermediate forwarding device based on the scheme, but also timely and quickly acquire the round trip delay information.
In step S30, a path delay between the first intermediate forwarding device 201 and the second intermediate forwarding device 202 is determined according to the first round trip delay, the second round trip delay and the first forwarding delay.
In at least one embodiment of the present invention, determining a path delay between a first intermediate forwarding device and a second intermediate forwarding device according to a first round trip delay, a second round trip delay, and a first forwarding delay includes: determining a first difference between the second round trip delay and the first round trip delay; and determining a second difference between half of the first difference and the first forwarding delay, wherein the second difference is the path delay between the first intermediate forwarding device and the second intermediate forwarding device.
Referring to fig. 2, a second round trip time RTT is determined in an embodiment of the present invention 2 With a first round trip time RTT 1 Then subtracting the first transfer delay FD from half of the difference A A path delay between the first intermediate forwarding device 201 and the second intermediate forwarding device 202 is obtained, which path delay= (RTT 2 -RTT 1 )/2-FD A . It can be seen that the path delay between the first intermediate forwarding device 201 and the second intermediate forwarding device 202 can be determined without considering clock synchronization of the first intermediate forwarding device 201 and the second intermediate forwarding device 202 in the embodiment of the present invention. Wherein, RTT of the embodiment 1 /2 may represent a path delay (T) between the first intermediate forwarding device 201 and the first network device 101 1 ),RTT 2 /2 may represent a sum (T) of a path delay between the second intermediate forwarding device 202 and the first intermediate forwarding device 201, a first forwarding delay of the first intermediate forwarding device 201 2 )。
The whole realization process of the network transmission delay measurement does not need clock synchronization among different intermediate forwarding devices, and the method can more accurately and reliably determine the specific value of the path delay by combining the two modes of measuring the path delay by using the RTT value and measuring the forwarding delay by using the INT.
As shown in fig. 3 to 6, the number of intermediate forwarding devices set between the first network device 101 and the second network device 102 shown in the present embodiment is 3, specifically, the first network device 101 and the second network device 102 may communicate with each other through a first intermediate forwarding device 201, a second intermediate forwarding device 202, and a third intermediate forwarding device 203 that are sequentially set, and the first intermediate forwarding device 201, the second intermediate forwarding device 202, and the third intermediate forwarding device 203 are respectively communicatively connected to the delay analysis apparatus 103. The present embodiment next takes 3 intermediate forwarding devices as an example, and determines the network transmission delay between the first network device 101 and the second network device 102.
As shown in fig. 3, the delay analyzing apparatus 103 receives a first packet sent by one intermediate forwarding device of the plurality of intermediate forwarding devices, and in this embodiment, this step may specifically include: the first packet sent by the third intermediate forwarding device 203 is received, where the first packet is used to characterize the first forwarding delay of the first intermediate forwarding device 201, the second forwarding delay of the second intermediate forwarding device 202, and the third forwarding delay of the third intermediate forwarding device 203. It can be seen that the first packet according to the embodiment of the present invention is used to characterize the forwarding delay of each intermediate forwarding device, that is, the forwarding delays of each of the first intermediate forwarding device, the second intermediate forwarding device, and the third intermediate forwarding device.
In this embodiment of the present invention, the receiving the first packet sent by the third intermediate forwarding device 203 includes: receiving a first message encapsulated and sent by the third intermediate forwarding device 203 based on the first timestamp, the second timestamp and the third timestamp; wherein the first timestamp includes a time when the first request packet enters and leaves the first intermediate forwarding device 201, the first request packet is a request packet sent by the first network device 101 to the second network device 102, the second timestamp includes a time when the first request packet enters and leaves the second intermediate forwarding device 202, and the third timestamp includes a time when the first request packet enters and leaves the third intermediate forwarding device 203.
When in specific implementation, the embodiment of the invention is realized based on INT technology, and the first intermediate forwarding device, the second intermediate forwarding device and the third intermediate forwarding device enable INT functions. In this embodiment, the first intermediate forwarding device serves as a first node, the second intermediate forwarding device serves as an intermediate node (may be multiple) and the third intermediate forwarding device serves as a tail node. When the first communication device sends an original request message to the second communication device, the embodiment can package the original request message into an INT message, identify the INT message at each intermediate forwarding device (i.e. each node), add a time stamp of the in-out device, and upload the INT message to the time delay analysis device after reaching the last intermediate forwarding device, so as to obtain time delay information by analyzing the time stamp of the device. The third intermediate forwarding device 203 in the present invention may be replaced by the first intermediate forwarding device 201, in which case the original request message is sent by the second network device to the first network device.
For the first intermediate forwarding device as the head node, qoS (Quality of Service ) policies are applied on the traffic ingress port, so as to mirror the rule-compliant packets received on the interface to an INT processor inside the first intermediate forwarding device, where the processor adds an INT mark and a timestamp to the first request packet, generates an INT packet, and sends the INT packet to the intermediate node. And for the second intermediate transmitting device serving as the intermediate node, after the input port of the intermediate node receives the message, the INT message can be automatically identified according to the INT mark, and the INT message is uploaded to an INT processor in the second intermediate transmitting device to be added with a time stamp and then sent to the tail node. For the third intermediate forwarding device serving as the tail node, after receiving the message, the ingress port of the tail node automatically identifies the INT message according to the INT mark, and sends the INT message to the INT processor in the third intermediate forwarding device to add a time stamp, then encapsulates the INT message according to the specified IP (Internet Protocol ) address, port number and VLAN (Virtual Local Area Network ) number, and then sends the INT message to the collector in the delay analysis device 103.
Referring to fig. 3, after the INT message enters the first intermediate forwarding device 201, a first timestamp is added to the INT message Wen Tianjia, specifically, a timestamp a of the first request message entering the first intermediate forwarding device 201 is added in And a timestamp a of the first request message leaving the first intermediate forwarding device 201 out . First forwarding delay FD A =A out -A in . After the INT message enters the second intermediate forwarding device 202, a second timestamp is added to the INT message Wen Tianjia, specifically, a timestamp B of the first request message entering the second intermediate forwarding device 202 is added in And a timestamp B of the first request message leaving the second intermediate forwarding device 202 out The method comprises the steps of carrying out a first treatment on the surface of the Then the second forwarding delay FD B =B out -B in . INT messageAfter entering the third intermediate forwarding device 203, a third timestamp is added to the INT message Wen Tianjia, specifically adding a timestamp C of the first request message entering the third intermediate forwarding device 203 in And a timestamp C of the first request message leaving the third intermediate forwarding device 203 out The method comprises the steps of carrying out a first treatment on the surface of the Third forwarding delay FD C =C out -C in . The delay analysis device 103 in this embodiment analyzes the first request packet to obtain a first timestamp, a second timestamp and a third timestamp, and determines the corresponding first forwarding delay, second forwarding delay and third forwarding delay according to the above manner. It should be understood that the present invention may also send a request message to the first communication device through the second communication device, in which case the device that sends the first message is the first intermediate forwarding device.
As shown in fig. 4, the delay analysis device 103 of this embodiment may receive second packets sent by a plurality of intermediate forwarding devices, where in this embodiment the step may specifically include: receiving a first sub-message sent by the first intermediate forwarding device 201, a second sub-message sent by the second intermediate forwarding device 202, a third sub-message sent by the third intermediate forwarding device 203, and a fourth sub-message sent by the third intermediate forwarding device 203; the first sub-packet is used to characterize a first round trip delay between the first intermediate forwarding device 201 and the first network device 101, the second sub-packet is used to characterize a second round trip delay between the second intermediate forwarding device 202 and the first network device 101, the third sub-packet is used to characterize a third round trip delay between the third intermediate forwarding device 203 and the first network device 101, and the fourth sub-packet is used to characterize a fourth round trip delay between the third intermediate forwarding device 203 and the second network device 102. The first sub-message, the second sub-message, the third sub-message and the fourth sub-message are respectively used for representing the round trip delay between each intermediate forwarding device and the corresponding network device.
In a specific implementation, the delay analysis device 103 may receive a first sub-packet sent by the first intermediate forwarding device 201, a second sub-packet sent by the second intermediate forwarding device 202, and a third sub-packet sent by the third intermediate forwarding device 203, where the steps include: receiving a first sub-message encapsulated and sent by the first intermediate forwarding device 201 based on the first round trip delay, receiving a second sub-message encapsulated and sent by the second intermediate forwarding device 202 based on the second round trip delay, and receiving a third sub-message encapsulated and sent by the third intermediate forwarding device 203 based on the third round trip delay; the first round trip delay, the second round trip delay, and the third round trip delay are all determined based on a second request packet sent by the second network device 102 to the first network device 101 and a response packet of the first network device 101 in response to the second request packet.
As shown in fig. 4, in this embodiment, the first intermediate forwarding device 201, the second intermediate forwarding device 202, and the third intermediate forwarding device 203 all enable the NetAnalysis function, and the NetAnalysis function monitors and counts the RoCE session traffic, where the monitoring and counting objects include a session RTT (Round Trip Time), and each intermediate forwarding device actively sends the statistical result to the delay analysis device 103 through the test. The NetAnalysis refers to network analysis, a specific value is a network flow monitoring and analyzing technology, and the specific value can be used for carrying out deep analysis on a specified service flow to obtain performance index data such as packet loss rate, time delay and the like of the specified service flow; roCE, collectively RDMA over Converged Ethernet, is a network protocol that allows remote direct memory access to be used over ethernet, referring to the application of RDMA (Remote Direct Memory Access, remote direct data access) over ethernet.
As shown in fig. 5, the second network device 102 may send a second request packet to the first network device 101, and then the first network device 101 sends a corresponding response packet to the second network device 102.
In the process of the request and the response, the RTT value acquired by the first intermediate forwarding device 201 is RTT 1 I.e. the first round trip delay; the RTT value acquired by the second intermediate forwarding device 202 is RTT 2 I.e. a second round trip delay; the RTT value acquired by the third intermediate forwarding device 203 is RTT 3 I.e. the third round trip delay. For the case of two intermediate forwarding devices, for example, the first intermediate forwarding device 201 and the second intermediate forwarding device 202, the RTT value acquired by the first intermediate forwarding device 201 is RTT 1 I.e. the first round trip delay; second intermediateThe RTT value collected by the forwarding device 202 is RTT 2 . The embodiment of the invention can accurately collect the time delay of the round trip paths among the first intermediate forwarding equipment, the second intermediate forwarding equipment and the third intermediate forwarding equipment and the first network equipment on the premise of not using clock synchronization based on the scheme, thereby providing accurate data support for the measurement of network transmission time delay.
As shown in fig. 5, the first network device 101 may send a third request packet to the second network device 102, and then the second network device 102 sends a corresponding response packet to the first network device 101. In the request and response process, the RTT value acquired by the third intermediate forwarding device 203 is RTT 4 . For the case of two intermediate forwarding devices, for example, the RTT value collected by the second intermediate forwarding device 202 is RTT 3 . Based on the scheme, the embodiment of the invention can accurately acquire the time delay of the round trip path between the third intermediate forwarding equipment and the second network equipment on the premise of not using clock synchronization, thereby providing accurate data support for the measurement of network transmission time delay.
As shown in fig. 6, the present embodiment determines the network transmission delay according to the forwarding delay, the first round trip delay and the second round trip delay, and specifically includes the following steps: determining a first path delay according to the first round trip delay, determining a second path delay according to the second round trip delay and the first round trip delay, determining a third path delay according to the third round trip delay and the second round trip delay, and determining a fourth path delay according to the fourth round trip delay; and determining the network transmission delay according to the first forwarding delay, the second forwarding delay, the third forwarding delay, the first path delay, the second path delay, the third path delay and the fourth path delay.
Wherein the first path delay represents a path delay between the first intermediate forwarding device 201 and the first network device 101, the second path delay represents a sum of a path delay between the second intermediate forwarding device 202 and the first intermediate forwarding device 201 and the first forwarding delay, the third path delay represents a sum of a path delay between the third intermediate forwarding device 203 and the second intermediate forwarding device 202 and the second forwarding delay, and the fourth path delay represents a path delay between the third intermediate forwarding device 203 and the second network device 102. It can be seen that the present embodiment can determine the corresponding path delay according to the round trip delay.
As shown in fig. 6, the path delays according to the present embodiment are calculated as follows: first path delay t1= (RTT 1 ) Second path delay t2= (RTT) 2 -RTT 1 ) 2; third path delay t3= (RTT 3 -RTT 2 ) /2, fourth path delay t4= (RTT 4 )/2。
For the case of two intermediate forwarding devices (first intermediate forwarding device 201 and second intermediate forwarding device 202), in combination with the previous example, the path delay between first intermediate forwarding device 201 and first network device 101 may be (RTT 1 ) The path delay between the second intermediate forwarding device 202 and the first network device 101 may be (RTT 2 -RTT 1 ) 2; the path delay between the second intermediate forwarding device 202 and the second network device 102 may be (RTT 3 )/2。
As shown in fig. 6, the determining the network transmission delay according to the first forwarding delay, the second forwarding delay, the third forwarding delay, the first path delay, the second path delay, the third path delay and the fourth path delay according to the embodiment of the present invention may specifically include: determining a first difference between the second path delay and the first forwarding delay, determining a second difference between the third path delay and the second forwarding delay, and determining a sum of the first forwarding delay, the second forwarding delay, the third forwarding delay, the first path delay, the first difference, the second difference, and the fourth path delay as a network transmission delay between the first network device 101 and the second network device 102.
As shown in fig. 6, the present embodiment can specifically calculate the delay of each segment of sub-path and the network transmission delay as follows. In each path between the first network device 101 and the second network device 102, the first path delay T1 is a first path delay PD 1 The first difference between the second path delay and the first forwarding delay is the second path delay PD 2 The second difference between the third path delay and the second forwarding delay is the third path delayThree-terminal path delay PD 3 The fourth path delay T4 is the fourth path delay PD 4 As shown in conjunction with fig. 6, the network transmission path=pd between the first network device 101 and the second network device 102 in the present embodiment 1 +FD A +PD 2 +FD B +PD 3 +FD C +PD 4 。
The whole realization process of the network transmission delay measurement does not need clock synchronization among different intermediate forwarding devices, and the method can more accurately and reliably determine the specific value of the network transmission delay by combining the two modes of measuring the path delay by using the RTT value and measuring the forwarding delay by using the INT.
It should be understood that, on the basis of determining the first forwarding delay, the second forwarding delay, the third forwarding delay, the first path delay, the second path delay, the third path delay and the fourth path delay according to the present invention, the present invention may calculate the sum of the first forwarding delay, the second forwarding delay, the third forwarding delay, the first path delay, the second path delay, the third path delay and the fourth path delay, and then determine the network transmission delay by subtracting the first forwarding delay and the second forwarding delay in sequence.
As shown in fig. 7, the delay analysis device 103 according to the embodiment of the present invention specifically includes a collector (collector) and an analyzer, where the collector is configured to receive a message and forward the message to the analyzer, and the analyzer is configured to calculate data included in the message. For example, in the case of three intermediate forwarding devices, the collector is configured to receive and forward the first packet, the first sub-packet, the second sub-packet, the third sub-packet, and the fourth sub-packet related to the present invention, and the analyzer is configured to calculate the data such as the timestamp, the round trip delay, and the like included in the packet, where a specific calculation manner is described in detail in this specification, and will not be described herein.
The embodiment of the invention can determine the network transmission delay according to the forwarding delay and the corresponding path delay, realizes the piecewise measurement of the forwarding delay and the path delay, does not depend on high-precision clock synchronization, can determine the accurate network transmission delay, and provides a reliable basis for optimizing the network quality.
At least one embodiment of the present invention can also provide a delay measurement apparatus that can be integrated on an analyzer of the delay analysis apparatus 103, based on the same inventive concept as the delay measurement method provided by one or more embodiments of the present invention. The first network equipment and the second network equipment are communicated through at least two intermediate forwarding equipment, and after one of the first network equipment and the second network equipment sends a request message to the opposite-end network equipment, the opposite-end network equipment feeds back a response message corresponding to the request message to the network equipment; the delay measurement device comprises, but is not limited to, a forwarding delay acquisition module, a round trip delay acquisition module and a path delay determination module.
The forwarding delay acquisition module is used for acquiring first forwarding delay of forwarding the target request message by the first intermediate forwarding device under the condition that the second network device sends the target request message to the first network device; the first intermediate forwarding device and the second intermediate forwarding device are any two adjacent intermediate forwarding devices in the at least two intermediate forwarding devices.
The round trip delay acquisition module is used for acquiring a first round trip delay corresponding to the first intermediate forwarding equipment and a second round trip delay corresponding to the second intermediate forwarding equipment; the first round trip time delay is the time length from the first intermediate forwarding device to the time when the first intermediate forwarding device sends the target request message to the time when the second intermediate forwarding device receives the target response message corresponding to the target request message.
And the path delay determining module is used for determining the path delay between the first intermediate forwarding equipment and the second intermediate forwarding equipment according to the first round trip delay, the second round trip delay and the first forwarding delay.
Optionally, the path delay determining module is configured to determine a first difference between the second round trip delay and the first round trip delay; the path delay determining module is further configured to determine a second difference between half of the first difference and the first forwarding delay, where the second difference is a path delay between the first intermediate forwarding device and the second intermediate forwarding device.
Optionally, the forwarding delay acquiring module is configured to acquire a first timestamp and a second timestamp corresponding to the first intermediate forwarding device; the first time stamp represents the time when the target request message enters the first intermediate forwarding device, the second time stamp represents the time when the target request message leaves the first intermediate forwarding device, and the difference value between the second time stamp and the first time stamp is the first forwarding delay.
Optionally, the forwarding delay obtaining module is configured to receive an in-band telemetry packet sent by the first intermediate forwarding device, where the in-band telemetry packet is used to encapsulate the first timestamp and the second timestamp.
Optionally, the round trip delay obtaining module is configured to receive a first round trip delay collected by the first intermediate forwarding device and uploaded through a remote telemetry mode, and receive a second round trip delay collected by the second intermediate forwarding device and uploaded through the remote telemetry mode.
At least one embodiment of the present invention can also provide a computer device, including a memory and a processor, where the memory stores computer readable instructions that, when executed by the processor, cause the processor to perform the delay measurement method according to any of the embodiments of the present invention. The detailed implementation process of the delay measurement method provided by the invention is described in detail in the specification, and will not be described herein.
At least one embodiment of the present invention can also provide a storage medium storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the delay measurement method in any one of the embodiments of the present invention, based on the same inventive concept as the delay measurement method provided in one or more embodiments of the present invention. The detailed implementation process of the delay measurement method provided by the invention is described in detail in the specification, and will not be described herein.
Logic and/or steps represented in the flowcharts or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable storage medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable storage medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection (electronic device) with one or more wires, a portable computer cartridge (magnetic device), a random access Memory (RAM, random Access Memory), a Read-Only Memory (ROM), an erasable programmable Read-Only Memory (EPROM, erasable Programmable Read-Only Memory, or flash Memory), an optical fiber device, and a portable compact disc Read-Only Memory (CDROM, compact Disc Read-Only Memory). In addition, the computer-readable storage medium may even be paper or other suitable medium upon which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted, or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits with logic gates for implementing logic functions on data signals, application specific integrated circuits with appropriate combinational logic gates, programmable gate arrays (PGA, programmable Gate Array), field programmable gate arrays (FPGA, field Programmable Gate Array), and the like.
In the description of the present specification, a description referring to the terms "present embodiment," "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present invention, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise.
The above description is only of the preferred embodiments of the present invention, and is not intended to limit the invention, but any modifications, equivalents, and simple improvements made within the spirit of the present invention should be included in the scope of the present invention.
Claims (12)
1. The method is characterized in that the method is applied to a time delay analysis device, a first network device and a second network device are communicated through at least two intermediate forwarding devices, and after one of the first network device and the second network device sends a request message to an opposite end network device, the opposite end network device feeds back a response message corresponding to the request message to the network device; the method comprises the following steps:
Acquiring a first forwarding delay of forwarding the target request message by the first intermediate forwarding device under the condition that the second network device sends the target request message to the first network device; the first network device, the first intermediate forwarding device, the second intermediate forwarding device and the second network device are sequentially arranged, and the first intermediate forwarding device and the second intermediate forwarding device are any two adjacent intermediate forwarding devices in the at least two intermediate forwarding devices;
acquiring a first round trip delay corresponding to the first intermediate forwarding device and a second round trip delay corresponding to the second intermediate forwarding device; the first round trip delay is a time length from the first intermediate forwarding device sending the target request message to receiving a target response message corresponding to the target request message, and the second round trip delay is a time length from the second intermediate forwarding device sending the target request message to receiving the target response message corresponding to the target request message;
and determining the path delay between the first intermediate forwarding device and the second intermediate forwarding device according to the first round trip delay, the second round trip delay and the first forwarding delay.
2. The delay measurement method of claim 1 wherein said determining a path delay between the first intermediate forwarding device and the second intermediate forwarding device based on the first round trip delay, the second round trip delay, and the first forwarding delay comprises:
determining a first difference between the second round trip delay and the first round trip delay;
and determining a second difference value between half of the first difference value and the first forwarding time delay, wherein the second difference value is the path time delay between the first intermediate forwarding equipment and the second intermediate forwarding equipment.
3. The delay measurement method according to claim 1 or 2, wherein the obtaining the first forwarding delay of the first intermediate forwarding device for forwarding the target request packet includes:
acquiring a first time stamp and a second time stamp corresponding to the first intermediate forwarding equipment;
the first time stamp represents the time when the target request message enters the first intermediate forwarding device, the second time stamp represents the time when the target request message leaves the first intermediate forwarding device, and the difference between the second time stamp and the first time stamp is the first forwarding delay.
4. The method for latency measurement according to claim 3, wherein the obtaining the first timestamp and the second timestamp corresponding to the first intermediate forwarding device includes:
and receiving an in-band telemetry message sent by the first intermediate forwarding device, wherein the in-band telemetry message is used for packaging the first timestamp and the second timestamp.
5. The delay measurement method according to claim 1 or 2, wherein the obtaining a first round trip delay corresponding to the first intermediate forwarding device and a second round trip delay corresponding to the second intermediate forwarding device includes:
and receiving the first round trip delay acquired by the first intermediate forwarding device and uploaded by the remote telemetry mode, and receiving the second round trip delay acquired by the second intermediate forwarding device and uploaded by the remote telemetry mode.
6. The delay measurement device is characterized in that a first network device and a second network device are communicated through at least two intermediate forwarding devices, and after one network device of the first network device and the second network device sends a request message to an opposite end network device, the opposite end network device feeds back a response message corresponding to the request message to the network device; the device comprises:
A forwarding delay obtaining module, configured to obtain, when the second network device sends a target request packet to the first network device, a first forwarding delay of the first intermediate forwarding device for forwarding the target request packet; the first network device, the first intermediate forwarding device, the second intermediate forwarding device and the second network device are sequentially arranged, and the first intermediate forwarding device and the second intermediate forwarding device are any two adjacent intermediate forwarding devices in the at least two intermediate forwarding devices;
the round trip delay acquisition module is used for acquiring a first round trip delay corresponding to the first intermediate forwarding equipment and a second round trip delay corresponding to the second intermediate forwarding equipment; the first round trip delay is a time length from the first intermediate forwarding device sending the target request message to receiving a target response message corresponding to the target request message, and the second round trip delay is a time length from the second intermediate forwarding device sending the target request message to receiving the target response message corresponding to the target request message;
and the path delay determining module is used for determining the path delay between the first intermediate forwarding device and the second intermediate forwarding device according to the first round trip delay, the second round trip delay and the first forwarding delay.
7. The time delay measuring device of claim 6, wherein,
the path delay determining module is configured to determine a first difference value between the second round trip delay and the first round trip delay;
the path delay determining module is further configured to determine a second difference between half of the first difference and the first forwarding delay, where the second difference is a path delay between the first intermediate forwarding device and the second intermediate forwarding device.
8. The time delay measuring device of claim 6 or 7, wherein,
the forwarding delay acquisition module is used for acquiring a first timestamp and a second timestamp corresponding to the first intermediate forwarding device;
the first time stamp represents the time when the target request message enters the first intermediate forwarding device, the second time stamp represents the time when the target request message leaves the first intermediate forwarding device, and the difference between the second time stamp and the first time stamp is the first forwarding delay.
9. The time delay measuring device of claim 8, wherein,
the forwarding delay acquisition module is configured to receive an in-band telemetry packet sent by the first intermediate forwarding device, where the in-band telemetry packet is used to encapsulate the first timestamp and the second timestamp.
10. The time delay measuring device of claim 6 or 7, wherein,
the round trip delay acquisition module is used for receiving the first round trip delay acquired by the first intermediate forwarding device and uploaded through a remote telemetry mode, and receiving the second round trip delay acquired by the second intermediate forwarding device and uploaded through the remote telemetry mode.
11. A computer device comprising a memory and a processor, the memory having stored therein computer readable instructions which, when executed by the processor, cause the processor to perform the time delay measurement method of any of claims 1 to 5.
12. A storage medium storing computer readable instructions which, when executed by one or more processors, cause the one or more processors to perform the time delay measurement method of any of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211686156.0A CN116016282A (en) | 2022-12-27 | 2022-12-27 | Time delay measurement method and device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211686156.0A CN116016282A (en) | 2022-12-27 | 2022-12-27 | Time delay measurement method and device, computer equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116016282A true CN116016282A (en) | 2023-04-25 |
Family
ID=86026101
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211686156.0A Pending CN116016282A (en) | 2022-12-27 | 2022-12-27 | Time delay measurement method and device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116016282A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116760765A (en) * | 2023-08-10 | 2023-09-15 | 新华三技术有限公司 | Network state detection method and device, electronic equipment and storage medium |
-
2022
- 2022-12-27 CN CN202211686156.0A patent/CN116016282A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116760765A (en) * | 2023-08-10 | 2023-09-15 | 新华三技术有限公司 | Network state detection method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7769850B2 (en) | System and method for analysis of communications networks | |
EP0996254B1 (en) | A method for quantifying communication performance | |
JP5462954B2 (en) | Packet loss detection method and apparatus, and router | |
CA2448312C (en) | Method and apparatus for auditing service level agreements by test packet insertion | |
US20130336146A1 (en) | Method and apparatus for providing availability metrics for measurement and management of ethernet services | |
US20140280904A1 (en) | Session initiation protocol testing control | |
US20060274791A1 (en) | Method measuring a delay time metric and measurement system | |
CN107579869B (en) | Network performance detection method and network equipment | |
US9385958B2 (en) | Methods and nodes for improved estimation of available path capacity of a data transfer path | |
US9148354B2 (en) | Apparatus and method for monitoring of connectivity services | |
EP3295612B1 (en) | Uplink performance management | |
CN105827476A (en) | High-speed PING implementation method and PING testing method | |
CN105391592A (en) | Packet transport network service detecting and measuring method, device and system | |
CN116016282A (en) | Time delay measurement method and device, computer equipment and storage medium | |
US20220247651A1 (en) | System and method for network and computation performance probing for edge computing | |
CN117041134A (en) | Data path planning method, device and equipment | |
US20230318970A1 (en) | Packet Processing Method and Apparatus | |
CN113973070B (en) | Information acquisition method, device and test equipment | |
CN117221175A (en) | Time delay measuring method and device, storage medium and program product thereof | |
CN112653887B (en) | Video diagnosis method and device | |
US20140086091A1 (en) | Method, apparatus, and system for analyzing network transmission characteristic | |
KR100943728B1 (en) | The per link available bandwidth measurement method using the total length field in IP packet header and the available bandwidth information of a link management method | |
JP2004032377A (en) | Method and system for estimating bottle neck and computer readable recording medium recorded with program of that method | |
CN116074213A (en) | Intelligent operation and maintenance method and device based on link quality analysis | |
CN116346653A (en) | VPP-based inter-cloud interconnection observability system and method thereof |
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 |