WO2018099375A1 - Synchronization method, synchronization device, synchronization apparatus and communication system - Google Patents

Synchronization method, synchronization device, synchronization apparatus and communication system Download PDF

Info

Publication number
WO2018099375A1
WO2018099375A1 PCT/CN2017/113376 CN2017113376W WO2018099375A1 WO 2018099375 A1 WO2018099375 A1 WO 2018099375A1 CN 2017113376 W CN2017113376 W CN 2017113376W WO 2018099375 A1 WO2018099375 A1 WO 2018099375A1
Authority
WO
WIPO (PCT)
Prior art keywords
time
slave
master
synchronization
nth
Prior art date
Application number
PCT/CN2017/113376
Other languages
French (fr)
Chinese (zh)
Inventor
胡新天
韩柳燕
Original Assignee
中国移动通信有限公司研究院
中国移动通信集团公司
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 中国移动通信有限公司研究院, 中国移动通信集团公司 filed Critical 中国移动通信有限公司研究院
Publication of WO2018099375A1 publication Critical patent/WO2018099375A1/en

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L7/00Arrangements for synchronising receiver with transmitter

Definitions

  • the present disclosure relates to synchronization technologies in the field of communications, and more particularly to a synchronization method, a synchronization device, a synchronization device, and a communication system.
  • each device can only lock time information for one upstream device at a single point in time. After a problem occurs with the synchronization between the upstream device, the device needs to reselect the upstream device, and after stably locking the device, switch to tracking the device. During the process of reselecting and waiting for the lock, the device cannot obtain the time signal of the time server, which may cause the synchronization effect of the device to decrease and affect the communication quality. In a more serious case, when the time server fails, the entire network device needs to switch the synchronization information to the standby server, so that the impact of the single point problem spreads to the entire network, resulting in synchronization of multiple or the entire network.
  • embodiments of the present disclosure are expected to provide a synchronization method, a synchronization apparatus, and a communication system that at least partially solve the above problems.
  • the first aspect of the disclosure provides a synchronization method, which is applied to the first device, and includes:
  • the master time of the first device is calibrated based on the N slave times.
  • the first device includes M slave units and one master unit, where the M is an integer not less than the N and not less than 2;
  • the locking and tracking the N time signals to form N slave times includes:
  • n is an integer not greater than the N
  • the calibrating the master time of the first device according to the N slave times includes:
  • the master time of the master unit is calibrated based on the slave time of at least N of the slave units.
  • the calibrating the master time of the first device according to the N times of time further includes:
  • the master time of the first device is calibrated according to the nth slave time.
  • the determining, by the determining, the synchronization status of the nth slave time and the master time of the nth second device includes:
  • the master time of the first device is calibrated according to the nth slave time, including:
  • the master time of the first device is calibrated according to the nth slave time.
  • the calibrating the master time of the first device according to the N times of time includes:
  • the N second devices respectively adjacent to the first device are synchronized to obtain a time signal of the master time of each of the second devices, including:
  • the N second devices that are respectively adjacent to the first device are synchronized to obtain a time signal of the primary time of each of the second devices, including:
  • a second aspect of the embodiments of the present disclosure provides a synchronization apparatus, which is applied to a first device, and includes:
  • An acquiring module configured to synchronize with each of the N second devices adjacent to the first device to obtain a time signal of a primary time of each of the second devices, where the N is an integer not less than 2;
  • a calibration module configured to calibrate a primary time of the first device according to the N slave times.
  • the first device includes M slave units and one master unit; wherein, the M is an integer not less than the N and not less than 2;
  • the acquiring module is specifically configured to acquire, by using the nth slave unit, an nth time signal that represents a master time of the nth second device;
  • the lock tracking module is configured to calibrate a slave time of the nth slave unit according to the nth time signal, where n is an integer not greater than the N;
  • the calibration module is specifically configured to calibrate a master time of the master unit according to a slave time of at least N slave units.
  • the device further includes:
  • a determining module configured to determine a synchronization status of the nth slave time and a master time of the nth second device
  • the master time of the first device is calibrated according to the nth slave time
  • the calibration module specifically, when the first time deviation is less than a preset value, calibrating a primary time of the first device according to the nth slave time.
  • the determining module is specifically configured to compare the first time of the nth slave time with the master time of the nth second device
  • the calibration module specifically, when the first time deviation is less than a preset value, calibrating the master time of the first device according to the nth slave time.
  • the calibration module is specifically configured to respectively compare a second time deviation of the N slave times with a master time of the first device; according to the second The time deviation determines an adjustment value, and the main time of the first device is adjusted according to the adjustment value.
  • the acquiring module is specifically configured to receive, by the N, the second device, a message that is sent by the second device, and extract time information in the packet to obtain N The time signal.
  • the acquiring module is specifically configured to separately receive physical time signals of N main time of the second device.
  • a third aspect of the embodiments of the present disclosure provides a synchronization device, where the synchronization device is a first device, including:
  • At least two slave units for acquiring a time signal of a master time of the second device adjacent to the first device, locking and tracking the time signal to form a slave time;
  • a main unit configured to calibrate a master time of the main unit according to a slave time of the at least two slave units.
  • a fourth aspect of the embodiments of the present disclosure provides a communication system including a first device and a plurality of second devices adjacent to the first device;
  • a plurality of the second devices configured to respectively send time signals of their own master time to the first device
  • the first device is configured to acquire time signals of a plurality of the second devices, lock and track the time signal, form a slave time, and calibrate a master time of the first device according to the slave time.
  • a fifth aspect of the embodiments of the present disclosure provides a computer-implemented synchronization device, including: a processor, a memory, and a computer program stored on the memory and executable on the processor, the computer program being The steps in the synchronization method as described above are implemented when the processor is executed.
  • a sixth aspect of the present disclosure provides a computer readable storage medium having stored thereon a computer program that, when executed by a processor, implements the steps in the synchronization method as described above.
  • the synchronization method, device and system provided by the embodiments of the present disclosure, the first device performing synchronization, locking and tracking the time signal from a plurality of time signals of the main time of the adjacent second device to form a plurality of slave times And then calibrate the primary time of the first device according to the time.
  • the process of synchronization because the time signal acquired from other devices is not locked, the synchronization is inaccurate, and the time required to repeatedly acquire other devices, and the time signal process of repeatedly acquiring other devices is repeated. In the middle, there is a problem that the synchronization cannot be synchronized or the synchronization effect is poor.
  • the mesh synchronization is used to replace the synchronization mode of the synchronization chain, thereby reducing synchronization.
  • the error is accumulated by the upstream device to the downstream device step by step, which improves the synchronization accuracy and improves the synchronization effect.
  • the first device itself realizes the locking and tracking of the time required for synchronization from time, so that the devices cannot be synchronized. The problem, which reduces the unsynchronization of all devices in the entire network caused by the time server.
  • the synchronization method provided according to various embodiments of the present disclosure has the characteristics of high synchronization precision, short synchronization disorder time, and low probability.
  • FIG. 1 is a schematic flowchart diagram of a synchronization method according to an embodiment of the present disclosure
  • FIG. 2 is a schematic structural diagram of a synchronization apparatus according to an embodiment of the present disclosure
  • FIG. 3 is a schematic structural diagram of a synchronization device according to an embodiment of the present disclosure.
  • FIG. 4 is a schematic structural diagram of a first synchronization system according to an embodiment of the present disclosure.
  • FIG. 5 is a schematic structural diagram of a second synchronization system according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram of a third synchronization system according to an embodiment of the present disclosure.
  • this embodiment provides a synchronization method, which is applied to a first device, and includes:
  • Step S110 Synchronizing with the N second devices adjacent to the first device to obtain a time signal of the main time of each of the second devices; wherein, N is an integer not less than 2;
  • Step S120 Lock and track the N time signals to form N slave times
  • Step S130 Calibrate the master time of the first device according to the N slave times.
  • the “first” and “second” in the first device and the second device in this embodiment are generally referred to, and do not specifically refer to a certain device.
  • the first device and the second device are both devices that are adjacent to each other and different in the communication system.
  • the first device and the second device are peer devices or peer devices, that is, the first device is not an upstream device of the second device, and the second device is not an upstream device of the first device.
  • the first device and the second device are two devices that are adjacent to each other and can communicate with each other.
  • the first device will acquire a time signal from a plurality of adjacent second devices.
  • the time signal here may be a time signal characterizing the master time of the second device.
  • the master time here is a time signal since a device communicates with other devices, and uses the time to transmit an electrical signal or an electromagnetic wave signal or an optical signal carrying the information in the corresponding time-frequency resource.
  • the time signal of the master time of the second device is acquired, the time signal is locked and tracked to form the slave time of the first device.
  • the first device may include a plurality of slave units, and the slave units may also form a time signal, and in the embodiment, the time signal is locked and tracked to form a slave time. It can be understood that the slave time of the slave unit in the first device is calibrated according to the time signal, thereby realizing Calibration of time, and locking and tracking of the primary time of the second device.
  • the lock tracking the slave device's slave time herein may also include utilizing the acquired time signal as an input to the phase locked loop, using the phase locked loop to lock and track the time signal.
  • step S130 the calibration of the master time of the first device is performed according to the slave time of the plurality of slave units. Multiple calibrations can be performed in step S130. For example, in step S130, multiple calibrations will be performed at predetermined time intervals. Since the master time of the other device is locked by the slave unit, it is not necessary to repeatedly acquire time from the second device during the calibration of the master time of the first device. If the main time of the main unit of the first device is disordered, it is not necessary to wait until the main time of the other device is re-acquired, and the main time can be calibrated according to its own time, so that time synchronization with other devices can be completed quickly and easily.
  • the master time of the other device can be acquired while performing calibration, thereby avoiding the inability to perform during the acquisition time.
  • the calibration of the primary time of the first device causes the first device itself and the downstream devices connected below it to be uncalibrated and unable to synchronize with the upstream device.
  • the N time signals are time pulses
  • the step S120 may include: calculating N time pulses to obtain a mean or a median of phase differences among the N time pulses, using the mean of the phase differences or The median adjusts the phase of the time pulse of the first device to achieve synchronization of the time pulse of the first device with the time pulses of the N second device master times.
  • each device in the communication network can be regarded as performing similar adjustments on the first device, so that synchronization of the entire network can be realized.
  • the upstream device and the downstream device can be no longer distinguished between the devices, and the downstream device is not synchronized to the upstream device, so that the accumulation of synchronization errors can be avoided and more accurate synchronization can be realized.
  • the first device includes M slave units and one master unit, wherein the M is an integer not less than 2.
  • the step S110 may include: acquiring, by using the nth slave unit, an nth time signal that represents a master time of the nth second device.
  • the step S120 may include: calibrating a slave time of the nth slave unit according to the nth time signal; wherein the n is an integer not greater than the N; the N is not greater than the An integer of M.
  • the step S130 may include: calibrating a master time of the master unit according to a slave time of at least N slave units.
  • the first device includes one main unit and a plurality of slave units.
  • Both the master unit and the slave unit herein may correspond to a timing chip or the like, except that the master unit provides local time for the operation of the first device.
  • the slave unit is mainly used for time calibration of the primary unit by the first device and the second device to achieve synchronization.
  • the timing accuracy of the main unit may be higher than the timing accuracy of the slave unit to ensure the accuracy of the local time of the first device and reduce instability.
  • the timing precision of the master unit and the slave unit are consistent.
  • the slave device when acquiring the time signal of the second device, the slave device is used to acquire, and by calibrating the slave device's slave time, locking and tracking of the second device master time is realized.
  • the locking may be: synchronizing the slave time of the first device with the master time of the second device; the tracking may be understood as: the slave time of the first device is in the master of the second device After the time synchronization, the timing is continued or the time signal is generated at the time after the synchronization, thereby achieving the effect of tracking the master time of the second device.
  • step S130 the master time of the master unit is calibrated according to the slave time of the N slave units, that is, the master time of the second device is acquired and recorded in the slave unit as a medium, and is used to adjust the master unit in the first device. Master time.
  • the second device may also include: a primary unit and a secondary unit; that is, the timing structure or time structure of the second device is the same as the first device.
  • step S110 may be: one slave unit of the first device acquires a time signal from a master unit of a second device.
  • the master time of the master unit of the plurality of second devices can be acquired by the first device including the plurality of slave units, and the master time of the master unit of the plurality of second devices (corresponding to the slaves of the plurality of slave units) Time), calibrating the master time of the primary unit of the first device, thereby implementing time alignment between a plurality of adjacent peer devices, thereby avoiding the stepwise accumulation of synchronization errors and the inability to synchronize during time acquisition.
  • the step S130 may include: determining a synchronization status of the nth slave time and a master time of the nth second device; when the synchronization condition satisfies a preset condition, The master time of the first device is calibrated according to the nth slave time.
  • the synchronization condition here can characterize the synchronization accuracy between the slave time of each slave unit and the master time of other devices.
  • the step S120 may include: comparing a first time deviation of the nth slave time with a master time of the nth second device, and when the first time offset is less than a preset And a value, the master time of the first device is calibrated according to the nth slave time.
  • the specific method may include: determining, by comparing the time of the sth slave unit and the sth master unit of the second device, the sth first time offset; the s is not greater than the N Positive integer.
  • the sth slave unit refers to any slave unit that performs time signal interaction with the second device.
  • the s second device is also generally referred to as any device that performs time signal interaction with the slave unit in the first device.
  • a slave unit and a master unit of an adjacent device perform time comparison to obtain a first time offset.
  • the slave unit is in the process of acquiring the master unit of the neighboring device, there may be a time error between the slave unit and the master unit of the adjacent second device even after the unit is calibrated due to problems such as transmission delay and calibration delay.
  • the first time offset will also be acquired.
  • the packet exchanges for example, packet packet interaction, acquires the time of the second device, and obtains the first time offset by comparing the acquired time with the slave unit.
  • the step S120 includes: calibrating the master time of the master unit according to the first time offset and the slave time of the N slave units.
  • one or more slave times that are better than the master time synchronization effect of the adjacent second device are combined with the first time offset value to calibrate the master time of the master unit.
  • the master time of the first device is calibrated.
  • the calibration of the master time of the first device is not performed according to the slave time, and the problem that the synchronization effect is poor during the calibration of the master time of the first device is avoided.
  • the step S120 may include:
  • the primary time of the first device herein has an original time, which is the time before the primary unit of the first device is calibrated.
  • N times and the first setting The prepared master time is compared, and after the comparison, at least N second time offsets are obtained.
  • M is greater than N, in order to reduce the data required to be recorded during the synchronous calibration process, for example, it is not necessary to record which N times of time have been time-aligned with the adjacent second device, and the ratio can be directly
  • the second time offset of the original time of the M slave units and the master unit the comparison manner necessarily includes the N slave times that are time-aligned with the second device.
  • the adjustment value is determined.
  • the adjustment value adjusts the main time of the main unit, thereby achieving precise synchronization of the main unit of the first device.
  • the adjustment value may be a mean or a median of the plurality of the second time offsets.
  • the step S110 may include: receiving, respectively, N messages sent by the second device; extracting time information in the message, and obtaining N the time signals.
  • the message here may be a packet time message, for example, a Precision Time Protocol (PTP) message.
  • the time signal can be obtained by extracting time information carried by the message. For example, the time stamp of the packet is extracted, the time signal is obtained, and the packet content of the packet is extracted, and time information in the content of the packet is obtained, thereby obtaining the time signal.
  • PTP Precision Time Protocol
  • the interaction of the time signals between the first device and the second device can be easily realized through message interaction, and has the characteristics of being simple to implement.
  • the step S110 may include:
  • the physical time signal in this embodiment may include a time pulse, for example, a second pulse, which are the corresponding physical times.
  • the first device may receive the physical time signal by using a phase locked loop or the like, for example, a second pulse, and then calibrate the instantaneous time of the slave unit according to the physical time signal, for example, using the output signal of the phase locked loop as the local time of the slave unit, thereby Time calibration of the unit. If the physical time signal is received from the second device, the main unit may implement time calibration in step S120 by phase adjustment or adjustment of a pulse length, thereby achieving synchronization.
  • a neighboring device that uses the same operating frequency as the first device is selected as the second device.
  • the first device operates at 2 Mbps. If calibration synchronization is required, it needs to be calibrated to a device with the same operating frequency of 2 Mbps instead of any device. Therefore, in this embodiment, the method further includes:
  • the second device is selected by acquisition of frequency information. Specifically, for example, a neighboring device having the same operating frequency as the primary unit of the first device or having a frequency deviation within a predetermined range is acquired as the first device. Usually the operating frequency or frequency information of the master unit and the slave unit in a device is the same.
  • the embodiment provides a synchronization device 100, which is applied to a first device, and includes:
  • the obtaining module 110 is configured to synchronize the N second devices adjacent to the first device to obtain a time signal of a primary time of each of the second devices, where the N is an integer not less than 2;
  • Locking tracking module 120 configured to lock and track the N time signals to form N slave times
  • the calibration module 130 is configured to calibrate the master time of the first device according to the N times.
  • the synchronization device provided in this embodiment is a synchronization structure applied to the second device.
  • the obtaining module 110 may correspond to a communication interface, and may receive a time signal from the second device.
  • the lock tracking module can correspond to a time chip and can be used to record and generate slave time.
  • the calibration module 130 can correspond to a processor or processing circuit or processing chip.
  • the processor can include a central processing unit, a microprocessor, a digital signal processor, an application processor or a programmable array, and the like.
  • the processing circuit can include an application specific integrated circuit or the like.
  • the acquisition module 110 will obtain time signals of a plurality of adjacent second devices of the first device, and the calibration module 130 will calibrate the master time of the first device according to the N slave times.
  • the master time of other devices is locked and tracked.
  • the first device includes M slave units and one master unit; wherein the M is an integer not less than 2;
  • the acquiring module 110 is specifically configured to acquire, by using the nth slave unit, an nth time signal that represents a primary time of the nth second device;
  • the lock tracking module 120 is specifically configured to calibrate the according to the nth time signal a slave time of the nth slave unit; wherein n is an integer not greater than the N; the N is an integer not greater than the M;
  • the calibration module 130 is specifically configured to calibrate a master time of the master unit according to a slave time of at least N slave units.
  • the first device includes a plurality of slave units and one master unit.
  • the obtaining unit 110 acquires a plurality of time signals from the plurality of second devices by using the slave unit.
  • the calibration module 130 can be configured to control the main unit to perform calibration according to the slave time of the plurality of slave units, thereby implementing synchronization with the plurality of second devices to improve synchronization accuracy.
  • the synchronization device 100 further includes:
  • a judging module (not shown), configured to determine a synchronization status of the nth slave time and a master time of the nth second device;
  • the calibration module 130 specifically calibrates the master time of the first device according to the nth slave time when the synchronization condition satisfies a preset condition.
  • the determining module is specifically configured to compare a first time deviation between the nth slave time and a master time of the nth second device; the calibration module 130 is specifically used And when the first time deviation is less than a preset value, the master time of the first device is calibrated according to the nth slave time.
  • the determination module may correspond to a processor or processing circuit, or a comparator or a processor or processing circuit having a comparison function.
  • the determining module obtains the first time offset value by comparing the time of the slave unit with the second device.
  • the calibration module 130 when the first time deviation is less than a preset value, calibrating the master time of the first device according to the nth slave time, so that the slave with poor synchronization effect with other devices can be replaced. Time, the calibration of the primary time of the local first device, again improves the calibration and synchronization accuracy of the master time between the two devices.
  • the calibration module 130 is specifically configured to respectively compare a second time deviation of the N slave times with a master time of the first device; and determine, according to the second time offset, an adjustment value, according to The adjustment value adjusts a primary time of the first device.
  • the calibration module 130 calculates the second time deviation value, determines the adjustment value according to the second time deviation, and then uses the adjustment value to adjust the main time of the main unit to improve the synchronization accuracy again.
  • the acquiring module 110 is configured to receive, by the N, the second device, a message that is sent by the second device, and extract time information in the packet to obtain the N time signals.
  • the time signal is obtained through message interaction.
  • the acquiring module 110 is specifically configured to receive physical time signals of the primary time of the N second devices.
  • the acquiring unit 110 may also acquire the time signal by receiving a physical time signal. These messages are sent based on the primary time of the second device.
  • the embodiment provides a synchronization device 200, where the synchronization device is a first device, and includes:
  • At least two slave units 210 for acquiring a time signal of a master time of a second device adjacent to the first device, locking and tracking the time signal to form a slave time;
  • the main unit 220 is configured to calibrate the main time of the main unit according to the slave time of the at least two slave units.
  • the synchronization device in this embodiment may be any one of the communication devices, for example, base stations at various levels, gateways at various levels, or communication devices at various levels.
  • the synchronization device includes at least one slave unit 210, and further includes a plurality of master units 220.
  • the slave unit 210 acquires the time signal of the master unit of the adjacent second device, and then the master unit 220 of the device performs the master unit 220 of the device according to the slave time of the plurality of slave units 210. Time calibration of the main time.
  • the synchronization device 200 of this embodiment can be used to implement the foregoing synchronization method.
  • the main unit 220 is mainly used for comparing with the time of the slave unit 210, determining the time deviation, determining the adjustment value according to the time deviation, and adjusting the main time of the main unit 220 by using the adjustment value.
  • the slave unit may acquire a time signal by using a message, for example, a PTP message, or the like, or acquire a physical time signal or the like directly from an adjacent second device.
  • this embodiment provides a communication system, including a first device 310 and a plurality of second devices 320 adjacent to the first device 310;
  • the first device 310 is configured to acquire time signals of a plurality of the second devices, lock and track the time signal, form a slave time, and calibrate a master time of the first device according to the slave time.
  • the synchronization system provides a time signal for synchronization by a plurality of second devices for a first device, where the time signal can be a time stamp or a physical time signal in a PTP message, for example.
  • the first device 310 and the second device 320 are regarded as peer devices, so that mesh-like synchronization can be realized, thereby achieving synchronization improvement.
  • this embodiment can be used to implement the aforementioned synchronization method.
  • the present example provides a synchronization system including a plurality of devices; each of the devices includes a main unit and a plurality of slave units.
  • a slave unit of a device can establish a connection with a master unit of an adjacent device for time signal interaction and time calibration of the slave unit, and finally time calibration and synchronization of the master unit between two adjacent devices.
  • the synchronization system includes a plurality of devices as described above, each device including a master unit and a slave unit.
  • the main unit includes an input subunit and an output subunit; the slave unit includes an input subunit and a comparison subunit.
  • the input subunit of the slave unit is connected to the output subunit of the master unit of another device, acquires the time of the master unit of the other device, and calibrates the time of the slave unit.
  • the comparison subunit of the slave unit compares the time of the master unit of the device with the slave unit, and then obtains a time offset, and then calibrates the time of the master unit by using the time offset.
  • the input subunit maintains time synchronization with the main unit of the neighboring device by using PTP message interaction, and takes the acquired time as the slave unit local time.
  • the input subunit simultaneously locks an external clock frequency signal such as 2 MHz to obtain frequency information that is the same as or maintains a specified frequency deviation from the device and other adjacent device main units.
  • the comparison subunit locks the main unit by the 1PPS signal, and extracts the time T M of the main unit, and simultaneously extracts the local time T S(i) of the slave unit, by comparing the main unit time T M with the slave unit time T S(i) Deviation, obtain the time deviation T D(i) from the unit time and the main unit, and report the time deviation T D(i) to the centralized management unit outside the device.
  • the main unit contains an input subunit and an output subunit.
  • the input subunit obtains frequency information through an external frequency signal such as 2 MHz, and provides frequency information to the output subunit to maintain the device time T M ; the output subunit transmits the 1 PPS (second pulse) signal to the device and other adjacent devices.
  • the slave unit outputs the time T M .
  • the apparatus further includes: an external centralized management unit (not shown) that extracts a time offset of the primary unit and the one or more secondary units for each device; T D(i) is a primary unit and a Time offset between i slave units, using the time offset to calculate the adjustment value T A in a specified manner, and adjusting the time TM of the device master unit with the adjustment value T A so that all devices in the network tend to be at the same time, in the device Time synchronization is achieved. among them, The N is the number of slave units or the number of slave units that have acquired other neighboring devices.
  • the time synchronization system provided by this example is composed of a plurality of devices connected to each other.
  • the devices that make up the time synchronization system are at the same level in the network.
  • a plurality of devices constituting a time synchronization system are composed of a main unit and one or more slave units.
  • the device performing synchronization when the time deviation of the main unit and the plurality of slave units is respectively compared, it is judged based on the synchronization state of the slave unit whether or not the time of the slave unit is extracted. Specifically, if the slave unit cannot currently obtain the time information of the adjacent master unit corresponding thereto or cannot correctly lock the adjacent master unit corresponding thereto, the time of the slave unit is not extracted, and the slave unit and the master unit are not compared. Time deviation.
  • One or more slave units are synchronized to different units of the main unit, and are synchronized by message interaction. Specifically, each slave unit exchanges a packet time message such as a PTP packet with a master unit of a different neighboring device, and uses the timestamp information in the packet to calculate the time of acquiring the neighboring unit of the other neighboring device, and serves as a slave unit. Local time. The slave unit continuously extracts the timestamp, locks the time of other neighboring device master units, and calculates the update local time.
  • a packet time message such as a PTP packet
  • the slave unit continuously extracts the timestamp, locks the time of other neighboring device master units, and calculates the update local time.
  • one or more slave units are synchronized to a master unit of a different device, and synchronized using a physical layer synchronization method. Specifically, each slave unit receives a physical time signal such as 1 PPS (second pulse) from a different neighboring device, locks the time signal locally with a phase locked loop, and uses the phase locked loop output signal as the local time of the slave unit.
  • a physical time signal such as 1 PPS (second pulse) from a different neighboring device
  • One or more slave units are synchronized to a master unit of a different device, and the slave unit acquires frequency information that is the same as or maintains a specified frequency deviation from the own device and other neighboring device master units.
  • the slave unit obtains frequency information by using an external frequency signal such as 8000 Hz, 2 Mbps/2 MHz, and 10 MHz, an intra-band frequency signal such as E1, synchronous Ethernet, or a packet such as PTP.
  • the specified frequency deviation should ensure that the synchronization accuracy of one or more slave units and different master units under the influence of frequency deviation meets the requirements in specific application scenarios.
  • the time deviation calculates the time adjustment value, adjusts the time of the main unit of the device, so that multiple devices constituting the time synchronization system tend to be at the same time, and time synchronization is realized between the devices.
  • the time of the master unit and the time of one or more slave units are extracted by comparing the master unit time with the one or more slave unit times at the same time Deviation, obtaining one or more slave unit time and time offset of the master unit.
  • the slave unit receives a physical time signal such as 1PPS (second pulse) of the master unit, extracts the whole second information carried by the time signal, and discriminates the phase difference between the unit local time and the extracted time signal and the second time. The time offset between the unit and the main unit of the device.
  • a physical time signal such as 1PPS (second pulse) of the master unit
  • the time offset is stored after the time offset of the master unit and one or more slave units is compared within the device.
  • the obtained time deviation can be stored locally; the obtained time deviation can be sent to the centralized management unit inside the device; and the obtained time deviation can also be reported to the centralized management unit outside the device.
  • the time adjustment value When adjusting the time of the device main unit by using the time deviation, extracting the time deviation of the main unit and one or more slave units (ie, obtaining the time deviation between the device and all its neighbors), calculating the time adjustment value by using the time deviation in a specified manner, and The time of the device's main unit is adjusted with the time adjustment value so that all devices in the network tend to be at the same time, and time synchronization is implemented between the devices. For example, when calculating the time adjustment value, the arithmetic mean or weighted average of the primary unit and one or more slave unit time offsets may be used as the time adjustment value.
  • time error value can be calculated by using PTP packet interaction.
  • the main unit has the time of the device and provides the time of the device to the slave units of different devices.
  • the master unit extracts the absolute time of the upstream device or the time server as the output time.
  • the time is different from the main unit and the slave unit time, and is used for output to the user.
  • Absolute time refers to the standard time commonly used worldwide, such as Coordinated Universal Time (UTC).
  • UTC Coordinated Universal Time
  • the main unit extracts the time of the upstream device or the time server as the local time.
  • the master unit transmits 1PPS (second pulse)
  • 1PPS second pulse
  • the time is output to the slave unit of the device and other neighboring devices by means of a signal, an interactive PTP message, and the like.
  • the master unit Before the time of providing the device to the slave units of different devices, the master unit obtains frequency information by means of an external frequency signal, an in-band frequency signal such as an Ethernet, and a PTP message to maintain the device time.
  • the master unit and one or more slave units may have the same carrier, but have different functions through configuration.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division, and the actual implementation may have another division manner.
  • multiple units or components can be combined, or can be integrated into another system, or some features can be omitted or not implemented.
  • the coupling, or direct coupling, or communication connection of the components shown or discussed may be indirect coupling or communication connection through some interfaces, devices or units, and may be electrical, mechanical or other forms. of.
  • the units described above as separate components may or may not be physically separated, and the components displayed as the unit may or may not be physical units, that is, may be located in one place or distributed to a plurality of network units. It is also possible to select some or all of the units according to actual needs to achieve the objectives of the solution of the embodiment.
  • each functional unit in each embodiment of the present disclosure may be integrated into one processing module, or each unit may be separately used as one unit, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
  • the foregoing program may be stored in a computer readable storage medium, and the program is executed when executed.
  • the foregoing storage device includes the following steps: the foregoing storage medium includes: a mobile storage device, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
  • ROM read-only memory
  • RAM random access memory
  • magnetic disk or an optical disk.
  • optical disk A medium that can store program code.

