Time synchronization method and device based on optical transmission network, and electronic equipment

By introducing an identification set mechanism in the optical transmission network, the problem that the IEEE 1588 protocol cannot realize time synchronization of multiple user-side devices is solved, and efficient time synchronization between local devices and multiple user-side devices is achieved.

CN119652454AActive Publication Date: 2025-03-18RUIJIE NETWORKS CO LTD

Patent Information

Application Number
CN202311196894.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-15
Publication Date
2025-03-18
Estimated Expiration
2043-09-15

AI Technical Summary

Technical Problem

The existing IEEE 1588 protocol can only realize the time synchronization between one local device and one user device, and cannot be applied to the scenario where one local device synchronizes multiple user devices.

Method used

By introducing an identification collection mechanism in the optical transmission network, the local device communicates optically with multiple user devices through the optical splitter. The user device adds a unique identifier when generating the delay request message. The local device determines the corresponding user device based on the identification and sends time synchronization information.

Benefits of technology

Time synchronization between one local device and multiple user devices is realized, which improves the efficiency of time synchronization and avoids the problem that the local device cannot confirm the source of delayed request packets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119652454A_ABST
    Figure CN119652454A_ABST
Patent Text Reader

Abstract

The invention relates to a time synchronization method and device based on an optical transmission network, and electronic equipment. The method comprises the following steps: when a first delay request message carrying a first identifier sent by first user side equipment is received, determining a first identifier set to which the first identifier belongs; determining a first client device corresponding to the first identifier set according to a corresponding relationship between the identifier set and the client devices; and sending the first delay request response message carrying the time synchronization information and the first identifier to the first user side equipment through the optical splitter. Based on the above method, it can be avoided that when a plurality of client devices send delay request messages to the same local device, the local device cannot send the recorded time when each delay request message is received to the corresponding client device, and time synchronization between one local device and the plurality of client devices connected with the local device is achieved.
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 method, device and electronic equipment for time synchronization based on an optical transmission network. Background Art

[0002] At present, the Ethernet system is based on the IEEE 1588PTP protocol (full name: Precision Clock Synchronization Protocol Standard for Network Measurement and Control Systems, IEEE 1588Precision Clock Synchronization Protocol), referred to as PTP (Precision Timing Protocol) protocol, to achieve time synchronization between central office equipment and user-end equipment.

[0003] The process of time synchronization between the central office device and the user-end device based on the IEEE 1588 protocol is as follows: the central office device sends a synchronization message to the user-end device, and after sending the synchronization message, sends a follow-up message carrying a timestamp t1 (the time when the central office device sends the synchronization message); the user-end device receives the synchronization message, records the timestamp t2 of receiving the synchronization message, and receives the follow-up message to obtain the timestamp t1; after obtaining the timestamp t1 and the timestamp t2, the user-end device sends a delay request message to the central office device, and records the timestamp t3 of sending the delay request message; when the central office device receives the delay request message, it records the timestamp t4 of receiving the delay request message, and then sends the delay request response message carrying the timestamp t4 to the user-end device. After receiving the delay request response message, the user-end device obtains the timestamp t4, and determines the time deviation and link delay by combining the timestamp t1, the timestamp t2, and the timestamp t3, and corrects the clock according to the time deviation and the link delay to achieve time synchronization with the central office device. However, the existing IEEE 1588 protocol is only applicable to the scenario where one central office device synchronizes one user terminal device, and is not applicable to the scenario where one central office device synchronizes multiple user terminal devices. Summary of the invention

[0004] The purpose of the present application is to provide a method, device and electronic device for time synchronization based on an optical transmission network, so as to achieve time synchronization between a central office device and multiple user-end devices connected thereto.

[0005] In a first aspect, the present application provides a method for time synchronization based on an optical transmission network, the method being applied to a first user terminal device, the first user terminal device optically communicating with a central office device via an optical splitter, the method comprising:

[0006] According to a preset selection rule, a first identifier is selected from a first identifier set and added to the generated delay request message, so as to obtain a first delay request message carrying the first identifier, wherein different identifier sets correspond to different user terminal devices, and identifiers in the same identifier set are used to distinguish delay request messages sent by the same user terminal device at different times;

[0007] Sending the first delay request message to the central office device via the optical splitter;

[0008] A first delay request response message carrying time synchronization information and the first identifier is received, wherein the time synchronization information is used to synchronize the time of the first user terminal device with the local terminal device.

[0009] Different user-end devices add identifiers from their own available identifier sets to their own generated delay request messages, so that when the central office device receives multiple delay request messages, it can confirm which user-end device the multiple delay request messages come from according to the identifiers in the delay request messages, and then send delay request response messages to the corresponding user-end devices respectively, so that multiple user-end devices can achieve time synchronization with the same central office device. In a possible embodiment, before selecting a first identifier from a first identifier set and adding it to the generated delay request message according to a preset selection rule, it also includes: in response to the synchronization time deviations determined for multiple consecutive times being within a set range, sending an identifier request message carrying a first address to the central office device, wherein the synchronization time deviation is the difference between the time when the first user-end device receives the synchronization message and the time when the central office device sends the synchronization message, and the first address is used to identify the first user-end device; when receiving an identifier request response message carrying the first identifier set, parsing the identifier request response message to obtain the first identifier set.

[0010] After the synchronization time deviation is stabilized within the set range, the identification request message is sent to the central office device, which can reduce the packet loss rate of the identification request message and the identification request response message. The identification request message is sent to the central office device so that the central office device can assign each user terminal device a respective identification set, so that the subsequent central office device can determine the identification set to which the identification belongs according to the identification in the delay request message, and then determine the corresponding user terminal device according to the identification set.

[0011] In a possible embodiment, the receiving of the first delay request response message carrying the time synchronization information and the first identifier includes: determining whether the first delay request response message carrying the time synchronization information and the first identifier is received; if so, parsing the first delay request response message to obtain the time synchronization information, and determining the link delay according to the time synchronization information; if not, resending the second delay request message carrying the second identifier to the local end device, wherein the second identifier belongs to the first identifier set.

[0012] In the current time synchronization scheme, when a delay request fails, the user-end device will stop sending delay request messages, wait for the central office device to start sending synchronization messages again, and reset the entire synchronization process. However, in the present application, when the delay request of the user-end device fails, that is, when the delay request response message is not received, there is no need to reset the entire synchronization process. The user-end device only needs to continue to resend the delay request message to the central office device. Compared with resetting the entire synchronization process, this processing method reduces the waste of time and resources and improves the efficiency of time synchronization between the user-end device and the central office device.

[0013] In a possible embodiment, after determining the link delay according to the time synchronization information, it also includes: judging whether the link delays determined for multiple consecutive times are all less than a preset threshold; if not, resending the delay request message carrying the identifier in the first identifier set to the local end device at a first frequency; if yes, resending the delay request message carrying the identifier in the first identifier set to the local end device at a second frequency, wherein the second frequency is lower than the first frequency.

[0014] When the user-end device is not online, the uplink bandwidth is low and the uplink traffic is unstable. At this time, the packet loss rate of the delay request message sent by the user-end device is high. The probability of the delay request message being successfully received is increased by increasing the sending frequency of the delay request message. When the link delay determined for multiple consecutive times is less than the preset threshold, it means that the user-end device is online, so the sending frequency of the delay request message can be reduced, thereby reducing the delay request messages and delay request response messages in the optical transmission network and preventing congestion in the optical transmission network.

