Delay Detection Method and Device

By introducing a message coloring and label flipping mechanism in iFIT detection, the downstream devices are able to record and report timestamps when the link is congested, which solves the problem of latency detection interruption caused by link congestion and realizes continuous latency calculation and accurate latency results.

CN116389320BActive Publication Date: 2026-03-13NEW H3C TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-06
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

During iFIT latency detection, when link congestion causes packet loss, downstream devices cannot identify packets carrying latency coloring marks, cannot record timestamps and report them to the analyzer, making it impossible for the analyzer to calculate latency.

Method used

When the first node receives a message sent by the second node, it records the timestamp and determines the message's coloring status. If no message matching the conditions is received, it sends delay measurement data. If a message is received, it records and sends multiple timestamps to ensure that downstream devices can report timestamps in each cycle. The analyzer uses these timestamps to calculate the continuous delay.

Benefits of technology

This ensures that the analyzer can continuously and completely obtain network latency information, solves the problem of latency detection interruption caused by link congestion, and realizes accurate calculation of latency results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116389320B_ABST
    Figure CN116389320B_ABST
Patent Text Reader

Abstract

This application provides a latency detection method and apparatus. The method includes: receiving a second message sent by a second node, the second message including a packet loss measurement coloring identifier with a second value; if the second value is in a flipped state of a first value, recording a first timestamp of the received second message; determining whether a third message has been received, the third message including a packet loss measurement coloring identifier with a second value and including a set latency coloring identifier; if not received, sending first latency measurement data to an analyzer, the first latency measurement data including a first timestamp; if received, recording a second timestamp of the received third message and sending second latency measurement data to the analyzer, the second latency measurement data including a second timestamp, or sending multiple second latency measurement data to the analyzer, each second latency measurement data including a first timestamp and any one of the second timestamps; wherein the second node is an upstream network device of the first node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a delay detection method and apparatus. Background Technology

[0002] Currently, with the popularization of the internet and the development of communication technologies, various network services are emerging in an endless stream, resulting in significant changes to the services and architecture of IP networks. These new services place higher demands on network performance. Among these, voice and video services are the most widely used, and they are highly sensitive to network packet loss, latency, and latency jitter. High packet loss rates and high latency will lead to voice stuttering and video blurring, affecting the user's internet experience and, in severe cases, causing communication anomalies. When the quality of voice and video services deteriorates, users expect to quickly locate and troubleshoot network faults.

[0003] Currently, methods for measuring packet loss and latency in IP networks fall into two main categories: one is indirect measurement, which calculates the packet loss rate and latency of simulated business packets by simulating real business packet transmission and reception, thereby indirectly obtaining the packet loss rate and latency of the actual business packets. The other is direct measurement, which obtains the packet loss rate and latency of the actual business packets by directly detecting their transmission and reception.

[0004] When the above measurement techniques are applied to small-scale network environments, they can quickly locate packet loss and latency issues. However, when applied to large-scale network environments, they suffer from slow location speed, high location consumption, and location difficulties.

[0005] In-situ Flow Information Telemetry (iFIT) is a measurement technique used in Multiprotocol Label Switching (MPLS), Segment Routing MPLS (SR-MPLS), SRv6, Generalized SRv6 (G-SRv6), and Generalized Bit Indexed Explicit Replication (G-BIER) networks to measure network performance metrics. Compared to traditional network packet loss and latency measurement techniques, iFIT features high detection accuracy, simple deployment, rapid fault location, visualization capabilities, support for path discovery, hardware implementation, minimal impact on the network, and strong scalability.

[0006] iFIT supports multiple working mechanisms, such as time synchronization, packet loss measurement, latency measurement, and measurement data reporting. The latency measurement mechanism works as follows: each measurement point records the timestamps t0, t1, t2, etc., of the colored packets in the target flow as they pass through it. Each measurement point reports its recorded timestamps to the analyzer, which then calculates the one-way latency of the forward path of period i in the target flow based on the timestamps reported by the measurement points. For example, Delay[i] = t2 - t1. Similarly, the one-way latency of the reverse path of the target flow can also be obtained.

[0007] In the scenario where the detected target flow has the same path in both directions, the analyzer can also calculate the bidirectional delay of the target flow period i based on the timestamp reported by the measurement point: Delay[i] = one-way delay of the forward target flow + one-way delay of the reverse target flow.

[0008] The principle of iFIT latency detection is to color the first packet of the target flow being detected in each cycle with latency. Obviously, when link congestion causes packet loss, the downstream device will not be able to identify the packet carrying the latency coloring flag D Flag=1 in that cycle. Naturally, it will not be able to record the timestamp and report it to the analyzer, so the analyzer will not be able to calculate the latency. As a result, users cannot intuitively and continuously obtain the actual latency information of the link. Summary of the Invention

[0009] In view of this, this application provides a latency detection method and apparatus to solve the problem in the existing iFIT latency detection process that when link congestion causes packet loss, downstream devices cannot identify packets carrying latency coloring marks in the current period, cannot record timestamps and report them to the analyzer, thus making it impossible for the analyzer to calculate latency.

[0010] In a first aspect, this application provides a latency detection method, the method being applied to a first node, the first node receiving a first message sent by a second node, the first message including a packet loss measurement coloring identifier with a first value, the method comprising:

[0011] Receive a second message sent by the second node, the second message including a packet loss measurement coloring identifier with a second value;

[0012] If the second value is a flipped state of the first value, then record the first timestamp of receiving the second message;

[0013] Determine whether a third message has been received, wherein the third message includes a packet loss measurement coloring flag with the second value and a set delay coloring flag;

[0014] If not received, first delay measurement data is sent to the analyzer, the first delay measurement data including the first timestamp;

[0015] If received, the second timestamp of the third message is recorded, and second delay measurement data is sent to the analyzer, the second delay measurement data including the second timestamp; or, multiple second delay measurement data are sent to the analyzer, each second delay measurement data including either the first timestamp or the second timestamp.

