A method and system for accurately calculating path latency

By establishing time synchronization relationships in the fiber optic network and querying a preset delay error table, the path delay can be accurately calculated, solving the measurement error problem of OTDR in ultra-long-distance optical transmission scenarios and realizing high-precision fiber length measurement and fault location.

CN122137491APending Publication Date: 2026-06-02FIBERHOME TELECOMMUNICATION TECHNOLOGIES CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
FIBERHOME TELECOMMUNICATION TECHNOLOGIES CO LTD
Filing Date
2026-02-28
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

In existing technologies, OTDRs cannot accurately measure fiber length in ultra-long-distance optical transmission scenarios, and the internal delay error of the IEEE 1588 protocol cannot be measured and compensated separately, resulting in a large error in path delay calculation.

Method used

After establishing a time synchronization relationship between the master and slave network elements at both ends of the path, the slave network element receives the stamping scheme identifier from the master network element, queries the preset delay error table, obtains the sum of the internal delays of the master and slave network elements, and uses this delay error sum to correct the measured path delay to obtain the true path delay.

Benefits of technology

It significantly improves the accuracy of path delay measurement, enhances the accuracy of fiber length measurement, solves the problems of inaccurate OTDR composite diagrams and inaccurate fiber length measurement, and ensures the accuracy of optical layer fault location.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122137491A_ABST
    Figure CN122137491A_ABST
Patent Text Reader

Abstract

A method and system for accurately calculating path delay is disclosed. After establishing time synchronization between the master and slave network elements at both ends of the path, the method uses the delay error and the stamping scheme identifier sent by the master network element to obtain the delay error. The slave network element queries a pre-set delay error table based on the delay error and the stamping scheme identifier of the master network element to obtain the corresponding delay error sum. The delay error sum is the sum of the delay error sum within the master network element and the delay error sum within the slave network element. The slave network element uses the delay error sum to correct the measured path delay obtained through the time synchronization protocol to obtain the true path delay. This effectively eliminates the end-to-end internal processing delay introduced by the hardware stamping position being far from the physical layer boundary, significantly improving the measurement accuracy of path delay.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network communication, specifically to a method and system for accurately calculating path delay. Background Technology

[0002] In optical transport networks (OTNs), to achieve intelligent operation and maintenance and precise fault location, optical layer network elements need to support compositing functionality based on optical time domain reflectometers (OTDRs) in optical supervisory channels (OSCs). A key technology in OTDR compositing is the accurate measurement of the fiber optic length between two directly connected network elements. However, traditional OTDRs typically only support fiber optic length measurements of less than 100 km, which is insufficient to meet the needs of ultra-long-distance optical transmission scenarios.

[0003] OTN optical layer network elements themselves lack the delay measurement (DM) function supported by the Operation, Administration and Maintenance (OAM) mechanism found in electrical layer network elements. However, most current OTN optical layer network elements widely support the IEEE 1588 Precision Time Protocol (PTP) and can transmit PTP messages through the OSC channel. IEEE 1588 can calculate the bidirectional path delay between master and slave network elements, and this calculation is not limited by fiber distance. Therefore, theoretically, by combining the fiber refractive index and applying the formula fiber length = path delay / fiber refractive index, the physical length of ultra-long-distance optical fibers can be indirectly obtained, thus compensating for the shortcomings of OTDR ranging capabilities.

[0004] To achieve high-precision path delay calculation, the IEEE 1588 protocol heavily relies on the timing of message timestamps. Ideally, the timestamp point should be as close as possible to the actual physical layer (PHY) exit or entrance to minimize the introduction of uncontrollable internal processing delays within network elements. However, in practice, the optical monitoring channel (OSC) interface typically employs a low-rate design (e.g., 25 Mbps) to improve receiver sensitivity over ultra-long distance transmissions, and its timestamp function is generally implemented at the MAC layer by FPGAs or dedicated service chips. Because the timestamp occurs in the digital domain, rather than at the physical boundary where the optical signal is actually transmitted or received, there is an internal delay between the actual timestamp and the actual times when the signal enters or exits the fiber. This internal delay mainly includes the internal delay Tx of the main network element and the internal delay Rx of the slave network element. Different timestamp schemes introduce different internal delays, ranging from thousands to tens of thousands of nanoseconds, corresponding to fiber length errors of hundreds of meters or even kilometers. This error can cause OTDRs to fail to properly composite the optical fiber. More importantly, OSC cannot accurately measure the latency error introduced from the main network element or from within the network element, but this error cannot be ignored, and these internal latencies will change unpredictably with hardware platform upgrades or changes in the stamping scheme.

[0005] Therefore, how to identify and eliminate internal delay errors within network elements in order to accurately calculate path delay is a technical problem that needs to be solved. Summary of the Invention

[0006] This application provides a method and system for accurately calculating path delay, which can solve the technical problem in the prior art that the transmission delay and reception delay within network elements cannot be accurately measured and compensated, resulting in a large error in the calculation of network path delay.

