CN114520702A - Time synchronization method and related equipment - Google Patents

Time synchronization method and related equipment Download PDF

Info

Publication number
CN114520702A
CN114520702A CN202011293824.4A CN202011293824A CN114520702A CN 114520702 A CN114520702 A CN 114520702A CN 202011293824 A CN202011293824 A CN 202011293824A CN 114520702 A CN114520702 A CN 114520702A
Authority
CN
China
Prior art keywords
time
electronic device
signal
electronic equipment
reference signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011293824.4A
Other languages
Chinese (zh)
Inventor
于泽洋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Communications Ltd Research Institute
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Communications Ltd Research Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Communications Ltd Research Institute filed Critical China Mobile Communications Group Co Ltd
Priority to CN202011293824.4A priority Critical patent/CN114520702A/en
Publication of CN114520702A publication Critical patent/CN114520702A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • H04J3/0667Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Electric Clocks (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

The invention provides a time synchronization method and related equipment, and relates to the field of transmission systems, wherein the time synchronization method is applied to first electronic equipment and comprises the following steps: acquiring a time reference signal sent from second electronic equipment, wherein the time reference signal is obtained by analyzing a time signal of third electronic equipment by the second electronic equipment, the third electronic equipment comprises a master clock or the third electronic equipment is a first switch, and the second electronic equipment and the third electronic equipment support the same time synchronization protocol; time synchronization is performed based on the time reference signal. In the embodiment of the invention, the second electronic equipment analyzes the time signal of the third electronic equipment to obtain the time reference signal, and the first electronic equipment acquires the time reference signal through the second electronic equipment, so that the time synchronization requirement of the first electronic equipment can be met under the condition of not limiting the time synchronization protocol of the first electronic equipment, and the flexibility of equipment setting in a transmission system is improved.

Description

Time synchronization method and related equipment
Technical Field
The present invention relates to the field of transmission systems, and in particular, to a time synchronization method and related device.
Background
The time synchronization technology can provide the same time reference for each device in the system, and is an important support for data fusion, data management and data analysis. For example, in a scene of the internet of things, there are strong time relationship constraints between devices, and the scheduling management of the devices is not away from an accurate time synchronization technology. Meanwhile, the time synchronization among the devices also meets the requirements of various application scenes on reliability and safety.
In the prior art, a Precision Time Protocol (PTP) Protocol is defined in a high Precision Time Protocol standard. The protocol is regarded as a key technology in the field of transmission systems due to its high precision and the ability to satisfy both frequency synchronization and time synchronization.
Currently, devices supporting a PTP protocol are not popularized, the existing time synchronization technology further includes hardware time synchronization, software time synchronization, and the like, in an application scenario of a multi-device system such as the internet of things, time synchronization requirements among different devices often exist, and time synchronization among devices conforming to different time synchronization protocol standards is difficult to complete.
Disclosure of Invention
The embodiment of the invention provides a time synchronization method and related equipment, which are used for solving the problem that the time synchronization is difficult to complete among the existing equipment which follows different time synchronization protocol standards.
In order to solve the technical problem, the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a time synchronization method applied to a first electronic device, including:
acquiring a time reference signal sent from second electronic equipment, wherein the time reference signal is obtained by analyzing a time signal of third electronic equipment by the second electronic equipment, the third electronic equipment comprises a master clock or is a first switch, and the second electronic equipment and the third electronic equipment support the same time synchronization protocol;
and performing time synchronization based on the time reference signal.
Optionally, after performing time synchronization based on the time reference signal, the method further includes:
acquiring a difference signal sent from a monitoring device, wherein the difference signal is a difference between a first time signal of the first electronic device and a second time signal of the third electronic device;
correcting the first time signal based on the difference signal to obtain a first corrected time signal;
taking the first corrected time signal as a time signal of the first electronic device;
wherein the first time signal and the second time signal are synchronously acquired by the monitoring device;
alternatively, the first and second electrodes may be,
acquiring a second correction time signal sent from a monitoring device, wherein the second correction time signal is calculated by the monitoring device based on a difference between a first time signal of the first electronic device and a second time signal of the third electronic device;
taking the second correction time signal as a time signal of the first electronic device;
wherein the first time signal and the second time signal are acquired synchronously by the monitoring device.
Optionally, the time reference signal includes at least one of pulse per second 1PPS and time information ToD.
In a second aspect, an embodiment of the present invention provides a time synchronization method, applied to a second electronic device, including:
acquiring a time signal of third electronic equipment, wherein the third electronic equipment comprises a master clock or is a first switch, and the second electronic equipment and the third electronic equipment support the same time synchronization protocol;
analyzing the time signal to obtain a time reference signal;
and sending the time reference signal to the first electronic equipment.
Optionally, the second electronic device is connected to the third electronic device through a fixed network.
In a third aspect, an embodiment of the present invention provides a first electronic device, including:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a time reference signal sent from second electronic equipment, the time reference signal is obtained by analyzing a time signal of third electronic equipment by the second electronic equipment, the third electronic equipment comprises a master clock or is a first switch, and the second electronic equipment and the third electronic equipment support the same time synchronization protocol;
and the synchronization module is used for carrying out time synchronization based on the time reference signal.
Optionally, the first electronic device further includes:
a third obtaining module, configured to obtain a difference signal sent from a monitoring device, where the difference signal is a difference between a first time signal of the first electronic device and a second time signal of the third electronic device;
the correction module is used for correcting the first time signal based on the difference signal to obtain a first corrected time signal;
the first updating module is used for taking the first corrected time signal as a time signal of the first electronic device;
wherein the first time signal and the second time signal are synchronously acquired by the monitoring device;
alternatively, the first and second electrodes may be,
a fourth acquiring module, configured to acquire a second correction time signal sent from a monitoring device, where the second correction time signal is calculated by the monitoring device based on a difference between a first time signal of the first electronic device and a second time signal of the third electronic device;
the second updating module is used for taking the second correction time signal as a time signal of the first electronic device;
wherein the first time signal and the second time signal are acquired synchronously by the monitoring device.
Optionally, the time reference signal includes at least one of pulse per second 1PPS and time information ToD.
In a fourth aspect, embodiments of the present invention provide a first electronic device, including a transceiver and a processor,
the transceiver is configured to acquire a time reference signal sent from a second electronic device, where the time reference signal is obtained by analyzing a time signal of a third electronic device by the second electronic device, the third electronic device includes a master clock or is a first switch, and the second electronic device and the third electronic device support the same time synchronization protocol;
the processor is configured to perform time synchronization based on the time reference signal.
Optionally, the transceiver is further configured to obtain a difference signal sent from a monitoring device, where the difference signal is a difference between a first time signal of the first electronic device and a second time signal of the third electronic device;
the processor is further configured to correct the first time signal based on the difference signal to obtain a first corrected time signal;
taking the first corrected time signal as a time signal of the first electronic device;
wherein the first time signal and the second time signal are acquired synchronously by the monitoring device.
Optionally, the transceiver is further configured to acquire a second correction time signal sent from the monitoring device, where the second correction time signal is calculated by the monitoring device based on a difference between the first time signal of the first electronic device and the second time signal of the third electronic device;
the processor is further configured to use the second corrected time signal as a time signal of the first electronic device; wherein the first time signal and the second time signal are acquired synchronously by the monitoring device.
Optionally, the time reference signal includes at least one of pulse per second 1PPS and time information ToD.
In a fifth aspect, an embodiment of the present invention provides an electronic device, including: a processor, a memory and a program stored on the memory and executable on the processor, which program, when executed by the processor, performs the steps of the time synchronization method as described in the first aspect above.
In a sixth aspect, an embodiment of the present invention provides a second electronic device, including:
the second obtaining module is configured to obtain a time signal of a third electronic device, where the third electronic device includes a master clock or is a first switch, and the second electronic device and the third electronic device support a same time synchronization protocol;
the analysis module is used for analyzing the time signal to obtain a time reference signal;
and the sending module is used for sending the time reference signal to the first electronic equipment.
Optionally, the second electronic device is connected to the third electronic device through a fixed network.
Optionally, the time reference signal includes at least one of pulse per second 1PPS and time information ToD.
In a seventh aspect, an embodiment of the present invention provides a second electronic device, including a transceiver and a processor,
the transceiver is configured to acquire a time signal of a third electronic device, where the third electronic device includes a master clock or is a first switch, and the second electronic device and the third electronic device support a same time synchronization protocol;
the processor is used for analyzing the time signal to obtain a time reference signal;
the transceiver is further configured to transmit the time reference signal to the first electronic device.
Optionally, the second electronic device is connected to the third electronic device through a fixed network.
Optionally, the time reference signal includes at least one of pulse per second 1PPS and time information ToD.
In an eighth aspect, an embodiment of the present invention provides an electronic device, including: a processor, a memory and a program stored on the memory and executable on the processor, which program, when executed by the processor, performs the steps of the time synchronization method as described in the second aspect above.
In a ninth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the time synchronization method according to the first aspect or the second aspect.
According to the time synchronization method and the related equipment in the embodiment of the invention, the second electronic equipment analyzes and extracts the time signal of the main clock or the first switch to obtain the time reference signal, and the first electronic equipment obtains the time reference signal through the second electronic equipment, so that the time synchronization requirement of the first electronic equipment can be met under the condition that the time synchronization protocol of the first electronic equipment is not limited, and the flexibility of equipment setting in a transmission system is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is a flowchart of a time synchronization method according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating a method for time synchronization according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating a method for time synchronization according to an embodiment of the present invention;
FIG. 4 is a flow chart of another time synchronization method provided by the embodiment of the invention;
fig. 5 is a schematic structural diagram of a first electronic device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a second electronic device according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of another electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a time synchronization method, which is used for solving the problem that the time synchronization is difficult to complete among the existing devices which follow different time synchronization protocol standards.
Referring to fig. 1, fig. 1 is a flowchart of a time synchronization method provided by an embodiment of the present invention, for a first electronic device, as shown in fig. 1, the method includes the following steps:
step 101, obtaining a time reference signal sent from a second electronic device, where the time reference signal is obtained by analyzing a time signal of a third electronic device by the second electronic device, the third electronic device includes a master clock or the third electronic device is a first switch, and the second electronic device and the third electronic device support the same time synchronization protocol.
It is understood that the time reference signal is a reference signal for time synchronization between devices.
Existing transmission systems (e.g., internet of things systems) include one or more first electronic devices, such as a lidar, a camera, a switch, and so forth. The devices within the transmission system typically need to be time synchronized, while the time synchronization protocols supported by different first electronic devices may not be the same.
In the embodiment of the present invention, a time reference signal is obtained by analyzing a time signal of a third electronic device by a second electronic device, where the third electronic device includes a master clock or is a first switch, and the third electronic device may be understood as a time source of the first electronic device. The first electronic device and the third electronic device may support the same time synchronization protocol or may support different time synchronization protocols. The time reference signal is obtained by analyzing the time signal of the time source third electronic equipment through the second electronic equipment, and the first electronic equipment directly obtains the time reference information of the time source third electronic equipment through the second electronic equipment.
For example, the third electronic device is a master clock or a switch supporting a PTP protocol, the first electronic device is a device supporting a hardware time synchronization protocol or a software time synchronization protocol, the first electronic device and the third electronic device are in the same transmission system, the time signal of the third electronic device is analyzed by the second electronic device supporting the same time synchronization protocol as the third electronic device, and the time reference signal is extracted, the first electronic device obtains the time reference signal by the second electronic device, that is, the second electronic device can give a time to the first electronic device supporting or not supporting the PTP protocol or the slave devices of other third electronic devices by analyzing the time reference signal, that is, the time synchronization between the slave device of the third electronic device and the third electronic device can be completed.
Optionally, the second electronic device is connected to the third electronic device through a fixed network, that is, the second electronic device is connected to the third electronic device through a wired network, and compared with a wireless network, time synchronization of the fixed network is more stable.
Optionally, as shown in fig. 2, when the third electronic device includes a master clock, the first electronic device is at least one of a plurality of devices (device 1.1, device 1.2, and … …, device 1.n, and switch 2), the system further includes a first switch (switch 1), and the master clock, the second electronic device, and the first switch are sequentially connected to the first electronic device. The multiple devices (device 1.1, device 1.2, … … device 1.n, switch 2) and the first switch may have a device different from the master clock in the supported time synchronization protocol, and the second electronic device is connected between the master clock and the switch to obtain and analyze the time signal of the master clock to obtain the time reference signal, so that each device (device 1.1, device 1.2, … … device 1.n, switch 2) can obtain the time reference signal through the first switch, thereby completing the time synchronization between the first electronic device and the third electronic device, and the time synchronization requirement of each first electronic device can be met under the condition that the time synchronization protocol of the first electronic device is not limited, thereby improving the flexibility of device setting in the transmission system.
It is understood that the first switch (switch 1) is not essential, and when there is one first electronic device, the master clock, the second electronic device and the first electronic device are connected in sequence. In the case of including a first switch, the first switch is also connected to the second electronic device via a fixed network.
Optionally, as shown in fig. 3, when the third electronic device is a first switch (switch 1), the first electronic device is at least one of a plurality of devices (device 2.1, device 2.2, … …, device 2.n, switch 3), the system further includes a second switch (switch 2), and the master clock, the first switch, and the second electronic device are sequentially connected to the first electronic device. The multiple devices (device 2.1, device 2.2, … … device 2.n, switch 3) and the second switch may have a device with a different time synchronization protocol from the first switch, and the second switch is connected to the first switch and the second switch to obtain and analyze the time signal of the first switch to obtain the time reference signal, so that each of the multiple devices (device 2.1, device 2.2, … … device 2.n, switch 3) can obtain the time reference signal through the second switch, thereby completing the time synchronization between the first electronic device and the third electronic device, and meeting the time synchronization requirement of each first electronic device without limiting the time synchronization protocol of the first electronic device, and improving the flexibility of device settings in the transmission system.
It is understood that the second switch (switch 2) is not essential, and when there is one first electronic device, the first switch and the second electronic device are connected to the first electronic device in sequence. In case of including a second switch, the second switch is also connected to a second electronic device via a fixed network.
It can be understood that the switch in this embodiment, as a tandem node in the transmission system, mainly assumes functions of interacting data between devices and cascading other switches. The switches (switch 1, switch 2, switch … …, switch n) which are sequentially cascaded are arranged in the transmission system, so that the requirement of equipment expansion of the transmission system can be met.
The time reference source of the first switch is from an upstream master clock, time is given through a time reference signal recovered by the second electronic device, the time of the second switch is derived from the first switch, and the time reference of the second switch is also the master clock as the time reference of the first switch is from the master clock, and the like. In the embodiment of the present invention, as shown in fig. 3, the master clock and the first switch (switch 1) support the same time synchronization protocol, and since the time reference source of the first switch (switch 1) is the master clock, and the time of the second switch (switch 2) comes from switch 1, the time reference source of the second switch is also the master clock, and so on.
Optionally, the second electronic device is disposed at a front end of the first electronic device, and the first electronic device is a device with a time synchronization protocol different from that of the master clock. I.e. the device front end, which differs from the master clock time synchronization protocol, configures the second electronic device for extracting the time reference signal.
Or, optionally, the second electronic device is disposed at the output end of the master clock, that is, the time reference signal is directly extracted at the front end of the system by using the second electronic device without considering a time transmission protocol of each first electronic device of the transmission system, and each first electronic device in cascade connection can complete time synchronization by acquiring the time reference signal without performing time synchronization by using the time synchronization protocol of the master clock.
And 102, performing time synchronization based on the time reference signal.
In the embodiment of the invention, according to different requirements of different time, the reference signals of different time can be analyzed through the second electronic equipment. Optionally, the time reference signal includes at least one of pulse per second 1PPS and time information ToD.
After acquiring the time reference signal, the first electronic device may determine a time signal thereof according to the time reference signal, thereby completing time synchronization.
In the time synchronization method in this embodiment, the second electronic device analyzes and extracts a time signal of the master clock or the first switch to obtain the time reference signal, and the first electronic device obtains the time reference signal through the second electronic device, so that the time synchronization requirement of the first electronic device can be met without limiting a time synchronization protocol of the first electronic device, and the flexibility of device setting in the transmission system is improved.
Another time synchronization method provided in the embodiment of the present invention is used for a first electronic device, and after steps 201 and 202, the method further includes a step of correcting a time signal of the first electronic device.
Optionally, the method further includes:
in a first mode
Acquiring a difference signal sent from a monitoring device, wherein the difference signal is a difference between a first time signal of the first electronic device and a second time signal of the third electronic device;
correcting the first time signal based on the difference signal to obtain a first corrected time signal;
taking the first corrected time signal as a time signal of the first electronic device;
wherein the first time signal and the second time signal are acquired synchronously by the monitoring device.
Alternatively, the first and second liquid crystal display panels may be,
mode two
Acquiring a second correction time signal sent from a monitoring device, wherein the second correction time signal is calculated by the monitoring device based on a difference between a first time signal of the first electronic device and a second time signal of the third electronic device;
taking the second correction time signal as a time signal of the first electronic device;
wherein the first time signal and the second time signal are acquired synchronously by the monitoring device.
In the embodiment of the invention, the transmission system is also provided with monitoring equipment for monitoring and calibrating the time synchronization condition among the equipment in the transmission system.
The switches (switch 1, switch 2, switch … …, switch n) which are sequentially cascaded are arranged in the transmission system, so that the requirement of equipment expansion of the transmission system can be met. The monitoring device may be provided between a master clock and a switch or between switches cascaded to each other.
The monitoring device synchronously acquires the first time signal of the first electronic device and the second time signal of the third electronic device to determine whether the synchronous time between the first electronic device and the third electronic device meets the requirement.
Optionally, the monitoring device may also monitor the slave device of the third electronic device, and calculate a difference between the time signal of the third electronic device and the slave set time signal thereof.
As shown in fig. 2, when the third electronic device is a master clock, the switch 1 and the first electronic device (at least one of the device 1.1, the device 1.2, the … …, the device 1.n, and the switch 2) are slaves of the third electronic device, and the monitoring device 1 respectively calculates a difference between a time signal of the first switch and a master clock time signal, and a difference between a time signal of the first electronic device and a master clock time signal.
As shown in fig. 3, when the third electronic device is the first switch (switch 1), the switch 2 and the first electronic device (at least one of the device 2.1, the device 2.2, and the … …, device 2.n, and the switch 3) are set as slave devices, and the monitoring device 1 calculates a difference between the time signal of the second switch (switch 2) and the time signal of the first switch (switch 1), and a difference between the time signal of the first electronic device and the time signal of the first switch (switch 1), respectively.
If the difference is acceptable within the fault tolerance range, that is, the absolute value of the difference is less than or equal to the preset threshold, the time synchronization is considered to be correct, and calibration is not needed. Conversely, if the absolute value of the difference is greater than the preset threshold, it is determined that the synchronization is wrong, and calibration is required.
In a case that an absolute value of a difference between the first time signal of the first electronic device and the second time signal of the third electronic device is greater than a first preset threshold, the time signal of the first electronic device needs to be calibrated.
Optionally, when the absolute value of the difference between the first time signal of the first electronic device and the second time signal of the third electronic device is greater than a first preset threshold, the calibration is performed in a manner of a first manner, the monitoring device informs the first electronic device of the difference, and the first electronic device performs the calibration based on the difference. Alternatively, as shown in fig. 2 or 3, the monitoring device informs the first electronic device of the difference signal through the switch, and the first electronic device performs calibration based on the difference signal.
Or, in a case that an absolute value of a difference between the first time signal of the first electronic device and the second time signal of the third electronic device is greater than a first preset threshold, performing calibration in a second manner, determining, by the monitoring device, a correct time signal, namely a second calibration time signal, directly based on the difference, and sending the second calibration time signal to the first electronic device, where the first electronic device directly completes time calibration by using the second calibration time signal as a time signal.
Optionally, the monitoring device obtains the first time signal of the first electronic device and the second time signal of the third electronic device synchronously at a preset period t, calculates a difference value between the first time signal and the second time signal, and determines whether calibration needs to be performed. That is, the monitoring device collects the time signals of the first electronic device and the second electronic device once every time t, calculates the difference value, and determines whether the first electronic device needs to perform time synchronization calibration, that is, the monitoring device performs the determination of whether the time synchronization calibration is performed once every time t.
Optionally, as shown in fig. 2, when the third electronic device is a master clock and the transmission system includes a first switch, the monitoring device may further calculate a second difference value of the time signal between the first switch and the master clock, and correct the time signal of the first switch when the second difference value is greater than a second preset threshold value. In a specific correction manner, referring to the first and second manners, the monitoring device may send the second difference value, and the first switch may perform correction based on the second difference value, or the monitoring device may directly send the correction time, and the first switch may perform correction at the correction time.
Optionally, as shown in fig. 3, when the third electronic device is a first switch and the transmission system includes a second switch, the monitoring device may further calculate a third difference value of the time signal between the second switch and the first switch, and correct the time signal of the second switch when the third difference value is greater than a third preset threshold. In a specific correction manner, referring to the first and second manners, the monitoring device may send the third difference value, and the second switch may perform correction based on the third difference value, or the monitoring device may directly send the correction time, and the second switch may perform correction at the correction time.
Optionally, the first preset threshold, the second preset threshold, and the third preset threshold may be the same or different.
The time synchronization method in this embodiment further corrects the synchronized time signal based on the monitoring result of the monitoring device, so that the flexibility of device setting in the transmission system can be improved, the accuracy of time synchronization can be improved, and the operation accuracy of the transmission system can be improved.
Referring to fig. 4, fig. 4 is a flowchart of another time synchronization method provided by an embodiment of the present invention, for a second electronic device, as shown in fig. 4, the method includes the following steps:
step 401, acquiring a time signal of a third electronic device, where the third electronic device includes a master clock or the third electronic device is a first switch, and the second electronic device and the third electronic device support the same time synchronization protocol;
step 402, analyzing the time signal to obtain a time reference signal;
step 403, sending the time reference signal to the first electronic device.
Optionally, the second electronic device is connected to the third electronic device through a fixed network.
Optionally, the time reference signal includes at least one of pulse per second 1PPS and time information ToD.
It should be noted that, this embodiment is used as a time synchronization implementation manner of the second electronic device corresponding to the embodiment shown in fig. 1 to 3, and specific implementation manners thereof may refer to relevant descriptions in the embodiment shown in fig. 1 to 3, and in order to avoid repeated descriptions, the detailed description of this embodiment is not repeated.
Fig. 5 is a schematic structural diagram of a first electronic device according to an embodiment of the present invention, and as shown in fig. 5, the first electronic device 500 includes:
a first obtaining module 501, configured to obtain a time reference signal sent from a second electronic device, where the time reference signal is obtained by analyzing a time signal of a third electronic device by the second electronic device, the third electronic device includes a master clock or is a first switch, and the second electronic device and the third electronic device support a same time synchronization protocol;
a synchronization module 502, configured to perform time synchronization based on the time reference signal.
Optionally, the first electronic device further includes:
a third obtaining module, configured to obtain a difference signal sent from a monitoring device, where the difference signal is a difference between a first time signal of the first electronic device and a second time signal of the third electronic device;
the correction module is used for correcting the first time signal based on the difference signal to obtain a first corrected time signal;
the first updating module is used for taking the first corrected time signal as a time signal of the first electronic device;
wherein the first time signal and the second time signal are synchronously acquired by the monitoring device;
alternatively, the first and second electrodes may be,
a fourth acquiring module, configured to acquire a second correction time signal sent from a monitoring device, where the second correction time signal is calculated by the monitoring device based on a difference between a first time signal of the first electronic device and a second time signal of the third electronic device;
the second updating module is used for taking the second correction time signal as a time signal of the first electronic device;
wherein the first time signal and the second time signal are acquired synchronously by the monitoring device.
Optionally, the time reference signal includes at least one of pulse per second 1PPS and time information ToD.
It should be noted that, this embodiment is used as an implementation of the time synchronization device corresponding to the embodiments shown in fig. 1 to 3, and specific implementation thereof may refer to relevant descriptions in the embodiment shown in fig. 1, and in order to avoid repeated descriptions, this embodiment is not described again.
It should be noted that, the first electronic device provided in the embodiment of the present invention is a device capable of executing the time synchronization method in the embodiments shown in fig. 1 to 3, and all implementation manners in the embodiment of the time synchronization method are applicable to the device and can achieve the same or similar beneficial effects.
Specifically, referring to fig. 6, an embodiment of the present invention further provides a receiving end device, which includes a bus 601, a transceiver 602, an antenna 603, a bus interface 604, a processor 605, and a memory 606.
A transceiver 602, configured to obtain a time reference signal sent from a second electronic device, where the time reference signal is obtained by analyzing a time signal of a third electronic device by the second electronic device, the third electronic device includes a master clock or is a first switch, and the second electronic device and the third electronic device support a same time synchronization protocol; .
Further, the processor 605 is configured to perform time synchronization based on the time reference signal.
Optionally, the transceiver is further configured to obtain a difference signal sent from a monitoring device, where the difference signal is a difference between a first time signal of the first electronic device and a second time signal of the third electronic device;
the processor is further configured to correct the first time signal based on the difference signal to obtain a first corrected time signal;
taking the first corrected time signal as a time signal of the first electronic device;
wherein the first time signal and the second time signal are acquired synchronously by the monitoring device.
Optionally, the transceiver is further configured to acquire a second correction time signal sent from the monitoring device, where the second correction time signal is calculated by the monitoring device based on a difference between the first time signal of the first electronic device and the second time signal of the third electronic device;
the processor is further configured to use the second corrected time signal as a time signal of the first electronic device; wherein the first time signal and the second time signal are acquired synchronously by the monitoring device.
Optionally, the time reference signal includes at least one of pulse per second 1PPS and time information ToD.
In fig. 6, a bus architecture (represented by bus 601), where bus 601 may include any number of interconnected buses and bridges, where bus 601 links together various circuits including one or more processors, represented by processor 605, and memory, represented by memory 606. The bus 601 may also link together various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface 604 provides an interface between the bus 601 and the transceiver 602. The transceiver 602 may be one element or may be multiple elements, such as multiple receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. The data processed by the processor 605 is transmitted over a wireless medium via the antenna 603, and further, the antenna 603 receives the data and transmits the data to the processor 605.
The processor 605 is responsible for managing the bus 601 and general processing, and may also provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. And memory 606 may be used to store data used by processor 605 in performing operations.
Alternatively, processor 605 may be a CPU, ASIC, FPGA or CPLD.
It should be noted that, the first electronic device provided in the embodiment of the present invention is a device capable of executing the time synchronization method in the embodiments shown in fig. 1 to 3, and all implementation manners in the embodiment of the time synchronization method are applicable to the device and can achieve the same or similar beneficial effects.
An embodiment of the present invention further provides an electronic device, including: the program is executed by the processor to implement the processes of the time synchronization method in the embodiment shown in fig. 1 to 3, and can achieve the same technical effects, and the details are not repeated here to avoid repetition.
Fig. 7 is a schematic structural diagram of a second electronic device according to an embodiment of the present invention, and as shown in fig. 7, a second electronic device 700 includes:
a second obtaining module 701, configured to obtain a time signal of a third electronic device, where the third electronic device includes a master clock or is a first switch, and the second electronic device and the third electronic device support a same time synchronization protocol;
an analyzing module 702, configured to analyze the time signal to obtain a time reference signal;
a sending module 703, configured to send the time reference signal to the first electronic device.
Optionally, the second electronic device is connected to the third electronic device through a fixed network.
Optionally, the time reference signal includes at least one of pulse per second 1PPS and time information ToD.
It should be noted that, this embodiment is used as an implementation of the time synchronization device corresponding to the embodiment shown in fig. 4, and specific implementation thereof may refer to relevant descriptions in the embodiments shown in fig. 1 to 4, and in order to avoid repeated descriptions, this embodiment is not described again.
Specifically, referring to fig. 8, the embodiment of the present invention further provides a second electronic device, which includes a bus 801, a transceiver 802, an antenna 803, a bus interface 804, a processor 805, and a memory 806.
The transceiver 802 is configured to acquire a time signal of a third electronic device, where the third electronic device includes a master clock or is a first switch, and the second electronic device and the third electronic device support a same time synchronization protocol.
Further, the processor 805 is configured to analyze the time signal to obtain a time reference signal.
The transceiver 802 is further configured to transmit the time reference signal to the first electronic device.
Optionally, the second electronic device is connected to the third electronic device through a fixed network.
Optionally, the time reference signal includes at least one of pulse per second 1PPS and time information ToD.
In FIG. 8, a bus architecture (represented by bus 801), the bus 801 may include any number of interconnected buses and bridges, the bus 801 linking together various circuits including one or more processors, represented by processor 805, and memory, represented by memory 806. The bus 801 may also link together various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface 804 provides an interface between the bus 801 and the transceiver 802. The transceiver 802 may be one element or may be multiple elements, such as multiple receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. Data processed by the processor 805 is transmitted over a wireless medium via the antenna 803, and further, the antenna 803 receives the data and transmits the data to the processor 805.
The processor 805 is responsible for managing the bus 801 and general processing, and may also provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. And the memory 806 may be used to store data used by the processor 805 in performing operations.
Alternatively, the processor 805 may be a CPU, ASIC, FPGA or CPLD.
It should be noted that, this embodiment is used as an implementation of the time synchronization device corresponding to the embodiment shown in fig. 4, and specific implementation thereof may refer to relevant descriptions in the embodiments shown in fig. 1 to 4, and in order to avoid repeated descriptions, this embodiment is not described again.
An embodiment of the present invention further provides an electronic device, including: the program is executed by the processor to implement the processes of the embodiment shown in fig. 4, and the same technical effects can be achieved, and details are not repeated here in order to avoid repetition.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the time synchronization method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (13)

1. A time synchronization method applied to a first electronic device includes:
acquiring a time reference signal sent from second electronic equipment, wherein the time reference signal is obtained by analyzing a time signal of third electronic equipment by the second electronic equipment, the third electronic equipment comprises a master clock or is a first switch, and the second electronic equipment and the third electronic equipment support the same time synchronization protocol;
and performing time synchronization based on the time reference signal.
2. The method of claim 1, wherein after the time synchronization based on the time reference signal, the method further comprises:
acquiring a difference signal sent from a monitoring device, wherein the difference signal is a difference between a first time signal of the first electronic device and a second time signal of the third electronic device;
correcting the first time signal based on the difference signal to obtain a first corrected time signal;
taking the first correction time signal as a time signal of the first electronic device;
wherein the first time signal and the second time signal are synchronously acquired by the monitoring device;
alternatively, the first and second electrodes may be,
acquiring a second correction time signal sent from a monitoring device, wherein the second correction time signal is calculated by the monitoring device based on a difference between a first time signal of the first electronic device and a second time signal of the third electronic device;
taking the second correction time signal as a time signal of the first electronic device;
wherein the first time signal and the second time signal are acquired synchronously by the monitoring device.
3. The method according to claim 1 or 2, wherein the time reference signal comprises at least one of a pulse per second 1PPS and time information ToD.
4. A time synchronization method applied to a second electronic device includes:
acquiring a time signal of third electronic equipment, wherein the third electronic equipment comprises a master clock or is a first switch, and the second electronic equipment and the third electronic equipment support the same time synchronization protocol;
analyzing the time signal to obtain a time reference signal;
and sending the time reference signal to the first electronic equipment.
5. The method of claim 4, wherein the second electronic device is connected to the third electronic device via a fixed network.
6. The method according to claim 4 or 5, wherein the time reference signal comprises at least one of pulse per second 1PPS and time information ToD.
7. A first electronic device, comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a time reference signal sent from second electronic equipment, the time reference signal is obtained by analyzing a time signal of third electronic equipment by the second electronic equipment, the third electronic equipment comprises a master clock or is a first switch, and the second electronic equipment and the third electronic equipment support the same time synchronization protocol;
and the synchronization module is used for carrying out time synchronization based on the time reference signal.
8. A first electronic device comprising a transceiver and a processor,
the transceiver is configured to acquire a time reference signal sent from a second electronic device, where the time reference signal is obtained by analyzing a time signal of a third electronic device by the second electronic device, the third electronic device includes a master clock or is a first switch, and the second electronic device and the third electronic device support the same time synchronization protocol;
the processor is configured to perform time synchronization based on the time reference signal.
9. An electronic device, comprising: processor, memory and program stored on the memory and executable on the processor, which when executed by the processor implements the steps of the time synchronization method according to any one of claims 1 to 3.
10. A second electronic device, comprising:
the second obtaining module is configured to obtain a time signal of a third electronic device, where the third electronic device includes a master clock or is a first switch, and the second electronic device and the third electronic device support a same time synchronization protocol;
the analysis module is used for analyzing the time signal to obtain a time reference signal;
and the sending module is used for sending the time reference signal to the first electronic equipment.
11. A second electronic device comprising a transceiver and a processor,
the transceiver is configured to acquire a time signal of a third electronic device, where the third electronic device includes a master clock or is a first switch, and the second electronic device and the third electronic device support a same time synchronization protocol;
the processor is used for analyzing the time signal to obtain a time reference signal;
the transceiver is further configured to transmit the time reference signal to the first electronic device.
12. An electronic device, comprising: processor, memory and program stored on the memory and executable on the processor, which when executed by the processor implements the steps of the time synchronization method according to any of claims 4 to 6.
13. A computer-readable storage medium, characterized in that a computer program is stored thereon, which computer program, when being executed by a processor, carries out the steps of the time synchronization method according to any one of claims 1 to 6.
CN202011293824.4A 2020-11-18 2020-11-18 Time synchronization method and related equipment Pending CN114520702A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011293824.4A CN114520702A (en) 2020-11-18 2020-11-18 Time synchronization method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011293824.4A CN114520702A (en) 2020-11-18 2020-11-18 Time synchronization method and related equipment

Publications (1)

Publication Number Publication Date
CN114520702A true CN114520702A (en) 2022-05-20

Family

ID=81594415

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011293824.4A Pending CN114520702A (en) 2020-11-18 2020-11-18 Time synchronization method and related equipment

Country Status (1)

Country Link
CN (1) CN114520702A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105764132A (en) * 2014-12-16 2016-07-13 中兴通讯股份有限公司 Time service method, device and system
CN106130710A (en) * 2016-06-29 2016-11-16 北京东土科技股份有限公司 A kind of clock synchronizing method and system
CN110120846A (en) * 2018-02-05 2019-08-13 大唐移动通信设备有限公司 A kind of clock synchronizing method and system
JP2019149702A (en) * 2018-02-27 2019-09-05 サイレックス・テクノロジー株式会社 Transmission device, reception device, transmission method, and reception method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105764132A (en) * 2014-12-16 2016-07-13 中兴通讯股份有限公司 Time service method, device and system
CN106130710A (en) * 2016-06-29 2016-11-16 北京东土科技股份有限公司 A kind of clock synchronizing method and system
CN110120846A (en) * 2018-02-05 2019-08-13 大唐移动通信设备有限公司 A kind of clock synchronizing method and system
JP2019149702A (en) * 2018-02-27 2019-09-05 サイレックス・テクノロジー株式会社 Transmission device, reception device, transmission method, and reception method

Similar Documents

Publication Publication Date Title
EP3009897B1 (en) Distribution device, distribution system, and distribution method
CN111416617A (en) Clock synchronization method and device and electronic equipment
EP4216019A1 (en) Device synchronous calibration method and apparatus, devices, and storage medium
CN101848051B (en) Method and device for performing clock synchronization between equipment
WO2004066530A1 (en) Method and apparatus for the synchronization of a system time of a communications network with a clock reference
CN111585682A (en) Sensor time synchronization method and device and terminal equipment
US20160065358A1 (en) Synchronization method, intermediate node, and slave node of communication network system
WO2015122027A1 (en) Time synchronization device
CN103546267A (en) Time synchronization monitoring method and system
WO2016177090A1 (en) Clock synchronization method and device
US20220360350A1 (en) Method and apparatus for acquiring timestamp of data stream, storage medium, and electronic apparatus
US20190197010A1 (en) Data transmission method and mobile terminal
US11303376B2 (en) Information processing apparatus and time synchronization method
CN114520702A (en) Time synchronization method and related equipment
CN112511259A (en) Intelligent terminal clock management method and device, storage medium and terminal equipment
EP4231472A2 (en) Data alignment method, differential protector and differential protection system
CN111102689A (en) Method and device for adjusting clock synchronization
US11614767B2 (en) Device and method for providing a clock signal to an application
EP2777498A1 (en) Blood glucose monitoring system having wireless communication module to which time synchronization method is applied
KR101965932B1 (en) UTC Time Synchronization Method for a Device using GPS Module
CN113204516A (en) Method and device for time synchronization of processors
CN114035740A (en) Clock crystal oscillator synchronization method, device and system
US11294421B2 (en) Precision timing between systems
CN112566235B (en) Wireless synchronization method, device and system for monitoring station
CN114124334B (en) Processing method, client, equipment and medium of air interface data packet

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination