Time synchronization method, system and device in passive optical network and storage medium

By allocating forwarding time slots in a passive optical network and introducing a time-determined transmission mechanism to calculate and transmit offsets, the problem of mismatch between the time synchronization mechanism and the forwarding mechanism in the industrial control network is solved, and the accuracy of time synchronization is improved.

CN119299032APending Publication Date: 2025-01-10CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411368006.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

In industrial control networks, the existing time synchronization mechanism does not match the forwarding mechanism of passive optical networks, resulting in insufficient time synchronization accuracy, affecting control accuracy and execution efficiency.

Method used

In a passive optical network, the forwarding time slot is allocated to the main clock terminal and the slave clock terminal through the optical line terminal. The master-to-slave service forwarding time slot is arranged before the slave-to-main forwarding time slot, and a deterministic time transmission mechanism of the slave clock terminal is introduced. , combining the bidirectional time slot difference and preset time length, calculate and transmit offsets to achieve time synchronization.

Benefits of technology

It effectively avoids the impact of different two-way waiting delays on time synchronization in PON network, improves the accuracy of time synchronization, solves the problem of mismatch between the time synchronization mechanism and the forwarding mechanism, and improves the time synchronization accuracy of industrial control networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119299032A_ABST
    Figure CN119299032A_ABST
Patent Text Reader

Abstract

The invention relates to a time synchronization method in a passive optical network, a passive optical network system, communication equipment and a computer readable storage medium. According to the method, aiming at the characteristic that two-way transmission in the PON network is asymmetric, a DBA mechanism of the PON network is combined, in the same period, master-to-slave service forwarding time slots are arranged before slave-to-master forwarding time slots, and a determined moment sending mechanism of a slave clock terminal is introduced, so that the influence of different two-way waiting time delays in the PON network on time synchronization can be avoided; and the master clock terminal determines the offset according to the information obtained in the interaction process with the slave clock terminal in combination with the bidirectional time slot difference and the preset duration, and provides the offset to the slave clock terminal, so that time synchronization between the master clock terminal and the slave clock terminal is realized, the time accuracy of each device in the PON network is improved, and the user experience is improved. The problem that a time synchronization mechanism in a current industrial control network is not matched with a PON network forwarding mechanism is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a time synchronization method in a passive optical network, a passive optical network system, a communication device, and a computer-readable storage medium. Background Art

[0002] In the control network of industrial automation, ensuring the time synchronization of all devices is crucial for real-time control applications. Currently, the 1588 protocol (master-slave synchronization system, referred to as PTP) is widely used to achieve time synchronization by measuring and compensating network delays through the nodes in the control network.

[0003] As the industrial manufacturing industry continues to upgrade, manufacturing equipment is evolving towards higher precision and higher execution efficiency, and the synchronization accuracy of industrial communications directly affects control accuracy and execution efficiency. For example, the CNC machine tool industry involves multi-axis synchronous linkage and fast refresh frequency, and the synchronization accuracy and jitter index of each axis directly affect the processing accuracy.

[0004] PON (Passive Optical Network) transmits data through optical fiber. Due to its high bandwidth, long-distance transmission capability and good anti-interference characteristics, it is very suitable for industrial environments that require high reliability and real-time performance. The industry is currently vigorously promoting PON-based industrial control networks.

[0005] At present, industrial equipment uses the PTP time synchronization mechanism based on industrial Ethernet. However, the PON network uses a time division multiplexing mechanism when carrying industrial control in the east-west direction, which introduces service waiting delay in both directions of transmission, and the waiting delay in both directions is different, resulting in asymmetric transmission in both directions. The time synchronization mechanism in the current industrial control network does not match the forwarding mechanism of the PON network. Therefore, it is urgent to provide a time synchronization method to achieve clock synchronization based on the PON network carrying services. Summary of the invention

[0006] Based on this, it is necessary to provide a time synchronization method in a passive optical network, a passive optical network system, a communication device and a computer-readable storage medium to address the above technical problems, which can ensure accurate clock synchronization of each device in the passive optical network.

[0007] In a first aspect, the present application provides a time synchronization method in a passive optical network, wherein the passive optical network comprises an optical line terminal, a master clock terminal and a slave clock terminal; the time synchronization method is applied to the master clock terminal; the method comprises:

[0008] Acquire a first forwarding time slot allocated by an optical line terminal; wherein the optical line terminal allocates the first forwarding time slot to the master clock terminal and allocates the second forwarding time slot to the slave clock terminal; within the same cycle, the first forwarding time slot allocated by the optical line terminal is earlier than the second forwarding time slot;

[0009] Based on the first forwarding time slot, a synchronization message is sent to the slave clock terminal; the synchronization message includes the service arrival time;

[0010] Receive a feedback message sent by a slave clock terminal and determine the receiving time of the feedback message; the feedback message includes the receiving time of the synchronization message and the sending time of the feedback message; the sending time of the feedback message is the sending time determined by the slave clock terminal according to the service arrival time and the preset duration; the preset duration is consistent with the cycle duration;

[0011] Querying a bidirectional time slot difference from an optical line terminal; the bidirectional time slot difference is a difference between a start time of a first forwarding time slot and a start time of a second forwarding time slot in the same cycle;

[0012] Determine the offset according to the service arrival time, the synchronization message reception time, the feedback message sending time, the feedback message reception time, the two-way time slot difference and the preset duration;

[0013] The offset is sent to the slave clock terminal to instruct the slave clock terminal to perform time synchronization based on the offset.

[0014] In one embodiment, the preset duration is inconsistent with the cycle duration, and the method further includes:

[0015] The offset is determined according to the service arrival time, the synchronization message reception time, the feedback message sending time, the feedback message reception time, the two-way time slot difference, the preset duration and the cycle duration.

[0016] In one embodiment, the offset is determined according to the service arrival time, the reception time of the synchronization message, the sending time of the feedback message, the reception time of the feedback message, the two-way time slot difference and the preset duration, including:

[0017] Determine the difference between the reception time of the synchronization message and the service arrival time to obtain the synchronization message transmission time;

[0018] Determine the difference between the time when the feedback message is received and the time when the feedback message is sent, and obtain the transmission time of the feedback message;

[0019] If the feedback message transmission duration is less than the synchronization message transmission duration, the offset is determined according to the difference between the synchronization message transmission duration and the feedback message transmission duration, the preset duration, and the bidirectional time slot difference.

[0020] In one embodiment, the method further comprises:

[0021] If the feedback message transmission duration is greater than the synchronization message transmission duration, the offset is determined according to the difference between the synchronization message transmission duration and the feedback message transmission duration and the bidirectional time slot difference.

[0022] In one embodiment, after receiving the feedback message sent by the slave clock terminal and determining the receiving time of the feedback message, the method further includes:

[0023] The reception time of the feedback message is sent to the slave clock terminal to instruct the slave clock terminal to determine the offset according to the service arrival time, the reception time of the synchronization message, the sending time of the feedback message, the reception time of the feedback message, the two-way time slot difference and the preset duration, and perform time synchronization based on the offset.

[0024] In a second aspect, the present application further provides a time synchronization method in a passive optical network, wherein the passive optical network comprises an optical line terminal, a master clock terminal and a slave clock terminal; the time synchronization method is applied to the slave clock terminal; the method comprises:

[0025] Acquire a second forwarding time slot allocated by the optical line terminal; wherein the optical line terminal allocates a first forwarding time slot to the master clock terminal and allocates a second forwarding time slot to the slave clock terminal; within the same cycle, the first forwarding time slot allocated by the optical line terminal is earlier than the second forwarding time slot;

[0026] Receive the synchronization message sent by the master clock terminal and determine the reception time of the synchronization message; the synchronization message includes the service arrival time;

[0027] Determine the sending time of the feedback message according to the service arrival time and the preset duration;

[0028] Based on the second forwarding time slot, a feedback message is sent to the master clock terminal; the feedback message includes the reception time of the synchronization message and the sending time of the feedback message;

[0029] The device receives the offset sent by the master clock terminal and performs time synchronization based on the offset.

[0030] In one of the embodiments, after sending a feedback message to the master clock terminal based on the second forwarding time slot, the method includes:

[0031] receiving the time at which the feedback message sent by the master clock terminal is received;

[0032] Determine the offset according to the service arrival time, the synchronization message reception time, the feedback message sending time, the feedback message reception time, the two-way time slot difference and the preset duration; the two-way time slot difference is the difference between the start time of the first forwarding time slot and the start time of the second forwarding time slot in the same cycle;

[0033] Time synchronization based on offset.

[0034] In a third aspect, the present application also provides a passive optical network system, which includes an optical line terminal, a master clock terminal and a slave clock terminal; the master clock terminal is used to execute the steps of the method described in the first aspect above; the slave clock terminal is used to execute the steps of the method described in the second aspect above.

[0035] In a fourth aspect, the present application further provides a communication device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method described in the first aspect or the second aspect are implemented.

[0036] In a fifth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the method described in the first aspect or the second aspect above are implemented.

[0037] The time synchronization method, passive optical network system, communication device and computer-readable storage medium in the above-mentioned passive optical network are designed for the asymmetric characteristics of bidirectional transmission in the PON network, combined with the dynamic bandwidth allocation (DBA) mechanism of the PON network, and set that in the same cycle, the master-to-slave service forwarding time slot is arranged before the slave-to-master forwarding time slot, and introduce a determined time sending mechanism of the slave clock terminal, that is, the slave clock terminal determines the sending time of the feedback message according to the service arrival time and the preset duration, which can avoid the influence of different bidirectional waiting delays in the PON network on time synchronization; the master clock terminal determines the offset according to the information obtained in the interaction process with the slave clock terminal, combined with the bidirectional time slot difference and the preset duration, and provides the offset to the slave clock terminal, so as to realize the time synchronization between the master clock terminal and the slave clock terminal, improve the time accuracy of each device in the PON network, and solve the problem that the time synchronization mechanism in the current industrial control network does not match the PON network forwarding mechanism. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0039] FIG1 is an interactive schematic diagram of an existing time synchronization method;

[0040] FIG2 is a schematic diagram of the interaction of optical network units in a passive optical network;

[0041] FIG3 is an application environment diagram of a time synchronization method in a passive optical network in one embodiment;

[0042] FIG4 is a schematic flow diagram of a time synchronization method in a passive optical network according to an embodiment;

[0043] FIG5 is a schematic diagram of a communication process between a master clock terminal and a slave clock terminal in one embodiment;

[0044] FIG6 is a schematic diagram of the layout of the service arrival time t1 and the feedback message sending time t3 in one embodiment;

[0045] FIG7 is a schematic diagram of the interaction between the master and slave clocks in an example;

[0046] FIG8 is a schematic flow chart of a time synchronization method in a passive optical network according to another embodiment;

[0047] FIG9 is a schematic diagram of a communication process between a master clock terminal and a slave clock terminal in another embodiment;

[0048] 10 is a schematic diagram of the communication process between the master clock terminal and the slave clock terminal in yet another embodiment;

[0049] FIG. 11 is a diagram showing the internal structure of a communication device in one embodiment. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0051] It is understandable that in the control network of industrial automation, the 1588 protocol (master-slave synchronization system, referred to as PTP) is currently widely used. The nodes in the control network are used to measure and compensate for network delays, thereby achieving time synchronization. Referring to Figure 1, Figure 1 is an interactive schematic diagram of the existing time synchronization method. t1 is the precise sending time of the synchronization message leaving the master clock, the slave clock records the precise arrival time t2 of the synchronization message arriving at the slave clock, the slave clock sends a feedback message and records the precise sending time t3, the master clock records the precise arrival time t4 of the feedback message arriving at the master clock, and the master clock sends the message carrying t4 to the slave clock. Among them, the 1588 protocol assumes that the round-trip time from one node to another is equal, that is, the two nodes form a symmetrical link, therefore, t2-t1=D+offset; t4-t3=D-offset; D represents the link forwarding delay, and offset represents the compensation deviation value of the delay. Further determination: D=[(t4-t3)-(t2-t1)] / 2; offset=t2-t1-D. In this way, the slave clock can calculate the offset (offset) and link delay (D) between it and the master clock, and adjust the slave clock to achieve time synchronization.

[0052] The PON network uses a time division multiplexing mechanism when carrying industrial control in the east-west direction. This introduces service waiting delays in both directions, and the waiting delays in both directions are different, resulting in asymmetric transmission in both directions. Referring to Figure 2, Figure 2 is a schematic diagram of the interaction of optical network units in a passive optical network; in the process of processing periodic services, the optical network unit (ONU) in the PON network needs to wait for the appropriate transmission time according to the forwarding time slot allocated by the PON link. The transmission of synchronization messages and feedback messages also needs to follow this mechanism. The transmission has a service waiting delay (D 等待1 and D 等待2 ). Therefore, t2-t1=D+D 等待1 +offset; t4-t3=D+D 等待2 -offset; due to D 等待1 and D 等待2 Different from the above, the calculation method of 1588 protocol will lead to time synchronization errors. It can be seen that the time synchronization mechanism in the current industrial control network does not match the PON network forwarding mechanism.

[0053] Based on this, the present application provides a time synchronization method in a passive optical network, which can solve the problem that the time synchronization mechanism in the current industrial control network does not match the PON network forwarding mechanism.

[0054] The time synchronization method in the passive optical network provided in the embodiment of the present application can be applied to the application environment shown in Figure 3. Among them, the passive optical network system includes an optical line terminal (OLT) 102 and an optical network unit (ONU) 104, and the optical line terminal 102 is connected to at least one optical network unit 104 for communication. It can be understood that the OLT can be connected to more or fewer ONUs. Figure 3 is only an example and does not constitute a limitation on the passive optical network system to which the present application scheme is applied. Among them, the optical line terminal 102 allocates forwarding time slots to each optical network unit 104 based on the DBA mechanism. The optical network units 104 are clock synchronized by the time synchronization method provided in the embodiment of the present application.

[0055] In an exemplary embodiment, as shown in FIG4 , a time synchronization method in a passive optical network is provided, wherein the passive optical network includes an optical line terminal, a master clock terminal and a slave clock terminal; the time synchronization method is applied to the master clock terminal; the method includes:

[0056] Step 402, obtaining a first forwarding time slot allocated by the optical line terminal; wherein the optical line terminal allocates the first forwarding time slot to the master clock terminal and allocates the second forwarding time slot to the slave clock terminal; within the same cycle, the first forwarding time slot allocated by the optical line terminal is earlier than the second forwarding time slot.

[0057] The master clock terminal and the slave clock terminal may be the optical network unit 104 shown in FIG3. In order to realize bandwidth resource allocation, the optical line terminal OLT allocates forwarding time slots to each optical network unit so that each optical network unit sends data at an appropriate sending time. In this embodiment, in the same cycle, the first forwarding time slot allocated by the optical line terminal to the master clock terminal is earlier than the second forwarding time slot allocated to the slave clock terminal, that is, the master-to-slave service forwarding time slot is arranged before the slave-to-master forwarding time slot.

[0058] Step 404: Send a synchronization message to the slave clock terminal based on the first forwarding time slot; the synchronization message includes the service arrival time.

[0059] The service arrival time is the sending time of the synchronization message recorded by the master clock terminal, which is recorded as t1. After encapsulating the synchronization message, the master clock terminal needs to wait for a certain time and send the synchronization message carrying t1 to the slave clock terminal at an appropriate sending time based on the first forwarding time slot.

[0060] Step 406, receive the feedback message sent by the slave clock terminal, and determine the receiving time of the feedback message; the feedback message includes the receiving time of the synchronization message and the sending time of the feedback message; the sending time of the feedback message is the sending time determined by the slave clock terminal according to the service arrival time and the preset duration; the preset duration is consistent with the cycle duration.

[0061] Among them, when the synchronization message arrives at the slave clock terminal, the slave clock terminal records the time of receiving the synchronization message, which is recorded as t2. The slave clock terminal generates a feedback message in response to the synchronization message, and the slave clock terminal records the time of sending the feedback message, which is recorded as t3. Similarly, after encapsulating the feedback message, the slave clock terminal needs to wait for a certain period of time, and send a feedback message carrying t2 and t3 to the master clock terminal at an appropriate sending time based on the second forwarding time slot. When the feedback message arrives at the master clock terminal, the master clock terminal records the time of receiving the feedback message, which is recorded as t4.

[0062] The preset duration is a parameter set in advance. In this embodiment, the preset duration is consistent with the cycle duration, which is the duration corresponding to the DBA scheduling cycle, for example, 125us. The slave clock terminal adopts a determined time sending mechanism, that is, the slave clock terminal sends a feedback message after the preset time of the service arrival time. Among them, for the slave clock terminal, t3-t1=T, T is the cycle duration; considering the offset offset between the master clock terminal and the slave clock terminal, the difference between t3 and t1 on the PON link is T-offset.

[0063] Step 408, query the bidirectional time slot difference from the optical line terminal; the bidirectional time slot difference is the difference between the start time of the first forwarding time slot and the start time of the second forwarding time slot in the same cycle.

[0064] Step 410, determining an offset according to the service arrival time, the synchronization message reception time, the feedback message sending time, the feedback message reception time, the two-way time slot difference and the preset duration.

[0065] Among them, by setting the master-to-slave service forwarding time slot before the slave-to-master forwarding time slot in the same cycle, and introducing the determined time sending mechanism of the slave clock terminal, the master clock terminal sends the synchronization message in the nth cycle and the slave clock terminal sends the feedback message in the n+1th cycle, the relationship between the two-way waiting delay can be determined. According to the characteristics of two-way transmission in the PON network: t2-t1=D+D 等待1 +offset; t4-t3=D+D 等待2 -offset; Combined with the relationship between the two-way waiting delays, substitute t1, t2, t3, t4, and the two-way time slot difference C determined in this interaction 差 And the preset time length T, solve the offset between the master clock terminal and the slave clock terminal.