[0007] In a first aspect, embodiments of this application provide a method for accurately calculating path delay, the method comprising: After the master network element and slave network element at both ends of the path establish a time synchronization relationship, the slave network element receives the stamping scheme identifier sent by the master network element; The slave network element queries a preset delay error table based on the stamping scheme identifier of the master network element to obtain the corresponding delay error sum, wherein the delay error sum is the sum of the internal delay of the master network element and the internal delay of the slave network element; The network element uses the delay error and corrects the measured path delay obtained through the time synchronization protocol to obtain the true path delay.

[0008] In conjunction with the first aspect, in one implementation, the step of the slave network element querying a preset delay error table based on the stamping scheme identifier of the master network element to obtain the corresponding delay error sum includes: The slave network element queries the locally preset slave network element delay error table according to the stamping scheme identifier of the master network element to obtain the corresponding delay error sum. The slave network element delay error table is constructed based on the stamping scheme of the slave network element and stores the corresponding delay error sum with the stamping scheme identifier of the master network element as the index. If the delay error sum table of the slave network element contains a delay error sum corresponding to the stamping scheme identifier of the master network element, then the slave network element reads the delay error sum. If it does not exist, the slave network element requests the master network element to obtain the sum of delay errors corresponding to the master network element's stamping scheme identifier and its own stamping scheme identifier.

[0009] In conjunction with the first aspect, in one implementation, after the slave network element reads the delay error sum value from the slave network element's delay error sum table, the method further includes: When the slave network element is a newly joined network element and its stamping scheme is a new stamping scheme that does not exist in the network, the slave network element sends a notification message to the master network element so that the master network element updates its local preset master network element delay error table according to the notification message. The notification message includes the stamping scheme identifier of the slave network element, the stamping scheme identifier of the master network element, and the corresponding delay error.

[0010] In conjunction with the first aspect, in one implementation, the step of requesting the main network element to obtain the sum of delay errors corresponding to the main network element's stamping scheme identifier and its own stamping scheme identifier includes: The slave network element sends a request message to the master network element, wherein the request message includes the stamping scheme identifier of the slave network element; After receiving the request message, the master network element looks up the local preset master network element delay error table according to the stamping scheme identifier of the slave network element, obtains the corresponding delay error, and sends a response message back to the slave network element. The master network element delay error table is constructed based on the stamping scheme of the master network element and stores the corresponding delay error using the stamping scheme identifier of the slave network element as an index. The slave network element updates its locally configured slave network element delay error table according to the response message; The response message includes the stamping scheme identifier of the master network element, the stamping scheme identifier of the slave network element, and the corresponding delay error.

[0011] In conjunction with the first aspect, in one implementation, before each network element joins the network, the following is also included: Determine whether the stamping scheme of the network element to be added to the network is an existing stamping scheme in the network; If not, the network elements to be connected to the network are configured as master network elements and slave network elements respectively. Based on all existing stamping schemes in the network and optical fibers of known length, the corresponding time delay errors are calculated through calibration, and master network element time delay error tables and slave network element time delay error tables corresponding to the stamping schemes are constructed and preset locally in the network elements to be connected to the network. If so, the master network element delay error table and slave network element delay error table corresponding to the stamping scheme of the network element to be connected to the network are pre-set locally on the network element to be connected to the network.

[0012] In conjunction with the first aspect, in one implementation, the network element to be connected to the network is configured as a primary network element, and a primary network element delay error table corresponding to the stamping scheme is constructed, including: The network element to be added to the network is connected to each reference slave network element in the current network that uses a different stamping scheme through an optical fiber of known length, and a time synchronization relationship is established based on a time synchronization protocol. For each connection, the standard fiber path delay is calculated based on the fiber length and fiber refractive index, and the measured path delay between the network element to be connected to the network and the corresponding reference slave element is measured through a time synchronization protocol. Calculate the difference between the measurement path delay and the standard fiber optic path delay to obtain the corresponding delay error. Using the stamping scheme identifier of the reference slave element as an index and the corresponding time delay error as an element, a master element time delay error table corresponding to the stamping scheme of the network element to be connected to the network is generated.

[0013] In conjunction with the first aspect, in one implementation, the network element to be connected to the network is configured as a slave network element, and a slave network element delay error table corresponding to the stamping scheme is constructed, including: The network element to be added to the network is connected to each of the reference master network elements in the current network that use different known stamping schemes through optical fibers of known length, and a time synchronization relationship is established based on a time synchronization protocol. For each connection, the standard fiber path delay is calculated based on the fiber length and fiber refractive index, and the measured path delay between the network element to be connected to the network and the corresponding reference master network element is measured through a time synchronization protocol. Calculate the difference between the measurement path delay and the standard fiber optic path delay to obtain the corresponding delay error. Using the stamping scheme identifier of the reference master network element as an index and the corresponding delay error as an element, a table of slave network element delay errors corresponding to the stamping scheme of the network element to be connected to the network is generated.