[0015] In a possible embodiment, in response to the synchronization time deviations determined multiple times in succession being within a set range, before sending an identification request message carrying the first address to the local end device, it also includes: receiving the synchronization message and the follow-up message via the optical splitter; recording the reception time of the synchronization message, and obtaining the sending time of the synchronization message sent by the local end device from the follow-up message; and determining the synchronization time deviation based on the sending time and the receiving time.

[0016] The present application provides a method for time synchronization based on optical communication, the method being applied to a central office device, the central office device optically communicating with a plurality of user-end devices through an optical splitter, the method comprising:

[0017] When receiving a first delay request message carrying a first identifier sent by a first user terminal device, determining a first identifier set to which the first identifier belongs, wherein different identifier sets correspond to different user terminal devices, and identifiers in the same identifier set are used to distinguish delay request messages sent by the same user terminal device at different times;

[0018] Determining the first user terminal device corresponding to the first identification set according to the correspondence between the identification set and the user terminal device;

[0019] A first delay request response message carrying time synchronization information and the first identifier is sent to the first user terminal device via the optical splitter, wherein the first user terminal device is any one of a plurality of user terminal devices.

[0020] When the local device receives a delay request message, it determines the identifier set to which the identifier belongs based on the identifier in the delay request message, and then determines the corresponding user-end device based on the identifier set, and then sends the corresponding delay request response message to the corresponding user-end device, avoiding the situation where when multiple user-end devices are connected to the local device, it is impossible to confirm which user-end device the delay request message comes from, and thus the delay request response message cannot be accurately sent to the corresponding user-end device.

[0021] In a possible embodiment, before determining the first identification set to which the first identification belongs, it also includes: when receiving an identification request message sent by the first user-end device, parsing the identification request message to obtain a first address, wherein the first address is used to identify the first user-end device; determining the first user-end device according to the first address, and assigning the first identification set to the first user-end device; and sending an identification request response message carrying the first identification set to the first user-end device according to the first address.

[0022] An identification request message type is added to the original IEEE1588 protocol. The user end sends an identification request message to the central office device, and the central office device sends an identification request response message carrying an identification set to the user end device. Each user end device is assigned an exclusive identification set, which makes it easier for the subsequent central office device to determine the identification set to which the identification belongs based on the identification in the delay request message, and then determine the corresponding user end device based on the identification set.

[0023] In a possible embodiment, after sending the identification request response message carrying the first identification set to the first user terminal device, it also includes: determining whether the first address is resolved again in the identification request message received within a preset time period; if so, sending the identification request response message carrying the first identification set to the first user terminal device corresponding to the first address; if not, and a second address is resolved from the identification request message received within the preset time period, sending the identification request response message carrying the first identification set to the second user terminal device corresponding to the second address, wherein the second address is used to identify the second user terminal device, and the second user terminal device is a newly connected user terminal device.

[0024] When the first user terminal device goes offline, the allocation of the first identification set is suspended. When the first user terminal device is replaced by a newly connected user terminal device, the first identification set is directly allocated to the newly connected user terminal device for use, thereby avoiding waste of identification resources.

[0025] In a possible embodiment, when the identification request message sent by the first user terminal device is received, before parsing the identification request message to obtain the first address, it also includes: when the local terminal device sends the synchronization message and the follow-up message, obtaining the port number in the header information of the synchronization message and the port number in the header information of the follow-up message; sending the synchronization message and the follow-up message to the splitter corresponding to the port number.

[0026] When generating a PTP message, the central office device fills the ports that can use the IEEE1588 standard protocol in the header information of the PTP message, thereby controlling the generated PTP message to be sent to the optical splitters corresponding to these ports.

[0027] In a second aspect, the present application provides a device for time synchronization based on an optical transmission network, the device is a first user terminal device, or the device is applied to the first user terminal device, the first user terminal device optically communicates with the central office device through an optical splitter, and the device includes:

[0028] A message generating unit, according to a preset selection rule, selects a first identifier from a first identifier set and adds it to a generated delay request message, to obtain a first delay request message carrying the first identifier, wherein different identifier sets correspond to different user terminal devices, and identifiers in the same identifier set are used to distinguish delay request messages sent by the same user terminal device at different times;

[0029] A message sending unit, sending the first delay request message to the central office device via the optical splitter;

[0030] A message receiving unit receives a first delay request response message carrying time synchronization information and the first identifier, wherein the time synchronization information is used to synchronize the time of the first user terminal device with the local terminal device.

[0031] In a possible embodiment, the device is also used for: in response to the synchronization time deviations determined for multiple consecutive times being within a set range, sending an identification request message carrying a first address to the local end device, wherein the synchronization time deviation is the difference between the time when the first user end device receives the synchronization message and the time when the local end device sends the synchronization message, and the first address is used to identify the first user end device; when an identification request response message carrying the first identification set is received, parsing the identification request response message to obtain the first identification set.

[0032] In a possible embodiment, the message receiving unit is used to: determine whether the first delay request response message carrying the time synchronization information and the first identifier is received; if so, parse the first delay request response message to obtain the time synchronization information, and determine the link delay based on the time synchronization information; if not, resend the second delay request message carrying the second identifier to the local end device, wherein the second identifier belongs to the first identifier set.

[0033] In a possible embodiment, the device is also used to: determine whether multiple consecutive link delays are all less than a preset threshold; if not, resend the delay request message carrying the identifier in the first identifier set to the local end device at a first frequency; if yes, resend the delay request message carrying the identifier in the first identifier set to the local end device at a second frequency, wherein the second frequency is lower than the first frequency.

[0034] The present application also provides a device for time synchronization based on optical communication, the device is a central office device, or the device is applied to the central office device, the central office device optically communicates with multiple user-end devices through an optical splitter, and the device includes:

[0035] A first determining unit, when receiving a first delay request message carrying a first identifier sent by a first user terminal device, determines a first identifier set to which the first identifier belongs, wherein different identifier sets correspond to different user terminal devices, and identifiers in the same identifier set are used to distinguish delay request messages sent by the same user terminal device at different times;

[0036] a second determining unit, determining the first user terminal device corresponding to the first identification set according to a correspondence between the identification set and the user terminal device;

[0037] The message sending unit sends the first delay request response message carrying the time synchronization information and the first identifier to the first user terminal device via the optical splitter, wherein the first user terminal device is any one of the multiple user terminal devices.

[0038] In a possible embodiment, the device is also used to: when receiving an identification request message sent by the first user-end device, parse the identification request message to obtain a first address, wherein the first address is the physical address of the first user-end device; determine the first user-end device based on the first address, and assign the first identification set to the first user-end device; and send an identification request response message carrying the first identification set to the first user-end device based on the first address.

[0039] In a possible embodiment, the device is also used to: determine whether the first address is resolved again in the identification request message received within a preset time period; if so, send an identification request response message carrying the first identification set to the first user terminal device corresponding to the first address; if not, and a second address is resolved in the identification request message received within the preset time period, send an identification request response message carrying the first identification set to the second user terminal device corresponding to the second address, wherein the second address is used to identify the second user terminal device, and the second user terminal device is a newly connected user terminal device.

[0040] In a third aspect, the present application provides an electronic device, the electronic device comprising:

[0041] Memory, used to store computer programs;

[0042] The processor is used to implement the above-mentioned method steps of time synchronization based on optical communication when executing the computer program stored in the memory.

[0043] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements the above-mentioned method steps for time synchronization based on optical communication.

[0044] For each aspect from the second to the fourth aspect and the technical effects that may be achieved by each aspect, please refer to the above description of the technical effects that can be achieved by the first aspect or various possible schemes in the first aspect, and no further details will be given here. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 A schematic diagram of a possible EPON system provided for this application;

