Time synchronization method, device and time synchronization system to prevent time rollback

By calculating the time difference before and after the device signal is blocked and synchronized, the problem of inability to synchronize after the device signal is blocked, and the continuity and accuracy of time synchronization are achieved.

CN114666002BActive Publication Date: 2024-12-03BEIJING XIAOMA YIYI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210336013.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-31
Publication Date
2024-12-03
Estimated Expiration
2042-03-31

AI Technical Summary

Technical Problem

In the prior art, the device cannot perform time synchronization after the signal is blocked, resulting in a problem of time rollback.

Method used

By obtaining the time difference between the first type of device and the second type of device before and after the signal of the second type of device is blocked, and synchronizing the time of the second type of device according to the difference value, the continuity of time synchronization is ensured.

Benefits of technology

It effectively solves the problem that time synchronization cannot be performed after the signal is blocked, ensuring the continuity and accuracy of time synchronization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114666002B_ABST
    Figure CN114666002B_ABST
Patent Text Reader

Abstract

The present application provides a time synchronization method, device and time synchronization system for preventing time rollback. The method includes obtaining a first time of a first type of device and a second time of a second type of device at a moment before a signal of a second type of device is blocked, calculating a difference between the first time and the second time, obtaining a third time of the second type of device during a process in which the signal of the second type of device is blocked, synchronizing the third time of the second type of device according to the difference, and obtaining the time of the second type of device after synchronization, thereby solving the problem in the prior art that time synchronization cannot be performed after the signal is blocked.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of time synchronization technology, and in particular to a time synchronization method, device, time synchronization system, processor, and computer-readable storage medium for preventing time rollback. Background Art

[0002] In the existing solution, when a device that obtains time through an internal clock crystal oscillator passes through a tunnel, it may not be able to receive a signal, that is, the signal is in a shielded state, which makes it impossible for the device to enter time synchronization, resulting in time rollback. Summary of the invention

[0003] The main purpose of the present application is to provide a time synchronization method, device, time synchronization system, processor and computer-readable storage medium for preventing time rollback, so as to solve the problem that the prior art cannot perform time synchronization after the signal is shielded.

[0004] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a time synchronization method for preventing time rollback is provided, the method is applied to a time synchronization system, the time synchronization system includes a first type of device and a second type of device, the first type of device and the second type of device communicate with each other, the time of the first type of device is obtained through a positioning system, and the time of the second type of device is obtained through an internal clock crystal oscillator, the method includes: before the signal of the second type of device is blocked, obtaining the first time of the first type of device and the second time of the second type of device; calculating the difference between the first time and the second time; in the process of blocking the signal of the second type of device, obtaining the third time of the second type of device; synchronizing the third time of the second type of device according to the difference to obtain the time after synchronization of the second type of device.

[0005] Further, synchronizing the third time of the second type device according to the difference to obtain the time after the second type device is time synchronized includes: summing the difference and the third time to obtain the time after the second type device is time synchronized.

[0006] Furthermore, after calculating the difference between the first time and the second time, the method further includes: summing the difference and the second time to obtain the time after the second type of device is time synchronized before the signal of the second type of device is shielded.

[0007] Furthermore, there are multiple first-type devices and multiple second-type devices, and before the signal of the second-type device is blocked, obtaining the first time of the first-type device and the second time of the second-type device includes: determining a blocked second-type target device from multiple second-type devices; determining a first-type target device that communicates with the second-type target device from multiple first-type devices; obtaining the second time of the second-type target device before the signal of the second-type device is blocked, and the first time of the first-type target device before the signal of the second-type device is blocked.

[0008] Further, determining the shielded second type target device from a plurality of the second type devices includes: acquiring the signal strength of each second type device; and determining the second type device whose signal strength is less than a strength threshold as the second type target device.

[0009] Further, determining a first type target device that communicates with the second type target device from multiple first type devices includes: controlling the second type target device to send a predetermined message to each first type device; and determining that the first type device that sends a feedback message to the second type target device is the first type target device, wherein the feedback message has an associated relationship with the predetermined message.

[0010] Furthermore, acquiring the first time of the first type of device includes: acquiring the first time of the first type of device using a carrier phase differential technology.

[0011] Furthermore, carrier phase differential technology is used to obtain the first time of the first type of device, including: obtaining a reference second pulse signal and a target message generated by the positioning system; and determining the first time of the first type of device based on the reference second pulse signal and the target message.

[0012] Furthermore, the positioning system includes at least one of the following: GPS, Beidou Navigation System, and GLONASS.

[0013] Furthermore, the second type of equipment is installed on a vehicle.

[0014] According to another aspect of the present application, a time synchronization device for preventing time rollback is provided, the device being applied to a time synchronization system, the time synchronization system comprising a first type of device and a second type of device, the first type of device and the second type of device communicating with each other, the time of the first type of device being acquired through a positioning system, the time of the second type of device being acquired through an internal clock crystal oscillator, the device comprising a first acquisition unit, a calculation unit, a second acquisition unit and a synchronization unit, the first acquisition unit being used to acquire a first time of the first type of device and a second time of the second type of device at a moment before a signal of the second type of device is shielded; the calculation unit being used to calculate a difference between the first time and the second time; the second acquisition unit being used to acquire a third time of the second type of device during a process in which the signal of the second type of device is shielded; the synchronization unit being used to synchronize the third time of the second type of device according to the difference to obtain the time of the synchronized second type of device.

[0015] Furthermore, there are multiple first-type devices and multiple second-type devices.

[0016] According to another aspect of the present application, a time synchronization system is also provided, which includes a first type of device, a second type of device and a time synchronization device, wherein the first type of device and the second type of device communicate with each other, and the time synchronization device communicates with the first type of device and the second type of device respectively, and the time synchronization device is used to execute any one of the above-mentioned time synchronization methods for preventing time rollback.

[0017] According to another aspect of the present application, a processor is provided, wherein the processor is used to run a program, wherein any one of the above methods is performed when the program is run.

[0018] According to another aspect of the present application, a computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned methods.

[0019] By applying the technical solution of the present application, a first time of a first type of device and a second time of a second type of device are obtained before a signal of a second type of device is shielded, and a difference between the first time and the second time is calculated. During the process of shielding the signal of the second type of device, a third time of the second type of device is obtained, and the third time of the second type of device is synchronized according to the difference to obtain the time after synchronization of the second type of device, thereby solving the problem that the prior art cannot perform time synchronization after the signal is shielded. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The drawings constituting part of the present application are used to provide a further understanding of the present application. The exemplary embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0021] Figure 1 A flow chart of a time synchronization method for preventing time rollback according to an embodiment of the present application is shown;

[0022] Figure 2 A schematic diagram of a time synchronization device for preventing time rollback according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0023] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0024] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0026] It should be understood that when an element (such as a layer, film, region, or substrate) is described as being "on" another element, the element may be directly on the other element, or there may be intermediate elements. Moreover, in the specification and claims, when an element is described as being "connected" to another element, the element may be "directly connected" to the other element, or "connected" to the other element through a third element.

[0027] As introduced in the background technology, in the existing scheme, when a device that obtains time through an internal clock crystal oscillator passes through a tunnel, it will be unable to receive a signal, that is, the signal is in a shielded state, and the device cannot enter time synchronization, resulting in time rollback. In order to solve the problem that the prior art cannot perform time synchronization after the signal is shielded, a time synchronization method, device, time synchronization system, processor and computer-readable storage medium that prevent time rollback are proposed.

[0028] According to an embodiment of the present application, a time synchronization method for preventing time rollback is provided.

[0029] The method is applied to a time synchronization system, which includes a first type of device and a second type of device. The first type of device communicates with the second type of device. The time of the first type of device is obtained through a positioning system, and the time of the second type of device is obtained through an internal clock crystal oscillator. Figure 1 1 is a flow chart of a time synchronization method for preventing time rollback according to an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:

[0030] Step S101, before the signal of the second type device is blocked, obtaining a first time of the first type device and a second time of the second type device;

[0031] Step S102, calculating the difference between the first time and the second time;

[0032] Step S103, while the signal of the second type device is being shielded, obtaining a third time of the second type device;

[0033] Step S104: synchronize the third time of the second type device according to the difference to obtain the synchronized time of the second type device.