[0014] In conjunction with the first aspect, in one implementation, the slave element uses the delay error and the measured path delay obtained through the time synchronization protocol to correct for the true path delay, including: The actual path delay is obtained by subtracting the delay error from the measured path delay.

[0015] Secondly, embodiments of this application provide a system for accurately calculating path delay. The system includes a master network element and a slave network element, wherein the slave network element is used for: After the master network element and slave network element at both ends of the path establish a time synchronization relationship, the stamping scheme identifier sent by the master network element is received; Based on the stamping scheme identifier of the main network element, query the preset delay error table to obtain the corresponding delay error sum, wherein the delay error sum is the sum of the internal delay of the main network element and the internal delay of the slave network element; The true path delay is obtained by using the aforementioned delay error and correcting the measured path delay obtained through the time synchronization protocol.

[0016] In conjunction with the second aspect, in one implementation, the slave network element is further used for: Based on the stamping scheme identifier of the master network element, query the locally preset slave network element delay error sum table to obtain the corresponding delay error sum. The slave network element delay error sum table is constructed based on the stamping scheme of the slave network element and stores the corresponding delay error sum with the stamping scheme identifier of the master network element as the index. If the delay error sum table contains a delay error sum corresponding to the stamping scheme identifier of the main network element, then read the delay error sum. If it does not exist, then request the main network element to obtain the sum of delay errors corresponding to the main network element's stamping scheme identifier and its own stamping scheme identifier.

[0017] The beneficial effects of the technical solutions provided in this application include: After the master network element and slave network element at both ends of the path establish a time synchronization relationship, the slave network element receives the stamping scheme identifier sent by the master network element. The slave network element queries a preset delay error table based on the stamping scheme identifier of the master network element to obtain the corresponding delay error sum, wherein the delay error sum is the sum of the internal delay of the master network element and the internal delay of the slave network element. The slave network element uses the delay error sum to correct the measured path delay obtained by the time synchronization protocol to obtain the true path delay. This effectively eliminates the end-to-end internal processing delay introduced by the hardware stamping position being far from the physical layer boundary, significantly improves the measurement accuracy of path delay, and thus significantly improves the measurement accuracy of fiber length. This solves the technical problems in related technologies, such as large deviations in path delay calculation, inaccurate OTDR composite diagrams, and inaccurate fiber length measurement caused by the inability to accurately compensate for the internal delays of master and slave network elements. Attached Figure Description

[0018] Figure 1This is a flowchart illustrating an embodiment of the method for accurately calculating path delay according to this application; Figure 2 This is a schematic diagram illustrating the calculation principle of the path delay measurement in this application; Figure 3 This is a schematic diagram illustrating the calculation principle of the delay error sum in this application; Figure 4 This is a schematic diagram illustrating the calculation process of path delay when a new network element enters the network for this application. Figure 5 This is a schematic diagram illustrating the calculation process of path delay when a new main network element joins the network for this application. Detailed Implementation

[0019] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.

[0020] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0021] In a first aspect, embodiments of this application provide a method for accurately calculating path delay.

[0022] In one embodiment, reference is made to Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the method for accurately calculating path delay according to this application. Figure 1 As shown, methods for accurately calculating path delay include: Step S101: After the master network element and slave network element at both ends of the path establish a time synchronization relationship, the slave network element receives the stamping scheme identifier sent by the master network element.

[0023] In this embodiment, the time synchronization relationship can be established based on the EE 1588 time synchronization protocol.

[0024] Step S102: The slave network element queries a preset delay error table based on the stamping scheme identifier of the master network element to obtain the corresponding delay error sum, wherein the delay error sum is the sum of the internal delay of the master network element and the internal delay of the slave network element.

[0025] Step S103: The slave network element uses the delay error and the measured path delay obtained through the time synchronization protocol to correct the actual path delay.

[0026] In this embodiment, after time synchronization is established, the master network element actively announces its stamping scheme identifier, enabling the slave network element to query the preset delay error table based on the identifier, obtain the sum of the internal processing delays of both the master and slave, and use this to accurately compensate for the measurement path delay measured based on the time synchronization protocol. This solves the technical problem in related technologies where the internal transmission and reception delays of the network element cannot be accurately known and compensated, resulting in significant deviations in path delay calculation, which in turn affects the fiber length estimation, OTDR composite map accuracy, and optical layer fault location accuracy.

[0027] It is worth noting that the roles played by each network element in the communication process in this embodiment are relative. Depending on the different synchronization relationships, any network element can act as either a master network element or a slave network element. To support bidirectional accurate delay calculation, each network element pre-sets two delay error tables locally before joining the network: a delay error table for the master network element and a delay error table for the slave network element.

[0028] For any network element, the network element delay error sum table is constructed based on the stamping scheme when the network element is a slave network element, and uses the stamping scheme identifier of the master network element as an index to store the delay compensation value under the corresponding master-slave combination (i.e., the sum of the master network element's transmitting delay and the slave network element's receiving delay); the master network element delay error sum table is constructed based on the stamping scheme when the network element is a master network element, and uses the stamping scheme identifier of the slave network element as an index to store the internal delay compensation value under the corresponding master-slave combination (i.e., the sum of the master network element's transmitting delay and the slave network element's receiving delay).