[0046] Figure 2 A schematic diagram of a time synchronization method based on an optical transmission network provided in the present application;

[0047] Figure 3 A schematic diagram of a process for allocating an identification set to a central office device provided in the present application;

[0048] Figure 4 A schematic diagram of a possible application scenario provided for this application;

[0049] Figure 5 A schematic diagram of a possible application scenario provided for this application;

[0050] Figure 6 A schematic diagram of a time synchronization method based on an optical transmission network provided in the present application;

[0051] Figure 7 A schematic diagram of a process for a user terminal device to request allocation of an identification set provided in the present application;

[0052] Figure 8 A timing diagram of OLT and ONU sending messages provided in this application;

[0053] Fig. 9 A schematic diagram of a time synchronization device based on an optical transmission network provided by the present application;

[0054] Fig.10 A schematic diagram of a time synchronization device based on an optical transmission network provided by the present application;

[0055] Fig.11 A schematic diagram of the structure of an electronic device provided in this application. DETAILED DESCRIPTION

[0056] In order to make the purpose, technical solution and advantages of the present application more clear, the present application will be further described in detail below in conjunction with the accompanying drawings. The specific operation method in the method embodiment can also be applied to the device embodiment or the system embodiment.

[0057] In the description of this application, "multiple" is understood to be "at least two". "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent three situations: A exists alone, A and B exist at the same time, and B exists alone. A is connected to B, which can represent two situations: A is directly connected to B and A is connected to B through C. In addition, in the description of this application, words such as "first" and "second" are only used for the purpose of distinguishing descriptions, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order.

[0058] At present, the IEEE 1588 protocol is mostly used in the market to achieve time synchronization between the central office device and the connected user-side device. The process of achieving time synchronization is as follows: the central office device uses the IEEE 1588 protocol to send a synchronization message to the user-side device, and after sending the synchronization message, sends a follow-up message carrying a timestamp t1 (the time when the central office device sends the synchronization message); the user-side device receives the synchronization message, records the timestamp t2 of receiving the synchronization message, and receives the follow-up message to obtain the timestamp t1; after obtaining the timestamp t1 and the timestamp t2, the user-side device sends a delay request message to the central office device, and records the timestamp t3 of sending the delay request message; when receiving the delay request message, the central office device records the timestamp t4 of receiving the delay request message, and then sends the delay request response message carrying the timestamp t4 to the user-side device. After receiving the delay request response message, the user-end device obtains the timestamp t4, and determines the time deviation and link delay in combination with the timestamp t1, timestamp t2, and timestamp t3, and corrects the clock according to the time deviation and link delay to achieve time synchronization with the central office device. In the above-mentioned process of achieving time synchronization between the user-end device and the central office device based on the IEEE 1588 protocol, when the delay request of the user-end device fails, that is, when the delay request response message sent by the central office device is not received, the entire synchronization process will be reset, and the central office device will restart sending synchronization messages to the user-end device. When a central office device communicates with multiple user-end devices, this processing method of resetting the entire synchronization process will seriously reduce the efficiency of time synchronization between the user-end device and the central office device, resulting in a waste of time.

[0059] In addition, the current IEEE 1588 protocol is only applicable to the scenario where one central office device synchronizes one user-end device, and cannot be applied to the scenario where one central office device synchronizes multiple user-end devices. This is because during the synchronization process, each user-end device will periodically send a delay request message to the central office device. Each delay request message sent by the same user-end device will carry an ID, and the ID will increase from 0. This will result in the existence of delay request messages with the same ID in the delay request messages received by the central office device, such as Figure 1 The central office device receives a delay request message with ID 1 sent by user-end device 1 at time t1, and receives a delay request message with ID 1 sent by user-end device 3 at time t2. Therefore, the central office device cannot determine which user-end device sent the delay request messages with the same ID, and thus cannot correctly send a delay request response message carrying timestamp t4 to the corresponding user-end device, which in turn causes the user-end device to be unable to achieve time synchronization with the central office device.

[0060] In view of this, the embodiment of the present application provides a method for time synchronization based on an optical transmission network to solve the above problems, realize time synchronization between a central office device and multiple user end devices, and improve the efficiency of time synchronization. The present application is further described in detail below in conjunction with the accompanying drawings.

[0061] See also Figure 2 As shown, it is a flow chart of a method for time synchronization based on optical communication provided by an embodiment of the present application. The method is applied to a central office device, and the central office device optically communicates with multiple user-end devices through an optical splitter. The specific implementation process of the method is as follows:

[0062] S201, when receiving a first delay request message carrying a first identifier sent by a first user terminal device, determining a first identifier set to which the first identifier belongs;

[0063] S202, determining a first user terminal device corresponding to a first identification set according to a correspondence between the identification set and the user terminal device;

[0064] S203: Send a first delay request response message carrying the time synchronization information and the first identifier to the first user terminal device via the optical splitter.

[0065] In the embodiment of the present application, the above method can be applied to Figure 1 In the network topology shown, the first delay request message is uploaded by the first user terminal device, and the first user terminal device is any one of n user terminal devices, where n is an integer greater than 1. Before the first user terminal device uploads the first delay request message, the central office device needs to allocate a first identification set to the first user terminal device. The first identification set includes multiple identifications, which are used to be added to the delay request message sent by the first user terminal device to distinguish the delay request messages sent by the first user terminal device at different times. Different identification sets are allocated to different user terminal devices, and the identifications in the same identification set are used to distinguish the delay request messages sent by the same user terminal device at different times. The following specifically describes the process of the central office device allocating the first identification set to the first user terminal device.

[0066] See also Figure 3 As shown, Figure 3 This is a schematic diagram of a process of the central office device allocating a first identification set to the first user terminal device. The specific process is as follows:

[0067] S301, sending a synchronization message to n user terminal devices, and recording the first moment of sending the synchronization message;

[0068] Specifically, during the time synchronization process between the central office device and the n user-end devices connected to it, the central office device will first broadcast a Sync message (synchronization message) and record the first moment of sending the Sync message. The Sync message is a PTP message, and the Sync message can be sent irregularly or periodically.

[0069] It should be noted that there is a portIdentity in the IEEE1588 standard protocol header information, which is used to indicate the port (interface) number under different network cards, indicating that the port uses the IEEE1588 standard protocol, that is, PTP messages can be sent through this port.

[0070] portIdentity can only be used in scenarios where there is only one port on a network card, for example, port1 corresponds to OLT1 and port2 corresponds to OLT2 (OLT is an optical line terminal, a type of local equipment). When there are multiple ports on the local equipment network card that use the IEEE1588 standard protocol, for example Figure 4 As shown in the figure, there are three ports that can use the IEEE1588 standard protocol under the network card of an OLT: port3, port4, and port5. When sending a PTP message, it is impossible to determine which port is used to send it.

[0071] Therefore, in the embodiment of the present application, when a network card of a local end device has multiple ports that can use the IEEE1588 standard protocol, these port serial numbers are filled in the reserved field of the PTP message standard header information, and when sending the PTP message, the PTP message can be controlled to be sent to the corresponding port after parsing the reserved field. For example, a network card of a local end device has ports that can use the IEEE1588 standard protocol: port3, port4, port5. When it is necessary to send a PTP message to port3, the port3 serial number is filled in the reserved field of the PTP message standard header information. When it is necessary to send a PTP message to port3 and port4, the port3 serial number and port4 serial number are filled in the reserved field of the PTP message standard header information.

[0072] S302: Sending a follow-up message carrying the first moment to n user terminal devices;