[0016] The second node is the upstream network device of the first node.

[0017] Secondly, this application provides a delay detection method, which is applied to an analyzer, and the method includes:

[0018] Receive first delay measurement data sent by the first node, wherein the first delay measurement data includes a first timestamp;

[0019] Receive second delay measurement data sent by the second node, the second delay measurement data including a second timestamp;

[0020] Using the first timestamp and the second timestamp, calculate the one-way latency within the current test period.

[0021] Thirdly, this application provides a latency detection device, which is applied to a first node. The first node receives a first message sent by a second node. The first message includes a packet loss measurement coloring identifier with a first value. The device includes:

[0022] The receiving unit is configured to receive a second message sent by the second node, the second message including a packet loss measurement coloring identifier with a second value;

[0023] A recording unit is configured to record a first timestamp of receiving the second message if the second value is a flipped state of the first value.

[0024] The judgment unit is used to determine whether a third message has been received, wherein the third message includes a packet loss measurement coloring flag with the second value and a delay coloring flag that has been set.

[0025] The sending unit is configured to send first delay measurement data to the analyzer if it does not receive the data, the first delay measurement data including the first timestamp;

[0026] The recording unit is further configured to, if received, record a second timestamp of the received third message; the sending unit is further configured to, send second delay measurement data to the analyzer, the second delay measurement data including the second timestamp, or, send multiple second delay measurement data to the analyzer, each second delay measurement data including either the first timestamp or the second timestamp.

[0027] The second node is the upstream network device of the first node.

[0028] Fourthly, this application provides a time delay detection device, which is applied to an analyzer, and the device includes:

[0029] The receiving unit is configured to receive first delay measurement data sent by the first node, wherein the first delay measurement data includes a first timestamp;

[0030] The receiving unit is further configured to receive second delay measurement data sent by the second node, wherein the second delay measurement data includes a second timestamp;

[0031] The calculation unit is used to calculate the one-way latency within the current test period using the first timestamp and the second timestamp.

[0032] Fifthly, this application provides a network device including a processor and a machine-readable storage medium storing machine-executable instructions that can be executed by the processor, which in turn cause the processor to perform the method provided in the first aspect of this application.

[0033] In a sixth aspect, this application provides a network device including a processor and a machine-readable storage medium storing machine-executable instructions that can be executed by the processor, which in turn cause the processor to perform the method provided in the second aspect of this application.

[0034] Therefore, using the latency detection method and apparatus provided in this application, a first node receives a first message sent by a second node, the first message including a packet loss measurement coloring identifier with a first value; the first node then receives a second message sent by the second node, the second message including a packet loss measurement coloring identifier with a second value; if the second value is in a flipped state of the first value, the first node records a first timestamp of the received second message; the first node determines whether a third message has been received, the third message including a packet loss measurement coloring identifier with a second value and a latency coloring identifier that has been set; if not received, the first node sends first latency measurement data to the analyzer, the first latency measurement data including a first timestamp; if received, the first node records a second timestamp of the received third message and sends second latency measurement data to the analyzer, the second latency measurement data including a second timestamp, or sends multiple second latency measurement data to the analyzer, each second latency measurement data including either a first timestamp or a second timestamp; wherein, the second node is an upstream network device of the first node.

[0035] Thus, by employing a dual guarantee mechanism using the arrival timestamp of the actual colored packet and the arrival timestamp of the first packet in the same period, it is ensured that downstream devices can report timestamps in each period, allowing the analyzer to obtain continuous and complete latency statistics. Simultaneously, different identifiers are used to represent the source of the latency measurement data, ensuring that users can intuitively and continuously obtain actual latency information for probed services through this mechanism. This solves the problem in existing iFIT latency detection processes where, when link congestion leads to packet loss, downstream devices cannot identify packets carrying latency-colored markers in the current period, cannot record timestamps and report them to the analyzer, thus preventing the analyzer from calculating latency. Attached Figure Description

[0036] Figure 1 A flowchart illustrating a delay detection method provided in this application embodiment;

[0037] Figure 2 A flowchart illustrating another delay detection method provided in this application embodiment;

[0038] Figure 3 A structural diagram of a time delay detection device provided in an embodiment of this application;

[0039] Figure 4 A structural diagram of another delay detection device provided in an embodiment of this application;

[0040] Figure 5 The network device hardware structure provided in the embodiments of this application. Detailed Implementation

[0041] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0042] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the corresponding listed items.

[0043] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0044] The following is a detailed description of a latency detection method provided by an embodiment of this application. See also... Figure 1 , Figure 1 This is a flowchart illustrating a latency detection method provided in an embodiment of this application. The method is applied to a first node, and the latency detection method provided in this embodiment may include the following steps.

[0045] Step 110: Receive a second message sent by the second node, the second message including a packet loss measurement coloring identifier with a second value;

[0046] Specifically, the first node and the second node serve as iFIT measurement points to detect packet loss and latency in the target flow. In this embodiment, the second node can serve as an ingress node of iFIT and as an upstream network device of the first node. The first node can serve as an intermediate node or an egress node of iFIT.

[0047] During iFIT detection, the second node generates and sends a first message to the first node. This first message includes a packet loss measurement coloring identifier (carried by the L field) with a first value.

[0048] After receiving the first message from the second node, the first node can process the first message according to the existing iFIT, which will not be repeated here. It can be understood that the first node stores the field content included in the first message locally.

[0049] The second node, acting as an incoming node, continuously sends messages, such as a second message, to the first node. In this embodiment, the second message includes a packet loss measurement coloring identifier, which has a second value.

[0050] The first and second values ​​mentioned above can be used to indicate whether the cycle has reversed, and their values ​​are specifically 0 or 1; the first value can be the same as or different from the second value. When the first value and the second value are different, it indicates that the cycle has reversed.

[0051] Step 120: If the second value is a flipped state of the first value, then record the first timestamp of receiving the second message;