[0029] By pre-building these two tables and pre-installing them in the network elements, it is ensured that after any two network elements establish a time synchronization relationship, regardless of how their master and slave roles are assigned, they can quickly obtain accurate internal delay compensation values, thereby achieving high-precision correction of path delay.

[0030] In one embodiment, before each network element joins the network, a table entry pre-setting process needs to be performed to ensure that it has the ability to obtain the sum of delay errors corresponding to all stamping scheme combinations in the current network.

[0031] Specifically, before each network element joins the network, it is determined whether the stamping scheme of the network element to be joined is an existing stamping scheme in the network.

[0032] If they already exist, it means that the master network element delay error table and slave network element delay error table corresponding to the stamping scheme have been generated and archived in the previous calibration process. At this time, the two tables corresponding to the stamping scheme can be directly loaded into the local storage of the network element to be connected to the network without repeated calibration.

[0033] If it does not exist, it means that the stamping scheme of the network element to be connected to the network is a new scheme. In this case, offline calibration needs to be performed on the network element to be connected to the network. This process includes: configuring the network element to be connected to the network as a master network element and a slave network element respectively; calculating the corresponding time delay error based on all existing stamping schemes in the network and optical fibers of known length through calibration; and constructing the master network element time delay error table and slave network element time delay error table corresponding to the stamping scheme, and pre-setting them locally on the network element to be connected to the network.

[0034] In a specific embodiment, the network element to be connected to the network is configured as the main network element, and a main network element delay error table corresponding to the stamping scheme is constructed, including the following steps: The network element to be added to the network is connected to each reference slave network element in the current network that uses a different stamping scheme through optical fibers of known length, and a time synchronization relationship is established based on the IEEE 1588 time synchronization protocol.

[0035] For each connection, the standard fiber path delay is calculated by dividing the fiber length by the fiber refractive index. The measured path delay between the network element to be connected and the corresponding reference slave element is measured using a time synchronization protocol. The difference between the measured path delay and the standard fiber path delay is calculated to obtain the corresponding delay error. Tx + Rx = Measurement path delay - Standard fiber optic path delay Where Tx+Rx represents the sum of delay errors, Tx represents the internal delay of the master network element, and Rx represents the internal delay of the slave network element.

[0036] To ensure that the network element to be added can support as many stamping scheme combinations as possible, it is necessary to traverse all different stamping schemes in the current network. Assuming the stamping scheme identifiers are 1-N, N increases by 1 for each new stamping scheme. Finally, using the stamping scheme identifier of the reference network element as the index and the corresponding latency error as the element, a table of the main network element latency error sum for the new stamping scheme corresponding to the network element to be added is generated, as shown in Figure 1. Table 1. Main network element latency error when using stamping scheme x as the main network element. It is worth noting that, such as Figure 2 As shown, the process of a network element measuring the path delay according to the time synchronization protocol includes: the master network element sends a synchronization message to the slave network element at time t1, and the message arrives at the slave network element at time t2; after receiving the synchronization message, the slave network element sends a delay request message back to the master network element at time t3; the master network element receives the delay request message at time t4 and encapsulates the value of t4 in a delay response message and returns it to the slave network element. After receiving the delay response message, the slave network element calculates the path delay according to the following formula based on the four timestamps t1, t2, t3, and t4:

[0037] like Figure 3 As shown, the relationship between the master network element and the slave network element The actual path delay is composed of the transmission delay Tx from the main network element to the internal network, the reception delay Rx from the network element to the internal network, and the real path delay. Therefore, the formula for calculating the real path delay is: Actual path delay = Measured path delay (Tx+Rx) The measured path delay is calculated using the IEEE 1588 protocol based on timestamps, while the actual path delay is calculated based on a known length of optical fiber and its refractive index. Since we cannot measure the specific values ​​of Tx and Rx separately, but by using an optical fiber of known length, we can obtain: Tx + Rx = Measurement path delay Real path delay Therefore, based on this principle, as long as the value of Tx+Rx is known, the actual path delay of an optical fiber of unknown length can be accurately calculated.

[0038] Since different stamping schemes introduce different errors, it is necessary to calibrate each combination of stamping schemes to generate corresponding delay error tables. In this way, during actual operation, regardless of the stamping scheme used by the master and slave network elements, accurate internal delay compensation values ​​can be quickly obtained by looking up the tables, thereby achieving high-precision path delay correction.