[0073] Specifically, after the central office device records the first moment of sending the synchronization message, it packages the first moment into a Follow_up message, and sends the Follow_up message to n user-end devices. The Follow_up message is a multicast PTP message. It should be understood that in an embodiment of the present invention, all user-end devices connected under the same splitter are a group.

[0074] When the first user terminal device receives the Sync message, it records the second moment of receiving the Sync message. When receiving the Follow_up message, it obtains the first moment from the Follow_up message, and then calculates the synchronization time deviation between the second moment and the first moment. Since the Sync message is sent periodically, the Follow_up message is also sent periodically, and a synchronization time deviation can be obtained each time the Sync message and the Follow_up message are sent. When the synchronization time deviations calculated for multiple consecutive times are all within the set range, such as the synchronization time deviations calculated for consecutive preset times, such as 3 times, are all within the sub-microsecond range, the first user terminal device starts to send an identification request message to the central office device to request the central office device to allocate an identification set for it. The identification request message carries a first address, and the first address is used to identify the first user terminal device. Any information that can uniquely identify the user terminal device can be used as the first address, such as the first address can be the MAC address (physical address) of the first user terminal device. Because the MAC address of each user terminal device is unique, the central office device can determine the user terminal device requesting the allocation of the identification set based on the MAC address in the identification request message.

[0075] S303: When receiving the identification request message, parse the identification request message to obtain the first address;

[0076] In an embodiment of the present application, when the terminal device receives an identification request message, it parses the identification request message to obtain a first address, where the first address is used to identify the first user terminal device, and the first address is the MAC address of the first user terminal device.

[0077] It is worth noting that the existing IEEE1588 standard protocol does not contain a message type for identification request. The method provided in the embodiment of the present application adds a message type for identification request in the IEEE1588 standard protocol for requesting and allocating identification. The message type for identification request includes: identification request message and identification request response message. The identification request message and the identification request response message can be a layer 2 MAC message.

[0078] S304: Determine a first user terminal device according to the first address, and assign a first identification set to the first user terminal device;

[0079] Specifically, the central office device determines the first user terminal device according to the first address, and allocates a first identification set to the first user terminal device. The process of allocating the identification set is:

[0080] The total number of identifiers in the identifier set of each user terminal device is calculated based on the set identifier total range and the maximum splitting ratio of the optical splitter connected to the central office device. Figure 5For example, if the total range of the set identifier is 0x00 to 0xffff, that is, 0 to 65535 characters, Figure 5 If there are 32 ports of the optical splitter connected to an OLT at the local end, the maximum splitting ratio is 1:32, and the total number of available identifiers for each ONU at the user end connected to the optical splitter is 65536÷32=2048 characters.

[0081] In addition, the order of assigning the identification set to each user terminal device may be based on the order in which identification request messages sent by different user terminal devices are received, such as Figure 5 , when receiving the identification request message sent by ONU1, a first identification set is allocated to ONU1, and the identification range of the first identification set is 0 to 2047 characters, for example, the first identification set is {0,1,2,3,...,2047}; when receiving the identification request message sent by ONU2, a second identification set {2048,2049,2050,...,4095} is allocated to ONU2, and the identification range of the second identification set is 2048 to 4095 characters. Subsequently, an identification set is allocated to each ONU in turn, which will not be repeated here.

[0082] S305: Sending an identification request response message carrying a first identification set to the first user terminal device according to the first address;

[0083] Specifically, after the local device assigns a first identification set to the first user-end device, the first identification set is packaged into an identification request response message, and based on the resolved first address, the identification request response message is sent to the first user-end device corresponding to the first address. Here, the method of sending the identification request response message can be unicast sending, and the embodiment of the present invention does not limit the method of sending the identification request response message.

[0084] When the first user terminal device receives an identification request response message carrying a first identification set, it parses the identification request response message to obtain the first identification set, selects a first identification from the first identification set, adds the first identification to the generated delay request message, obtains a first delay request message carrying the first identification, and then sends the first delay request message to the local terminal device.

[0085] In the embodiment of the present application, when the local device receives the first delay request message sent by the first user device, it starts to execute the operation of S201.

[0086] S201, when receiving a first delay request message carrying a first identifier sent by a first user terminal device, determining a first identifier set to which the first identifier belongs;

[0087] Specifically, after receiving the first delay request message, the local device parses the first delay request message to obtain the first identifier, and determines the first identifier set to which the first identifier belongs according to the first identifier.

[0088] S202, determining a first user terminal device corresponding to a first identification set according to a correspondence between the identification set and the user terminal device;

[0089] It is worth noting that different identification sets contain different identifications, and different identification sets are allocated to different user terminal devices. The identifications in the same identification set are used to distinguish delay request messages sent by the same user terminal device at different times.

[0090] Specifically, after determining the first identifier set to which the first identifier belongs, the first user terminal device corresponding to the first identifier set is determined according to the allocation relationship between each identifier set and each user terminal device, thereby determining that the first delay request message comes from the first user terminal device. For example, the allocation relationship between each identifier set and each user terminal device can be shown in the following Table 1.

[0091]

[0092] Table 1

[0093] S203: Send a first delay request response message carrying the time synchronization information and the first identifier to the first user terminal device via the optical splitter.

[0094] Specifically, the time synchronization information is the receiving time when the local terminal device receives the first delay request message. When the local terminal device receives the first delay request message, it will record the receiving time of the first delay request message as the time synchronization information. After determining that the first identifier set to which the first identifier belongs corresponds to the first user terminal device, the time synchronization information is packaged into the first delay request response message, and the first identifier is also added to the first delay request response message. Then, the first delay request response message carrying the time synchronization information and the first identifier is sent to the first user terminal device. The method of sending the first delay request response message can be unicast sending. The embodiment of the present invention does not limit the method of sending the delay request response message.

[0095] In the above method, the central office device assigns a different and non-overlapping set of identifiers to each user-end device, so that the central office device determines the identifier set to which the identifier belongs based on the identifier in the received delay request message, and then determines the corresponding user-end device based on the identifier set, and sends a delay request response message carrying time synchronization information and the same identifier to the corresponding user-end device, avoiding the situation where it is impossible to determine which user-end device sent the received delay request message, and thus it is impossible to accurately send the delay request response message carrying the time synchronization information to the corresponding user-end device.

[0096] In addition, the local end device also adds the identifier in the received delay request message to the delay request response message carrying the time synchronization information sent, so that the corresponding user end device can obtain the sending time when the delay request message carrying the identifier is sent according to the identifier, that is, the third moment. The third moment corresponds to the time synchronization information, and then time synchronization is performed according to the third moment and the time synchronization information, thereby improving the accuracy of time synchronization.

[0097] Furthermore, due to the situation that the user terminal device is offline or replaced with a new one, after sending the identification request response message carrying the first identification set to the first user terminal device, the local terminal device also needs to determine whether the first address is resolved again in the identification request message received within the preset time period.

[0098] In a possible implementation, if the identification request message received by the local terminal device within a preset time period resolves the first address again, it indicates that the first user terminal device is not offline, because the first user terminal device will periodically send identification request messages (heartbeat packet function) to the local terminal device, and the local terminal device will receive the identification request message again within the preset time period, then the local terminal device sends an identification request response message carrying the first identification set to the first user terminal device corresponding to the first address.

[0099] In a possible implementation, if the local terminal device resolves the first address again in the identification request message received within a preset time period, indicating that the first user terminal device is not offline, then an identification request response message without the first identification set is sent to the first user terminal device corresponding to the first address.