[0066] Step 412: Send the offset to the slave clock terminal to instruct the slave clock terminal to perform time synchronization based on the offset.

[0067] 5, FIG5 is a schematic diagram of the communication process between the master clock terminal and the slave clock terminal in an embodiment, and the communication process includes: 1. The PON link queries the master clock, sends service information to the master clock terminal, and matches the corresponding forwarding time slot; 2. The PON link queries the slave clock, sends service information to the slave clock terminal, and matches the corresponding forwarding time slot; 3. The PON link uses the DBA configuration mechanism of the PON network, and within a cycle, the master-to-slave service forwarding time slot is arranged before the slave-to-master forwarding time slot; 4. The master clock terminal sends a synchronization message to the slave clock terminal, including t1 information; 5. The slave clock terminal sends a feedback message to the master clock terminal at t1+T, including t2 and t3 information; 6. The master clock terminal queries the PON link for the bidirectional time slot difference C 差 ; 7. The master clock terminal calculates the offset according to the time synchronization algorithm that matches the PON characteristics; 8. The master clock terminal sends the offset to the slave clock terminal; 9. The slave clock terminal updates the slave clock time according to the offset.

[0068] In the above-mentioned time synchronization method in the passive optical network, in view of the asymmetric characteristics of bidirectional transmission in the PON network, combined with the DBA mechanism of the PON network, it is set that in the same cycle, the master-to-slave service forwarding time slot is arranged before the slave-to-master forwarding time slot, and a determined time sending mechanism of the slave clock terminal is introduced, that is, the slave clock terminal determines the sending time of the feedback message according to the service arrival time and the preset duration, which can avoid the influence of different bidirectional waiting delays in the PON network on time synchronization; the master clock terminal determines the offset according to the information obtained during the interaction with the slave clock terminal, combined with the bidirectional time slot difference and the preset duration, and provides the offset to the slave clock terminal, so as to realize the time synchronization between the master clock terminal and the slave clock terminal, improve the time accuracy of each device in the PON network, and solve the problem that the time synchronization mechanism in the current industrial control network does not match the PON network forwarding mechanism.

[0069] In an exemplary embodiment, step 410 includes: determining the difference between the reception time of the synchronization message and the service arrival time to obtain the synchronization message transmission duration; determining the difference between the reception time of the feedback message and the sending time of the feedback message to obtain the feedback message transmission duration; if the feedback message transmission duration is less than the transmission duration of the synchronization message, determining the offset according to the difference between the synchronization message transmission duration and the feedback message transmission duration, the preset duration, and the two-way time slot difference.

[0070] Among them, for the nth cycle, if the service arrival time is before the first forwarding time slot, the master clock terminal can send a synchronization message in the first forwarding time slot of the nth cycle. In the n+1th cycle, since the first forwarding time slot is earlier than the second forwarding time slot, the slave clock terminal needs to wait for a long time before sending a feedback message. In this case, the waiting delay from the master to the slave is less than the waiting delay from the slave to the master, and the transmission duration of the synchronization message is less than the transmission duration of the feedback message. For the nth cycle, if the service arrival time is between the first forwarding time slot and the second forwarding time slot, the master clock terminal needs to wait for the first forwarding time slot of the n+1th cycle, send a synchronization message in the first forwarding time slot of the n+1th cycle, and the slave clock terminal sends a feedback message in the second forwarding time slot of the n+1th cycle. In this case, the waiting delay from the master to the slave is greater than the waiting delay from the slave to the master, and the transmission duration of the synchronization message is greater than the transmission duration of the feedback message.

[0071] In an optional implementation, when the transmission time of the feedback message is preset to be less than the transmission time of the synchronization message, the calculation formula of the offset is: offset=(t2-t1)-(t4-t3)-T+C 差 ; The synchronization message transmission time (t2-t1), feedback message transmission time (t4-t3), preset time T, and bidirectional time slot difference C determined by this interaction are 差 Substituting into this formula, the offset can be determined.

[0072] It can be understood that, referring to FIG. 6 , FIG. 6 is a schematic diagram of the layout of the service arrival time t1 and the feedback message sending time t3 in one embodiment; referring to FIG. 6 (1), the preset duration is consistent with the cycle duration, both of which are T, the interval between t3 and t1 is T-offset, and the difference between the start time of the first forwarding time slot and the start time of the second forwarding time slot is C 差 , the service arrival time is between the first forwarding time slot (i.e., master to slave time slot) and the second forwarding time slot (i.e., slave to master time slot) in the nth cycle, t4-t3<t2-t1; the relationship between the two-way waiting delay is analyzed as follows: D 等待2 -D 等待1 =C 差 -T+offset. According to the characteristics of bidirectional transmission in PON network: t2-t1=D+D 等待1 +offset; t4-t3=D+D 等待2 -offset; combined with D 等待2 -D 等待1 =C 差 -T+offset, then we can determine offset=(t2-t1)-(t4-t3)-T+C 差 Based on the same idea, the calculation of link transmission delay D can be realized, which will not be described here.

[0073] In an exemplary embodiment, the method further includes: if the feedback message transmission duration is greater than the synchronization message transmission duration, determining the offset according to the difference between the synchronization message transmission duration and the feedback message transmission duration, and the bidirectional time slot difference.

[0074] Among them, when the feedback message transmission time is preset to be longer than the synchronization message transmission time, the calculation formula of the offset is: offset=(t2-t1)-(t4-t3)+C 差 ; The synchronization message transmission time (t2-t1), feedback message transmission time (t4-t3), and bidirectional time slot difference C determined by this interaction are 差 Substituting into this formula, the offset can be determined.