[0039] In one embodiment, the network element to be connected to the network is configured as a slave network element, and a slave network element delay error table corresponding to the stamping scheme is constructed. This includes: connecting the network element to be connected to each reference master network element in the current network using a different known stamping scheme via optical fibers of known length, and establishing a time synchronization relationship based on a time synchronization protocol; for each connection, calculating the standard optical fiber path delay based on the optical fiber length and refractive index, and measuring the measured path delay between the network element to be connected and the corresponding reference master network element using the time synchronization protocol; calculating the difference between the measured path delay and the standard optical fiber path delay to obtain the corresponding delay error sum; using the stamping scheme identifier of the reference master network element as an index and the corresponding delay error sum as an element, generating a slave network element delay error sum table corresponding to the stamping scheme of the network element to be connected to the network. The generated slave network element delay error sum table corresponding to the new stamping scheme of the network element to be connected to the network is shown in Figure 2. Table 2 shows the network element delay error when using the stamping scheme x. The method and principle for establishing the delay error table for network elements are the same as those for the delay error table for main network elements, and will not be repeated here.

[0040] By pre-maintaining master network element delay error sum tables and slave network element delay error sum tables for all known stamping schemes, when any two network elements communicate based on the IEEE 1588 protocol, as long as they know the stamping scheme identifier of the other end, they can combine their own fixed stamping scheme, query the corresponding local delay error sum table, and accurately obtain the sum of internal delays introduced by the master-slave stamping scheme combination.

[0041] In one embodiment, based on the principle of 1588 path delay calculation, only slave network elements can calculate path delay. Slave network elements need to know the master network element's stamping scheme in order to look up their own slave network element delay error table. After the master and slave network elements establish 1588 time synchronization, the master network element periodically sends its own stamping scheme to the slave network element. After receiving the stamping scheme identifier sent by the master network element, the slave network element queries its locally preset slave network element delay error table based on this identifier.

[0042] If the delay error sum table of the slave network element contains a delay error sum corresponding to the stamping scheme identifier of the master network element, the slave network element directly reads the delay error sum and uses the delay error sum to correct the measured path delay measured by the time synchronization protocol to obtain the true path delay.

[0043] It is worth noting that since path delay is calculated by the slave network element, when the slave network element is a newly joined network element and its stamping scheme is a new stamping scheme not yet existing in the network, the slave network element has already pre-configured a complete slave network element delay error table through calibration before joining the network. This table covers all known master network element stamping schemes in the current network. Therefore, after receiving the stamping scheme identifier announced by the master network element, it can directly look up the table to obtain the corresponding internal delay compensation value, thereby accurately correcting the measured path delay. Therefore, even if its stamping scheme is a newly added type, it will not affect the accuracy of the slave network element's calculation of the actual path delay.

[0044] However, if the main network element's local delay error and table do not yet include the stamping scheme used by the newly joined slave network element, then when other slave network elements using the same stamping scheme subsequently access the network, the main network element will be unable to provide them with accurate delay compensation values, thereby affecting the consistency and scalability of the entire network path delay calculation.

[0045] To address this issue, this embodiment further includes: when a slave network element is a newly joined network element and its stamping scheme is a new stamping scheme not existing in the network, the slave network element actively sends an announcement message to the master network element. Upon receiving the announcement message, if the master network element does not yet store a corresponding entry in its local master network element delay error sum table, it writes the information carried in the message into the table, completing a dynamic update. The announcement message includes at least the following information: the slave network element's stamping scheme identifier, the master network element's stamping scheme identifier, and the corresponding delay error sum.

[0046] Through this mechanism, the master network element can promptly supplement its support capability for new stamping methods and slave network element stamping schemes, ensuring that any master-slave combination can achieve high-precision path delay correction during the continuous evolution of the network.