[0052] Specifically, according to the description of step 110, after receiving the second message, the first node identifies the packet loss measurement coloring identifier and obtains the second value. The first node identifies whether the second value is a flipped state of the first value. If the second value is a flipped state of the first value, the first node records the first timestamp of receiving the second message.

[0053] The above flipping state is when the first value is 0 and the second value is 1; or, when the first value is 1 and the second value is 0.

[0054] The first and second values ​​are illustrated below with an example.

[0055] In one example, the second node generates and sends a first message to the first node within period i-1. The first message includes a packet loss measurement coloring identifier with a value of 1. The second node generates and sends a second message to the first node within period i. The second message includes a packet loss measurement coloring identifier with a value of 0.

[0056] The first node continuously receives messages sent by the second node. During message transmission, message out-of-order situations may occur. Specifically, this out-of-order situation occurs when the first node receives messages from another period before it has finished receiving all the messages from a certain period. For example, when the first node is currently receiving multiple messages from period i-1, it receives messages from period i, and then subsequently receives messages from period i-1 again.

[0057] After receiving each second message from the second node, the first node identifies the value of the packet loss measurement coloring identifier included in the second message. If this value is different from the value of the packet loss measurement coloring identifier included in the previously received first message, the first node determines that a cycle reversal has occurred, that is, from cycle i-1 to cycle i. At this time, the first node records the first timestamp of receiving the first second message.

[0058] Step 130: Determine whether a third message has been received, wherein the third message includes a packet loss measurement coloring flag with the second value and includes a time delay coloring flag that has been set;

[0059] Specifically, according to the description of step 120, after the first node records the first timestamp, it determines whether it has received the third message. The third message includes a packet loss measurement coloring identifier, the value of which is a second value. Furthermore, the third message also includes a delay coloring identifier (carried by the D field), the D field being set.

[0060] In this embodiment, if the packet loss measurement coloring flag value included in the third message is the second value, it indicates that the third message is a message within period i. If the delay coloring flag is set, it indicates that the third message is the first message within period i. That is, the first message within period i was not lost.

[0061] Understandably, during iFIT detection, after the second node identifies the target flow, it performs time-delay coloring on the first packet (i.e., the third packet) of the detected target flow within period i and then sends it to the first node. Simultaneously, the second node also records the timestamp of the received third packet and sends it to the analyzer. This timestamp is used by the analyzer to calculate the one-way delay for period i by combining it with either the first or second timestamp.

[0062] If the first node receives the third message, the first node determines that the first message in period i was not lost and executes step 150; if the first node does not receive the third message, the first node determines that the first message in period i was lost and executes step 140.

[0063] It should be noted that after the first node receives the second message, there may be a situation where the first node receives a message from period i-1 again. Since the packet loss measurement coloring identifier included in the message from period i-1 has a first value, while the packet loss measurement coloring identifier included in the message from period i has a second value, according to the description of step 120 above, the first node determines that a period reversal has occurred.

[0064] However, if the first node determines that another periodic flip has occurred, it will record the periodic flip timestamp again, causing timestamp recording errors. Therefore, after receiving the second message, the first node...

[0065] Start a timer. If a cycle flip occurs again within the specified time period, the first node will no longer record the timestamp of the cycle flip.

[0066] The above timing duration can be flexibly adjusted according to the actual situation, for example, 1.3T, where T is the period.

[0067] Step 140: If not received, send the first delay measurement data to the analyzer, the first delay measurement data including the first timestamp;

[0068] Specifically, based on the judgment in step 130, if the first node does not receive the third message, then the first node determines that the first message within period i has been lost. The first node generates and sends first delay measurement data to the analyzer, which includes a first timestamp.

[0069] Optionally, the first delay measurement data can be specifically implemented through a terminology message. This terminology message includes a period ID field, which indicates the period. The analyzer uses the period ID field to determine the period to which the first timestamp belongs.

[0070] For example, if the period ID is 54878501, which indicates period i-1, then the period to which the first timestamp belongs is period i-1.

[0071] It should be noted that after the first node determines that the first packet within period i (e.g., 54878502 indicates period i) has been lost, in order to ensure that the analyzer can continuously and accurately calculate the one-way delay within period i, the first node will send the reception time of the first packet that the period has flipped, i.e., the first timestamp, to the analyzer. This allows the analyzer to use the first timestamp as the first packet within period i for calculating the one-way delay. Alternatively, the analyzer can also determine whether it has received the timestamp corresponding to the first packet within period i. If it has not received it, it will use the first timestamp for calculation. The process of the analyzer calculating the one-way delay will be described in subsequent embodiments and will not be repeated here.

[0072] Step 150: If received, record the second timestamp of the received third message and send second delay measurement data to the analyzer. The second delay measurement data includes the second timestamp. Alternatively, send multiple second delay measurement data to the analyzer. Each second delay measurement data includes either the first timestamp or the second timestamp.

[0073] Specifically, based on the judgment in step 130, if the first node receives the third message, then the first node determines that the first message within period i was not lost.

[0074] In one possible implementation, the first node generates and sends second delay measurement data to the analyzer, the second delay measurement data including a second timestamp.

[0075] In another possible implementation, the first node generates multiple second delay measurement data. For example, the first node generates two second delay measurement data, one of which includes a first timestamp; the other of which includes a second timestamp.

[0076] Among the various implementation methods mentioned above, after the analyzer receives the data, there are also multiple calculation methods when calculating the one-way delay, which will be briefly explained here.

[0077] In one possible implementation, the analyzer receives second delay measurement data, at which point the analyzer uses the second timestamp to calculate the one-way delay.

[0078] In another possible implementation, the analyzer receives two second delay measurement data (one second delay measurement data includes a first timestamp, and the other second delay measurement data includes a second timestamp). In this case, the analyzer first determines whether it has received the second delay measurement data including the second timestamp. If it has received it, the analyzer uses the second timestamp to calculate the one-way delay; if it has not received it, the analyzer uses the first timestamp to calculate the one-way delay.

[0079] It should be noted that the process of the analyzer calculating the one-way delay will be described in subsequent embodiments and will not be repeated here.