Abstract

Disclosed in the embodiments of the present disclosure are a synchronization method, a synchronization device, a synchronization apparatus and a system. The method applied in a first device comprises: synchronizing the first device with N second devices adjacent to the first device to obtain a time signal of a master time of each of the second devices, N being an integer not less than 2; locking and tracking said N time signals, to form N slave times; and calibrating, according to the N slave times, the master time of the first device. First, after the time signals of the second devices are obtained, the time signals will be locked and tracked to form slave times, thus avoiding the problem that synchronization cannot be achieved when acquiring time signals repeatedly or multiple times or the synchronization effects are poor. Second, the first device obtains the time signals of a plurality of adjacent second devices to synchronize with, rather than to be synchronized with an upstream device, thereby reducing the accumulation of synchronization errors caused by the synchronization of the downstream device and the upstream device, improving synchronization accuracy.

Description

同步方法、同步装置、同步设备及通信系统Synchronization method, synchronization device, synchronization device, and communication system
相关申请的交叉参考Cross-reference to related applications
本申请主张在2016年12月1日在中国提交的中国专利申请号No.201611094137.3的优先权,其全部内容通过引用包含于此。The present application claims priority to Chinese Patent Application No. 201611094137.3, filed on Jan. 1, 2016, the entire content of
技术领域Technical field
本公开文本涉及通信领域的同步技术,尤其涉及一种同步方法、同步装置、同步设备及通信系统。The present disclosure relates to synchronization technologies in the field of communications, and more particularly to a synchronization method, a synchronization device, a synchronization device, and a communication system.
背景技术Background technique
通常,每个设备在一个时间点只能锁定一个上游设备的时间信息。当与上游设备间的同步出现问题后,设备需要重新选择上游设备,并在稳定锁定该设备后,倒换到跟踪该设备。在重新选择和等待锁定过程中,设备无法获取时间服务器的时间信号,会造成设备的同步效果的下降,影响通信质量。更严重的情况下,时间服务器出现故障时,全网设备需要倒换跟踪到备用服务器的同步信息,使得单点问题的影响扩散到整个网络,从而导致多个或整个网络的同步出现紊乱。Typically, each device can only lock time information for one upstream device at a single point in time. After a problem occurs with the synchronization between the upstream device, the device needs to reselect the upstream device, and after stably locking the device, switch to tracking the device. During the process of reselecting and waiting for the lock, the device cannot obtain the time signal of the time server, which may cause the synchronization effect of the device to decrease and affect the communication quality. In a more serious case, when the time server fails, the entire network device needs to switch the synchronization information to the standby server, so that the impact of the single point problem spreads to the entire network, resulting in synchronization of multiple or the entire network.
发明内容Summary of the invention
(一)要解决的技术问题(1) Technical problems to be solved
有鉴于此,本公开文本实施例期望提供一种同步方法、同步装置及通信系统,至少部分解决上述问题。In view of this, embodiments of the present disclosure are expected to provide a synchronization method, a synchronization apparatus, and a communication system that at least partially solve the above problems.
(二)技术方案(2) Technical plan
为达到上述目的,本公开文本的技术方案是这样实现的:本公开文本实施例第一方面提供一种同步方法,应用于第一设备中,包括:In order to achieve the above object, the technical solution of the present disclosure is implemented as follows: The first aspect of the disclosure provides a synchronization method, which is applied to the first device, and includes:
分别与第一设备相邻的N个第二设备进行同步,以获得各所述第二设备的主时间的时间信号,其中,所述N为不小于2的整数;锁定并跟踪所述N个时间信号,形成N个从时间;以及 Synchronizing with the N second devices respectively adjacent to the first device to obtain a time signal of the main time of each of the second devices, wherein the N is an integer not less than 2; locking and tracking the N Time signal, forming N slave times;
根据N个所述从时间,校准所述第一设备的主时间。The master time of the first device is calibrated based on the N slave times.
基于上述方案,在本公开文本的一个可行实施例中,所述第一设备包括M个从单元和一个主单元,其中,所述M为不小于所述N且不小于2的整数;Based on the above solution, in a possible embodiment of the present disclosure, the first device includes M slave units and one master unit, where the M is an integer not less than the N and not less than 2;
所述分别与第一设备相邻的N个第二设备进行同步,以获得各所述第二设备的主时间的时间信号,包括:And synchronizing the N second devices that are respectively adjacent to the first device to obtain a time signal of the main time of each of the second devices, including:
利用第n个从单元获取表征第n个所述第二设备的主时间的第n个时间信号;Acquiring, by the nth slave unit, an nth time signal characterizing a master time of the nth second device;
所述锁定并跟踪所述N个时间信号,形成N个从时间,包括:The locking and tracking the N time signals to form N slave times includes:
根据所述第n个时间信号,校准所述第n个从单元的从时间;其中,所述n为不大于所述N的整数;And calibrating a slave time of the nth slave unit according to the nth time signal; wherein, n is an integer not greater than the N;
所述根据N个所述从时间,校准所述第一设备的主时间,包括:The calibrating the master time of the first device according to the N slave times includes:
根据至少N个所述从单元的从时间,校准所述主单元的主时间。The master time of the master unit is calibrated based on the slave time of at least N of the slave units.
基于上述方案,在本公开文本的一个可行实施例中,所述根据N个所述从时间,校准所述第一设备的主时间,还包括:Based on the above solution, in a possible embodiment of the present disclosure, the calibrating the master time of the first device according to the N times of time, further includes:
判断所述第n个从时间与所述第n个所述第二设备的主时间的同步状况;Determining a synchronization status of the nth slave time and a master time of the nth second device;
当所述同步状况满足预设条件时,根据所述第n个从时间校准所述第一设备的主时间。When the synchronization condition satisfies a preset condition, the master time of the first device is calibrated according to the nth slave time.
基于上述方案,在本公开文本的一个可行实施例中,所述判断所述第n个从时间与所述第n个所述第二设备的主时间的同步状况,包括:Based on the above solution, in a feasible embodiment of the present disclosure, the determining, by the determining, the synchronization status of the nth slave time and the master time of the nth second device includes:
比对所述第n个从时间与所述第n个所述第二设备的主时间的第一时间偏差;Comparing a first time deviation of the nth slave time from a master time of the nth second device;
所述当所述同步状况满足预设条件时,根据所述第n个从时间校准所述第一设备的主时间,包括:When the synchronization condition meets the preset condition, the master time of the first device is calibrated according to the nth slave time, including:
当所述第一时间偏差小于预设值时,根据所述第n个从时间校准所述第一设备的主时间。When the first time deviation is less than a preset value, the master time of the first device is calibrated according to the nth slave time.
基于上述方案,在本公开文本的一个可行实施例中,所述根据N个所述从时间,校准所述第一设备的主时间,包括:Based on the foregoing solution, in a possible implementation of the disclosure, the calibrating the master time of the first device according to the N times of time includes:
分别比对N个所述从时间与第一设备的主时间的第二时间偏差; Comparing respectively the second time deviations of the N slave times from the master time of the first device;
根据所述第二时间偏差,确定调整值;以及Determining an adjustment value according to the second time deviation;
根据所述调整值,调整所述第一设备的主时间。Adjusting a primary time of the first device according to the adjustment value.
基于上述方案,在本公开文本的一个可行实施例中,所述分别与第一设备相邻的N个第二设备进行同步,以获得各所述第二设备的主时间的时间信号,包括:Based on the above solution, in a possible embodiment of the present disclosure, the N second devices respectively adjacent to the first device are synchronized to obtain a time signal of the master time of each of the second devices, including:
接收N个所述第二设备分别发送的报文;Receiving, respectively, packets sent by the N second devices;
提取所述报文中的时间信息,获得N个所述时间信号。Extracting time information in the message to obtain N pieces of the time signals.
基于上述方案,所述分别与第一设备相邻的N个第二设备进行同步,以获得各所述第二设备的主时间的时间信号,包括:Based on the foregoing solution, the N second devices that are respectively adjacent to the first device are synchronized to obtain a time signal of the primary time of each of the second devices, including:
分别接收N个所述第二设备的主时间的物理时间信号。Receiving physical time signals of the master time of the N second devices, respectively.
本公开文本实施例第二方面提供一种同步装置,应用于第一设备中,包括:A second aspect of the embodiments of the present disclosure provides a synchronization apparatus, which is applied to a first device, and includes:
获取模块,用于分别与第一设备相邻的N个第二设备进行同步,以获得各所述第二设备的主时间的时间信号,其中,所述N为不小于2的整数;An acquiring module, configured to synchronize with each of the N second devices adjacent to the first device to obtain a time signal of a primary time of each of the second devices, where the N is an integer not less than 2;
锁定跟踪模块,用于锁定并跟踪所述N个时间信号,形成N个从时间;以及Locking a tracking module for locking and tracking the N time signals to form N slave times;
校准模块,用于根据N个所述从时间,校准所述第一设备的主时间。And a calibration module, configured to calibrate a primary time of the first device according to the N slave times.
基于上述方案,在本公开文本的一个可行实施例中,所述第一设备包括M个从单元和一个主单元;其中,所述M为不小于所述N且不小于2的整数;Based on the above solution, in a possible embodiment of the present disclosure, the first device includes M slave units and one master unit; wherein, the M is an integer not less than the N and not less than 2;
所述获取模块,具体用于利用第n个从单元获取表征第n个所述第二设备的主时间的第n个时间信号;The acquiring module is specifically configured to acquire, by using the nth slave unit, an nth time signal that represents a master time of the nth second device;
所述锁定跟踪模块,具体用于根据所述第n个时间信号,校准所述第n个从单元的从时间;其中,所述n为不大于所述N的整数;The lock tracking module is configured to calibrate a slave time of the nth slave unit according to the nth time signal, where n is an integer not greater than the N;
所述校准模块,具体用于根据至少N个所述从单元的从时间,校准所述主单元的主时间。The calibration module is specifically configured to calibrate a master time of the master unit according to a slave time of at least N slave units.
基于上述方案,在本公开文本的一个可行实施例中,所述装置还包括:Based on the above solution, in a possible embodiment of the disclosure, the device further includes:
判断模块,用于判断所述第n个从时间与所述第n个所述第二设备的主时间的同步状况; a determining module, configured to determine a synchronization status of the nth slave time and a master time of the nth second device;
当所述同步状况满足预设条件时,根据所述第n个从时间校准所述第一设备的主时间;When the synchronization condition satisfies a preset condition, the master time of the first device is calibrated according to the nth slave time;
所述校准模块,具体当所述第一时间偏差小于预设值时,根据所述第n个从时间校准所述第一设备的主时间。The calibration module, specifically, when the first time deviation is less than a preset value, calibrating a primary time of the first device according to the nth slave time.
基于上述方案,在本公开文本的一个可行实施例中,所述判断模块,具体用于比对所述第n个从时间与所述第n个所述第二设备的主时间的第一时间偏差;所述校准模块,具体当所述第一时间偏差小于预设值时,根据所述第n个从时间校准所述第一设备的主时间。Based on the above solution, in a feasible embodiment of the present disclosure, the determining module is specifically configured to compare the first time of the nth slave time with the master time of the nth second device The calibration module, specifically, when the first time deviation is less than a preset value, calibrating the master time of the first device according to the nth slave time.
基于上述方案,在本公开文本的一个可行实施例中,所述校准模块,具体用于分别比对N个所述从时间与第一设备的主时间的第二时间偏差;根据所述第二时间偏差,确定调整值,根据所述调整值,调整所述第一设备的主时间。Based on the above solution, in a feasible embodiment of the present disclosure, the calibration module is specifically configured to respectively compare a second time deviation of the N slave times with a master time of the first device; according to the second The time deviation determines an adjustment value, and the main time of the first device is adjusted according to the adjustment value.
基于上述方案,在本公开文本的一个可行实施例中,所述获取模块,具体用于接收N个所述第二设备分别发送的报文;提取所述报文中的时间信息,获得N个所述时间信号。Based on the foregoing solution, in a possible implementation of the disclosure, the acquiring module is specifically configured to receive, by the N, the second device, a message that is sent by the second device, and extract time information in the packet to obtain N The time signal.
基于上述方案,在本公开文本的一个可行实施例中,所述获取模块,具体用于分别接收N个所述第二设备的主时间的物理时间信号。Based on the above solution, in a possible embodiment of the present disclosure, the acquiring module is specifically configured to separately receive physical time signals of N main time of the second device.
本公开文本实施例第三方面提供一种同步设备,所述同步设备为第一设备,包括:A third aspect of the embodiments of the present disclosure provides a synchronization device, where the synchronization device is a first device, including:
至少两个从单元,用于获取与第一设备相邻的第二设备的主时间的时间信号,锁定并跟踪所述时间信号,形成从时间;以及At least two slave units for acquiring a time signal of a master time of the second device adjacent to the first device, locking and tracking the time signal to form a slave time;
主单元,用于根据所述至少两个从单元的从时间,校准所述主单元的主时间。a main unit, configured to calibrate a master time of the main unit according to a slave time of the at least two slave units.
本公开文本实施例第四方面提供一种通信系统,包括第一设备及多个与所述第一设备相邻的第二设备;A fourth aspect of the embodiments of the present disclosure provides a communication system including a first device and a plurality of second devices adjacent to the first device;
多个所述第二设备,用于分别将自身主时间的时间信号发送给所述第一设备;以及a plurality of the second devices, configured to respectively send time signals of their own master time to the first device;
所述第一设备,用于获取多个所述第二设备的时间信号,锁定并跟踪所述时间信号并形成从时间,并根据所述从时间校准所述第一设备的主时间。 The first device is configured to acquire time signals of a plurality of the second devices, lock and track the time signal, form a slave time, and calibrate a master time of the first device according to the slave time.
本公开文本实施例第五方面提供一种由计算机实现的同步装置,包括:处理器、存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如上所述的同步方法中的步骤。A fifth aspect of the embodiments of the present disclosure provides a computer-implemented synchronization device, including: a processor, a memory, and a computer program stored on the memory and executable on the processor, the computer program being The steps in the synchronization method as described above are implemented when the processor is executed.
本公开文本实施例第六方面提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如上所述的同步方法中的步骤。A sixth aspect of the present disclosure provides a computer readable storage medium having stored thereon a computer program that, when executed by a processor, implements the steps in the synchronization method as described above.
(三)有益效果(3) Beneficial effects
本公开文本实施例所提供的上述技术方案的有益效果如下:The beneficial effects of the above technical solutions provided by the embodiments of the present disclosure are as follows:
本公开文本实施例提供的同步方法、装置及系统,进行同步的第一设备,从相邻的第二设备的主时间的多个时间信号,锁定并跟踪所述时间信号,形成多个从时间,再根据从时间校准第一设备的主时间。这样的话,一方面解决了在同步的过程中,因为没有锁定从其他设备获取的时间信号,进而导致的同步不精确,以及需要反复获取其他设备的时间,并在反复获取其他设备的时间信号过程中,出现的无法同步或同步效果差的问题。另一方面,不再是仅从上游设备获取时间信号进行同步,而是与相邻的多个从设备进行同步,这样就用网状的同步,替换了同步链的同步方式,减少了因同步误差由上游设备逐级向下游设备累积的现象,提升了同步精度,提升了同步效果。此外,即便时间服务器出现故障,根据本公开文本的各实施例提供的同步方法,第一设备自身利用从时间实现了对需要同步的时间的锁定和跟踪,从而不会出现设备之间无法同步的问题,从而减少了时间服务器导致的整个网络内所有设备的无法同步的现象。总之,根据本公开文本的各实施例提供的同步方法,具有同步精度高、出现同步紊乱时间短及概率低的特点。The synchronization method, device and system provided by the embodiments of the present disclosure, the first device performing synchronization, locking and tracking the time signal from a plurality of time signals of the main time of the adjacent second device to form a plurality of slave times And then calibrate the primary time of the first device according to the time. In this way, on the one hand, in the process of synchronization, because the time signal acquired from other devices is not locked, the synchronization is inaccurate, and the time required to repeatedly acquire other devices, and the time signal process of repeatedly acquiring other devices is repeated. In the middle, there is a problem that the synchronization cannot be synchronized or the synchronization effect is poor. On the other hand, instead of only acquiring the time signal from the upstream device for synchronization, but synchronizing with a plurality of adjacent slave devices, the mesh synchronization is used to replace the synchronization mode of the synchronization chain, thereby reducing synchronization. The error is accumulated by the upstream device to the downstream device step by step, which improves the synchronization accuracy and improves the synchronization effect. In addition, even if the time server fails, according to the synchronization method provided by the embodiments of the present disclosure, the first device itself realizes the locking and tracking of the time required for synchronization from time, so that the devices cannot be synchronized. The problem, which reduces the unsynchronization of all devices in the entire network caused by the time server. In summary, the synchronization method provided according to various embodiments of the present disclosure has the characteristics of high synchronization precision, short synchronization disorder time, and low probability.
附图说明DRAWINGS
为了更清楚地说明本公开文本实施例或现有技术中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本公开文本的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only the present disclosure. Some embodiments of the text may also be used to obtain other figures from these figures without departing from the art.
图1为本公开文本实施例提供的一种同步方法的流程示意图; FIG. 1 is a schematic flowchart diagram of a synchronization method according to an embodiment of the present disclosure;
图2为本公开文本实施例提供的一种同步装置的结构示意图;2 is a schematic structural diagram of a synchronization apparatus according to an embodiment of the present disclosure;
图3为本公开文本实施例提供的一种同步设备的结构示意图;FIG. 3 is a schematic structural diagram of a synchronization device according to an embodiment of the present disclosure;
图4为本公开文本实施例提供的第一种同步系统的结构示意图;4 is a schematic structural diagram of a first synchronization system according to an embodiment of the present disclosure;
图5为本公开文本实施例提供的第二种同步系统的结构示意图;以及FIG. 5 is a schematic structural diagram of a second synchronization system according to an embodiment of the present disclosure;
图6为本公开文本实施例提供的第三种同步系统的结构示意图。FIG. 6 is a schematic structural diagram of a third synchronization system according to an embodiment of the present disclosure.
具体实施方式detailed description
以下结合说明书附图及具体实施例对本公开文本的技术方案做进一步的详细阐述。The technical solutions of the present disclosure will be further elaborated below in conjunction with the drawings and specific embodiments.
如图1所示,本实施例提供一种同步方法,应用于第一设备中,包括:As shown in FIG. 1 , this embodiment provides a synchronization method, which is applied to a first device, and includes:
步骤S110:分别与第一设备相邻的N个第二设备进行同步,以获得各所述第二设备的主时间的时间信号;其中,所述N为不小于2的整数;Step S110: Synchronizing with the N second devices adjacent to the first device to obtain a time signal of the main time of each of the second devices; wherein, N is an integer not less than 2;
步骤S120:锁定并跟踪所述N个时间信号,形成N个从时间;Step S120: Lock and track the N time signals to form N slave times;
步骤S130:根据N个所述从时间,校准所述第一设备的主时间。Step S130: Calibrate the master time of the first device according to the N slave times.
本实施例中所述第一设备和第二设备中的“第一”和“第二”均是泛指,并不特指某个设备。在本实施例中所述第一设备和第二设备均通信系统相邻设置且不同的设备。所述第一设备和第二设备为对等设备或同级设备,即所述第一设备不是所述第二设备的上游设备,所述第二设备也不是所述第一设备的上游设备。所述第一设备和第二设备为相邻设置可以相互通信的两个设备。The “first” and “second” in the first device and the second device in this embodiment are generally referred to, and do not specifically refer to a certain device. In this embodiment, the first device and the second device are both devices that are adjacent to each other and different in the communication system. The first device and the second device are peer devices or peer devices, that is, the first device is not an upstream device of the second device, and the second device is not an upstream device of the first device. The first device and the second device are two devices that are adjacent to each other and can communicate with each other.
所述第一设备将从多个相邻的第二设备中获取时间信号。这里的时间信号,可为表征所述第二设备的主时间的时间信号。这里的主时间为一个设备与其他设备进行通信以来的时间信号,利用该时间在对应的时频资源发送承载有信息的电信号或电磁波信号或光信号。The first device will acquire a time signal from a plurality of adjacent second devices. The time signal here may be a time signal characterizing the master time of the second device. The master time here is a time signal since a device communicates with other devices, and uses the time to transmit an electrical signal or an electromagnetic wave signal or an optical signal carrying the information in the corresponding time-frequency resource.
在本实施例中当获取到第二设备的主时间的时间信号后,将锁定并跟踪所述时间信号,形成第一设备的从时间。In this embodiment, after the time signal of the master time of the second device is acquired, the time signal is locked and tracked to form the slave time of the first device.
在具体实现时,所述第一设备可包括多个从单元,这些从单元也会形成时间信号,在本实施例中所述锁定并跟踪所述时间信号,形成从时间。可理解为根据所述时间信号校准所述第一设备内的从单元的从时间,从而实现从 时间的校准,和对第二设备的主时间的锁定和跟踪。In a specific implementation, the first device may include a plurality of slave units, and the slave units may also form a time signal, and in the embodiment, the time signal is locked and tracked to form a slave time. It can be understood that the slave time of the slave unit in the first device is calibrated according to the time signal, thereby realizing Calibration of time, and locking and tracking of the primary time of the second device.
这里的锁定跟踪第二设备的从时间,还可包括利用获取的时间信号作为锁相环的输入,利用锁相环进行所述时间信号的锁定和跟踪。The lock tracking the slave device's slave time herein may also include utilizing the acquired time signal as an input to the phase locked loop, using the phase locked loop to lock and track the time signal.
在步骤S130中,将根据多个从单元的从时间进行第一设备的主时间的校准。在步骤S130中可以进行多次校准。例如,所述步骤S130,将按预定时间间隔进行多次校准。由于利用从单元锁定了其他设备的主时间,从而可以在多次第一设备的主时间的校准过程中,就不用反复从第二设备获取时间。若当第一设备的主单元的主时间紊乱时,无需等到重新获取其他设备的主时间,就可以根据自身的从时间进行主时间的校准,从而简便快捷的完成与其他设备的时间同步。In step S130, the calibration of the master time of the first device is performed according to the slave time of the plurality of slave units. Multiple calibrations can be performed in step S130. For example, in step S130, multiple calibrations will be performed at predetermined time intervals. Since the master time of the other device is locked by the slave unit, it is not necessary to repeatedly acquire time from the second device during the calibration of the master time of the first device. If the main time of the main unit of the first device is disordered, it is not necessary to wait until the main time of the other device is re-acquired, and the main time can be calibrated according to its own time, so that time synchronization with other devices can be completed quickly and easily.
在本实施例中由于从时间是与相邻的多个设备的主时间进行同步,故在本实施例中可以一边获取其他设备的主时间,一边进行校准,避免在获取时间的过程中无法进行第一设备的主时间的校准,并导致第一设备自身及连接在其下方的下游设备的都无法校准,无法与上游设备进行同步的问题。In this embodiment, since the slave time is synchronized with the master time of the plurality of adjacent devices, in this embodiment, the master time of the other device can be acquired while performing calibration, thereby avoiding the inability to perform during the acquisition time. The calibration of the primary time of the first device causes the first device itself and the downstream devices connected below it to be uncalibrated and unable to synchronize with the upstream device.
在具体实现时,所述N个时间信号为时间脉冲,所述步骤S120可包括:计算出N个时间脉冲得到这N个时间脉冲中相位差的均值或中值,利用该相位差的均值或中值,调整所述第一设备的时间脉冲的相位,从而实现第一设备的从时间与N个第二设备主时间的时间脉冲的同步。在具体实现时,通信网络中每一个设备都可以视为第一设备执行类似的调整,这样的话,就可以实现全网的同步。显然,采用这种同步方法,可以在设备之间不再区分上游设备和下游设备,也不限于下游设备向上游设备进行同步,这样可以避免同步误差的累加,实现更精确的同步。In a specific implementation, the N time signals are time pulses, and the step S120 may include: calculating N time pulses to obtain a mean or a median of phase differences among the N time pulses, using the mean of the phase differences or The median adjusts the phase of the time pulse of the first device to achieve synchronization of the time pulse of the first device with the time pulses of the N second device master times. In a specific implementation, each device in the communication network can be regarded as performing similar adjustments on the first device, so that synchronization of the entire network can be realized. Obviously, with this synchronization method, the upstream device and the downstream device can be no longer distinguished between the devices, and the downstream device is not synchronized to the upstream device, so that the accumulation of synchronization errors can be avoided and more accurate synchronization can be realized.
在一些实施例中,所述第一设备包括M个从单元和一个主单元,其中,所述M为不小于2的整数。In some embodiments, the first device includes M slave units and one master unit, wherein the M is an integer not less than 2.
所述步骤S110可包括:利用第n个从单元获取表征第n个所述第二设备的主时间的第n个时间信号。The step S110 may include: acquiring, by using the nth slave unit, an nth time signal that represents a master time of the nth second device.
所述步骤S120可包括:根据所述第n个时间信号,校准所述第n个从单元的从时间;其中,所述n为不大于所述N的整数;所述N为不大于所述M的整数。 The step S120 may include: calibrating a slave time of the nth slave unit according to the nth time signal; wherein the n is an integer not greater than the N; the N is not greater than the An integer of M.
所述步骤S130可包括:根据至少N个所述从单元的从时间,校准所述主单元的主时间。The step S130 may include: calibrating a master time of the master unit according to a slave time of at least N slave units.
在本实施例中所述第一设备包括一个主单元和多个从单元。这里的主单元和从单元都可对应于计时芯片等,不同的是,所述主单元为所述第一设备的工作提供本地时间。所述从单元主要用于第一设备与第二设备进行主单元的时间校准,实现同步。在具体实现时,为了节省硬件成本,所述主单元的计时精度可能高于所述从单元的计时精度,以确保第一设备的本地时间的精确性,减少不稳定性。可选的,所述主单元和从单元的计时精度一致。In the embodiment, the first device includes one main unit and a plurality of slave units. Both the master unit and the slave unit herein may correspond to a timing chip or the like, except that the master unit provides local time for the operation of the first device. The slave unit is mainly used for time calibration of the primary unit by the first device and the second device to achieve synchronization. In a specific implementation, in order to save hardware cost, the timing accuracy of the main unit may be higher than the timing accuracy of the slave unit to ensure the accuracy of the local time of the first device and reduce instability. Optionally, the timing precision of the master unit and the slave unit are consistent.
在本实施例中在获取第二设备的时间信号时,利用从单元去获取,并通过校准从单元的从时间,实现对第二设备主时间的锁定和跟踪。In the present embodiment, when acquiring the time signal of the second device, the slave device is used to acquire, and by calibrating the slave device's slave time, locking and tracking of the second device master time is realized.
在本实施例中所述锁定可为:将第一设备的从时间与第二设备的主时间进行同步;所述跟踪可理解为:所述第一设备的从时间在与第二设备的主时间同步之后,以同步之后的时间继续计时或产生时间信号,从而达到跟踪第二设备的主时间的效果。In the embodiment, the locking may be: synchronizing the slave time of the first device with the master time of the second device; the tracking may be understood as: the slave time of the first device is in the master of the second device After the time synchronization, the timing is continued or the time signal is generated at the time after the synchronization, thereby achieving the effect of tracking the master time of the second device.
在步骤S130中将根据N个从单元的从时间,校准主单元的主时间,即相当于以从单元为媒介,获取并记录第二设备的主时间,并用于调整第一设备内主单元的主时间。In step S130, the master time of the master unit is calibrated according to the slave time of the N slave units, that is, the master time of the second device is acquired and recorded in the slave unit as a medium, and is used to adjust the master unit in the first device. Master time.
在具体实现时,所述第二设备同样可包括:主单元和从单元;即所述第二设备的计时结构或时间结构与第一设备相同。在本实施例中所述步骤S110可为:第一设备的一个从单元从一个第二设备的主单元获取时间信号。这样的话,包括多个从单元的第一设备就可获取多个第二设备的主单元的主时间,再根据这多个第二设备的主单元的主时间(对应于多个从单元的从时间),校准第一设备的主单元的主时间,从而实现多个相邻对等设备之间的时间校准,从而避免同步误差的逐级累加及无法在时间获取的过程中进行同步的问题。In a specific implementation, the second device may also include: a primary unit and a secondary unit; that is, the timing structure or time structure of the second device is the same as the first device. In the embodiment, step S110 may be: one slave unit of the first device acquires a time signal from a master unit of a second device. In this case, the master time of the master unit of the plurality of second devices can be acquired by the first device including the plurality of slave units, and the master time of the master unit of the plurality of second devices (corresponding to the slaves of the plurality of slave units) Time), calibrating the master time of the primary unit of the first device, thereby implementing time alignment between a plurality of adjacent peer devices, thereby avoiding the stepwise accumulation of synchronization errors and the inability to synchronize during time acquisition.
在有些实施例中,所述步骤S130可包括:判断所述第n个从时间与所述第n个所述第二设备的主时间的同步状况;当所述同步状况满足预设条件时,根据所述第n个从时间校准所述第一设备的主时间。In some embodiments, the step S130 may include: determining a synchronization status of the nth slave time and a master time of the nth second device; when the synchronization condition satisfies a preset condition, The master time of the first device is calibrated according to the nth slave time.
这里的同步状况可表征每一个从单元的从时间与其他设备的主时间之间的同步精确度。 The synchronization condition here can characterize the synchronization accuracy between the slave time of each slave unit and the master time of other devices.
进一步地,所述步骤S120可包括:比对所述第n个从时间与所述第n个所述第二设备的主时间的第一时间偏差,且当所述第一时间偏差小于预设值时,根据所述第n个从时间校准所述第一设备的主时间。Further, the step S120 may include: comparing a first time deviation of the nth slave time with a master time of the nth second device, and when the first time offset is less than a preset And a value, the master time of the first device is calibrated according to the nth slave time.
具体的方法可包括:比对所述第s个所述从单元与第s个所述第二设备的主单元的时间,确定第s个第一时间偏差;所述s为不大于所述N的正整数。在本实施例中所述第s个所述从单元为泛指与第二设备进行时间信号交互的任意一个从单元。所述第s个第二设备,同样是泛指与第一设备内从单元进行时间信号交互的任意一个设备。在本实施例中,总之一个从单元和一个相邻设备的主单元进行时间比对,获得第一时间偏差。因为,从单元在获取相邻设备的主单元的时间过程中,可能由于传输时延、校准时延等问题,从单元即便校准之后,与相邻的第二设备的主单元还是存在时间误差。在本实施例中为了进一步提升同步精度,将还会获取所述第一时间偏差。例如,通过报文交互,例如,分组报文交互,获取第二设备的时间,通过获取的时间与从单元的比对,再获得所述第一时间偏差。这样的话,所述步骤S120包括:根据所述第一时间偏差及所述N个所述从单元的从时间,校准所述主单元的主时间。The specific method may include: determining, by comparing the time of the sth slave unit and the sth master unit of the second device, the sth first time offset; the s is not greater than the N Positive integer. In the embodiment, the sth slave unit refers to any slave unit that performs time signal interaction with the second device. The s second device is also generally referred to as any device that performs time signal interaction with the slave unit in the first device. In this embodiment, a slave unit and a master unit of an adjacent device perform time comparison to obtain a first time offset. Because the slave unit is in the process of acquiring the master unit of the neighboring device, there may be a time error between the slave unit and the master unit of the adjacent second device even after the unit is calibrated due to problems such as transmission delay and calibration delay. In order to further improve the synchronization accuracy in this embodiment, the first time offset will also be acquired. For example, the packet exchanges, for example, packet packet interaction, acquires the time of the second device, and obtains the first time offset by comparing the acquired time with the slave unit. In this case, the step S120 includes: calibrating the master time of the master unit according to the first time offset and the slave time of the N slave units.
在本实施例中,将结合所述第一时间偏差值,选择与相邻的第二设备的主时间同步效果好的一个或多个从时间,校准所述主单元的主时间。In this embodiment, one or more slave times that are better than the master time synchronization effect of the adjacent second device are combined with the first time offset value to calibrate the master time of the master unit.
在有些实施例中,具体校准所述主单元的间时,若N个所述时间误差值有P个第一时间偏差值小于偏差阈值,则根据所述P个第一时间偏差值及所述从时间,校准所述第一设备的主时间。In some embodiments, when specifically calculating the interval between the main units, if the N time error values have P first time deviation values less than a deviation threshold, according to the P first time deviation values and the From time, the master time of the first device is calibrated.
若大于所述偏差阈值,则不根据该从时间进行第一设备的主时间的校准,避免在第一设备的主时间的校准过程中出现同步效果差的问题。If the deviation threshold is greater than the calibration, the calibration of the master time of the first device is not performed according to the slave time, and the problem that the synchronization effect is poor during the calibration of the master time of the first device is avoided.
在一些实施例中,所述步骤S120可包括:In some embodiments, the step S120 may include:
分别比对N个所述从时间与第一设备的主时间的第二时间偏差;Comparing respectively the second time deviations of the N slave times from the master time of the first device;
根据所述第二时间偏差,确定调整值;以及Determining an adjustment value according to the second time deviation;
根据所述调整值,调整所述第一设备的主时间。Adjusting a primary time of the first device according to the adjustment value.
在本实施例中这里第一设备的主时间有一个原始时间,该原始时间为第一设备的主单元在校准之前的时间。在本实施例中,将N个从时间与第一设 备的主时间进行比对,比对之后,会得到至少N个第二时间偏差。在具体实现时,若M大于N,为了减少同步校准过程中所需记录的数据,例如,不用记录本次有哪N个从时间与相邻的第二设备进行过时间校准,可以直接将比对M个从单元与主单元的原始时间的第二时间偏差,这种比对方式,必然包括本次与第二设备进行了时间校准的N个从时间。再根据所述第二时间偏差,确定调整值。最后所述调整值,调整主单元的主时间,从而实现第一设备的主单元的精确同步。所述调整值可为多个所述第二时间偏差的均值或中值。In this embodiment, the primary time of the first device herein has an original time, which is the time before the primary unit of the first device is calibrated. In this embodiment, N times and the first setting The prepared master time is compared, and after the comparison, at least N second time offsets are obtained. In the specific implementation, if M is greater than N, in order to reduce the data required to be recorded during the synchronous calibration process, for example, it is not necessary to record which N times of time have been time-aligned with the adjacent second device, and the ratio can be directly The second time offset of the original time of the M slave units and the master unit, the comparison manner necessarily includes the N slave times that are time-aligned with the second device. And according to the second time deviation, the adjustment value is determined. Finally, the adjustment value adjusts the main time of the main unit, thereby achieving precise synchronization of the main unit of the first device. The adjustment value may be a mean or a median of the plurality of the second time offsets.
在一些实施例中,所述步骤S110可包括:接收N个所述第二设备分别发送的报文;提取所述报文中的时间信息,获得N个所述时间信号。In some embodiments, the step S110 may include: receiving, respectively, N messages sent by the second device; extracting time information in the message, and obtaining N the time signals.
这里的报文可为分组时间报文,例如,精确时间同步协议(Precision Time Protocol,PTP)报文。通过提取该报文携带的时间信息,可以获得所述时间信号。例如,提取该报文的时间戳,获取所述时间信号,也可以提取所述报文的报文内容,获得报文内容中的时间信息,从而获得所述时间信号。总之,在本实施例中通过报文交互可以简便的实现第一设备和第二设备之间时间信号的交互,具有实现简便的特点。The message here may be a packet time message, for example, a Precision Time Protocol (PTP) message. The time signal can be obtained by extracting time information carried by the message. For example, the time stamp of the packet is extracted, the time signal is obtained, and the packet content of the packet is extracted, and time information in the content of the packet is obtained, thereby obtaining the time signal. In summary, in the embodiment, the interaction of the time signals between the first device and the second device can be easily realized through message interaction, and has the characteristics of being simple to implement.
在另一些实施例中,所述步骤S110可包括:In other embodiments, the step S110 may include:
分别接收N个所述第二设备的主时间的物理时间信号。Receiving physical time signals of the master time of the N second devices, respectively.
在本实施例中所述物理时间信号,可包括时间脉冲、例如,秒脉冲,这些脉冲都是对应的物理时间。第一设备可以利用锁相环等接收所述物理时间信号,例如,秒脉冲,再根据物理时间信号校准从单元的即时时间,例如将锁相环的输出信号作为从单元的本地时间,从而从单元的时间校准。若从第二设备接收的为物理时间信号时,所述主单元可通过相位调整或一个脉冲长度的调整,实现步骤S120中的时间校准,从而实现同步。The physical time signal in this embodiment may include a time pulse, for example, a second pulse, which are the corresponding physical times. The first device may receive the physical time signal by using a phase locked loop or the like, for example, a second pulse, and then calibrate the instantaneous time of the slave unit according to the physical time signal, for example, using the output signal of the phase locked loop as the local time of the slave unit, thereby Time calibration of the unit. If the physical time signal is received from the second device, the main unit may implement time calibration in step S120 by phase adjustment or adjustment of a pulse length, thereby achieving synchronization.
值得注意的是:在进行同步之前,本实施例所述的方法还可包括:It should be noted that the method described in this embodiment may further include:
获取相邻设备的频率信息;Obtain frequency information of neighboring devices;
选择与所述第一设备采用同一工作频率的相邻设备,作为所述第二设备。例如,第一设备的工作频率为2Mbps,若需要校准同步,则需要和工作频率同样为2Mbps的设备校准,而非任意一个设备。故在本实施例中,所述方法还包括: A neighboring device that uses the same operating frequency as the first device is selected as the second device. For example, the first device operates at 2 Mbps. If calibration synchronization is required, it needs to be calibrated to a device with the same operating frequency of 2 Mbps instead of any device. Therefore, in this embodiment, the method further includes:
通过频率信息的获取,选择所述第二设备。具体如,获取与第一设备的主单元的工作频率相同或频率偏差在预定范围内的相邻设备作为所述第一设备。通常一个设备内主单元和从单元的工作频率或频率信息是一致的。The second device is selected by acquisition of frequency information. Specifically, for example, a neighboring device having the same operating frequency as the primary unit of the first device or having a frequency deviation within a predetermined range is acquired as the first device. Usually the operating frequency or frequency information of the master unit and the slave unit in a device is the same.
如图2所示,本实施例提供一种同步装置100,应用于第一设备中,包括:As shown in FIG. 2, the embodiment provides a synchronization device 100, which is applied to a first device, and includes:
获取模块110,用于分别与第一设备相邻的N个第二设备进行同步,以获得各所述第二设备的主时间的时间信号;其中,所述N为不小于2的整数;The obtaining module 110 is configured to synchronize the N second devices adjacent to the first device to obtain a time signal of a primary time of each of the second devices, where the N is an integer not less than 2;
锁定跟踪模块120,用于锁定并跟踪所述N个时间信号,形成N个从时间;Locking tracking module 120, configured to lock and track the N time signals to form N slave times;
校准模块130,用于根据N个所述从时间,校准所述第一设备的主时间。The calibration module 130 is configured to calibrate the master time of the first device according to the N times.
本实施例提供的所述同步装置为应用于所述第二设备中的同步结构。The synchronization device provided in this embodiment is a synchronization structure applied to the second device.
所述获取模块110可对应于通信接口,可以从第二设备接收时间信号。所述锁定跟踪模块可对应于时间芯片,可用于记录并产生从时间。The obtaining module 110 may correspond to a communication interface, and may receive a time signal from the second device. The lock tracking module can correspond to a time chip and can be used to record and generate slave time.
所述校准模块130可对应于处理器或处理电路或处理芯片。所述处理器可包括中央处理器、微处理器、数字信号处理器、应用处理器或可编程阵列等。所述处理电路可包括专用集成电路等。The calibration module 130 can correspond to a processor or processing circuit or processing chip. The processor can include a central processing unit, a microprocessor, a digital signal processor, an application processor or a programmable array, and the like. The processing circuit can include an application specific integrated circuit or the like.
在本实施例中所述获取模块110将获得第一设备的相邻的多个第二设备的时间信号,在校准模块130将根据N个从时间,校准第一设备的主时间。一方面,不再是下游设备向上游设备的校准,而所有设备都视为同级设备进行网状似的同步校准,从而实现同步精确度的提升。另一方面,在同步的过程中,会锁定并跟踪其他设备的主时间,在多次同步时,不用每次都去进行其他设备的时钟获取,或当一次同步失效时可以不用再去重复获取,从而避免在获取其他设备的主时间过程中导致的无法同步或同步效果差的问题,且避免了链式同步逐级同步失效的问题。In this embodiment, the acquisition module 110 will obtain time signals of a plurality of adjacent second devices of the first device, and the calibration module 130 will calibrate the master time of the first device according to the N slave times. On the one hand, it is no longer the calibration of the downstream device to the upstream device, and all devices are regarded as the network-like synchronous calibration of the same-level device, thereby achieving the synchronization accuracy improvement. On the other hand, during the synchronization process, the master time of other devices is locked and tracked. When multiple synchronizations are performed, it is not necessary to perform clock acquisition of other devices every time, or when one synchronization fails, it is not necessary to repeat the acquisition. In order to avoid the problem of unsynchronized or poor synchronization caused by acquiring the master time of other devices, and avoiding the problem of chained synchronization step-by-step synchronization failure.
在一些实施例中,所述第一设备包括M个从单元和一个主单元;其中,所述M为不小于2的整数;In some embodiments, the first device includes M slave units and one master unit; wherein the M is an integer not less than 2;
所述获取模块110,具体用于利用第n个从单元获取表征第n个所述第二设备的主时间的第n个时间信号;The acquiring module 110 is specifically configured to acquire, by using the nth slave unit, an nth time signal that represents a primary time of the nth second device;
所述锁定跟踪模块120,具体用于根据所述第n个时间信号,校准所述 第n个从单元的从时间;其中,所述n为不大于所述N的整数;所述N为不大于所述M的整数;The lock tracking module 120 is specifically configured to calibrate the according to the nth time signal a slave time of the nth slave unit; wherein n is an integer not greater than the N; the N is an integer not greater than the M;
所述校准模块130,具体用于根据至少N个所述从单元的从时间,校准所述主单元的主时间。The calibration module 130 is specifically configured to calibrate a master time of the master unit according to a slave time of at least N slave units.
在本实施例中所述第一设备包括多个从单元和一个主单元。获取单元110利用从单元从多个第二设备获取多个时间信号。校准模块130,可用于控制主单元,根据多个从单元的从时间来进行校准,从而实现与多个第二设备的同步,以提升同步的精确度。In the embodiment, the first device includes a plurality of slave units and one master unit. The obtaining unit 110 acquires a plurality of time signals from the plurality of second devices by using the slave unit. The calibration module 130 can be configured to control the main unit to perform calibration according to the slave time of the plurality of slave units, thereby implementing synchronization with the plurality of second devices to improve synchronization accuracy.
在一些实施例中,所述同步装置100还包括:In some embodiments, the synchronization device 100 further includes:
判断模块(未示出),用于判断所述第n个从时间与所述第n个所述第二设备的主时间的同步状况;a judging module (not shown), configured to determine a synchronization status of the nth slave time and a master time of the nth second device;
所述校准模块130,具体当所述同步状况满足预设条件时,根据所述第n个从时间校准所述第一设备的主时间。The calibration module 130 specifically calibrates the master time of the first device according to the nth slave time when the synchronization condition satisfies a preset condition.
具体地如,所述判断模块,具体用于比对所述第n个从时间与所述第n个所述第二设备的主时间的第一时间偏差;所述校准模块130,则具体用于当所述第一时间偏差小于预设值时,根据所述第n个从时间校准所述第一设备的主时间。For example, the determining module is specifically configured to compare a first time deviation between the nth slave time and a master time of the nth second device; the calibration module 130 is specifically used And when the first time deviation is less than a preset value, the master time of the first device is calibrated according to the nth slave time.
所述判断模块可对应于处理器或处理电路,或比较器或具有比较功能的处理器或处理电路。所述判断模块,通过从单元与第二设备的时间的比对,得到所述第一时间偏差值。The determination module may correspond to a processor or processing circuit, or a comparator or a processor or processing circuit having a comparison function. The determining module obtains the first time offset value by comparing the time of the slave unit with the second device.
所述校准模块130,当所述第一时间偏差小于预设值时,根据所述第n个从时间校准所述第一设备的主时间,这样就可以替换与其他设备的同步效果差的从时间,对本地的第一设备的主时间的校准,再次提升两个设备之间的主时间的校准及同步精确度。The calibration module 130, when the first time deviation is less than a preset value, calibrating the master time of the first device according to the nth slave time, so that the slave with poor synchronization effect with other devices can be replaced. Time, the calibration of the primary time of the local first device, again improves the calibration and synchronization accuracy of the master time between the two devices.
在一些实施例中,所述校准模块130,具体用于分别比对N个所述从时间与第一设备的主时间的第二时间偏差;根据所述第二时间偏差,确定调整值,根据所述调整值,调整所述第一设备的主时间。在本实施例中,所述校准模块130会计算出所述第二时间偏差值,根据第二时间偏差,确定调整值,再利用调整值,调整主单元的主时间,以再次提升同步精确度。 In some embodiments, the calibration module 130 is specifically configured to respectively compare a second time deviation of the N slave times with a master time of the first device; and determine, according to the second time offset, an adjustment value, according to The adjustment value adjusts a primary time of the first device. In this embodiment, the calibration module 130 calculates the second time deviation value, determines the adjustment value according to the second time deviation, and then uses the adjustment value to adjust the main time of the main unit to improve the synchronization accuracy again.
在某些实施例中,所述获取模块110,具体用于接收N个所述第二设备分别发送的报文;提取所述报文中的时间信息,获得N个所述时间信号。在本实施例中通过报文交互,获取时间信号。在另外一些实施例中,所述获取模块110,具体用于分别接收N个所述第二设备的主时间的物理时间信号。在本实施例中所述获取单元110还可通过物理时间信号的接收,获取所述时间信号。这些报文是基于第二设备的主时间发送的。In some embodiments, the acquiring module 110 is configured to receive, by the N, the second device, a message that is sent by the second device, and extract time information in the packet to obtain the N time signals. In this embodiment, the time signal is obtained through message interaction. In some other embodiments, the acquiring module 110 is specifically configured to receive physical time signals of the primary time of the N second devices. In this embodiment, the acquiring unit 110 may also acquire the time signal by receiving a physical time signal. These messages are sent based on the primary time of the second device.
如图3所示,本实施例提供一种同步设备200,所述同步设备为第一设备,包括:As shown in FIG. 3, the embodiment provides a synchronization device 200, where the synchronization device is a first device, and includes:
至少两个从单元210,用于获取与第一设备相邻的第二设备的主时间的时间信号,锁定并跟踪所述时间信号,形成从时间;At least two slave units 210, for acquiring a time signal of a master time of a second device adjacent to the first device, locking and tracking the time signal to form a slave time;
主单元220,用于根据所述至少两个从单元的从时间,校准所述主单元的主时间。The main unit 220 is configured to calibrate the main time of the main unit according to the slave time of the at least two slave units.
本实施例所述同步设备可为任意一个通信设备,例如,各级基站、各级网关或各级通信设备。在本实施例中所述同步设备包括至少一个从单元210,还包括多个主单元220。在本实施例中所述从单元210会获取相邻的第二设备的主单元的时间信号,再由本设备的主单元220根据多个从单元210的从时间,进行本设备的主单元220的主时间的时间校准。本实施例所述的同步设备200,可以用于实现前述的同步方法的实现。例如,主单元220,主要用于与从单元210的时间进行比较,确定时间偏差,再根据时间偏差确定调整值,再利用调整值调整主单元220的主时间。例如,所述从单元可通过报文,例如,PTP报文等获取时间信号,或直接从相邻的第二设备获取物理时间信号等。The synchronization device in this embodiment may be any one of the communication devices, for example, base stations at various levels, gateways at various levels, or communication devices at various levels. In the embodiment, the synchronization device includes at least one slave unit 210, and further includes a plurality of master units 220. In this embodiment, the slave unit 210 acquires the time signal of the master unit of the adjacent second device, and then the master unit 220 of the device performs the master unit 220 of the device according to the slave time of the plurality of slave units 210. Time calibration of the main time. The synchronization device 200 of this embodiment can be used to implement the foregoing synchronization method. For example, the main unit 220 is mainly used for comparing with the time of the slave unit 210, determining the time deviation, determining the adjustment value according to the time deviation, and adjusting the main time of the main unit 220 by using the adjustment value. For example, the slave unit may acquire a time signal by using a message, for example, a PTP message, or the like, or acquire a physical time signal or the like directly from an adjacent second device.
如图4所示,本实施例提供一种通信系统,包括第一设备310及多个与所述第一设备310相邻的第二设备320;As shown in Figure 4, this embodiment provides a communication system, including a first device 310 and a plurality of second devices 320 adjacent to the first device 310;
多个所述第二设备320,用于分别将自身主时间的时间信号发送给所述第一设备310;a plurality of the second devices 320, respectively, for transmitting a time signal of its own master time to the first device 310;
所述第一设备310,用于获取多个所述第二设备的时间信号,锁定并跟踪所述时间信号并形成从时间,并根据所述从时间校准所述第一设备的主时间。 The first device 310 is configured to acquire time signals of a plurality of the second devices, lock and track the time signal, form a slave time, and calibrate a master time of the first device according to the slave time.
在本实施例中同步系统,会由多个第二设备为一个第一设备提供同步用的时间信号,这里的时间信号可为如PTP报文中的时间戳或物理时间信号。第一设备310和第二设备320均视为同级设备,这样可以实现网状似同步,从而实现同步的提升。总之,本实施例可用于实现前述的同步方法。In this embodiment, the synchronization system provides a time signal for synchronization by a plurality of second devices for a first device, where the time signal can be a time stamp or a physical time signal in a PTP message, for example. Both the first device 310 and the second device 320 are regarded as peer devices, so that mesh-like synchronization can be realized, thereby achieving synchronization improvement. In summary, this embodiment can be used to implement the aforementioned synchronization method.
以下结合上述实施例提供几个具体示例:Several specific examples are provided below in conjunction with the above embodiments:
示例一:Example 1:
如图5所示,本示例提供一种同步系统,包括多个设备;每一个所述设备包括一个主单元和多个从单元。一个设备的一个从单元可与相邻一个设备的主单元建立连接,用于时间信号的交互和从单元的时间校准,最终时间两个相邻设备之间的主单元的时间校准并同步。As shown in FIG. 5, the present example provides a synchronization system including a plurality of devices; each of the devices includes a main unit and a plurality of slave units. A slave unit of a device can establish a connection with a master unit of an adjacent device for time signal interaction and time calibration of the slave unit, and finally time calibration and synchronization of the master unit between two adjacent devices.
如图6所示,本示例还提供一种同步系统。该同步系统包括多个如上所述的设备,每个设备包括主单元和从单元。所述主单元包括输入子单元和输出子单元;所述从单元包括输入子单元和比较子单元。所述从单元的输入子单元,与另一个设备的主单元的输出子单元连接,获取另一个设备的主单元的时间,校准本从单元的时间。所述从单元的比较子单元,比较本设备的主单元与本从单元的时间,然后获得时间偏差,然后利用时间偏差,校准主单元的时间。As shown in FIG. 6, this example also provides a synchronization system. The synchronization system includes a plurality of devices as described above, each device including a master unit and a slave unit. The main unit includes an input subunit and an output subunit; the slave unit includes an input subunit and a comparison subunit. The input subunit of the slave unit is connected to the output subunit of the master unit of another device, acquires the time of the master unit of the other device, and calibrates the time of the slave unit. The comparison subunit of the slave unit compares the time of the master unit of the device with the slave unit, and then obtains a time offset, and then calibrates the time of the master unit by using the time offset.
具体地如,输入子单元利用PTP报文交互与相邻设备的主单元保持时间同步,并以获取到的时间作为从单元本地时间。输入子单元同时锁定2MHz等外时钟频率信号以获取与本设备和其他相邻设备主单元相同或保持指定频率偏差的频率信息。Specifically, the input subunit maintains time synchronization with the main unit of the neighboring device by using PTP message interaction, and takes the acquired time as the slave unit local time. The input subunit simultaneously locks an external clock frequency signal such as 2 MHz to obtain frequency information that is the same as or maintains a specified frequency deviation from the device and other adjacent device main units.
比较子单元通过1PPS信号锁定主单元,并提取主单元的时间TM,同时提取从单元的本地时间TS(i),通过对比主单元时间TM和从单元时间相同TS(i)的偏差,获得从单元时间和主单元的时间偏差TD(i),将时间偏差TD(i)上报到本设备外部的集中管理单元。其中,TD(i)=TM-TS(i),i=1,2,...,N。主单元包含输入子单元和输出子单元。The comparison subunit locks the main unit by the 1PPS signal, and extracts the time T M of the main unit, and simultaneously extracts the local time T S(i) of the slave unit, by comparing the main unit time T M with the slave unit time T S(i) Deviation, obtain the time deviation T D(i) from the unit time and the main unit, and report the time deviation T D(i) to the centralized management unit outside the device. Where T D(i) = T M - T S(i) , i = 1, 2, ..., N. The main unit contains an input subunit and an output subunit.
输入子单元通过2MHz等外频率信号、获取频率信息,并将频率信息提供给输出子单元以保持设备时间TM;输出子单元通过发送1PPS(秒脉冲)信号向本设备和其他相邻设备的从单元输出时间TMThe input subunit obtains frequency information through an external frequency signal such as 2 MHz, and provides frequency information to the output subunit to maintain the device time T M ; the output subunit transmits the 1 PPS (second pulse) signal to the device and other adjacent devices. The slave unit outputs the time T M .
所述设备还包括:外部集中管理单元(未示出),所述外部集中管理单元针对每个设备提取主单元和一个或多个从单元的时间偏差;TD(i)为主单元与第i个从单元之间的时间偏差,以指定方式利用时间偏差计算调整值TA,并以调整值TA调整设备主单元的时间TM,以使网络中所有设备趋于相同的时间,在设备间实现时间同步。其中,
Figure PCTCN2017113376-appb-000001
所述N为从单元的个数或获取了相邻的其他设备的从单元的个数。
The apparatus further includes: an external centralized management unit (not shown) that extracts a time offset of the primary unit and the one or more secondary units for each device; T D(i) is a primary unit and a Time offset between i slave units, using the time offset to calculate the adjustment value T A in a specified manner, and adjusting the time TM of the device master unit with the adjustment value T A so that all devices in the network tend to be at the same time, in the device Time synchronization is achieved. among them,
Figure PCTCN2017113376-appb-000001
The N is the number of slave units or the number of slave units that have acquired other neighboring devices.
示例二:Example two:
本示例提供的时间同步系统由多个设备相互连接构成。The time synchronization system provided by this example is composed of a plurality of devices connected to each other.
可选地,组成时间同步系统的设备在网络中处于相同层级。Optionally, the devices that make up the time synchronization system are at the same level in the network.
组成时间同步系统的多个设备均由主单元和一个或多个从单元组成。在进行同步的设备内部,分别比对主单元和多个从单元的时间偏差时,根据从单元的同步状态判断是否提取从单元的时间。具体地,若从单元当前无法获得与其对应的相邻主单元的时间信息或无法正常锁定与其对应的相邻主单元,则不提取该从单元的时间,并不对比该从单元与主单元的时间偏差。A plurality of devices constituting a time synchronization system are composed of a main unit and one or more slave units. In the device performing synchronization, when the time deviation of the main unit and the plurality of slave units is respectively compared, it is judged based on the synchronization state of the slave unit whether or not the time of the slave unit is extracted. Specifically, if the slave unit cannot currently obtain the time information of the adjacent master unit corresponding thereto or cannot correctly lock the adjacent master unit corresponding thereto, the time of the slave unit is not extracted, and the slave unit and the master unit are not compared. Time deviation.
一个或多个从单元同步于不同设备的主单元,利用报文交互方式进行同步。具体地,每个从单元分别和一个不同相邻设备的主单元交互PTP报文等分组时间报文,使用报文中的时间戳信息计算获取其他相邻设备主单元的时间,并作为从单元的本地时间。从单元持续提取时间戳,锁定其他相邻设备主单元的时间,并计算更新本地时间。One or more slave units are synchronized to different units of the main unit, and are synchronized by message interaction. Specifically, each slave unit exchanges a packet time message such as a PTP packet with a master unit of a different neighboring device, and uses the timestamp information in the packet to calculate the time of acquiring the neighboring unit of the other neighboring device, and serves as a slave unit. Local time. The slave unit continuously extracts the timestamp, locks the time of other neighboring device master units, and calculates the update local time.
或者,一个或多个从单元同步于不同设备的主单元,利用物理层同步方式进行同步。具体地,每个从单元分别从一个不同相邻设备接收1PPS(秒脉冲)等物理时间信号,使用锁相环在本地锁定时间信号,并以锁相环输出信号作为从单元的本地时间。Alternatively, one or more slave units are synchronized to a master unit of a different device, and synchronized using a physical layer synchronization method. Specifically, each slave unit receives a physical time signal such as 1 PPS (second pulse) from a different neighboring device, locks the time signal locally with a phase locked loop, and uses the phase locked loop output signal as the local time of the slave unit.
一个或多个从单元同步于不同设备的主单元,从单元获取与本设备和其他相邻设备主单元相同或保持指定频率偏差的频率信息。其中,从单元通过8000Hz、2Mbps/2MHz、10MHz等外频率信号,E1、同步以太等带内频率信号或者,PTP等报文获取频率信息。指定频率偏差应保证在频率偏差影响下一个或多个从单元与不同主单元的同步精度满足具体应用场景下的需求。One or more slave units are synchronized to a master unit of a different device, and the slave unit acquires frequency information that is the same as or maintains a specified frequency deviation from the own device and other neighboring device master units. The slave unit obtains frequency information by using an external frequency signal such as 8000 Hz, 2 Mbps/2 MHz, and 10 MHz, an intra-band frequency signal such as E1, synchronous Ethernet, or a packet such as PTP. The specified frequency deviation should ensure that the synchronization accuracy of one or more slave units and different master units under the influence of frequency deviation meets the requirements in specific application scenarios.
在设备内部比对主单元和一个或多个从单元的时间偏差,并利用获得的 时间偏差计算时间调整值,调整设备主单元的时间,使组成时间同步系统的多个设备趋于相同的时间,在设备间实现时间同步。Aligning the time deviation between the main unit and one or more slave units within the device and utilizing the obtained The time deviation calculates the time adjustment value, adjusts the time of the main unit of the device, so that multiple devices constituting the time synchronization system tend to be at the same time, and time synchronization is realized between the devices.
在设备内部比对主单元和一个或多个从单元的时间偏差时,提取主单元的时间和一个或多个从单元的时间,通过对比主单元时间和一个或多个从单元时间相同时刻的偏差,获得一个或多个从单元时间和主单元的时间偏差。例如,从单元接收主单元的1PPS(秒脉冲)等物理时间信号,提取时间信号承载的整秒信息,鉴别从单元本地时间整秒时刻与提取的时间信号整秒时刻间的相位差,获得从单元和本设备主单元间的时间偏差。When the time deviation of the main unit and the one or more slave units is compared within the device, the time of the master unit and the time of one or more slave units are extracted by comparing the master unit time with the one or more slave unit times at the same time Deviation, obtaining one or more slave unit time and time offset of the master unit. For example, the slave unit receives a physical time signal such as 1PPS (second pulse) of the master unit, extracts the whole second information carried by the time signal, and discriminates the phase difference between the unit local time and the extracted time signal and the second time. The time offset between the unit and the main unit of the device.
在设备内部比对主单元和一个或多个从单元的时间偏差后,对时间偏差进行存储。可以在本地存储获得的时间偏差;可以将获得的时间偏差发送到本设备内部的集中管理单元;还可以将获得的时间偏差上报到本设备外部的集中管理单元。The time offset is stored after the time offset of the master unit and one or more slave units is compared within the device. The obtained time deviation can be stored locally; the obtained time deviation can be sent to the centralized management unit inside the device; and the obtained time deviation can also be reported to the centralized management unit outside the device.
利用时间偏差调整设备主单元的时间时,提取主单元和一个或多个从单元的时间偏差(即获得设备与其所有邻居设备间的时间偏差),以指定方式利用时间偏差计算时间调整值,并以时间调整值调整设备主单元的时间,以使网络中所有设备趋于相同的时间,在设备间实现时间同步。例如,计算时间调整值时,可以将主单元和一个或多个从单元时间偏差的算术平均值或加权平均值作为时间调整值。When adjusting the time of the device main unit by using the time deviation, extracting the time deviation of the main unit and one or more slave units (ie, obtaining the time deviation between the device and all its neighbors), calculating the time adjustment value by using the time deviation in a specified manner, and The time of the device's main unit is adjusted with the time adjustment value so that all devices in the network tend to be at the same time, and time synchronization is implemented between the devices. For example, when calculating the time adjustment value, the arithmetic mean or weighted average of the primary unit and one or more slave unit time offsets may be used as the time adjustment value.
可选地,以指定方式利用时间偏差计算时间调整值后,提取一个或多个从单元时间和相邻设备主单元的实际时间之间的时间误差值,并利用时间误差值修正时间调整值,以获得更精确的时间偏差值。其中,可以通过PTP报文交互等方式计算获取上述时间误差值。Optionally, after calculating the time adjustment value by using the time deviation in a specified manner, extracting a time error value between one or more slave unit time and an actual time of the adjacent device main unit, and correcting the time adjustment value by using the time error value, Get more accurate time offset values. The time error value can be calculated by using PTP packet interaction.
主单元具有本设备的时间,并向不同设备的从单元提供本设备的时间。The main unit has the time of the device and provides the time of the device to the slave units of different devices.
可选地,主单元提取上游设备或时间服务器的绝对时间作为输出时间。这里的时间与主单元和从单元时间都是不同,是用于输出给用户看的。绝对时间指世界协调时间(Coordinated Universal Time,UTC)等世界范围共同使用的标准时间。可选地,在时间同步系统需要与外部设备协同工作时,主单元提取上游设备或时间服务器的时间作为本地时间。Optionally, the master unit extracts the absolute time of the upstream device or the time server as the output time. The time here is different from the main unit and the slave unit time, and is used for output to the user. Absolute time refers to the standard time commonly used worldwide, such as Coordinated Universal Time (UTC). Optionally, when the time synchronization system needs to work in cooperation with the external device, the main unit extracts the time of the upstream device or the time server as the local time.
向不同设备的从单元提供本设备的时间时,主单元通过发送1PPS(秒脉 冲)信号、交互PTP报文等方式向本设备和其他相邻设备的从单元输出时间。When the time of the device is supplied to the slave units of different devices, the master unit transmits 1PPS (second pulse) The time is output to the slave unit of the device and other neighboring devices by means of a signal, an interactive PTP message, and the like.
向不同设备的从单元提供本设备的时间前,主单元通过外频率信号、同步以太等带内频率信号、PTP报文等方式获取频率信息,以保持设备时间。Before the time of providing the device to the slave units of different devices, the master unit obtains frequency information by means of an external frequency signal, an in-band frequency signal such as an Ethernet, and a PTP message to maintain the device time.
主单元和一个或多个从单元可以具有相同载体,但通过配置具备不同功能。The master unit and one or more slave units may have the same carrier, but have different functions through configuration.
本申请所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。以上所描述的设备实施例仅仅是示意性的。例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。例如,多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division, and the actual implementation may have another division manner. For example, multiple units or components can be combined, or can be integrated into another system, or some features can be omitted or not implemented. In addition, the coupling, or direct coupling, or communication connection of the components shown or discussed may be indirect coupling or communication connection through some interfaces, devices or units, and may be electrical, mechanical or other forms. of.
上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元,即可以位于一个地方,也可以分布到多个网络单元上。还可以根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separated, and the components displayed as the unit may or may not be physical units, that is, may be located in one place or distributed to a plurality of network units. It is also possible to select some or all of the units according to actual needs to achieve the objectives of the solution of the embodiment.
另外,在本公开文本各实施例中的各功能单元可以全部集成在一个处理模块中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing module, or each unit may be separately used as one unit, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。A person skilled in the art can understand that all or part of the steps of implementing the above method embodiments may be completed by using hardware related to the program instructions. The foregoing program may be stored in a computer readable storage medium, and the program is executed when executed. The foregoing storage device includes the following steps: the foregoing storage medium includes: a mobile storage device, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. A medium that can store program code.
以上所述,仅为本公开文本的具体实施方式,但本公开文本的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本公开文本揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本公开文本的保护范围之内。因 此,本公开文本的保护范围应以所述权利要求的保护范围为准。 The above description is only a specific embodiment of the present disclosure, but the scope of protection of the present disclosure is not limited thereto, and any person skilled in the art can easily think of changes or within the technical scope disclosed in the present disclosure. Substitutes are intended to be covered by the scope of the present disclosure. Cause Therefore, the scope of protection of the present disclosure should be determined by the scope of the claims.