[0034] In the above steps, during the process of shielding the signal of the above-mentioned second type device, the above-mentioned second type device cannot communicate with the above-mentioned first type device. Therefore, at the moment before the signal of the above-mentioned second type device is shielded, the difference between the above-mentioned first time and the above-mentioned second time is calculated, and the above-mentioned difference is used to synchronize the third time during the process of shielding the above-mentioned second type device to obtain the time after synchronization of the above-mentioned second type device, thereby solving the problem of the prior art that time synchronization cannot be performed after the signal is shielded.

[0035] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0036] In one embodiment of the present application, synchronizing the third time of the second type device according to the difference to obtain the time after the second type device is time synchronized includes: summing the difference and the third time to obtain the time after the second type device is time synchronized, so as to ensure that in the process of the signal of the second type device being shielded, the second type device can still be time synchronized, and using the first formula T1-T2=ΔT and the second formula T4=T3+ΔT to obtain the time after the third time of the second type device in the process of the second type device being shielded is synchronized, wherein T4 is the time after the third time of the second type device in the process of the second type device being shielded is synchronized, T3 is the third time obtained by the second type device in the process of the second type device being shielded, T2 is the second time obtained by the second type device at a moment before the signal of the second type device is shielded, and T1 is the first time obtained by the first type device at a moment before the signal of the second type device is shielded.

[0037] In one embodiment of the present application, after calculating the difference between the first time and the second time, the method further includes: summing the difference and the second time to obtain the time after the second type of device is time synchronized at a moment before the signal of the second type of device is blocked, thereby ensuring that the second type of device can also be time synchronized at a moment before being blocked.

[0038] In one embodiment of the present application, there are multiple first-type devices and multiple second-type devices. Before the signal of the second-type device is blocked, obtaining the first time of the first-type device and the second time of the second-type device includes: determining the blocked second-type target device from multiple second-type devices; determining the first-type target device communicating with the second-type target device from multiple first-type devices; obtaining the second time before the second-type target device is blocked, and the first time of the first-type target device before the second-type target device is blocked, so as to quickly find the blocked second-type target device and ensure the subsequent time synchronization of the second-type target device.

[0039] In one embodiment of the present application, determining a shielded second type target device from a plurality of the second type devices includes: obtaining the signal strength of each of the second type devices; determining the second type device whose signal strength is less than a strength threshold as the second type target device, and determining the second type target device by judging whether the signal strength of the second type device is less than the strength threshold.

[0040] In one embodiment of the present application, determining a first type target device for communicating with the second type target device from a plurality of the first type devices includes: controlling the second type target device to send a predetermined message to each of the first type devices; determining that the first type device that sends a feedback message to the second type target device is the first type target device, wherein the feedback message has an associated relationship with the predetermined message, so that the first type target device for communicating with the second type target device can be quickly determined from the plurality of the first type devices.

[0041] In one embodiment of the present application, obtaining the first time of the above-mentioned first type of device includes: using carrier phase difference technology to obtain the first time of the above-mentioned first type of device, so as to quickly obtain the first time of the above-mentioned first type of device, the carrier phase difference technology is a real-time dynamic carrier phase difference technology, and the real-time dynamic carrier phase difference technology is a differential method for real-time processing of carrier phase observations of two measurement stations, and the carrier phase collected by the reference station is sent to the user receiver to calculate the difference coordinates. After the real-time dynamic carrier phase difference technology is locked, the first type of device can be settled with centimeter-level accuracy. The real-time dynamic carrier phase difference technology locking refers to using carrier phase observations and combining the spatial correlation of observation errors between the reference station and the mobile station to remove most of the errors in the observation data of the mobile station by differential means. When the differential distance is less than the target differential value, the real-time dynamic carrier phase difference technology is locked.

[0042] In one embodiment of the present application, a carrier phase differential technology is used to obtain the first time of the above-mentioned first type of device, including: obtaining a reference second pulse signal (PPS) and a target message generated by the above-mentioned positioning system; determining the first time of the above-mentioned first type of device based on the above-mentioned reference second pulse signal and the above-mentioned target message, so as to quickly obtain the first time of the above-mentioned first type of device.

[0043] In a specific embodiment of the present application, the target message refers to a GPRMC message, and the first time of the first type of device is obtained according to GPRMC+PPS.

[0044] In one embodiment of the present application, the above-mentioned positioning system includes at least one of the following: GPS, Beidou navigation system, and GLONASS.