[0047] As an example, if the incoming network element is a newly added network element and its stamping scheme is a new stamping scheme that does not exist in the network, the calculation process of the true path delay is as follows: Figure 5 As shown: Step S201: After a new network element joins the network, it establishes a master-slave relationship with other network elements through interactive notification messages. After determining that the newly joined network element is a slave network element, the master network element uses the 1588 time synchronization protocol to periodically send signaling notification messages (carrying the master network element's stamping scheme identifier) ​​to the slave network element.

[0048] Step S202: After receiving the signaling notification message from the network element, extract the main network element stamping scheme identifier from it, and look up the local slave network element delay error table based on the identifier to obtain the corresponding delay error.

[0049] Step S203: The slave network element calculates the actual path delay based on the delay error and sends a signaling notification message to the master network element (carrying the slave network element's stamping scheme identifier, the master network element's stamping scheme identifier, the delay error, and the sum of the delays). Step S201: After receiving the signaling notification message, the main network element extracts the stamping scheme identifier and latency error from it, and updates the local main network element latency error table according to the identifier.

[0050] Furthermore, if the delay error sum corresponding to the stamping scheme identifier of the master network element is not found in the slave network element delay error sum table, this usually occurs when the master network element is using a new stamping scheme. For example, if the master network element is a newly joined device and its stamping scheme has not yet been recorded in the local delay error sum table by the slave network element. In this case, the slave network element requests the master network element to obtain the delay error sum corresponding to the master network element's stamping scheme identifier and its own stamping scheme identifier.

[0051] Specifically, the slave network element sends a request message to the master network element, wherein the request message includes the slave network element's stamping scheme identifier. After receiving the request message, the master network element looks up its locally preset master network element latency error table based on the slave network element's stamping scheme identifier to obtain the corresponding latency error sum, and then sends a response message back to the slave network element. The master network element latency error table is constructed based on the master network element's stamping scheme and stores the corresponding latency error sum using the slave network element's stamping scheme identifier as an index. Because the master network element is a new device, its master network element latency error table has already been maintained and interoperated with all existing stamping schemes before joining the network. Therefore, after receiving the request, the master network element can definitely find its own master network element latency error table based on the slave network element's stamping scheme and needs to send the found latency error sum back to the slave network element. The slave network element updates its locally configured slave network element latency error table according to the response message; wherein, the response message includes the stamping scheme identifier of the master network element, the stamping scheme identifier of the slave network element, and the corresponding latency error.

[0052] As an example, if the main network element is a newly joined network element and its stamping scheme is a new stamping scheme that does not exist in the network, the calculation process of the actual path delay is as follows: Figure 5 As shown: Step S301: After a new network element joins the network, it establishes a master-slave relationship with other network elements through interactive notification messages. After determining that the newly joined network element is the master network element, the master network element uses the 1588 time synchronization protocol to periodically send signaling notification messages (carrying the master network element's stamping scheme identifier) ​​to the slave network elements.

[0053] Step S302: After receiving the signaling notification message, the network element extracts the master network element stamping scheme identifier from it and looks up its slave network element delay error table according to the number. Since the master network element is newly joined and uses a stamping scheme that does not exist in the network, the slave network element cannot find the corresponding delay error.

[0054] Step S303: The slave network element sends a signaling request message (carrying the slave network element stamping scheme identifier) ​​to the master network element, requesting an update of the delay error.

[0055] Step S304: After receiving the signaling request message, the master network element extracts the slave network element stamping scheme identifier from it, looks up the local master network element delay error table, obtains the delay error sum, and then sends a signaling response message (carrying the slave network element stamping scheme identifier / master network element stamping scheme identifier / delay error sum) to the slave network element.

[0056] Step S305: After receiving the signaling response message from the network element, extract the delay error sum from it, update its own slave network element delay error sum table, and calculate the path delay based on the delay error sum.

[0057] It is worth noting that, through the two-step processing mechanism of direct compensation for table lookup hits and dynamic negotiation for table lookup misses, after any two network elements in the current network establish an IEEE 1588 time synchronization relationship, regardless of the entry order of the master and slave network elements (i.e., whether the master network element enters the network first and the slave network element enters later, or vice versa), the internal delay compensation value under the corresponding stamping scheme combination can be accurately obtained. Based on this, the measured path delay is corrected, thereby calculating a high-precision true path delay. This effectively solves the path delay deviation problem caused by unknown internal delays of network elements or missing entries, significantly improving the accuracy of optical layer link monitoring, fiber length estimation, and fault location.

[0058] Secondly, embodiments of this application also provide a system for accurately calculating path delay.

[0059] In one embodiment, the system for accurately calculating path delay includes a master network element and a slave network element, wherein the slave network element is used for: After the master network element and slave network element at both ends of the path establish a time synchronization relationship, the stamping scheme identifier sent by the master network element is received; Based on the stamping scheme identifier of the main network element, query the preset delay error table to obtain the corresponding delay error sum, wherein the delay error sum is the sum of the internal delay of the main network element and the internal delay of the slave network element; The true path delay is obtained by using the aforementioned delay error and correcting the measured path delay obtained through the time synchronization protocol.

[0060] Furthermore, in one embodiment, the slave network element is also used for: Based on the stamping scheme identifier of the master network element, query the locally preset slave network element delay error sum table to obtain the corresponding delay error sum. The slave network element delay error sum table is constructed based on the stamping scheme of the slave network element and stores the corresponding delay error sum with the stamping scheme identifier of the master network element as the index. If the delay error sum table contains a delay error sum corresponding to the stamping scheme identifier of the main network element, then read the delay error sum. If it does not exist, then request the main network element to obtain the sum of delay errors corresponding to the main network element's stamping scheme identifier and its own stamping scheme identifier.

[0061] Furthermore, in one embodiment: When the slave network element is a newly joined network element and its stamping scheme is a new stamping scheme that does not exist in the network, the slave network element is also used to send a notification message to the master network element so that the master network element updates the locally preset master network element delay error table according to the notification message. The notification message includes the stamping scheme identifier of the slave network element, the stamping scheme identifier of the master network element, and the corresponding delay error.

[0062] Furthermore, in one embodiment: The slave network element is further configured to send a request message to the master network element, wherein the request message includes the stamping scheme identifier of the slave network element; The master network element is also used to, after receiving the request message, look up the local preset master network element delay error table according to the stamping scheme identifier of the slave network element, obtain the corresponding delay error sum, and send a response message back to the slave network element, wherein the master network element delay error table is constructed based on the stamping scheme of the master network element and stores the corresponding delay error sum with the stamping scheme identifier of the slave network element as an index; The slave network element is also used to update the locally configured slave network element delay error table according to the response message; The response message includes the stamping scheme identifier of the master network element, the stamping scheme identifier of the slave network element, and the corresponding delay error.

[0063] Furthermore, in one embodiment, the system further includes a preset module for: Determine whether the stamping scheme of the network element to be added to the network is an existing stamping scheme in the network; If not, the network elements to be connected to the network are configured as master network elements and slave network elements respectively. Based on all existing stamping schemes in the network and optical fibers of known length, the corresponding time delay errors are calculated through calibration, and master network element time delay error tables and slave network element time delay error tables corresponding to the stamping schemes are constructed and preset locally in the network elements to be connected to the network. If so, the master network element delay error table and slave network element delay error table corresponding to the stamping scheme of the network element to be connected to the network are pre-set locally on the network element to be connected to the network.

[0064] Furthermore, in one embodiment, the preset module is also used for: The network element to be added to the network is connected to each reference slave network element in the current network that uses a different stamping scheme through an optical fiber of known length, and a time synchronization relationship is established based on a time synchronization protocol. For each connection, the standard fiber path delay is calculated based on the fiber length and fiber refractive index, and the measured path delay between the network element to be connected to the network and the corresponding reference slave element is measured through a time synchronization protocol. Calculate the difference between the measurement path delay and the standard fiber optic path delay to obtain the corresponding delay error. Using the stamping scheme identifier of the reference slave element as an index and the corresponding time delay error as an element, a master element time delay error table corresponding to the stamping scheme of the network element to be connected to the network is generated.

[0065] Furthermore, in one embodiment, the preset module is also used for: The network element to be added to the network is connected to each of the reference master network elements in the current network that use different known stamping schemes through optical fibers of known length, and a time synchronization relationship is established based on a time synchronization protocol. For each connection, the standard fiber path delay is calculated based on the fiber length and fiber refractive index, and the measured path delay between the network element to be connected to the network and the corresponding reference master network element is measured through a time synchronization protocol. Calculate the difference between the measurement path delay and the standard fiber optic path delay to obtain the corresponding delay error. Using the stamping scheme identifier of the reference master network element as an index and the corresponding delay error as an element, a table of slave network element delay errors corresponding to the stamping scheme of the network element to be connected to the network is generated.

[0066] Furthermore, in one embodiment, the slave network element is used for: The actual path delay is obtained by subtracting the delay error from the measured path delay.

[0067] The functions of each module in the system for accurately calculating path delay correspond to the steps in the method embodiment for accurately calculating path delay, and their functions and implementation processes will not be described in detail here.

[0068] It should be noted that the sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0069] The terms "comprising" and "having," and any variations thereof, in the specification, claims, and accompanying drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or apparatus. The terms "first," "second," and "third," etc., are used to distinguish different objects, etc., and do not indicate a sequence, nor do they limit "first," "second," and "third" to different types.

[0070] In the description of the embodiments of this application, terms such as "exemplary," "for example," or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplary," "for example," or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary," "for example," or "for instance" is intended to present the relevant concepts in a concrete manner.

[0071] In the description of the embodiments of this application, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The "and / or" in the text is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of this application, "multiple" means two or more.

[0072] In some processes described in the embodiments of this application, multiple operations or steps are included in a specific order. However, it should be understood that these operations or steps may not be executed in the order they appear in the embodiments of this application, or they may be executed in parallel. The sequence number of the operation is only used to distinguish different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed sequentially or in parallel, and these operations or steps may be combined.

[0073] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device to execute the methods described in the various embodiments of this application.

[0074] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A method for accurately calculating path delay, characterized in that, The method for accurately calculating path delay includes: After the master network element and slave network element at both ends of the path establish a time synchronization relationship, the slave network element receives the stamping scheme identifier sent by the master network element; The slave network element queries a preset delay error table based on the stamping scheme identifier of the master network element to obtain the corresponding delay error sum, wherein the delay error sum is the sum of the internal delay of the master network element and the internal delay of the slave network element; The network element uses the delay error and corrects the measured path delay obtained through the time synchronization protocol to obtain the true path delay.

2. The method for accurately calculating path delay as described in claim 1, characterized in that, The slave network element queries a preset latency error table based on the stamping scheme identifier of the master network element to obtain the corresponding latency error sum, including: The slave network element queries the locally preset slave network element delay error table according to the stamping scheme identifier of the master network element to obtain the corresponding delay error sum. The slave network element delay error table is constructed based on the stamping scheme of the slave network element and stores the corresponding delay error sum with the stamping scheme identifier of the master network element as the index. If the delay error sum table of the slave network element contains a delay error sum corresponding to the stamping scheme identifier of the master network element, then the slave network element reads the delay error sum. If it does not exist, the slave network element requests the master network element to obtain the sum of delay errors corresponding to the master network element's stamping scheme identifier and its own stamping scheme identifier.

3. The method for accurately calculating path delay as described in claim 2, characterized in that, If the slave network element has a delay error sum corresponding to the stamping scheme identifier of the master network element in the slave network element delay error sum table, after the slave network element reads the delay error sum value, the method further includes: When the slave network element is a newly joined network element and its stamping scheme is a new stamping scheme that does not exist in the network, the slave network element sends a notification message to the master network element so that the master network element updates its local preset master network element delay error table according to the notification message. The notification message includes the stamping scheme identifier of the slave network element, the stamping scheme identifier of the master network element, and the corresponding delay error.

4. The method for accurately calculating path delay as described in claim 2, characterized in that, The step of requesting the main network element to obtain the sum of delay errors corresponding to the main network element's stamping scheme identifier and its own stamping scheme identifier includes: The slave network element sends a request message to the master network element, wherein the request message includes the stamping scheme identifier of the slave network element; After receiving the request message, the master network element looks up the local preset master network element delay error table according to the stamping scheme identifier of the slave network element, obtains the corresponding delay error, and sends a response message back to the slave network element. The master network element delay error table is constructed based on the stamping scheme of the master network element and stores the corresponding delay error using the stamping scheme identifier of the slave network element as an index. The slave network element updates its locally configured slave network element delay error table according to the response message; The response message includes the stamping scheme identifier of the master network element, the stamping scheme identifier of the slave network element, and the corresponding delay error.

5. The method for accurately calculating path delay as described in claim 1, characterized in that, Before each network element connects to the network, the following is also included: Determine whether the stamping scheme of the network element to be added to the network is an existing stamping scheme in the network; If not, the network elements to be connected to the network are configured as master network elements and slave network elements respectively. Based on all existing stamping schemes in the network and optical fibers of known length, the corresponding time delay errors are calculated through calibration, and master network element time delay error tables and slave network element time delay error tables corresponding to the stamping schemes are constructed and preset locally in the network elements to be connected to the network. If so, the master network element delay error table and slave network element delay error table corresponding to the stamping scheme of the network element to be connected to the network are pre-set locally on the network element to be connected to the network.

6. The method for accurately calculating path delay as described in claim 5, characterized in that, Configure the network element to be connected to the network as the main network element, and construct a main network element delay error table corresponding to the stamping scheme, including: The network element to be added to the network is connected to each reference slave network element in the current network that uses a different stamping scheme through an optical fiber of known length, and a time synchronization relationship is established based on a time synchronization protocol. For each connection, the standard fiber path delay is calculated based on the fiber length and fiber refractive index, and the measured path delay between the network element to be connected to the network and the corresponding reference slave element is measured through a time synchronization protocol. Calculate the difference between the measurement path delay and the standard fiber optic path delay to obtain the corresponding delay error. Using the stamping scheme identifier of the reference slave element as an index and the corresponding time delay error as an element, a master element time delay error table corresponding to the stamping scheme of the network element to be connected to the network is generated.

7. The method for accurately calculating path delay as described in claim 5, characterized in that, Configure the network element to be connected to the network as a slave network element, and construct a slave network element delay error table corresponding to the stamping scheme, including: The network element to be added to the network is connected to each of the reference master network elements in the current network that use different known stamping schemes through optical fibers of known length, and a time synchronization relationship is established based on a time synchronization protocol. For each connection, the standard fiber path delay is calculated based on the fiber length and fiber refractive index, and the measured path delay between the network element to be connected to the network and the corresponding reference master network element is measured through a time synchronization protocol. Calculate the difference between the measurement path delay and the standard fiber optic path delay to obtain the corresponding delay error. Using the stamping scheme identifier of the reference master network element as an index and the corresponding delay error as an element, a table of slave network element delay errors corresponding to the stamping scheme of the network element to be connected to the network is generated.

8. The method for accurately calculating path delay as described in claim 1, characterized in that, The process of obtaining the true path delay by using the delay error and correcting the measured path delay obtained through the time synchronization protocol by the network element includes: The actual path delay is obtained by subtracting the delay error from the measured path delay.

9. A system for accurately calculating path delay, characterized in that, The system for accurately calculating path delay includes a master network element and a slave network element, wherein the slave network element is used for: After the master network element and slave network element at both ends of the path establish a time synchronization relationship, the stamping scheme identifier sent by the master network element is received; Based on the stamping scheme identifier of the main network element, query the preset delay error table to obtain the corresponding delay error sum, wherein the delay error sum is the sum of the internal delay of the main network element and the internal delay of the slave network element; The true path delay is obtained by using the aforementioned delay error and correcting the measured path delay obtained through the time synchronization protocol.

10. The system for accurately calculating path delay as described in claim 9, characterized in that, The network element is also used for: Based on the stamping scheme identifier of the master network element, query the locally preset slave network element delay error sum table to obtain the corresponding delay error sum. The slave network element delay error sum table is constructed based on the stamping scheme of the slave network element and stores the corresponding delay error sum with the stamping scheme identifier of the master network element as the index. If the delay error sum table contains a delay error sum corresponding to the stamping scheme identifier of the main network element, then read the delay error sum. If it does not exist, then request the main network element to obtain the sum of delay errors corresponding to the main network element's stamping scheme identifier and its own stamping scheme identifier.