[0100] In a possible implementation, if the identification request message received by the local terminal device within a preset time period does not resolve to the first address, but resolves to the second address, and the second address is the physical address of the newly connected user terminal device, indicating that the first user terminal device is replaced by the newly connected second user terminal device, the local terminal device will send an identification request response message carrying the first identification set to the newly connected user terminal device corresponding to the second address, that is, the local terminal device will reallocate the first identification set to the newly connected user terminal device.

[0101] In a possible implementation, if the local terminal device fails to resolve the first address in the identification request message received within a preset time period, and fails to resolve the second address of the newly connected user terminal device, indicating that the first user terminal device has gone offline and no new user terminal device is currently connected, the local terminal device will not temporarily allocate the first identification set to the user terminal device for use.

[0102] In an embodiment of the present application, when the first user terminal device goes offline, the allocation of the first identification set is suspended. When the first user terminal device is replaced by a newly connected user terminal device, the first identification set is directly allocated to the newly connected user terminal device for use, thereby avoiding waste of identification resources.

[0103] See also Figure 6 As shown, it is a flow chart of a method based on optical transmission provided in an embodiment of the present application. The method is applied to a first user terminal device. The first user terminal device optically communicates with the central office device through an optical splitter. The first user terminal device is any one of n user terminal devices. The specific implementation process of the method is as follows:

[0104] S601, according to a preset selection rule, select a first identifier from a first identifier set and add it to a generated delay request message to obtain a first delay request message carrying the first identifier;

[0105] S602, sending a first delay request message carrying a first identifier to a central office device via an optical splitter;

[0106] S603: Receive a first delay request response message carrying time synchronization information and a first tag.

[0107] In an embodiment of the present application, the first identification set is an identification set assigned by the central office device to the first user terminal device. Different identification sets are assigned to different user terminal devices, and the identifications in different identification sets are different. The identifications in the same identification set are used to distinguish delay request messages sent by the same user terminal device at different times. The user terminal device sends a marked delay request message to the central office device, so that the central office device determines the identification set described by the identification through the identification, and determines the user terminal device that sent the delay request message through the identification set. The following specifically describes the process of the first user terminal device requesting the central office device to allocate the first identification set.

[0108] See also Figure 7 As shown, it is a schematic diagram of a process of a first user terminal device requesting a central office device to allocate a first identification set. The specific process is as follows:

[0109] S701, when a synchronization message is received, recording a second time of receiving the synchronization message;

[0110] Specifically, in the process of synchronizing the first user-end device with the central office device, the central office device will periodically broadcast synchronization messages to each user-end device. When the first user-end device receives the Sync message, it records the second moment of receiving the Sync message and the ID value of the Sync message. The ID value of the Sync message is used to indicate the number of times the Sync message is sent. It is worth noting that the second moment when each user-end device receives the Sync message is random. For example, the following Table 2 shows the second moment when n user-end devices receive the Sync message broadcast by the central office device.

[0111]

[0112] Table 2

[0113] S702, when a follow-up message is received, parsing the follow-up message to obtain a first time;

[0114] In the embodiment of the present application, after sending the Sync message, the central office device sends a Follow_up message carrying the first time to each user terminal device. When each user terminal device receives the Follow_up message, it parses the Follow_up message to obtain the first time when the central office device sends the Sync message.

[0115] S703, in response to the synchronization time deviations determined for multiple consecutive times being within the set range, sending an identification request message carrying the first address to the local end device;

[0116] Specifically, the synchronization time deviation is the difference between the second moment when the first user terminal device receives the synchronization message and the first moment when the central office device sends the synchronization message. After the first user terminal device obtains the first moment and the second moment, the synchronization time deviation is calculated. Since the central office device periodically sends synchronization messages and follow-up messages carrying the first moment, a synchronization time deviation can be calculated each time the first user terminal device receives a synchronization message and a follow-up message. Whether to start sending an identification request message to the central office device is determined by judging whether the synchronization time deviations calculated for multiple consecutive times are all within the set range.

[0117] When the synchronization time deviation calculated for multiple consecutive times is within the set range, for example, the synchronization time deviation calculated for three consecutive times is within the sub-microsecond level, indicating that the synchronization time deviation is stable at the sub-microsecond level, an identification request message carrying the first address is sent to the local end device. Specifically, the first address is packaged into an ID_Req message (identification request message), and the ID_Req message is sent to the local end device. The first address is used to identify the first user end device, and the first address is the MAC address of the first user end device. The identification request message can be sent irregularly or periodically.

[0118] When the synchronization time deviations calculated for multiple consecutive times are not all within the set range, for example, among the synchronization time deviations calculated for three consecutive times, only one synchronization time deviation is at the sub-microsecond level, the first user-end device calls the PHC clock through PHCAPIs (Physical Hardware Clock Application Programming Interface) to adjust the second time of receiving the Sync message, until the synchronization time deviations calculated for three consecutive times are all at the sub-microsecond level, that is, the synchronization time deviation is less than 1 microsecond, indicating that the synchronization time deviation is stable at the sub-microsecond level, and then starts to send an identification request message carrying the first address to the local-end device.

[0119] After the synchronization time deviation is stabilized within the set range, the identification request message is sent to the central office device, which can reduce the packet loss rate of the identification request message and the identification request response message.

[0120] S704, when receiving an identification request response message carrying a first identification set, parsing the identification request response message to obtain the first identification set;

[0121] Specifically, after receiving the identification request message carrying the first address, the local terminal device will determine the first user terminal device based on the first address, allocate the first identification set to the first user terminal device for use, and send an ID_Resp message (identification request response message) carrying the first identification set to the first user terminal device.

[0122] When the first user terminal device receives the ID_Resp message, it parses the ID_Resp message to obtain a first identifier set, and the identifiers in the first identifier set are added to the delay request message generated by the first user terminal device to distinguish the delay request messages sent by the first user terminal device at different times.

[0123] In the embodiment of the present application, after the first user terminal device determines the first identification set, it starts to execute the operation of S601.

[0124] S601, according to a preset selection rule, select a first identifier from a first identifier set and add it to a generated delay request message to obtain a first delay request message carrying the first identifier;

[0125] Specifically, the first user terminal device generates a delay request message, selects a first identifier from the first identifier set and adds it to the generated delay request message, so as to obtain a first delay request message carrying the first identifier, wherein the preset selection rule here can be a random selection, as long as the time interval for selecting the same identifier is greater than the preset time interval threshold; for example, the preset selection rule can be: perform round-robin selection on the identifiers in the same identifier set, and select one identifier from the same identifier set each time. Furthermore, according to the preset selection rule, the method of selecting the first identifier can be to select from small to large in the order of the size of the identifiers in the first identifier set, or to select from large to small, and the embodiment of the present invention does not limit this.

[0126] For example, assuming that the first identifier set is characters 1 to 20, the identifiers are selected in ascending order. When the first Delay_Req message (delay request message) is generated, the first Delay_Req message is marked with character 1, that is, the ID of the first Delay_Req message is 1; when the second Delay_Req message is generated, the ID of the second Delay_Req message is 2, and so on, until all 21 identifiers are used up. When the Delay_Req message is generated again, the identifiers of the first identifier set are used cyclically.

[0127] S602, sending a first delay request message carrying a first identifier to a central office device via an optical splitter;

[0128] Specifically, the first user terminal device sends a first delay request message carrying a first identifier to the central office device, and records a third time when the first delay request message is sent.

[0129] It should be noted that the time at which n user-end devices send delay request messages to the optical line terminal is random, and the time at which any two user-end devices send delay request messages may be the same or different, and the delay request messages may be sent irregularly or at a preset frequency, for example, a delay request message may be sent every 2 seconds.

[0130] S603, receiving a first delay request response message carrying time synchronization information and a first identifier;

[0131] In the embodiment of the present application, the central office device determines the identifier set to which the identifier belongs according to the identifier in the Delay_Req message (delay request message), and then determines the user terminal device corresponding to the identifier set according to the correspondence between the identifier set and the user terminal device. Then, a Delay_Resq message (delay request response message) carrying time synchronization information and a first identifier is sent to the corresponding user terminal device. The time synchronization information is the receiving time when the central office device receives the Delay_Resq message sent by the corresponding user terminal device. The receiving time is recorded as the fourth time. The fourth time is used to describe the receiving time of the Delay_Resq message.

[0132] Specifically, the first user terminal device determines whether it has received a first delay request response message carrying time synchronization information and a first identifier. If the first delay request response message is received, the first delay request response message is parsed to obtain the time synchronization information and the first identifier, and the time synchronization information is the fourth moment. And according to the first identifier, the third moment when the first delay request message carrying the first identifier is sent is obtained, and then the link delay delay and the time deviation offset are calculated based on the obtained first moment, second moment, third moment and fourth moment. The specific calculation formula is: delay = ((t2-t1) + (t4-t3)) / 2, offset = ((t2-t1) - (t4-t3)) / 2.

[0133] If the first delay request response message is not received, a second delay request message carrying a second identifier is resent to the central office device, and the second identifier belongs to the first identifier set, that is, a new delay request message is regenerated and sent to the optical line terminal.

[0134] In the current time synchronization scheme, when a delay request fails, the user-end device will stop sending delay request messages, wait for the central office device to start sending synchronization messages again, and reset the entire synchronization process. However, in the present application, when the delay request of the user-end device fails, that is, when the delay request response message is not received, there is no need to reset the entire synchronization process. The user-end device only needs to continue to resend the delay request message to the central office device. Compared with resetting the entire synchronization process, this processing method reduces the waste of time and resources and improves the efficiency of time synchronization between the user-end device and the central office device.

[0135] Further, after determining the link delay according to the time synchronization information, it is determined whether the link delays determined for multiple times are all less than the preset threshold. Since the first user device continuously sends delay request messages to the central office device, the first user device can determine a link delay each time it receives a delay request response message carrying the time synchronization information sent by the central office device. It is determined whether the link delays determined for multiple times, for example, 3 times in a row, are all less than the preset threshold. For example, according to actual needs, the preset threshold can be 100 nanoseconds, or it can be set according to the link delay value specified in the IEEE1588 protocol. If not, it means that the link delay is still unstable, then the delay request message carrying the identifier in the first identifier set is continued to be resent to the central office device at the first frequency, and the first frequency can be the same as the frequency of the previous delay request message. If yes, it means that the link delay is stable, then the delay request message carrying the identifier in the first identifier set is resent to the central office device at the second frequency, and the second frequency is lower than the first frequency.

[0136] It is worth noting that when the user-end device is not online, the uplink bandwidth is low and the uplink traffic is unstable. At this time, the packet loss rate of the delay request message sent by the user-end device is high, so the calculated link delay is unstable. Therefore, the probability of successful reception of the delay request message can be increased by increasing the sending frequency of the delay request message. When the link delay determined for multiple consecutive times is less than the preset threshold, it means that the ONU device is online, so the sending frequency of the delay request message can be reduced, thereby reducing the delay request messages and delay request response messages in the optical transmission network and preventing congestion in the optical transmission network.

[0137] In summary, the above method is to increase the identification set application action of each user terminal device, request the central office device to allocate its own identification set, and use the identification in its own identification set to mark the delay request message generated by each. As a result, when the central office device receives different delay request messages, it can determine the identification set to which the mark belongs according to the mark in the delay request message, determine the corresponding user terminal device according to the identification set, and then send a delay request response message carrying the corresponding time synchronization information to the corresponding user terminal device, thereby avoiding the situation where the central office device cannot confirm the corresponding user terminal device.

[0138] In addition, the local end device also adds the identifier in the received delay request message to the delay request response message carrying the time synchronization information sent, so that the corresponding user end device can obtain the sending time when the delay request message carrying the identifier is sent according to the identifier, that is, the third moment. The third moment corresponds to the time synchronization information, and then time synchronization is performed according to the third moment and the time synchronization information, thereby improving the accuracy of time synchronization.

[0139] Combine the following Figure 8In the timing diagram, taking the Ethernet optical splitter network composed of the central office device as the OLT device, the user terminal device as the ONU device and the optical splitter as an example, a complete description is made of the time synchronization method based on the optical transmission network provided by the present application.

[0140] See also Figure 8 , it can be seen that there are n ONUs connected to one OLT.

[0141] In the embodiment of the present application, first, the OLT periodically sends a Sync message to each ONU and records the timestamp t1 when the Sync message is sent. The Sync message is a PTP multicast message.

[0142] When receiving a Sync message, the ONU will record the ID of the Sync message and the timestamp t2 of receiving the Sync message, such as Figure 8 As shown in the figure, the timestamp of the first ONU receiving the Sync message is t21, and the timestamp of the nth ONU receiving the Sync message is t2 n , and so on.

[0143] After sending the Sync message, the OLT will immediately send a Follow_up message to each ONU. The Follow_up message carries the timestamp t1 when the Sync message is sent. The Follow_up message is also a PTP multicast message.

[0144] The ONU captures the Follow_up message, parses the Follow_up message, and obtains the timestamp t1 when the Sync message is sent. When the ONU obtains the timestamp t1 and the timestamp t2, it calculates the synchronization time deviation, which is the difference between the timestamp t2 and the timestamp t1. It determines whether the synchronization time deviations calculated for three consecutive times are all within the sub-microsecond level. If so, it means that the synchronization time deviation is stable at the sub-microsecond level, and then starts to send the ID_Req message to the OLT. If not, it means that the synchronization time deviation is not stable at the sub-microsecond level, then the ONU calls the PHC clock (Physical hardware clock) through the PHC APIs to adjust the timestamp t2 of the ONU receiving the Sync message, until the synchronization time deviations calculated for three consecutive times are all within the sub-microsecond level, that is, the synchronization time deviations calculated for three consecutive times are all less than 1 microsecond, indicating that the synchronization time deviation is stable at the sub-microsecond level.

[0145] When the synchronization time deviation is stable within sub-microseconds, the ONU starts to periodically send ID_Req messages to the OLT. The ID_Req messages carry the ONU's MAC address.

[0146] After receiving the ID_Req message, the OLT parses the ID_Req message to obtain the MAC address, and then determines the ONU corresponding to the MAC address, and assigns an identification set, that is, an available ID range, to the ONU. The number of identifiers in the identification set is calculated based on the total number of preset identifiers and the maximum splitting ratio of the splitter. For example, the total number of preset identifiers is 3200, and the maximum splitting ratio is 1:32, that is, 32 ONUs can be connected to one OLT through a splitter, then the number of identifiers in the identification set of each ONU is 3200 ÷ 32 = 100. The identification set can be assigned to the ONU in sequence according to the order in which the ID_Req messages are received. Then send an ID_Resp message carrying the identification set to the corresponding ONU. For example Figure 8 In the example, the OLT sends an ID_Resp_1 message carrying a first set of identifiers to the first ONU, and sends an ID_Resp_n message carrying an nth set of identifiers to the nth ONU.

[0147] After receiving the ID_Resp message, the ONU parses the ID_Resp message to obtain the assigned identifier set, and each time it sends a Delay_Req message to the OLT, it selects an identifier from the identifier set and adds it to the Delay_Req message. When the ONU sends a Delay_Req message carrying an identifier, it also records the timestamp t3 of sending the Delay_Req message, for example Figure 8 In the example, the timestamp of the first ONU sending the Delay_Req_1 message carrying the identifier 1 is t31.