Claims (18)

  1. 一种同步方法,应用于第一设备中,包括:A synchronization method is applied to the first device, including:
    分别与第一设备相邻的N个第二设备进行同步,以获得各所述第二设备的主时间的时间信号,其中,所述N为不小于2的整数;Synchronizing with the N second devices respectively adjacent to the first device to obtain a time signal of a primary time of each of the second devices, where N is an integer not less than 2;
    锁定并跟踪所述N个时间信号,形成N个从时间;以及Locking and tracking the N time signals to form N slave times;
    根据N个所述从时间,校准所述第一设备的主时间。The master time of the first device is calibrated based on the N slave times.
  2. 根据权利要求1所述的方法,其中,The method of claim 1 wherein
    所述第一设备包括M个从单元和一个主单元;其中,所述M为不小于所述N且不小于2的整数;The first device includes M slave units and one master unit; wherein, the M is an integer not less than the N and not less than 2;
    所述分别与第一设备相邻的N个第二设备进行同步,以获得各所述第二设备的主时间的时间信号,包括:And synchronizing the N second devices that are respectively adjacent to the first device to obtain a time signal of the main time of each of the second devices, including:
    利用第n个从单元获取表征第n个所述第二设备的主时间的第n个时间信号;Acquiring, by the nth slave unit, an nth time signal characterizing a master time of the nth second device;
    所述锁定并跟踪所述N个时间信号,形成N个从时间,包括:The locking and tracking the N time signals to form N slave times includes:
    根据所述第n个时间信号,校准所述第n个从单元的从时间,其中,所述n为不大于所述N的整数;And calibrating a slave time of the nth slave unit according to the nth time signal, where n is an integer not greater than the N;
    所述根据N个所述从时间,校准所述第一设备的主时间,包括:The calibrating the master time of the first device according to the N slave times includes:
    根据至少N个所述从单元的从时间,校准所述主单元的主时间。The master time of the master unit is calibrated based on the slave time of at least N of the slave units.
  3. 根据权利要求2所述的方法,其中,The method of claim 2, wherein
    所述根据N个所述从时间,校准所述第一设备的主时间,还包括:The calibrating the master time of the first device according to the N times, further comprising:
    判断所述第n个从时间与所述第n个所述第二设备的主时间的同步状况;以及Determining a synchronization status of the nth slave time and a master time of the nth second device;
    当所述同步状况满足预设条件时,根据所述第n个从时间校准所述第一设备的主时间。When the synchronization condition satisfies a preset condition, the master time of the first device is calibrated according to the nth slave time.
  4. 根据权利要求3所述的方法,其中,The method of claim 3, wherein
    所述判断所述第n个从时间与所述第n个所述第二设备的主时间的同步状况,包括:The determining a synchronization status of the nth slave time and the master time of the nth second device includes:
    比对所述第n个从时间与所述第n个所述第二设备的主时间的第一时间 偏差;Comparing the nth slave time with the first time of the nth second device's master time deviation;
    所述当所述同步状况满足预设条件时,根据所述第n个从时间校准所述第一设备的主时间,包括:When the synchronization condition meets the preset condition, the master time of the first device is calibrated according to the nth slave time, including:
    当所述第一时间偏差小于预设值时,根据所述第n个从时间校准所述第一设备的主时间。When the first time deviation is less than a preset value, the master time of the first device is calibrated according to the nth slave time.
  5. 根据权利要求1至4中任一项所述的方法,其中,The method according to any one of claims 1 to 4, wherein
    所述根据N个所述从时间,校准所述第一设备的主时间,包括:The calibrating the master time of the first device according to the N slave times includes:
    分别比对N个所述从时间与第一设备的主时间的第二时间偏差;Comparing respectively the second time deviations of the N slave times from the master time of the first device;
    根据所述第二时间偏差,确定调整值;以及Determining an adjustment value according to the second time deviation;
    根据所述调整值,调整所述第一设备的主时间。Adjusting a primary time of the first device according to the adjustment value.
  6. 根据权利要求1至4中任一项所述的方法,其中,The method according to any one of claims 1 to 4, wherein
    所述分别与第一设备相邻的N个第二设备进行同步,以获得各所述第二设备的主时间的时间信号,包括:And synchronizing the N second devices that are respectively adjacent to the first device to obtain a time signal of the main time of each of the second devices, including:
    接收N个所述第二设备分别发送的报文;以及Receiving, respectively, packets sent by the N second devices;
    提取所述报文中的时间信息,获得N个所述时间信号。Extracting time information in the message to obtain N pieces of the time signals.
  7. 根据权利要求1至4中任一项所述的方法,其中,The method according to any one of claims 1 to 4, wherein
    所述分别与第一设备相邻的N个第二设备进行同步,以获得各所述第二设备的主时间的时间信号,包括:And synchronizing the N second devices that are respectively adjacent to the first device to obtain a time signal of the main time of each of the second devices, including:
    分别接收N个所述第二设备的主时间的物理时间信号。Receiving physical time signals of the master time of the N second devices, respectively.
  8. 一种同步装置,应用于第一设备中,包括:A synchronization device is applied to the first device, including:
    获取模块,用于分别与第一设备相邻的N个第二设备进行同步,以获得各所述第二设备的主时间的时间信号,其中,所述N为不小于2的整数;An acquiring module, configured to synchronize with each of the N second devices adjacent to the first device to obtain a time signal of a primary time of each of the second devices, where the N is an integer not less than 2;
    锁定跟踪模块,用于锁定并跟踪所述N个时间信号,形成N个从时间;以及Locking a tracking module for locking and tracking the N time signals to form N slave times;
    校准模块,用于根据N个所述从时间,校准所述第一设备的主时间。And a calibration module, configured to calibrate a primary time of the first device according to the N slave times.
  9. 根据权利要求8所述的装置,其中,The device according to claim 8, wherein
    所述第一设备包括M个从单元和一个主单元,其中,所述M为不小于所述N且不小于2的整数;The first device includes M slave units and one master unit, where the M is an integer not less than the N and not less than 2;
    所述获取模块,具体用于利用第n个从单元获取表征第n个所述第二设 备的主时间的第n个时间信号;The obtaining module is specifically configured to acquire, by using the nth slave unit, the nth second device The nth time signal of the standby master time;
    所述锁定跟踪模块,具体用于根据所述第n个时间信号,校准所述第n个从单元的从时间,其中,所述n为不大于所述N的整数;The lock tracking module is configured to calibrate a slave time of the nth slave unit according to the nth time signal, where n is an integer not greater than the N;
    所述校准模块,具体用于根据至少N个所述从单元的从时间,校准所述主单元的主时间。The calibration module is specifically configured to calibrate a master time of the master unit according to a slave time of at least N slave units.
  10. 根据权利要求9所述的装置,还包括:The apparatus of claim 9 further comprising:
    判断模块,用于判断所述第n个从时间与所述第n个所述第二设备的主时间的同步状况;a determining module, configured to determine a synchronization status of the nth slave time and a master time of the nth second device;
    其中,当所述同步状况满足预设条件时,所述校准模块根据所述第n个从时间校准所述第一设备的主时间;并且Wherein, when the synchronization condition satisfies a preset condition, the calibration module calibrates a master time of the first device according to the nth slave time;
    当所述第一时间偏差小于预设值时,所述校准模块根据所述第n个从时间校准所述第一设备的主时间。When the first time deviation is less than a preset value, the calibration module calibrates the master time of the first device according to the nth slave time.
  11. 根据权利要求10所述的装置,其中,The device according to claim 10, wherein
    所述判断模块,具体用于比对所述第n个从时间与所述第n个所述第二设备的主时间的第一时间偏差;所述校准模块,具体当所述第一时间偏差小于预设值时,根据所述第n从时间校准所述第一设备的主时间。The determining module is specifically configured to compare a first time deviation between the nth slave time and a master time of the nth second device; the calibration module, specifically when the first time offset When less than the preset value, the master time of the first device is calibrated according to the nth slave time.
  12. 根据权利要求8至11中任一项所述的装置,其中,The apparatus according to any one of claims 8 to 11, wherein
    所述校准模块,具体用于分别比对N个所述从时间与第一设备的主时间的第二时间偏差;根据所述第二时间偏差,确定调整值,根据所述调整值,调整所述第一设备的主时间。The calibration module is specifically configured to respectively compare a second time deviation of the N slave times with a master time of the first device; determine an adjustment value according to the second time offset, and adjust the location according to the adjustment value The primary time of the first device.
  13. 根据权利要求8至11中任一项所述的装置,其中,The apparatus according to any one of claims 8 to 11, wherein
    所述获取模块,具体用于接收N个所述第二设备分别发送的报文;提取所述报文中的时间信息,获得N个所述时间信号。The acquiring module is specifically configured to receive N packets sent by the second device, and extract time information in the packet to obtain N time signals.
  14. 根据权利要求8至11中任一项所述的装置,其中,The apparatus according to any one of claims 8 to 11, wherein
    所述获取模块,具体用于分别接收N个所述第二设备的主时间的物理时间信号。The acquiring module is specifically configured to separately receive physical time signals of N main time of the second device.
  15. 一种同步设备,所述同步设备为第一设备,包括:A synchronization device, where the synchronization device is a first device, including:
    至少两个从单元,用于获取与第一设备相邻的第二设备的主时间的时间信号,锁定并跟踪所述时间信号,形成从时间;以及 At least two slave units for acquiring a time signal of a master time of the second device adjacent to the first device, locking and tracking the time signal to form a slave time;
    主单元,用于根据所述至少两个从单元的从时间,校准所述主单元的主时间。a main unit, configured to calibrate a master time of the main unit according to a slave time of the at least two slave units.
  16. 一种通信系统,所述通信系统包括第一设备及多个与所述第一设备相邻的第二设备;A communication system, the communication system comprising a first device and a plurality of second devices adjacent to the first device;
    多个所述第二设备,用于分别将自身主时间的时间信号发送给所述第一设备;a plurality of the second devices, configured to respectively send time signals of their own master time to the first device;
    所述第一设备,用于获取多个所述第二设备的时间信号,锁定并跟踪所述时间信号并形成从时间,并根据所述从时间校准所述第一设备的主时间。The first device is configured to acquire time signals of a plurality of the second devices, lock and track the time signal, form a slave time, and calibrate a master time of the first device according to the slave time.
  17. 一种由计算机实现的同步装置,包括:处理器、存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如权利要求1至7中任一项所述的同步方法中的步骤。A computer-implemented synchronization device comprising: a processor, a memory, and a computer program stored on the memory and operable on the processor, the computer program being executed by the processor to implement the claims The steps in the synchronization method described in any one of 1 to 7.
  18. 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至7中任一项所述的同步方法中的步骤。 A computer readable storage medium having stored thereon a computer program, the computer program being executed by a processor to implement the steps of the synchronization method of any one of claims 1 to 7.