[0080] Thus, by employing a dual guarantee mechanism using the arrival timestamp of the actual colored packet and the arrival timestamp of the first packet in the same period, it is ensured that downstream devices can report timestamps in each period, allowing the analyzer to obtain continuous and complete latency statistics. Simultaneously, different identifiers are used to represent the source of the latency measurement data, ensuring that users can intuitively and continuously obtain actual latency information for probed services through this mechanism. This solves the problem in existing iFIT latency detection processes where, when link congestion leads to packet loss, downstream devices cannot identify packets carrying latency-colored markers in the current period, cannot record timestamps and report them to the analyzer, thus preventing the analyzer from calculating latency.

[0081] Optionally, in this embodiment, after the first node records the second timestamp, the first node also marks the second timestamp with a first identifier, that is, adds a first identifier to the second timestamp. The first identifier is used to distinguish the second timestamp from the first timestamp, so that the analyzer can determine the source of the timestamps included in the delay measurement data through the first identifier, that is, whether it was recorded after receiving the first message within period i; or after receiving the first message after the period reverses.

[0082] Optionally, the second delay measurement data also includes a first identifier, which is used to enable the analyzer to determine that the second timestamp is recorded after the first node receives a third message with a packet loss measurement coloring identifier having a second value and including the delay coloring identifier.

[0083] The following is a detailed description of a latency detection method provided by an embodiment of this application. See also... Figure 2 , Figure 2 A flowchart illustrating another latency detection method provided in this application embodiment. This method is applied to an analyzer, and the latency detection method provided in this application embodiment may include the following steps.

[0084] Step 210: Receive first delay measurement data sent by the first node, wherein the first delay measurement data includes a first timestamp;

[0085] Specifically, the first node and the second node serve as iFIT measurement points to detect packet loss and latency in the target flow. In this embodiment, the first node can serve as an ingress node of iFIT and as an upstream network device of the second node. The second node can serve as an intermediate node and an egress node of iFIT.

[0086] During iFIT detection, the first node determines the target flow and applies time-delay coloring to the first packet of the target flow within period i. Simultaneously, the first node records the first timestamp of the received first packet.

[0087] The first node generates and sends first delay measurement data to the analyzer, the first delay measurement data including a first timestamp.

[0088] After receiving the first delay measurement data, the analyzer obtains the first timestamp from it.

[0089] Understandably, according to the existing iFIT detection rules, the first node generates the first packet after performing delay coloring on the first packet. This first packet includes a packet loss measurement coloring identifier (carried by the L field), which has a first value. The first packet also includes a delay coloring identifier (carried by the D field), which is in a set state.

[0090] The first node sends the first message to the second node.

[0091] Meanwhile, the first node, acting as the incoming node, continuously sends messages, such as a second message, to the second node within period i. This second message includes a packet loss measurement coloring identifier, which has a first value. It is understood that subsequent second messages sent within period i also include a delay coloring identifier, but the D field is not set.

[0092] During message transmission, message out-of-order delivery may occur. Specifically, this occurs when the first node receives messages from another period before it has finished receiving all the messages from a given period. For example, if the first node is currently receiving multiple messages from period i-1, it receives messages from period i, and then subsequently receives messages from period i-1 again.

[0093] Subsequently, after receiving the message, the second node will follow the process described in the aforementioned embodiments to identify whether a periodic reversal has occurred, and send the second delay measurement data to the analyzer based on the identification results.

[0094] Step 220: Receive second delay measurement data sent by the second node, wherein the second delay measurement data includes a second timestamp;

[0095] Specifically, as described in step 210, the first node sends a first message and a second message to the second node. The second node processes each message separately according to their arrival order.

[0096] Optionally, in the first possible implementation, the second node first receives the second message sent by the first node. The second node obtains the value of the packet loss measurement coloring identifier from the second message as a first value. The second node identifies whether the first value is the same as the value of the packet loss measurement coloring identifier included in a third message sent by the first node that was received earlier (which may be a message within period i-1, or it may be a message within period i).

[0097] If they are different, the second node determines that a cycle reversal has occurred, that is, it has moved from cycle i-1 to cycle i. At this time, the second node records the timestamp of receiving the second message.

[0098] Then, the second node determines whether it has received the first message. If the second node has received the first message, it determines that the first message within period i has not been lost. The second node then generates and sends second delay measurement data to the analyzer, which includes a second timestamp. At this time, the second timestamp represents the timestamp at which the second node received the first message.

[0099] If the second node does not receive the first message, it determines that the first message within period i has been lost. The second node then generates and sends second delay measurement data to the analyzer, which includes a second timestamp. In this case, the second timestamp represents the timestamp at which the second node received the second message.

[0100] Optionally, in a second possible implementation, the second node first receives the second message sent by the first node. The second node extracts the value of the packet loss measurement coloring identifier from the second message as a first value. The second node then identifies whether the first value is the same as the value of the packet loss measurement coloring identifier included in a third message sent by the first node that it received earlier.

[0101] If they are different, the second node determines that a cycle reversal has occurred, that is, it has moved from cycle i-1 to cycle i. At this time, the second node records the timestamp of receiving the second message.

[0102] Then, the second node determines whether it has received the first message. If the second node has received the first message, it determines that the first message within period i was not lost. Since the second message has already been received, the second node can generate two second delay measurement data sets, each including a second timestamp. One second delay measurement data set includes a second timestamp representing the timestamp when the second node received the first message; the other second delay measurement data set includes a second timestamp representing the timestamp when the second node received the second message.

[0103] If the second node does not receive the first message, it determines that the first message within period i has been lost. The second node then generates and sends second delay measurement data to the analyzer, which includes a second timestamp. In this case, the second timestamp represents the timestamp at which the second node received the second message.

[0104] It should be noted that after the second node receives a message within period i, there may be a situation where the first node receives a message within period i-1 again. Since the value of the packet loss measurement coloring identifier included in the message within period i-1 is different from the value of the packet loss measurement coloring identifier included in the message within period i, according to the description of this step, the second node determines that a period reversal has occurred.