[0148] When the OLT receives the Delay_Req message sent by each ONU, it will record the timestamp t4 when the Delay_Req message is received, parse the Delay_Req message to obtain the identifier carried in the Delay_Req message, determine the identifier set to which the identifier belongs, and then determine the ONU corresponding to the identifier set. Then, it sends a Delay_Resq message carrying the timestamp t4 when the Delay_Req message was received and the parsed identifier to the corresponding ONU. Figure 8 As shown in the figure, the timestamp of the Delay_Req_1 message received by the OLT from the first ONU is t41. After parsing the Delay_Req_1 message, the identifier is 1, so the Delay_Resq_1(t41) message carrying the timestamp t41 and the identifier 1 is sent to the first ONU; the timestamp of the Delay_Req_n message received by the OLT from the nth ONU is t4 n , the Delay_Req_n message is parsed and the identifier is n, so the message is sent with timestamp t4 n and Delay_Resq_n(t4 n) message to the nth ONU.

[0149] After receiving the Delay_Resq message, the ONU parses the Delay_Resq message to obtain the timestamp t4. Then, according to the identifier in the Delay_Resq message, the sending time of the Delay_Req message carrying the identifier is obtained, that is, the timestamp t3. According to the timestamp t1, timestamp t2, timestamp t3 and timestamp t4, the link delay delay and time offset offset are calculated.

[0150] In the embodiment of the present application, the OLT is used as the master clock and the ONU is used as the slave clock. The difference between the slave clock and the master clock is the time deviation offset, the transmission delay from the master clock to the slave clock is delay1, and the transmission delay from the slave clock to the master clock is delay2. Figure 4 . Timestamp t1 and timestamp t2 satisfy the equation: t1+offset+delay1=t2, timestamp t3 and timestamp t4 satisfy the equation: t3-offset+delay2=t4. In the embodiment of the present application, since the messages are transmitted using the same physical link and the transmission delay of the physical link is fixed, it can be considered that the two-way delay is the same, that is, delay=delay1=delay2, so it can be deduced that: delay=((t2-t1)+(t4-t3)) / 2, offset=((t2-t1)-(t4-t3)) / 2.

[0151] After calculating their own link delay and time offset, each ONU can achieve time synchronization with the OLT based on the link delay and time offset.

[0152] Based on the same inventive concept, the present application also provides a device for time synchronization based on an optical transmission network, the device is a first user terminal device, or the device is applied to a first user terminal device, the first user terminal device optically communicates with the central office device through an optical splitter, see Fig. 9 , the device comprises:

[0153] The message generating unit 901 selects a first identifier from a first identifier set according to a preset selection rule and adds it to a generated delay request message to obtain a first delay request message carrying the first identifier, wherein different identifier sets correspond to different user terminal devices, and identifiers in the same identifier set are used to distinguish delay request messages sent by the same user terminal device at different times;

[0154] A message sending unit 902 sends the first delay request message to the central office device via the optical splitter;

[0155] The message receiving unit 903 receives a first delay request response message carrying time synchronization information and the first identifier, wherein the time synchronization information is used to synchronize the time of the first user terminal device with the local terminal device.

[0156] In a possible embodiment, the device is also used to: when receiving an identification request message, parse the identification request message to obtain a first address, wherein the first address is the physical address of the first optical network unit; determine the first optical network unit according to the first address, and assign the first identification set to the first optical network unit; and send an identification request response message carrying the first identification set to the first optical network unit according to the first address.

[0157] In a possible embodiment, the device is also used for: in response to the synchronization time deviations determined for multiple consecutive times being within a set range, sending an identification request message carrying a first address to the local end device, wherein the synchronization time deviation is the difference between the time when the first user end device receives the synchronization message and the time when the local end device sends the synchronization message, and the first address is the physical address of the first user end device; when an identification request response message carrying the first identification set is received, parsing the identification request response message to obtain the first identification set.

[0158] In a possible embodiment, the message receiving unit 903 is used to: determine whether the first delay request response message carrying the time synchronization information and the first identifier is received; if so, parse the first delay request response message to obtain the time synchronization information, and calculate the link delay based on the time synchronization information; if not, resend the second delay request message carrying the second identifier to the local end device, wherein the second identifier belongs to the first identifier set.

[0159] In a possible embodiment, the device is also used to: determine whether the link delays determined for multiple consecutive times are all less than a preset threshold; if not, resend the delay request message carrying the identifier in the first identifier set to the local end device at a first frequency; if yes, resend the delay request message carrying the identifier in the first identifier set to the local end device at a second frequency, wherein the second frequency is lower than the first frequency.

[0160] The present application also provides a device for time synchronization based on optical communication, which is a central office device, or the device is applied to a central office device, and the central office device optically communicates with multiple user-end devices through an optical splitter, see Fig.10 , the device comprises:

[0161] The first determining unit 1001, when receiving a first delay request message carrying a first identifier sent by a first user terminal device, determines a first identifier set to which the first identifier belongs, wherein different identifier sets correspond to different user terminal devices, and identifiers in the same identifier set are used to distinguish delay request messages sent by the same user terminal device at different times;

[0162] A second determining unit 1002 determines the first user terminal device corresponding to the first identification set according to a correspondence between the identification set and the user terminal device;

[0163] The message sending unit 1003 sends the first delay request response message carrying the time synchronization information and the first identifier to the first user terminal device via the optical splitter, wherein the first user terminal device is any one of the multiple user terminal devices.

[0164] In a possible embodiment, the device is also used to: when receiving an identification request message sent by the first user-end device, parse the identification request message to obtain a first address, wherein the first address is the physical address of the first user-end device; determine the first user-end device based on the first address, and assign the first identification set to the first user-end device; and send an identification request response message carrying the first identification set to the first user-end device based on the first address.

[0165] In a possible embodiment, the device is also used to: determine whether the first address is resolved again in the identification request message received within a preset time period; if so, send an identification request response message carrying the first identification set to the first user terminal device corresponding to the first address; if not, and a second address is resolved in the identification request message received within the preset time period, send an identification request response message carrying the first identification set to the second user terminal device corresponding to the second address, wherein the second address is used to identify the second user terminal device, and the second user terminal device is a newly connected user terminal device.

[0166] Based on the same inventive concept, an electronic device is also provided in an embodiment of the present application, and the electronic device can realize the function of the aforementioned message sending device for time synchronization, referring to Fig.11 , the electronic device comprises:

[0167] At least one processor 1101, and a memory 1102 connected to the at least one processor 1101. The specific connection medium between the processor 1101 and the memory 1102 is not limited in the embodiment of the present application. Fig.11 In the example, the processor 1101 and the memory 1102 are connected via the bus 1100. The bus 1100 is Fig.11 The bus 1100 is represented by a bold line, and the connection between other components is only for schematic illustration and is not intended to be limiting. The bus 1100 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.11 Only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. Alternatively, the processor 1101 can also be called a controller, and there is no limitation on the name.

[0168] In the embodiment of the present application, the memory 1102 stores instructions that can be executed by at least one processor 1101. The at least one processor 1101 can execute the message sending method for time synchronization discussed above by executing the instructions stored in the memory 1102. The processor 1101 can implement Fig. 9 , Fig.10 The functions of the various units in the device shown.

[0169] Among them, the processor 1101 is the control center of the device, and can use various interfaces and lines to connect the various parts of the entire control device. By running or executing instructions stored in the memory 1102 and calling the data stored in the memory 1102, the various functions of the device and processing data, the device can be monitored as a whole.