[0075] Referring to Figure 6 (2), the service arrival time is before the first forwarding time slot (i.e., master-to-slave time slot) of the nth cycle, t4-t3>t2-t1; the relationship between the two-way waiting delays is analyzed as follows: D 等待2 -D 等待1 =C 差 +offset. According to the characteristics of bidirectional transmission in PON network: t2-t1=D+D 等待1 +offset; t4-t3=D+D 等待2 -offset; combined with D 等待2 -D 等待1 =C 差 + offset, then we can determine offset=(t2-t1)-(t4-t3)+C 差 Based on the same idea, the calculation of link transmission delay D can be realized, which will not be described here.

[0076] In an optional implementation, if the feedback message transmission duration is equal to the synchronization message transmission duration, then offset=C 差 , or offset=C 差 -T.

[0077] Exemplarily, referring to FIG7, the period T (i.e., the preset duration) is 125us, the service arrival time t1 recorded by the master clock is 5us, the reception time t2 of the synchronization message recorded by the slave clock is 38us, the slave clock sends a feedback message at t1+125=130us, records t3 as 130us, and the reception time t4 of the feedback message recorded by the master clock is 175us. Since t4-t3>t2-t1, it indicates that the service arrival time is before the master-to-slave time slot of the corresponding period, and the two-way time slot difference C is queried. 差 It is 15us, determined based on the above formula:

[0078] offset=(t2-t1)-(t4-t3)+C 差 =(38-5)-(175-130)+15=3us.

[0079] In an exemplary embodiment, the preset duration is inconsistent with the cycle duration, and the method further includes: determining the offset based on the service arrival time, the synchronization message reception time, the feedback message sending time, the feedback message reception time, the two-way time slot difference, the preset duration and the cycle duration.

[0080] Assume that the preset duration is T1 and the cycle duration is T2. It is understandable that the preset duration is slightly different from the cycle duration, which can ensure that the master clock terminal sends the synchronization message in the nth cycle and the slave clock terminal sends the feedback message in the n+1th cycle. When the feedback message transmission duration is preset to be less than the synchronization message transmission duration, the offset calculation formula is: offset=(t2-t1)-(t4-t3)-T1+C 差 ; The synchronization message transmission time (t2-t1), feedback message transmission time (t4-t3), preset time T1, and bidirectional time slot difference C determined by this interaction are 差 Substituting into this formula, the offset can be determined.

[0081] Referring to Figure 6(1), the service arrival time is between the first forwarding time slot (i.e., master to slave time slot) and the second forwarding time slot (i.e., slave to master time slot) in the nth cycle, t4-t3<t2-t1; the relationship between the two-way waiting delay is analyzed as follows: D 等待2 -D 等待1 =C 差 -T1+offset. According to the characteristics of bidirectional transmission in PON network: t2-t1=D+D 等待1 +offset; t4-t3=D+D 等待2 -offset; combined with D 等待2 -D 等待1 =C 差 -T1+offset, then we can determine offset=(t2-t1)-(t4-t3)-T1+C 差 Based on the same idea, the calculation of link transmission delay D can be realized, which will not be described here.

[0082] When the feedback message transmission time is set to be longer than the synchronization message transmission time, the offset calculation formula is: offset = (t2-t1)-(t4-t3)-T2+T1+C 差 ; The synchronization message transmission time (t2-t1), feedback message transmission time (t4-t3), and bidirectional time slot difference C determined by this interaction are 差, preset duration T1, and cycle duration T2 are substituted into the formula to determine the offset.

[0083] Referring to Figure 6 (2), the service arrival time is before the first forwarding time slot (i.e., master-to-slave time slot) of the nth cycle, t4-t3>t2-t1; the relationship between the two-way waiting delays is analyzed as follows: D 等待2 -D 等待1 =T2-T1+C 差 +offset. According to the characteristics of bidirectional transmission in PON network: t2-t1=D+D 等待1 +offset; t4-t3=D+D 等待2 -offset; combined with D 等待2 -D 等待1 =T2-T1+C 差 + offset, then we can determine offset=(t2-t1)-(t4-t3)-T2+T1+C 差 Based on the same idea, the calculation of link transmission delay D can be realized, which will not be described here.

[0084] In an optional implementation, if the feedback message transmission duration is equal to the synchronization message transmission duration, then offset=C 差 -T2+T, or offset=C 差 -T1.

[0085] In one embodiment, after step 406, the method further includes:

[0086] The reception time of the feedback message is sent to the slave clock terminal to instruct the slave clock terminal to determine the offset according to the service arrival time, the reception time of the synchronization message, the sending time of the feedback message, the reception time of the feedback message, the two-way time slot difference and the preset duration, and perform time synchronization based on the offset.

[0087] Among them, the slave clock terminal determines the offset based on the information obtained during the interaction, combined with the two-way time slot difference and the preset duration, to achieve time synchronization between the master clock terminal and the slave clock terminal. It can also improve the time accuracy of each device in the PON network and solve the problem of mismatch between the time synchronization mechanism in the current industrial control network and the PON network forwarding mechanism.

[0088] Optionally, after step 406, the method further includes: querying the bidirectional time slot difference from the optical line terminal; and sending the bidirectional time slot difference and the reception time of the feedback message to the slave clock terminal. It is understandable that the step of querying the bidirectional time slot difference can be performed by the master clock terminal or the slave clock terminal.

[0089] In an exemplary embodiment, as shown in FIG8 , a time synchronization method in a passive optical network is provided, wherein the passive optical network includes an optical line terminal, a master clock terminal and a slave clock terminal; the time synchronization method is applied to the slave clock terminal; the method includes:

[0090] Step 802, obtaining a second forwarding time slot allocated by the optical line terminal; wherein the optical line terminal allocates a first forwarding time slot to the master clock terminal and allocates a second forwarding time slot to the slave clock terminal; within the same cycle, the first forwarding time slot allocated by the optical line terminal is earlier than the second forwarding time slot.

[0091] Step 804, receiving a synchronization message sent by the master clock terminal, and determining the reception time of the synchronization message; the synchronization message includes the service arrival time.

[0092] Step 806: Determine the sending time of the feedback message according to the service arrival time and the preset duration.

[0093] Step 808: Send a feedback message to the master clock terminal based on the second forwarding time slot; the feedback message includes the reception time of the synchronization message and the sending time of the feedback message.

[0094] Step 810: Receive the offset sent by the master clock terminal, and perform time synchronization based on the offset.

[0095] The master clock terminal executes the aforementioned steps 402 to 412. The description of steps 802 to 810 can refer to the explanation of the aforementioned steps 402 to 412, which will not be repeated here. It can be understood that the preset duration of this embodiment can be consistent with the cycle duration or inconsistent with the cycle duration.

[0096] In this embodiment, in view of the asymmetric characteristics of bidirectional transmission in the PON network, combined with the DBA mechanism of the PON network, it is set that in the same cycle, the master-to-slave service forwarding time slot is arranged before the slave-to-master forwarding time slot, and a determined time sending mechanism of the slave clock terminal is introduced, that is, the slave clock terminal determines the sending time of the feedback message according to the service arrival time and the preset duration, which can avoid the influence of different bidirectional waiting delays on time synchronization in the PON network; the master clock terminal determines the offset according to the information obtained during the interaction with the slave clock terminal, combined with the bidirectional time slot difference and the preset duration, and provides the offset to the slave clock terminal, so as to realize the time synchronization between the master clock terminal and the slave clock terminal, improve the time accuracy of each device in the PON network, and solve the problem that the time synchronization mechanism in the current industrial control network does not match the PON network forwarding mechanism.

[0097] In an exemplary embodiment, after step 808, the method includes: receiving the reception time of the feedback message sent by the master clock terminal; determining the offset according to the service arrival time, the reception time of the synchronization message, the transmission time of the feedback message, the reception time of the feedback message, the two-way time slot difference and the preset time length; the two-way time slot difference is the difference between the start time of the first forwarding time slot and the start time of the second forwarding time slot in the same cycle; and performing time synchronization based on the offset.

[0098] Among them, in this application, the offset can be determined by the master clock terminal, or by the slave clock terminal based on the information obtained during the interaction, combined with the two-way time slot difference and the preset duration, to achieve time synchronization between the master clock terminal and the slave clock terminal. It can also improve the time accuracy of each device in the PON network and solve the problem of mismatch between the time synchronization mechanism in the current industrial control network and the PON network forwarding mechanism.

[0099] When the preset duration is consistent with the cycle duration, if t4-t3<t2-t1, the offset is determined according to the following formula: offset=(t2-t1)-(t4-t3)-T+C 差 .

[0100] When the preset duration is consistent with the cycle duration, if t4-t3>t2-t1, the offset is determined according to the following formula: offset=(t2-t1)-(t4-t3)+C 差 .

[0101] When the preset duration is inconsistent with the cycle duration, if t4-t3<t2-t1, the offset is determined according to the following formula: offset=(t2-t1)-(t4-t3)-T1+C 差 .

[0102] When the preset duration is inconsistent with the cycle duration, if t4-t3>t2-t1, the offset is determined according to the following formula: offset=(t2-t1)-(t4-t3)-T2+T1+C 差 .

[0103] Where t1 is the service arrival time, t2 is the synchronization message reception time, t3 is the feedback message sending time, t4 is the feedback message reception time, C 差 is the bidirectional time slot difference, and T is the preset time length. For specific description, refer to the above embodiment.

[0104] Referring to FIG9 , FIG9 shows a communication process between a master clock terminal and a slave clock terminal, the communication process comprising: 1. The PON link queries the master clock, sends service information to the master clock terminal, and matches the corresponding forwarding time slot; 2. The PON link queries the slave clock, sends service information to the slave clock terminal, and matches the corresponding forwarding time slot; 3. The PON link uses the DBA configuration mechanism of the PON network, and within a cycle, the master-to-slave service forwarding time slot is arranged before the slave-to-master forwarding time slot; 4. The master clock terminal sends a synchronization message to the slave clock terminal, including t1 information; 5. The slave clock terminal sends a feedback message to the master clock terminal at t1+T, including t2 and t3 information; 6. The master clock terminal queries the PON link for the bidirectional time slot difference C 差 ; 7. The master clock terminal sends the t4 information and the bidirectional time slot difference C 差 Sent to the slave clock terminal; 8. The slave clock terminal calculates the offset according to the time synchronization algorithm that matches the PON characteristics; 9. The slave clock terminal updates the slave clock time according to the offset.

[0105] Referring to FIG. 10 , FIG. 10 shows another communication process between a master clock terminal and a slave clock terminal, the communication process comprising: 1. The PON link queries the master clock, sends service information to the master clock terminal, and matches the corresponding forwarding time slot; 2. The PON link queries the slave clock, sends service information to the slave clock terminal, and matches the corresponding forwarding time slot; 3. The PON link uses the DBA configuration mechanism of the PON network, and within one cycle, the master-to-slave service forwarding time slot is arranged before the slave-to-master forwarding time slot; 4. The master clock terminal sends a synchronization message to the slave clock terminal, including t1 information; 5. The slave clock terminal sends a feedback message to the master clock terminal at t1+T, including t2 and t3 information; 6. The master clock terminal sends t4 information to the slave clock terminal; 7. The slave clock terminal queries the PON link for the bidirectional time slot difference C 差 ; 8. The slave clock terminal calculates the offset according to a time synchronization algorithm that matches the characteristics of the PON; 9. The slave clock terminal updates the time of the slave clock according to the offset.

[0106] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0107] In an exemplary embodiment, a communication device is provided, which may be a server, and its internal structure diagram may be shown in FIG11. The communication device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the communication device is used to provide computing and control capabilities. The memory of the communication device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the communication device is used to exchange information between the processor and an external device. The communication interface of the communication device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a time synchronization method in a passive optical network is implemented.

[0108] Those skilled in the art will understand that the structure shown in FIG. 11 is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the communication device to which the scheme of the present application is applied. The specific communication device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0109] In an exemplary embodiment, a passive optical network system is provided, which includes an optical line terminal, a master clock terminal and a slave clock terminal; the master clock terminal is used to execute the steps of the time synchronization method applied to the master clock terminal as described above; the slave clock terminal is used to execute the steps of the time synchronization method applied to the slave clock terminal as described above.