[0105] However, if the second node determines that a cycle flip has occurred again, it will record the cycle flip timestamp again, causing confusion in the timestamp recording. Therefore, after the second node receives a message within cycle i-1 again, it starts a timer. If a cycle flip occurs again within this time period, the second node will no longer record the cycle flip timestamp.

[0106] The above timing duration can be flexibly adjusted according to the actual situation, for example, 1.3T, where T is the period.

[0107] Optionally, in this embodiment, when the second node records the timestamp of receiving the first message, it also marks the timestamp of receiving the first message with a first identifier, that is, it marks the timestamp with a first identifier. The first identifier is used to distinguish the timestamp of receiving the first message from the timestamp of receiving the second message (it can also be used to identify the actual value and the deviation value, where the actual value is the timestamp of receiving the delay-colored message and the deviation value is the timestamp of receiving the period-reversed message), so that the analyzer can determine the source of the timestamps included in the delay measurement data through the first identifier, that is, whether it was recorded after receiving the first message in period i, or after receiving the first message in period i.

[0108] Meanwhile, when the second node generates the second delay measurement data, if the second timestamp represents the timestamp at which the second node received the first message, the second delay measurement data also includes the first identifier.

[0109] Optionally, in this embodiment, the latency measurement data can be specifically implemented through a terminology message. The first identifier can be carried through an unused field included in the terminology message. It is understood that the terminology message also includes a period ID field, which indicates the period. The analyzer determines the period to which the timestamp belongs through the period ID field.

[0110] Through the above implementation, the analyzer receives at least one second delay measurement data sent by the second node and obtains the second timestamp from it.

[0111] Corresponding to the two possible implementations mentioned above, the analyzer may obtain a second timestamp indicating that different messages have been received.

[0112] Corresponding to the first possible implementation mentioned above, after receiving the second delay measurement data, the analyzer determines the source of the second timestamp included in the second delay measurement data by judging whether the second delay measurement data includes the first identifier.

[0113] For example, if the second delay measurement data includes the first identifier, the analyzer determines that the second timestamp represents the timestamp when the second node receives the first message; if the second delay measurement data does not include the first identifier, the analyzer determines that the second timestamp represents the timestamp when the second node receives the second message.

[0114] Corresponding to the second possible implementation mentioned above, after receiving one or more second delay measurement data, the analyzer determines the source of the second timestamp included in the second delay measurement data by judging whether the second delay measurement data includes a first identifier.

[0115] For example, when the analyzer receives a second delay measurement data, if the second delay measurement data does not include the first identifier, the analyzer determines that the second timestamp represents the timestamp when the second node receives the second message; when the analyzer receives multiple second delay measurement data, it determines whether each second delay measurement data includes the first identifier. If the second delay measurement data includes the first identifier, the analyzer determines that the second timestamp represents the timestamp when the second node receives the first message; if the second delay measurement data does not include the first identifier, the analyzer determines that the second timestamp represents the timestamp when the second node receives the second message.

[0116] Step 230: Calculate the one-way latency within the current test period using the first timestamp and the second timestamp.

[0117] Specifically, according to the description of step 210, after the analyzer obtains the first timestamp and the selected second timestamp, it uses the first timestamp and the second timestamp to calculate the one-way delay within the current test period i.

[0118] The one-way delay of the current test period i is the difference between the second timestamp and the first timestamp.

[0119] Thus, by employing a dual guarantee mechanism using the arrival timestamp of the actual colored packet and the arrival timestamp of the first packet in the same period, it is ensured that downstream devices can report timestamps in each period, allowing the analyzer to obtain continuous and complete latency statistics. Simultaneously, different identifiers are used to represent the source of the latency measurement data, ensuring that users can intuitively and continuously obtain actual latency information for probed services through this mechanism. This solves the problem in existing iFIT latency detection processes where, when link congestion leads to packet loss, downstream devices cannot identify packets carrying latency-colored markers in the current period, cannot record timestamps and report them to the analyzer, thus preventing the analyzer from calculating latency.

[0120] Optionally, in this embodiment of the application, when the second timestamp is recorded after the second node receives the first colored message in the current test period i, the second delay measurement data also includes a first marker; after the analyzer calculates the one-way delay in the current test period, it also marks the one-way delay with the first marker.

[0121] Optionally, in this embodiment of the application, before the analyzer uses the first timestamp and the second timestamp to calculate the one-way delay in the current test period, the analyzer determines whether it has received the second delay measurement data including the first mark; if it has not received it, the analyzer uses the first timestamp and the second timestamp to calculate the one-way delay in the current test period; wherein, the second timestamp is recorded after the second node receives the first message of the period flip.

[0122] Optionally, in this embodiment, the analyzer receives third latency measurement data sent by the second node, the third latency measurement data including a third timestamp. The analyzer determines whether either the second latency measurement data or the third latency measurement data has a first marker; if either the second latency measurement data or the third latency measurement data has a first marker, the analyzer uses the first timestamp and the timestamp with the first marker to calculate the one-way latency in the current test period; the analyzer marks the one-way latency with the first marker.

[0123] In one example, during iFIT detection, node 1 determines the target flow and applies time-delay coloring to the first packet of the detected target flow within period i. Simultaneously, node 1 records the timestamp t1 of receiving the first packet.

[0124] Node 1 generates and sends first delay measurement data to the analyzer, which includes a timestamp t1.

[0125] According to the existing iFIT detection rules, Node 1 generates packet 1 after performing delay coloring on the first packet. Packet 1 includes a packet loss measurement coloring identifier (carried by the L field), the value of which is 0. The first packet also includes a delay coloring identifier (carried by the D field), the value of which is 1.

[0126] The first node sends message 1 to the second node.

[0127] Meanwhile, Node 1, acting as an incoming node, continuously sends packets, such as packet 2, to Node 2 (a downstream network device of Node 1) within period i. Packet 2 includes a packet loss measurement coloring flag, the value of which is 0. It is understood that subsequent packets 2 sent within period i also include a delay coloring flag, but the value of the D field is 0.