[0045] In one embodiment of the present application, the second type of device is installed on a vehicle.

[0046] The embodiment of the present application also provides a time synchronization device for preventing time rollback. It should be noted that the time synchronization device for preventing time rollback in the embodiment of the present application can be used to execute the time synchronization method for preventing time rollback provided in the embodiment of the present application. The time synchronization device for preventing time rollback provided in the embodiment of the present application is introduced below.

[0047] The above device is applied to a time synchronization system, which includes a first type of device and a second type of device. The first type of device and the second type of device communicate with each other. The time of the first type of device is obtained through a positioning system, and the time of the second type of device is obtained through an internal clock crystal oscillator. Figure 2 Schematic diagram of a time synchronization device for preventing time rollback according to an embodiment of the present application. Figure 2 As shown, the device includes a first acquisition unit 10, a calculation unit 20, a second acquisition unit 30 and a synchronization unit 40;

[0048] The first acquisition unit 10 is used to acquire the first time of the first type of device and the second time of the second type of device before the signal of the second type of device is shielded; the calculation unit 20 is used to calculate the difference between the first time and the second time; the second acquisition unit 30 is used to acquire the third time of the second type of device during the process of the signal of the second type of device being shielded; the synchronization unit 40 is used to synchronize the third time of the second type of device according to the difference to obtain the time of the second type of device after synchronization.

[0049] In the above-mentioned device, when the signal of the above-mentioned second type device is blocked, the above-mentioned second type device cannot communicate with the above-mentioned first type device. Therefore, at the moment before the signal of the above-mentioned second type device is blocked, the difference between the above-mentioned first time and the above-mentioned second time is calculated by the above-mentioned calculation unit, and finally the above-mentioned synchronization unit uses the above-mentioned difference to synchronize the third time of the above-mentioned second type device to obtain the synchronized time of the above-mentioned second type device, thereby solving the problem that the prior art cannot perform time synchronization after the signal is blocked.

[0050] In one embodiment of the present application, the synchronization unit includes a calculation module, which is used to sum the above-mentioned difference and the above-mentioned third time to obtain the time after the above-mentioned second type of device is time synchronized, thereby ensuring that the above-mentioned second type of device can still perform time synchronization during the process of shielding the signal of the above-mentioned second type of device.

[0051] In one embodiment of the present application, the above-mentioned device also includes a processing unit, which is used to sum the above-mentioned difference between the above-mentioned first time and the above-mentioned second time after calculating the difference between the above-mentioned first time and the above-mentioned second time, so as to obtain the time after the above-mentioned second type of device is time synchronized at the moment before the signal of the above-mentioned second type of device is blocked, thereby ensuring that the above-mentioned second type of device can also be time synchronized at the moment before being blocked.

[0052] In one embodiment of the present application, there are multiple first-type devices and multiple second-type devices. The first acquisition unit includes a first determination module, a second determination module and a first acquisition module. The first determination module is used to determine the shielded second-type target device from the multiple second-type devices; the second determination module is used to determine the first-type target device that communicates with the second-type target device from the multiple first-type devices; the first acquisition module is used to obtain the second time of the moment before the second-type target device is shielded, and the first time of the first-type target device before the second-type target device is shielded, so as to quickly find the shielded second-type target device and ensure the subsequent time synchronization of the second-type target device.

[0053] In one embodiment of the present application, the above-mentioned first determination module includes a first acquisition submodule and a first determination submodule, and the above-mentioned first acquisition submodule is used to obtain the signal strength of each of the above-mentioned second type devices; the above-mentioned first determination submodule is used to determine the above-mentioned second type devices whose signal strength is less than the strength threshold as the above-mentioned second type target device.

[0054] In one embodiment of the present application, the second determination module includes a control submodule and a second determination submodule, the control submodule is used to control the second type target device to send a predetermined message to each of the first type devices; the second determination submodule is used to determine that the first type device that sends a feedback message to the second type target device is the first type target device, wherein the feedback message has an associated relationship with the predetermined message, so as to quickly determine the first type target device that communicates with the second type target device from multiple first type devices.

[0055] In one embodiment of the present application, the first acquisition unit includes a second acquisition module, and the second acquisition module is used to acquire the first time of the first type of device by using carrier phase difference technology, so as to quickly acquire the first time of the first type of device.