PCT/CN2017/113376 2016-12-01 2017-11-28 Synchronization method, synchronization device, synchronization apparatus and communication system WO2018099375A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611094137.3A CN108134644B (en) 2016-12-01 2016-12-01 Synchronous method, device, synchronizer and system
CN201611094137.3 2016-12-01

Publications (1)

Publication Number Publication Date
WO2018099375A1 true WO2018099375A1 (en) 2018-06-07

Family

ID=62241913

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/113376 WO2018099375A1 (en) 2016-12-01 2017-11-28 Synchronization method, synchronization device, synchronization apparatus and communication system

Country Status (2)

Country Link
CN (1) CN108134644B (en)
WO (1) WO2018099375A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112118064A (en) * 2020-08-18 2020-12-22 河南信大网御科技有限公司 Time synchronization method for mimicry heterogeneous equipment
CN113489599A (en) * 2021-05-27 2021-10-08 国网浙江省电力有限公司湖州供电公司 Substation time synchronization verification system and time synchronization defect elimination method

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113271609A (en) * 2020-02-14 2021-08-17 华为技术有限公司 Communication method and device
CN113810988B (en) * 2020-06-16 2023-03-10 上海华为技术有限公司 Data processing method and related equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1310857A2 (en) * 2001-08-23 2003-05-14 Xerox Corporation System and method for synchronisation of real-time clocks in a document processing system
US20110158120A1 (en) * 2009-12-28 2011-06-30 Fujitsu Limited Node device
CN103107876A (en) * 2011-11-15 2013-05-15 中兴通讯股份有限公司 Implementation method, system and device for multi-clock synchronization technology hybrid networking
CN105450384A (en) * 2015-12-10 2016-03-30 中国能源建设集团广东省电力设计研究院有限公司 Synchronous clock time synchronization apparatus for communication module
CN105723638A (en) * 2013-08-22 2016-06-29 瑞典爱立信有限公司 A method for detecting timing references affected by a change in path delay asymmetry between nodes in a communications network
US20160294545A1 (en) * 2015-03-31 2016-10-06 Alcatel-Lucent Canada Inc. Faster synchronization time and better master selection based on dynamic accuracy information in a network of ieee 1588 clocks

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101931524A (en) * 2009-06-25 2010-12-29 中兴通讯股份有限公司 Clock source selecting method of synchronous digital hierarchy network
CN103905135B (en) * 2012-12-24 2017-11-24 中国移动通信集团公司 Realize the method, apparatus and system of time synchronized
CN105024841B (en) * 2014-04-23 2019-08-27 南京中兴软件有限责任公司 A kind of synchronous fault processing method and system of clock and Time Synchronization Network

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1310857A2 (en) * 2001-08-23 2003-05-14 Xerox Corporation System and method for synchronisation of real-time clocks in a document processing system
US20110158120A1 (en) * 2009-12-28 2011-06-30 Fujitsu Limited Node device
CN103107876A (en) * 2011-11-15 2013-05-15 中兴通讯股份有限公司 Implementation method, system and device for multi-clock synchronization technology hybrid networking
CN105723638A (en) * 2013-08-22 2016-06-29 瑞典爱立信有限公司 A method for detecting timing references affected by a change in path delay asymmetry between nodes in a communications network
US20160294545A1 (en) * 2015-03-31 2016-10-06 Alcatel-Lucent Canada Inc. Faster synchronization time and better master selection based on dynamic accuracy information in a network of ieee 1588 clocks
CN105450384A (en) * 2015-12-10 2016-03-30 中国能源建设集团广东省电力设计研究院有限公司 Synchronous clock time synchronization apparatus for communication module

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112118064A (en) * 2020-08-18 2020-12-22 河南信大网御科技有限公司 Time synchronization method for mimicry heterogeneous equipment
CN112118064B (en) * 2020-08-18 2022-10-21 河南信大网御科技有限公司 Time synchronization method for mimicry heterogeneous equipment
CN113489599A (en) * 2021-05-27 2021-10-08 国网浙江省电力有限公司湖州供电公司 Substation time synchronization verification system and time synchronization defect elimination method
CN113489599B (en) * 2021-05-27 2023-07-28 国网浙江省电力有限公司湖州供电公司 Time synchronization verification system and time synchronization defect elimination method for transformer substation