[0128] During message transmission, message out-of-order situations may occur. For example, message 2 may arrive at node 2 before message 1; or, after receiving a message within period i-1, a message within period i may be received, and then another message within period i-1 may be received later.

[0129] In this embodiment, node 2 first receives message 2. After receiving message 2, node 2 identifies the value of the packet loss measurement coloring flag, which is 0. Node 2 then checks whether this value is the same as the value of the packet loss measurement coloring flag included in message 3 sent by node 1 earlier.

[0130] If they are different, then node 2 determines that a cycle reversal has occurred, that is, from cycle i-1 to cycle i. At this time, node 2 records the timestamp t3 of received message 2. At the same time, node 2 determines that message 2 is the first message received after the cycle reversal.

[0131] Node 2 determines whether it has received message 1.

[0132] If message 1 is received, node 2 records the timestamp t2 of the received message 1 and marks the timestamp t2 with the A identifier. Node 2 generates second delay measurement data, which includes the timestamp t2 and the A identifier. Node 2 sends the second delay measurement data to the analyzer. After receiving the second delay measurement data, the analyzer retrieves the timestamp t2 and the A identifier from it. Using the A identifier, the analyzer determines that the timestamp t2 is the first message within period i. The analyzer calculates the one-way delay within the current test period i: Delay[i] = t2 - t1, and marks the one-way delay with the A identifier.

[0133] If message 1 is not received, node 2 generates second delay measurement data, which includes a timestamp t3. Node 2 sends the second delay measurement data to the analyzer. After receiving the second delay measurement data, the analyzer retrieves the timestamp t3 from it. Since the second delay measurement data does not include the A identifier, the analyzer determines that timestamp t3 is the first message of the cycle reversal. The analyzer calculates the one-way delay within the current test cycle i: Delay[i] = t3 - t1.

[0134] It should be noted that after receiving message 2, node 2 starts a timer. If a periodic flip occurs again within the timer duration, node 2 will no longer record the timestamp of the periodic flip.

[0135] The above timing duration can be flexibly adjusted according to the actual situation, for example, 1.3T, where T is the period.

[0136] In another example, during iFIT detection, node 1 determines the target flow and applies time-delay coloring to the first packet of the detected target flow within period i. Simultaneously, node 1 records the timestamp t1 of receiving the first packet.

[0137] Node 1 generates and sends first delay measurement data to the analyzer, which includes a timestamp t1.

[0138] According to the existing iFIT detection rules, Node 1 generates packet 1 after performing delay coloring on the first packet. Packet 1 includes a packet loss measurement coloring identifier (carried by the L field), the value of which is 0. The first packet also includes a delay coloring identifier (carried by the D field), the value of which is 1.

[0139] The first node sends message 1 to the second node.

[0140] Meanwhile, Node 1, acting as an incoming node, continuously sends packets, such as packet 2, to Node 2 (a downstream network device of Node 1) within period i. Packet 2 includes a packet loss measurement coloring flag, the value of which is 0. It is understood that subsequent packets 2 sent within period i also include a delay coloring flag, but the value of the D field is 0.

[0141] During message transmission, message out-of-order situations may occur. For example, message 2 may arrive at node 2 before message 1; or, after receiving multiple messages within period i-1, a message within period i may be received.

[0142] In this embodiment, node 2 first receives message 2. After receiving message 2, node 2 identifies the value of the packet loss measurement coloring flag, which is 0. Node 2 then checks whether this value is the same as the value of the packet loss measurement coloring flag included in message 3 sent by node 1 earlier.

[0143] If they are different, then node 2 determines that a cycle reversal has occurred, that is, from cycle i-1 to cycle i. At this time, node 2 records the timestamp t3 of received message 2. At the same time, node 2 determines that message 2 is the first message received after the cycle reversal.

[0144] Node 2 determines whether it has received message 1.

[0145] If message 1 is received, node 2 records the timestamp t2 of received message 1 and marks timestamp t2 with the A identifier. Node 2 generates two second delay measurement data sets: one includes timestamp t2 and the A identifier; the other includes timestamp t3. Node 2 sends the two second delay measurement data sets to the analyzer. After receiving the two second delay measurement data sets, the analyzer determines whether either of the two delay measurement data sets has the identifier A. The analyzer obtains the timestamp t2 from the second delay measurement data set with the identifier A. Through the A identifier, the analyzer determines that timestamp t2 is the first message within period i. The analyzer calculates the one-way delay within the current test period i: Delay[i] = t2 - t1, and marks the one-way delay with the A identifier.

[0146] If message 1 is not received, node 2 generates second delay measurement data, which includes a timestamp t3. Node 2 sends the second delay measurement data to the analyzer. The analyzer determines whether it has received the second delay measurement data including the A identifier. If not received, the analyzer retrieves the timestamp t3 from the received second delay measurement data. Since the second delay measurement data does not include the A identifier, the analyzer determines that timestamp t3 is the first message of the cycle reversal. The analyzer calculates the one-way delay within the current test cycle i: Delay[i] = t3 - t1.

[0147] It should be noted that after receiving message 2, node 2 starts a timer. If a periodic flip occurs again within the timer duration, node 2 will no longer record the timestamp of the periodic flip.

[0148] The above timing duration can be flexibly adjusted according to the actual situation, for example, 1.3T, where T is the period.

[0149] The following tables 1 and 2 illustrate the delay measurement data reported by downstream devices to the analyzer.

[0150] Table 1. Data from the upstream equipment reporting analyzer before optimization.

[0151] Period ID Direction PktCount Timestamp(sec, nsec) Interface 54878501 Egress 74899 1630599180,1948185 XGE6 / 2 / 10 54878502 Egress 75487 --,-- XGE6 / 2 / 10 54878503 Egress 70454 --,-- XGE6 / 2 / 10 54878504 Egress 75131 1630599210,1957311 XGE6 / 2 / 10 54878505 Egress 76223 --,-- XGE6 / 2 / 10 54878506 Egress 72912 1630599230,1946283 XGE6 / 2 / 10 54878507 Egress 75718 --,-- XGE6 / 2 / 10