[0056] In one embodiment of the present application, the second acquisition module includes a second acquisition sub-module and a third determination sub-module. The second acquisition sub-module is used to acquire the reference second pulse signal and the target message generated by the positioning system; the third determination sub-module is used to determine the first time of the first type of device based on the reference second pulse signal and the target message, so as to quickly acquire the first time of the first type of device.

[0057] In one embodiment of the present application, there are multiple first-type devices and multiple second-type devices, which improves the flexibility of the apparatus.

[0058] An embodiment of the present application also provides a time synchronization system, which includes a first type of device, a second type of device and a time synchronization device. The first type of device and the second type of device communicate with each other, and the time synchronization device communicates with the first type of device and the second type of device respectively. The time synchronization device is used to execute the time synchronization method for preventing time rollback.

[0059] The above-mentioned time synchronization device for preventing time rollback includes a processor and a memory. The above-mentioned first acquisition unit, calculation unit, second acquisition unit and synchronization unit are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to implement corresponding functions.

[0060] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the problem that the prior art cannot perform time synchronization after the signal is shielded can be solved by adjusting kernel parameters.

[0061] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0062] An embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute the time synchronization method for preventing time rollback.

[0063] An embodiment of the present invention provides a processor, and the processor is used to run a program, wherein the time synchronization method for preventing time rollback is executed when the program is running.

[0064] The embodiment of the present invention provides a device, the device includes a processor, a memory, and a program stored in the memory and executable on the processor, and the processor implements at least the following steps when executing the program: before the signal of the second type device is shielded, obtain the first time of the first type device and the second time of the second type device; calculate the difference between the first time and the second time; in the process of shielding the signal of the second type device, obtain the third time of the second type device; synchronize the third time of the second type device according to the difference to obtain the synchronized time of the second type device. The device in this article can be a server, PC, PAD, mobile phone, etc.

[0065] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that is initialized with at least the following method steps: obtaining a first time of the first type of device and a second time of the second type of device at a moment before the signal of the second type of device is shielded; calculating the difference between the first time and the second time; obtaining a third time of the second type of device during the process of shielding the signal of the second type of device; synchronizing the third time of the second type of device according to the difference to obtain the time after synchronization of the second type of device.

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

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

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

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

[0070] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0071] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0072] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0073] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0074] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:

[0075] 1) The time synchronization method for preventing time rollback of the present application is that during the process in which the signal of the above-mentioned second type device is blocked, the above-mentioned second type device cannot communicate with the above-mentioned first type device. Therefore, at the moment before the signal of the above-mentioned second type device is blocked, the difference between the above-mentioned first time and the above-mentioned second time is calculated, and the above-mentioned difference is used to synchronize the third time of the above-mentioned second type device to obtain the time after the synchronization of the above-mentioned second type device, thereby solving the problem of the prior art that time synchronization cannot be performed after the signal is blocked.

[0076] 2) The time synchronization device for preventing time rollback of the present application is such that, during the process in which the signal of the above-mentioned second type device is blocked, the above-mentioned second type device cannot communicate with the above-mentioned first type device. Therefore, at the moment before the signal of the above-mentioned second type device is blocked, the difference between the above-mentioned first time and the above-mentioned second time is calculated by the above-mentioned calculation unit, and finally the above-mentioned synchronization unit uses the above-mentioned difference to synchronize the third time of the above-mentioned second type device to obtain the synchronized time of the above-mentioned second type device, thereby solving the problem that the prior art cannot perform time synchronization after the signal is blocked.