Also Published As

Publication number Publication date
CN108134644B (en) 2019-10-22
CN108134644A (en) 2018-06-08

Similar Documents

Publication Publication Date Title
US11838110B2 (en) Method of remotely monitoring the timing performance of a PTP slave
US7916758B2 (en) Method and system for precise-clock synchronization, and device for precise-clock frequency/time synchronization
WO2018099375A1 (en) Synchronization method, synchronization device, synchronization apparatus and communication system
US9548831B2 (en) Synchronizing system, synchronizing method, first synchronizing device, second synchronizing device, and computer program
CN102546071B (en) Clock synchronization method and system
CN103563287B (en) Synchronization device and synchronization method
US11444747B2 (en) Measure and improve clock synchronization using combination of transparent and boundary clocks
US9955447B2 (en) Clock synchronization method, mobile network system, network controller and network switch
WO2018221238A1 (en) Wireless device and processing method for wireless device
CN108028817B (en) Timing synchronization for small cells with limited backhaul
Exel Mitigation of asymmetric link delays in IEEE 1588 clock synchronization systems
US20120079310A1 (en) Communication system, communication interface, and synchronization method
CN103763055A (en) Method for precise time synchronization
JP6384697B2 (en) Synchronization method, synchronization device, and base station
US20140241381A1 (en) Time control device, time control method, and program
US9641269B2 (en) Apparatus and method for synchronizing clocks among communication devices
EP2893655A1 (en) Methods and devices for clock synchronization
WO2016106908A1 (en) Method and system for synchronizing clocks in sdh network
CN111953442A (en) Quick high-precision time synchronization system
CN102457346A (en) Time synchronization realizing method and clock node
WO2021018407A1 (en) Clock synchronization in packet communications networks
CN110620630B (en) Time synchronization method, device, network equipment and computer readable storage medium
US20240048261A1 (en) Robust time distribution and synchronization in computer and radio access networks
KR20190072745A (en) Stable Network-based Time Synchronization Method
Saarnisaari et al. Hybrid network synchronization for manets

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17876856

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 18/09/2019)

122 Ep: pct application non-entry in european phase

Ref document number: 17876856

Country of ref document: EP

Kind code of ref document: A1