[0152] Table 2 shows the data reported by the upstream device analyzer after optimization.

[0153]

[0154]

[0155] As can be seen from the table above, the delay detection method provided by the embodiments of this application can supplement the reporting of some data periods without delay, and mark the actual received period with delay-colored messages with an A mark, so as to maximize the presentation of the entire iFIT measurement results and achieve the effect of small error and continuity.

[0156] Based on the same inventive concept, embodiments of this application also provide a delay detection device corresponding to the delay detection method. See [link to related document]. Figure 3 , Figure 3 A latency detection device is provided in an embodiment of this application. The device is applied to a first node, which receives a first message sent by a second node. The first message includes a packet loss measurement coloring identifier with a first value. The device includes:

[0157] The receiving unit 310 is configured to receive a second message sent by the second node, the second message including a packet loss measurement coloring identifier with a second value;

[0158] Recording unit 320 is used to record a first timestamp of receiving the second message if the second value is a flipped state of the first value;

[0159] The judgment unit 330 is used to determine whether a third message has been received, the third message including a packet loss measurement coloring flag with the second value and a time delay coloring flag that has been set;

[0160] The sending unit 340 is configured to send first delay measurement data to the analyzer if it does not receive the data, the first delay measurement data including the first timestamp;

[0161] The recording unit 320 is further configured to, if received, record a second timestamp of the received third message; the sending unit 340 is further configured to, send second delay measurement data to the analyzer, the second delay measurement data including the second timestamp, or, send multiple second delay measurement data to the analyzer, each second delay measurement data including either the first timestamp or the second timestamp.

[0162] The second node is the upstream network device of the first node.

[0163] Optionally, the device further includes a marking unit (not shown) for marking the second timestamp with a first identifier.

[0164] Optionally, the second delay measurement data including the second timestamp also includes the first identifier, which is used to enable the analyzer to determine that the second timestamp is recorded after the first node receives the third message having the packet loss measurement coloring identifier with the second value and including the set delay coloring identifier.

[0165] Based on the same inventive concept, embodiments of this application also provide a delay detection device corresponding to the delay detection method. See [link to related document]. Figure 4 , Figure 4 Another delay detection device provided in this application embodiment, the device being applied to an analyzer, the device comprising:

[0166] The receiving unit 410 is configured to receive first delay measurement data sent by the first node, wherein the first delay measurement data includes a first timestamp;

[0167] The receiving unit 410 is further configured to receive second delay measurement data sent by the second node, wherein the second delay measurement data includes a second timestamp;

[0168] The calculation unit 420 is used to calculate the one-way delay within the current test period using the first timestamp and the second timestamp.

[0169] Optionally, when the second timestamp is recorded after the second node receives the first colored message in the current test period, the second delay measurement data further includes the first marker;

[0170] The device further includes a marking unit (not shown in the figure) for marking the first mark on the unidirectional time delay.

[0171] Optionally, the device further includes:

[0172] A judgment unit (not shown in the figure) is used to determine whether second delay measurement data including the first tag has been received;

[0173] The calculation unit 420 is further configured to, if not, use the first timestamp and the second timestamp to calculate the one-way delay within the current test period;

[0174] The second timestamp is recorded after the second node receives the first message with the period reversed. Optionally, the receiving unit 410 is further configured to receive third delay measurement data sent by the second node, the third delay measurement data including the third timestamp;

[0175] The device further includes: a judging unit (not shown in the figure), used to judge whether either the second time delay measurement data or the third time delay measurement data has a first mark;

[0176] The calculation unit 420 is further configured to, if so, calculate the one-way delay within the current test period using the first timestamp and the timestamp with the first mark;

[0177] The device further includes: a marking unit (not shown in the figure), used to mark the first mark on the unidirectional time delay.

[0178] Thus, by employing a dual guarantee mechanism using the arrival timestamp of the actual colored packet and the arrival timestamp of the first packet in the same period, it is ensured that downstream devices can report timestamps in each period, allowing the analyzer to obtain continuous and complete latency statistics. Simultaneously, different identifiers are used to represent the source of the latency measurement data, ensuring that users can intuitively and continuously obtain actual latency information for probed services through this mechanism. This solves the problem in existing iFIT latency detection processes where, when link congestion leads to packet loss, downstream devices cannot identify packets carrying latency-colored markers in the current period, cannot record timestamps and report them to the analyzer, thus preventing the analyzer from calculating latency.

[0179] Based on the same inventive concept, embodiments of this application also provide a network device, such as... Figure 5 As shown, the system includes a processor 510, a transceiver 520, and a machine-readable storage medium 530. The machine-readable storage medium 530 stores machine-executable instructions that can be executed by the processor 510. The processor 510 is prompted by the machine-executable instructions to execute the latency detection method provided in the embodiments of this application. (The foregoing...) Figure 3 , Figure 4 The delay detection device shown can be used as follows: Figure 5 The hardware structure of the network device shown is implemented.

[0180] The aforementioned computer-readable storage medium 530 may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the computer-readable storage medium 530 may also be at least one storage device located remotely from the aforementioned processor 510.

[0181] The processor 510 mentioned above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0182] In this embodiment of the application, the processor 510 reads the machine-executable instructions stored in the machine-readable storage medium 530, and is prompted by the machine-executable instructions to enable the processor 510 itself and the transceiver 520 to execute the latency detection method described in the aforementioned embodiment of the application.

[0183] In addition, this application provides a machine-readable storage medium 530 that stores machine-executable instructions. When called and executed by the processor 510, the machine-executable instructions cause the processor 510 itself and the transceiver 520 to execute the latency detection method described in the aforementioned application.

[0184] The specific implementation process of the functions and roles of each unit in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.