[0077] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A time synchronization method for preventing time rollback, characterized in that: The method is applied to a time synchronization system, the time synchronization system includes a first type of device and a second type of device, the first type of device and the second type of device communicate with each other, the time of the first type of device is obtained through a positioning system, and the time of the second type of device is obtained through an internal clock crystal oscillator, and the method includes: Before the signal of the second type of device is blocked, acquiring a first time of the first type of device and a second time of the second type of device; calculating a difference between the first time and the second time; In the process of shielding the signal of the second type device, obtaining a third time of the second type device; Synchronize the third time of the second type of device according to the difference to obtain the synchronized time of the second type of device; After calculating the difference between the first time and the second time, the method further includes: summing the difference and the second time to obtain a time after time synchronization of the second type of device at a moment before the signal of the second type of device is shielded; There are a plurality of first-type devices, there are a plurality of second-type devices, and before a signal of the second-type device is shielded, obtaining a first time of the first-type device and a second time of the second-type device, including: determining a shielded second-type target device from a plurality of second-type devices, determining a first-type target device communicating with the second-type target device from a plurality of first-type devices, obtaining the second time of the second-type target device before being shielded, and the first time of the first-type target device before the second-type target device is shielded; Determining a shielded second type target device from a plurality of second type devices includes: acquiring a signal strength of each second type device, and determining a second type device whose signal strength is less than a strength threshold as a second type target device; Determining a first type target device that communicates with the second type target device from multiple first type devices, including: controlling the second type target device to send a predetermined message to each first type device, and determining that the first type device that sends a feedback message to the second type target device is the first type target device, wherein the feedback message is associated with the predetermined message.

2. The method according to claim 1, characterized in that Synchronizing the third time of the second type device according to the difference to obtain the time after the second type device is synchronized, including: The difference and the third time are summed to obtain the time after time synchronization is performed on the second type device.

3. The method according to claim 1 or 2, characterized in that: Acquiring a first time of the first type of device includes: A carrier phase differential technology is used to acquire the first time of the first type of device.

4. The method according to claim 3, characterized in that Acquiring the first time of the first type of device by using a carrier phase difference technology includes: Acquire the reference second pulse signal and target message generated by the positioning system; A first time of the first type of device is determined according to the reference second pulse signal and the target message.

5. The method according to claim 1 or 2, wherein the positioning system comprises at least one of the following: GPS, BeiDou Navigation System, GLONASS.

6. The method according to any one of claims 1 or 2, characterized in that: The second type of equipment is mounted on a vehicle.

7. A time synchronization device for preventing time rollback, characterized in that: The device is applied to a time synchronization system, the time synchronization system includes a first type of device and a second type of device, the first type of device and the second type of device communicate with each other, the time of the first type of device is obtained through a positioning system, and the time of the second type of device is obtained through an internal clock crystal oscillator, and the device includes: A first acquiring unit, configured to acquire a first time of the first type of device and a second time of the second type of device before the signal of the second type of device is shielded; a calculation unit, configured to calculate a difference between the first time and the second time; A second acquiring unit, configured to acquire a third time of the second type of device during the process in which the signal of the second type of device is shielded; a synchronization unit, configured to synchronize the third time of the second type of device according to the difference to obtain the synchronized time of the second type of device; The apparatus further includes a processing unit, configured to sum the difference and the second time to obtain a time after time synchronization is performed on the second type of device at a moment before the signal of the second type of device is shielded; There are multiple first-type devices, there are multiple second-type devices, the first acquisition unit includes a first determination module, a second determination module and a first acquisition module, the first determination module is used to determine a shielded second-type target device from multiple second-type devices, the second determination module is used to determine a first-type target device that communicates with the second-type target device from multiple first-type devices, the first acquisition module is used to acquire a second time before the second-type target device is shielded, and a first time of the first-type target device before the second-type target device is shielded; The first determination module includes a first acquisition submodule and a first determination submodule, the first acquisition submodule is used to acquire the signal strength of each second-type device, and the first determination submodule is used to determine the second-type device whose signal strength is less than a strength threshold as the second-type target device; The second determination module includes a control submodule and a second determination submodule, the control submodule is used to control the second type target device to send a predetermined message to each first type device, and the second determination submodule is used to determine that the first type device that sends a feedback message to the second type target device is the first type target device, wherein the feedback message is associated with the predetermined message.

8. The device according to claim 7, characterized in that There are multiple first-type devices, and there are multiple second-type devices.

9. A time synchronization system, characterized in that: It includes a first type of device, a second type of device and a time synchronization device, the first type of device and the second type of device communicate with each other, the time synchronization device communicates with the first type of device and the second type of device respectively, and the time synchronization device is used to execute the time synchronization method for preventing time rollback as described in any one of claims 1 to 6.

10. A processor, characterized in that: The processor is used to run a program, wherein the program executes the method according to any one of claims 1 to 6 when running.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 6.