[0170] In a possible embodiment, the processor 1101 may include one or more processing units, and the processor 1101 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 1101. In some embodiments, the processor 1101 and the memory 1102 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on separate chips.

[0171] Processor 1101 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the message sending method for time synchronization disclosed in the embodiments of the present application may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0172] Memory 1102, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules. Memory 1102 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (Random Access Memory, RAM), static random access memory (Static Random Access Memory, SRAM), programmable read-only memory (Programmable Read Only Memory, PROM), read-only memory (Read Only Memory, ROM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), magnetic memory, disk, optical disk, etc. Memory 1102 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 1102 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.

[0173] By designing and programming the processor 1101, the code corresponding to the message sending method for time synchronization introduced in the above embodiment can be fixed into the chip, so that the chip can execute the code when running. Figure 2 The steps of the message sending method for time synchronization in the illustrated embodiment. How to design and program the processor 1101 is a technology well known to those skilled in the art and will not be described in detail here.

[0174] Based on the same inventive concept, an embodiment of the present application further provides a storage medium, which stores computer instructions. When the computer instructions are executed on a computer, the computer executes the message sending method for time synchronization discussed above.

[0175] In some possible implementations, various aspects of the message sending method for time synchronization provided in the present application can also be implemented in the form of a program product, which includes a program code. When the program product is run on an apparatus, the program code is used to enable the control device to execute the steps of the message sending method for time synchronization according to various exemplary implementations of the present application described above in this specification.

[0176] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0177] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0178] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0179] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0180] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A method for time synchronization based on an optical transmission network, characterized in that: The method is applied to a first user terminal device, the first user terminal device optically communicates with a central office device via an optical splitter, and the method includes: According to a preset selection rule, a first identifier is selected from a first identifier set and added to the generated delay request message, so as to obtain a first delay request message carrying the first identifier, wherein different identifier sets correspond to different user terminal devices, and identifiers in the same identifier set are used to distinguish delay request messages sent by the same user terminal device at different times; Sending the first delay request message to the central office device via the optical splitter; A first delay request response message carrying time synchronization information and the first identifier is received, wherein the time synchronization information is used to synchronize the time of the first user terminal device with the local terminal device.

2. The method according to claim 1, characterized in that Before selecting the first identifier from the first identifier set according to the preset selection rule and adding it to the generated delay request message, the method further includes: In response to the synchronization time deviations determined for multiple consecutive times being within a set range, sending an identification request message carrying a first address to the central office device, wherein the synchronization time deviation is a difference between a time when the first user terminal device receives the synchronization message and a time when the central office device sends the synchronization message, and the first address is used to identify the first user terminal device; When an identification request response message carrying the first identification set is received, the identification request response message is parsed to obtain the first identification set.

3. The method according to claim 1, characterized in that The receiving a first delay request response message carrying time synchronization information and the first identifier includes: Determining whether the first delay request response message carrying the time synchronization information and the first identifier is received; If yes, parsing the first delay request response message to obtain the time synchronization information, and determining the link delay according to the time synchronization information; If not, resend a second delay request message carrying a second identifier to the local end device, wherein the second identifier belongs to the first identifier set.

4. The method according to claim 3, characterized in that After determining the link delay according to the time synchronization information, the method further includes: Determine whether the link delays determined for multiple consecutive times are all less than a preset threshold; If not, resending the delay request message carrying the identifier in the first identifier set to the central office device according to the first frequency; If so, resending the delay request message carrying the identifier in the first identifier set to the local end device at a second frequency, wherein the second frequency is lower than the first frequency.

5. A method for time synchronization based on optical communication, characterized in that: The method is applied to a central office device, the central office device optically communicates with a plurality of user-end devices via an optical splitter, and the method comprises: When receiving a first delay request message carrying a first identifier sent by a first user terminal device, determining a first identifier set to which the first identifier belongs, wherein different identifier sets correspond to different user terminal devices, and identifiers in the same identifier set are used to distinguish delay request messages sent by the same user terminal device at different times; Determining the first user terminal device corresponding to the first identification set according to the correspondence between the identification set and the user terminal device; A first delay request response message carrying time synchronization information and the first identifier is sent to the first user terminal device via the optical splitter, wherein the first user terminal device is any one of a plurality of user terminal devices.

6. The method according to claim 5, characterized in that Before determining the first identifier set to which the first identifier belongs, the method further includes: When receiving the identification request message sent by the first user terminal device, parsing the identification request message to obtain a first address, wherein the first address is used to identify the first user terminal device; Determine the first user terminal device according to the first address, and assign the first identification set to the first user terminal device; According to the first address, an identification request response message carrying the first identification set is sent to the first user terminal device.

7. A device for time synchronization based on an optical transmission network, characterized in that: The device is a first user terminal device, or the device is applied to the first user terminal device, the first user terminal device optically communicates with the central office device through an optical splitter, and the device includes: A message generating unit, according to a preset selection rule, selects a first identifier from a first identifier set and adds it to a generated delay request message, to obtain a first delay request message carrying the first identifier, wherein different identifier sets correspond to different user terminal devices, and identifiers in the same identifier set are used to distinguish delay request messages sent by the same user terminal device at different times; A message sending unit, sending the first delay request message to the central office device via the optical splitter; A message receiving unit receives a first delay request response message carrying time synchronization information and the first identifier, wherein the time synchronization information is used to synchronize the time of the first user terminal device with the local terminal device.

8. A time synchronization device based on optical communication, characterized in that: The device is a central office device, or the device is applied to the central office device, the central office device optically communicates with a plurality of user-end devices through an optical splitter, and the device comprises: A first determining unit, when receiving a first delay request message carrying a first identifier sent by a first user terminal device, determines a first identifier set to which the first identifier belongs, wherein different identifier sets correspond to different user terminal devices, and identifiers in the same identifier set are used to distinguish delay request messages sent by the same user terminal device at different times; a second determining unit, determining the first user terminal device corresponding to the first identification set according to a correspondence between the identification set and the user terminal device; The message sending unit sends the first delay request response message carrying the time synchronization information and the first identifier to the first user terminal device via the optical splitter, wherein the first user terminal device is any one of the multiple user terminal devices.

9. A time synchronization system based on optical communication, characterized in that: The system includes a central office device and a plurality of user terminal devices. A first user terminal device, configured to select a first identifier from a first identifier set according to a preset selection rule and add it to a generated delay request message, obtain a first delay request message carrying the first identifier, and send the first delay request message carrying the first identifier to a central office device; wherein the first user terminal device is any one of the multiple user terminal devices; The central office device is configured to, when receiving a first delay request message carrying a first identifier sent by a first user terminal device, determine a first identifier set to which the first identifier belongs; determine the first user terminal device corresponding to the first identifier set according to a correspondence between the identifier set and the user terminal device; and send a first delay request response message carrying time synchronization information and the first identifier to the first user terminal device; The first user terminal device is further used to receive a first delay request response message sent by the local terminal device and carrying time synchronization information and the first identifier.

10. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to implement the method steps of any one of claims 1 to 6 when executing the computer program stored in the memory.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Time synchronization method, equipment and system

    CN105323028A

  • Message processing method and system

    CN107612650A

  • Method for determining transmission delay of passive optical network

    CN114567827A

  • System for helper using rotation pattern of cradle

    KR102303268B1

Cited By

  • A residual current synchronous sampling method and device

    CN122506433A

  • Time synchronization method and apparatus based on optical transmission network, electronic device, and storage medium

    EP4586521A1