[0110] In an exemplary embodiment, a communication device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: obtaining a first forwarding time slot allocated by an optical line terminal; wherein the optical line terminal allocates the first forwarding time slot to the master clock terminal and allocates the second forwarding time slot to the slave clock terminal; within the same cycle, the first forwarding time slot allocated by the optical line terminal is earlier than the second forwarding time slot; based on the first forwarding time slot, a synchronization message is sent to the slave clock terminal; the synchronization message includes a service arrival time; receiving a feedback message sent by the slave clock terminal, and determining the reception time of the feedback message; the feedback message The method includes the receiving time of the synchronization message and the sending time of the feedback message; the sending time of the feedback message is the sending time determined by the slave clock terminal according to the service arrival time and the preset duration; the preset duration is consistent with the cycle duration; the two-way time slot difference is queried from the optical line terminal; the two-way time slot difference is the difference between the start time of the first forwarding time slot and the start time of the second forwarding time slot in the same cycle; the offset is determined according to the service arrival time, the receiving time of the synchronization message, the sending time of the feedback message, the receiving time of the feedback message, the two-way time slot difference and the preset duration; the offset is sent to the slave clock terminal to instruct the slave clock terminal to perform time synchronization based on the offset.

[0111] In one embodiment, when the processor executes the computer program, the following steps are also implemented: determining the offset according to the service arrival time, the synchronization message reception time, the feedback message sending time, the feedback message reception time, the two-way time slot difference, the preset duration and the cycle duration.

[0112] In one embodiment, when the processor executes the computer program, the following steps are also implemented: determining the difference between the reception time of the synchronization message and the service arrival time to obtain the synchronization message transmission duration; determining the difference between the reception time of the feedback message and the sending time of the feedback message to obtain the feedback message transmission duration; if the feedback message transmission duration is less than the transmission duration of the synchronization message, determining the offset according to the difference between the synchronization message transmission duration and the feedback message transmission duration, the preset duration, and the two-way time slot difference.

[0113] In one embodiment, the processor further implements the following steps when executing the computer program: if the feedback message transmission duration is greater than the synchronization message transmission duration, determining the offset based on the difference between the synchronization message transmission duration and the feedback message transmission duration, and the two-way time slot difference.

[0114] In one embodiment, when the processor executes the computer program, the following steps are also implemented: the reception time of the feedback message is sent to the slave clock terminal to instruct the slave clock terminal to determine the offset according to the service arrival time, the reception time of the synchronization message, the sending time of the feedback message, the reception time of the feedback message, the two-way time slot difference and the preset duration, and perform time synchronization based on the offset.

[0115] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining a second forwarding time slot allocated by the optical line terminal; wherein the optical line terminal allocates a first forwarding time slot to the master clock terminal and allocates a second forwarding time slot to the slave clock terminal; within the same cycle, the first forwarding time slot allocated by the optical line terminal is earlier than the second forwarding time slot; receiving a synchronization message sent by the master clock terminal, and determining the reception time of the synchronization message; the synchronization message includes the service arrival time; determining the sending time of the feedback message according to the service arrival time and the preset duration; based on the second forwarding time slot, sending a feedback message to the master clock terminal; the feedback message includes the reception time of the synchronization message and the sending time of the feedback message; receiving an offset sent by the master clock terminal, and performing time synchronization based on the offset.

[0116] In one embodiment, when the processor executes the computer program, the following steps are also implemented: receiving the reception time of the feedback message sent by the master clock terminal; determining the offset according to the service arrival time, the reception time of the synchronization message, the transmission time of the feedback message, the reception time of the feedback message, the two-way time slot difference and the preset time length; the two-way time slot difference is the difference between the start time of the first forwarding time slot and the start time of the second forwarding time slot in the same cycle; and performing time synchronization based on the offset.

[0117] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: obtaining a first forwarding time slot allocated by an optical line terminal; wherein the optical line terminal allocates the first forwarding time slot to the master clock terminal and allocates the second forwarding time slot to the slave clock terminal; within the same cycle, the first forwarding time slot allocated by the optical line terminal is earlier than the second forwarding time slot; based on the first forwarding time slot, a synchronization message is sent to the slave clock terminal; the synchronization message includes the service arrival time; receiving a feedback message sent by the slave clock terminal, and determining the reception time of the feedback message; the feedback message includes the synchronization message The receiving time of the message and the sending time of the feedback message; the sending time of the feedback message is the sending time determined by the slave clock terminal according to the service arrival time and the preset duration; the preset duration is consistent with the cycle duration; the two-way time slot difference is queried from the optical line terminal; the two-way time slot difference is the difference between the start time of the first forwarding time slot and the start time of the second forwarding time slot in the same cycle; the offset is determined according to the service arrival time, the receiving time of the synchronization message, the sending time of the feedback message, the receiving time of the feedback message, the two-way time slot difference and the preset duration; the offset is sent to the slave clock terminal to instruct the slave clock terminal to perform time synchronization based on the offset.

[0118] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determining the offset according to the service arrival time, the synchronization message reception time, the feedback message sending time, the feedback message reception time, the two-way time slot difference, the preset duration and the cycle duration.

[0119] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determining the difference between the reception time of the synchronization message and the service arrival time to obtain the synchronization message transmission duration; determining the difference between the reception time of the feedback message and the sending time of the feedback message to obtain the feedback message transmission duration; if the feedback message transmission duration is less than the transmission duration of the synchronization message, determining the offset according to the difference between the synchronization message transmission duration and the feedback message transmission duration, the preset duration, and the two-way time slot difference.

[0120] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: if the feedback message transmission duration is greater than the synchronization message transmission duration, the offset is determined based on the difference between the synchronization message transmission duration and the feedback message transmission duration, and the two-way time slot difference.

[0121] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: the reception time of the feedback message is sent to the slave clock terminal to instruct the slave clock terminal to determine the offset according to the service arrival time, the reception time of the synchronization message, the sending time of the feedback message, the reception time of the feedback message, the two-way time slot difference and the preset duration, and perform time synchronization based on the offset.