[0185] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this application according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0186] For the time delay detection device and machine-readable storage medium embodiments, since the methods involved are basically similar to those in the aforementioned method embodiments, the description is relatively simple, and relevant details can be found in the descriptions of the method embodiments.

[0187] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A method of detecting latency, the method comprising: The method is applied to a first node receiving a first packet sent by a second node, the first packet comprising a packet loss measurement coloring identifier with a first value, and the method comprises: receiving a second packet sent by the second node, the second packet comprising the packet loss measurement coloring identifier with a second value; if the second value is a flipped state of the first value, recording a first time stamp of receiving the second packet; determining whether a third packet is received, the third packet comprising the packet loss measurement coloring identifier with the second value and comprising a set time delay coloring identifier; if not, sending first time delay measurement data to an analyzer, the first time delay measurement data comprising the first time stamp; if yes, recording a second time stamp of receiving the third packet, and sending second time delay measurement data to the analyzer, the second time delay measurement data comprising the second time stamp, or sending multiple second time delay measurement data to the analyzer, each of the second time delay measurement data comprising the first time stamp and any of the second time stamp; wherein the second node is an upstream network device of the first node.

2. The method of claim 1, wherein, After the recording of the second time stamp of receiving the third packet, the method further comprises: marking the second time stamp with a first identifier.

3. The method of claim 2, wherein, The second time delay measurement data comprising the second time stamp further comprises the first identifier, and the first identifier is used for making the analyzer determine that the second time stamp is recorded after the first node receives the third packet comprising the packet loss measurement coloring identifier with the second value and the set time delay coloring identifier.

4. A method of detecting latency, the method comprising: The method is applied to an analyzer, and the method comprises: receiving first time delay measurement data sent by a first node for performing a time delay detection method according to claim 1, the first time delay measurement data comprising a first time stamp; receiving second time delay measurement data sent by a second node, the second time delay measurement data comprising a second time stamp; calculating a one-way time delay in a current test period by using the first time stamp and the second time stamp.

5. The method of claim 4, wherein, When the second time stamp is recorded after the second node receives a first colored packet in the current test period, the second time delay measurement data further comprises a first mark; After the calculation of the one-way time delay in the current test period, the method further comprises: marking the one-way time delay with the first mark.

6. The method of claim 4, wherein, Before the calculation of the one-way time delay in the current test period by using the first time stamp and the second time stamp, the method further comprises: determining whether second time delay measurement data comprising a first mark is received; if not, calculating the one-way time delay in the current test period by using the first time stamp and the second time stamp; wherein the second time stamp is recorded after the second node receives a first packet of period flip.

7. The method of claim 4, wherein, After the receiving of the second time delay measurement data sent by the second node, the method further comprises: receiving third time delay measurement data sent by the second node, the third time delay measurement data comprising a third time stamp; determining whether any of the second latency measurement data and the third latency measurement data has a first mark; if yes, calculating a one-way latency within a current test period by using the first timestamp and the timestamp with the first mark; marking the one-way latency with the first mark.

8. A latency detection apparatus, characterized by, The device is applied to a first node, and the first node receives a first packet sent by a second node, the first packet comprising a packet loss measurement coloring identifier with a first value. The device comprises: a receiving unit configured to receive a second packet sent by the second node, the second packet comprising a packet loss measurement coloring identifier with a second value; a recording unit configured to, if the second value is a flipped state of the first value, record a first timestamp of receiving the second packet; a determining unit configured to determine whether a third packet is received, the third packet comprising the packet loss measurement coloring identifier with the second value and comprising a set latency coloring identifier; a sending unit configured to, if not, send first latency measurement data to an analyzer, the first latency measurement data comprising the first timestamp; the recording unit is further configured to, if yes, record a second timestamp of receiving the third packet; and the sending unit is further configured to send second latency measurement data to the analyzer, the second latency measurement data comprising the second timestamp, or send a plurality of second latency measurement data to the analyzer, each second latency measurement data comprising any of the first timestamp and the second timestamp. The second node is an upstream network device of the first node.

9. The apparatus of claim 8, wherein, The device further comprises a marking unit configured to mark the second timestamp with a first mark.

10. The apparatus of claim 9, wherein, The second latency measurement data comprising the second timestamp further comprises the first mark, and the first mark is used to make the analyzer determine that the second timestamp is recorded after the first node receives the third packet comprising the packet loss measurement coloring identifier with the second value and comprising the set latency coloring identifier.

11. A delay detection apparatus for performing the method of claim 4, characterized by The device is applied to an analyzer, and the device comprises: a receiving unit configured to receive first latency measurement data sent by a first node, the first latency measurement data comprising a first timestamp; the receiving unit is further configured to receive second latency measurement data sent by a second node, the second latency measurement data comprising a second timestamp; a calculating unit configured to calculate a one-way latency within a current test period by using the first timestamp and the second timestamp.

12. The apparatus of claim 11, wherein, When the second timestamp is recorded after the second node receives a first colored packet within the current test period, the second latency measurement data further comprises a first mark; the device further comprises a marking unit configured to mark the one-way latency with the first mark.

13. The apparatus of claim 11, wherein, The device further comprises: a determining unit configured to determine whether second latency measurement data comprising a first mark is received; the calculating unit is further configured to, if no, calculate a one-way latency within a current test period by using the first timestamp and the second timestamp; The second timestamp is recorded after the first message of the period flip is received by the second node.

14. The apparatus of claim 11, wherein, The receiving unit is further configured to receive third time delay measurement data sent by the second node, wherein the third time delay measurement data comprises a third timestamp. The device further comprises a judging unit configured to judge whether any of the second time delay measurement data and the third time delay measurement data has a first mark. The calculating unit is further configured to, if yes, calculate a one-way time delay in a current test period by using the first timestamp and the timestamp with the first mark. The device further comprises a marking unit configured to mark the one-way time delay with the first mark.

Citation Information

Patent Citations

  • Time delay measurement method and device

    CN113824607A

  • Stream detection method and electronic equipment

    CN115699685A