[0122] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining a second forwarding time slot allocated by the optical line terminal; wherein the optical line terminal allocates a first forwarding time slot to the master clock terminal and allocates a second forwarding time slot to the slave clock terminal; within the same cycle, the first forwarding time slot allocated by the optical line terminal is earlier than the second forwarding time slot; receiving a synchronization message sent by the master clock terminal, and determining the reception time of the synchronization message; the synchronization message includes the service arrival time; determining the sending time of the feedback message according to the service arrival time and the preset duration; sending a feedback message to the master clock terminal based on the second forwarding time slot; the feedback message includes the reception time of the synchronization message and the sending time of the feedback message; receiving an offset sent by the master clock terminal, and performing time synchronization based on the offset.

[0123] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: receiving the reception time of the feedback message sent by the master clock terminal; determining the offset according to the service arrival time, the reception time of the synchronization message, the transmission time of the feedback message, the reception time of the feedback message, the two-way time slot difference and the preset time length; the two-way time slot difference is the difference between the start time of the first forwarding time slot and the start time of the second forwarding time slot in the same cycle; and performing time synchronization based on the offset.

[0124] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0125] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0126] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0127] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A time synchronization method in a passive optical network, characterized in that: The passive optical network includes an optical line terminal, a master clock terminal and a slave clock terminal; the time synchronization method is applied to the master clock terminal; the method includes: Acquire a first forwarding time slot allocated by the optical line terminal; wherein the optical line terminal allocates the first forwarding time slot to the master clock terminal and allocates the second forwarding time slot to the slave clock terminal; within the same cycle, the first forwarding time slot allocated by the optical line terminal is earlier than the second forwarding time slot; Based on the first forwarding time slot, sending a synchronization message to the slave clock terminal; the synchronization message includes a service arrival time; Receive a feedback message sent by the slave clock terminal, and determine the receiving time of the feedback message; the feedback message includes the receiving time of the synchronization message and the sending time of the feedback message; the sending time of the feedback message is the sending time determined by the slave clock terminal according to the service arrival time and the preset duration; the preset duration is consistent with the cycle duration; Query a bidirectional time slot difference from the optical line terminal; the bidirectional time slot difference is the difference between the start time of the first forwarding time slot and the start time of the second forwarding time slot in the same cycle; Determine an offset according to the service arrival time, the reception time of the synchronization message, the sending time of the feedback message, the reception time of the feedback message, the two-way time slot difference and the preset duration; The offset is sent to the slave clock terminal to instruct the slave clock terminal to perform time synchronization based on the offset.

2. The method according to claim 1, characterized in that: The preset duration is inconsistent with the cycle duration, and the method further includes: An offset is determined according to the service arrival time, the reception time of the synchronization message, the sending time of the feedback message, the reception time of the feedback message, the two-way time slot difference, the preset duration and the cycle duration.

3. The method according to claim 1, characterized in that The determining of the offset according to the service arrival time, the reception time of the synchronization message, the sending time of the feedback message, the reception time of the feedback message, the bidirectional time slot difference and the preset duration includes: Determine the difference between the reception time of the synchronization message and the service arrival time to obtain the synchronization message transmission duration; Determine the difference between the time when the feedback message is received and the time when the feedback message is sent to obtain the transmission duration of the feedback message; If the feedback message transmission duration is shorter than the synchronization message transmission duration, the offset is determined according to the difference between the synchronization message transmission duration and the feedback message transmission duration, the preset duration, and the bidirectional time slot difference.

4. The method according to claim 3, characterized in that The method further comprises: If the feedback message transmission duration is greater than the synchronization message transmission duration, the offset is determined according to the difference between the synchronization message transmission duration and the feedback message transmission duration, and the bidirectional time slot difference.

5. The method according to claim 1, characterized in that After receiving the feedback message sent by the slave clock terminal and determining the reception time of the feedback message, the method further includes: The reception time of the feedback message is sent to the slave clock terminal to instruct the slave clock terminal to determine the offset according to the service arrival time, the reception time of the synchronization message, the sending time of the feedback message, the reception time of the feedback message, the two-way time slot difference and the preset duration, and perform time synchronization based on the offset.

6. A time synchronization method in a passive optical network, characterized in that: The passive optical network includes an optical line terminal, a master clock terminal and a slave clock terminal; the time synchronization method is applied to the slave clock terminal; the method includes: Acquire a second forwarding time slot allocated by the optical line terminal; wherein the optical line terminal allocates a first forwarding time slot to the master clock terminal and allocates a second forwarding time slot to the slave clock terminal; within the same cycle, the first forwarding time slot allocated by the optical line terminal is earlier than the second forwarding time slot; Receiving a synchronization message sent by the master clock terminal and determining a reception time of the synchronization message; the synchronization message includes a service arrival time; Determining a sending time of the feedback message according to the service arrival time and a preset duration; Based on the second forwarding time slot, sending a feedback message to the master clock terminal; the feedback message includes the reception time of the synchronization message and the sending time of the feedback message; An offset sent by the master clock terminal is received, and time synchronization is performed based on the offset.

7. The method according to claim 6, characterized in that After sending a feedback message to the master clock terminal based on the second forwarding time slot, the method includes: receiving a reception time of a feedback message sent by the master clock terminal; Determine the offset according to the service arrival time, the reception time of the synchronization message, the sending time of the feedback message, the reception time of the feedback message, the two-way time slot difference and the preset duration; the two-way time slot difference is the difference between the start time of the first forwarding time slot and the start time of the second forwarding time slot in the same cycle; Time synchronization is performed based on the offset.

8. A passive optical network system, characterized in that: The passive optical network system includes an optical line terminal, a master clock terminal and a slave clock terminal; the master clock terminal is used to execute the steps of the method described in any one of claims 1 to 5; the slave clock terminal is used to execute the steps of the method described in claim 6 or 7.

9. A communication device, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Time synchronization method in passive optical network system, and system, device and storage medium

    WO2026067779A1