Indoor wireless time synchronization method and device and electronic equipment

By using a wireless time synchronization method based on hardware time anchors and deterministic propagation paths, the problems of synchronization accuracy and stability in indoor wireless environments are solved, achieving microsecond-level time synchronization, which is suitable for multi-device collaborative systems.

CN121841535APending Publication Date: 2026-04-10SHANGHAI TASHI ZHIHANG TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610228069.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-26
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing wireless time synchronization technologies suffer from limitations in synchronization accuracy, uncertain time propagation paths, and strong dependence on software and network conditions in indoor environments, making it difficult to achieve high-precision and stable time synchronization.

Method used

An indoor wireless time synchronization method using hardware time anchors and deterministic propagation paths is adopted. The wireless clock synchronization master module generates periodic PPS signals, hardware latches the timestamps and forwards them directly at the physical layer. Combined with hardware capture of the receiving time, the local time offset is corrected to achieve time alignment of the slave devices.

Benefits of technology

It achieves microsecond-level time synchronization accuracy, avoids uncertainties and delays in software scheduling and higher-level protocol stacks, ensures the stability and reliability of the synchronization process, is unaffected by network conditions and environmental changes, and has good scalability and adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121841535A_ABST
    Figure CN121841535A_ABST
Patent Text Reader

Abstract

The invention provides an indoor wireless time synchronization method and device and electronic equipment, and relates to the technical field of wireless network time synchronization, and the method comprises the steps that main equipment sends the current time to a wireless clock synchronization main module; the wireless clock synchronization main module generates a periodic PPS signal based on an internal hardware clock, latches a timestamp generated at the current moment at each PPS edge by hardware, and broadcasts and sends the timestamp through a physical layer direct forwarding unit after fixed delay; when the wireless clock synchronization slave module receives the timestamp at the physical layer, the receiving moment is captured by hardware, and the internal hardware clock and PPS generation logic of the wireless clock synchronization slave module are updated; and the wireless clock synchronization slave module outputs a time service signal to a connected slave device through a PPS signal and a timestamp interface, so that the slave device completes time alignment with the master device. According to the invention, the time synchronization precision mainly comes from a hardware time anchor point and a deterministic propagation path, and does not depend on a complex software algorithm or multiple round-trip calibration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of wireless network time synchronization technology, and in particular to an indoor wireless time synchronization method, apparatus, and electronic device. Background Technology

[0002] In systems where multiple devices operate collaboratively, time consistency between devices is fundamental for achieving data fusion, collaborative control, and accurate measurement. This is especially true in indoor wireless environments, such as smart manufacturing, drone swarms, and sensor networks, where high-precision time synchronization between multiple nodes is of paramount importance.

[0003] Most existing time synchronization technologies rely on general communication networks or software protocols (such as software implementations of NTP and PTP). The acquisition, encapsulation, transmission, and parsing of time information typically require operating system scheduling and processing by higher-level protocol stacks. In wireless environments, these methods generally suffer from the following drawbacks and shortcomings: Limited time synchronization accuracy: Common wireless communication technologies (such as Wi-Fi and Zigbee) typically employ contention-based or scheduled channel access mechanisms, making it difficult to predict the actual transmission and reception times of data frames. Timestamps are often generated by software at non-deterministic moments, resulting in synchronization accuracy that is difficult to consistently achieve at the microsecond level.

[0004] Uncertain time propagation path: In existing schemes, time information is often transmitted as ordinary data payload, and there is no deterministic correlation between it and the wireless physical transmission time, which makes it difficult to eliminate time jitter and accumulated errors.

[0005] It is highly dependent on software and network conditions: time synchronization accuracy is easily affected by factors such as operating system scheduling, caching mechanisms, network load, and wireless interference. Synchronization performance will significantly decrease when the number of nodes increases or the environment changes.

[0006] Lack of dedicated hardware architecture for time synchronization: Existing wireless modules are mostly designed with data communication as the main goal and have not been specifically optimized for low-latency and deterministic propagation of time information, making it difficult to guarantee high-precision time synchronization at the system architecture level.

[0007] Therefore, an indoor wireless time synchronization method, device, and electronic device are proposed. Summary of the Invention

[0008] This specification provides an indoor wireless time synchronization method, device, and electronic device. The time synchronization accuracy mainly comes from hardware time anchors and deterministic propagation paths, rather than relying on complex software algorithms or multiple round trip calibrations.

[0009] This manual provides an indoor wireless time synchronization method, including: The master device obtains the current time; The master device sends the current time to a wireless clock synchronization master module to initialize an internal hardware clock of the wireless clock synchronization master module; The wireless clock synchronization master module generates a periodic PPS signal based on the internal hardware clock, generates a time stamp of the current time at each PPS edge by hardware latching, and broadcasts and sends the time stamp by a physical layer direct forwarding unit after a fixed delay; The wireless clock synchronization slave module captures the receiving time by hardware when the wireless clock synchronization slave module receives the time stamp at the physical layer, corrects a local time offset according to a preset delay parameter, and updates the internal hardware clock and PPS generation logic of the wireless clock synchronization slave module; The wireless clock synchronization slave module outputs a time service signal to the connected slave device through a PPS signal and a time stamp interface, so that the slave device completes time alignment with the master device.

[0010] Optionally, the wireless clock synchronization master module generates a periodic PPS signal based on the internal hardware clock, and the method comprises the following steps. After receiving the current time from the master device, the wireless clock synchronization master module loads the current time into an internal hardware real-time clock unit, and establishes a corresponding relationship between the hardware real-time clock unit and PPS generation logic by a time anchor generation unit, so as to ensure that the PPS edge is outputted at the next whole second time and is accurately aligned with the current time.

[0011] Optionally, the wireless clock synchronization master module generates a periodic PPS signal based on the internal hardware clock, and the method comprises the following steps. The time stamp capture and latching unit generates a high-precision hardware time stamp containing absolute time information by hardware latching the current time from the hardware real-time clock unit in response to detecting the PPS edge, and delivers the time stamp to the physical layer direct forwarding unit.

[0012] Optionally, the fixed delay is determined by a hardware circuit inside the wireless clock synchronization master module, and the fixed delay makes the time interval between the capture time of the time stamp and the wireless sending time have determinacy, and the time interval does not change with software load or environmental change.

[0013] Optionally, the wireless clock synchronization slave module captures the receiving time by hardware when the wireless clock synchronization slave module receives the time stamp at the physical layer, corrects a local time offset according to a preset delay parameter, and updates the internal hardware clock and PPS generation logic of the wireless clock synchronization slave module, and the method comprises the following steps. The hardware capture unit inside the wireless clock synchronization slave module immediately latches the count value of the current hardware real-time clock when detecting that the physical layer receives a wireless frame, and generates the receiving time.

[0014] Optionally, the wireless clock synchronization slave module captures the receiving time by hardware when receiving the timestamp at the physical layer, corrects the local time offset according to a preset delay parameter, and updates the internal hardware clock and PPS generation logic of the wireless clock synchronization slave module, including: the wireless clock synchronization slave module loads the corrected time value into the internal hardware real-time clock unit, and re-establishes the correspondence between the hardware real-time clock unit and the PPS generation logic by the time anchor generation unit, so that the subsequently output PPS signal is aligned with the PPS signal of the wireless clock synchronization master module.

[0015] Optionally, the wireless clock synchronization slave module outputs the time signal to the connected slave device through the PPS signal and timestamp interface, so that the slave device completes the time alignment with the master device, including: the PPS interface of the wireless clock synchronization slave module outputs the hardware PPS pulse strictly synchronized with the master module to the slave device, and outputs the current time information corresponding to the PPS pulse to the slave device through the serial or SPI interface, so that the slave device can complete the accurate setting of the local time based on the PPS pulse and the time information.

[0016] The present specification provides an indoor wireless time synchronization device, comprising: The acquisition module is configured to acquire, by a master device, a current time. The sending module is configured to send, by the master device, the current time to a wireless clock synchronization master module, so as to initialize an internal hardware clock of the wireless clock synchronization master module. The generation module is configured to generate, by the wireless clock synchronization master module, a periodic PPS signal based on the internal hardware clock, latch the current time by hardware at each PPS edge to generate a timestamp, and broadcast and send the timestamp through a physical layer direct forwarding unit after a fixed delay. The update module is configured to capture the receiving time by hardware when the wireless clock synchronization slave module receives the timestamp at the physical layer, correct the local time offset according to a preset delay parameter, and update the internal hardware clock and PPS generation logic of the wireless clock synchronization slave module. The alignment module is configured to output, by the wireless clock synchronization slave module, a time signal to the connected slave device through the PPS signal and timestamp interface, so that the slave device completes the time alignment with the master device.

[0017] Optionally, the generation module comprises: The wireless clock synchronization master module loads the current time into the internal hardware real-time clock unit after receiving the current time from the master device, and establishes the correspondence between the hardware real-time clock unit and the PPS generation logic by the time anchor generation unit, to ensure that the PPS edge output at the next whole second is accurately aligned with the current time.

[0018] Optionally, the generation module comprises: The timestamp capture and latch unit generates a high-precision hardware timestamp containing absolute time information by latching the current time from the hardware real-time clock unit by hardware logic in response to detecting the PPS edge, and delivers the timestamp to the physical layer direct forwarding unit.

[0019] Optionally, the fixed delay is determined by a hardware circuit inside the wireless clock synchronization master module, and the fixed delay causes a deterministic time interval between the capture time of the timestamp and the wireless transmission time, which does not change with software load or environmental changes.

[0020] Optionally, the update module comprises: a hardware capture unit inside the wireless clock synchronization slave module latches the count value of the current hardware real-time clock immediately when detecting that the physical layer receives a wireless frame, to generate the reception time.

[0021] Optionally, the update module comprises: the wireless clock synchronization slave module loads the corrected time value into the internal hardware real-time clock unit, and re-establishes the correspondence between the hardware real-time clock unit and the PPS generation logic by the time anchor generation unit, so that the subsequently output PPS signal remains aligned with the PPS signal of the wireless clock synchronization master module.

[0022] Optionally, the alignment module comprises: the PPS interface of the wireless clock synchronization slave module outputs a hardware PPS pulse strictly synchronized with the master module to the slave device, and outputs the current time information corresponding to the PPS pulse to the slave device through a serial or SPI interface, so that the slave device can complete the accurate setting of the local time based on the PPS pulse and the time information.

[0023] The specification also provides an electronic device, wherein the electronic device comprises: a processor; and a memory storing computer-executable instructions that, when executed, cause the processor to perform any of the above methods.

[0024] The specification also provides a computer-readable storage medium, wherein the computer-readable storage medium stores one or more programs that, when executed by a processor, implement any of the above methods.

[0025] In the present application, the time synchronization accuracy mainly comes from the hardware time anchor point and the deterministic propagation path, rather than relying on complex software algorithms or multiple round-trip calibration. The timestamp is generated by hardware latching at the PPS edge and sent through the physical layer direct forwarding unit after a fixed delay. The time of receiving the module is captured by hardware at the physical layer. The whole process avoids the uncertainty delay of software scheduling and high-layer protocol stack, making the synchronization error controllable and stable, and reliably achieving microsecond-level synchronization accuracy. The time information is completed by direct forwarding at the physical layer or near the physical layer. The generation, transmission and sending of the timestamp are completed by hardware logic without passing through the operating system and high-layer protocol stack. The fixed delay is determined by hardware circuit and does not change with the environment, so that the whole path delay from time capture to wireless sending has determinism and repeatability, which fundamentally eliminates the time jitter caused by software processing in the traditional scheme. The synchronization process does not depend on network congestion state, channel competition or communication load, and is not affected by operating system scheduling and cache mechanism. Therefore, in the multi-node deployment and complex indoor wireless environment, stable synchronization performance can still be maintained, and there will be no significant decrease in synchronization accuracy due to the increase in the number of nodes or environmental changes. The timing system is constructed by self-developed high-precision wireless clock synchronization master module and slave module. Each module has a standard PPS interface and a timestamp interface, which can be flexibly connected with different types of master and slave devices. This modular structure enables the present application to be easily applied to various scales of indoor multi-device collaborative systems, with good scalability and adaptability. The general wireless module takes data communication throughput as the main design goal, while the wireless clock synchronization module of the present application is optimized for time synchronization applications, with low delay and deterministic propagation of time information as the core design goal. Therefore, it has irreplaceable advantages in synchronization accuracy and stability compared with the general scheme. BRIEF DESCRIPTION OF DRAWINGS

[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0027] Figure 1 A schematic diagram of the principle of an indoor wireless time synchronization method provided by an embodiment of the present application; Figure 2 A structural schematic diagram of an indoor wireless time synchronization device provided by an embodiment of the present application; Figure 3 A structural schematic diagram of an electronic device provided by an embodiment of the present application; Figure 4This is a schematic diagram of a computer-readable medium provided for embodiments of this specification. Detailed Implementation

[0028] The following description is intended to disclose the present invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art. The basic principles of the invention defined in the following description can be applied to other embodiments, modifications, improvements, equivalents, and other technical solutions that do not depart from the spirit and scope of the invention.

[0029] The following is in conjunction with the appendix Figures 1-4 Exemplary embodiments of the invention will be described more fully here. However, exemplary embodiments can be implemented in many forms and should not be construed as limiting the invention to the embodiments set forth herein. Rather, these exemplary embodiments are provided to make the invention more comprehensive and complete, and to facilitate a full communication of the inventive concept to those skilled in the art. The same reference numerals in the figures denote the same or similar elements, components, or parts, and therefore repeated descriptions of them are omitted.

[0030] Subject to the technical concept of this invention, the features, structures, characteristics or other details described in a particular embodiment may be combined in one or more other embodiments in a suitable manner.

[0031] In the description of specific embodiments, the features, structures, characteristics, or other details described in this invention are intended to enable those skilled in the art to fully understand the embodiments. However, it is not excluded that those skilled in the art can practice the technical solutions of this invention without one or more of the specific features, structures, characteristics, or other details.

[0032] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0033] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0034] The terms “and / or” or “and / or” include all combinations of any one or more of the listed items.

[0035] Figure 1A schematic diagram of a principle of an indoor wireless time synchronization method provided by an embodiment of the present specification, which can include: S110: the master device acquires a current time; S120: the master device sends the current time to a wireless clock synchronization master module to initialize an internal hardware clock of the wireless clock synchronization master module; S130: the wireless clock synchronization master module generates a periodic PPS signal based on the internal hardware clock, generates a time stamp by hardware latching a current time at each PPS edge, and broadcasts and sends the time stamp through a physical layer direct forwarding unit after a fixed delay; S140: the wireless clock synchronization slave module captures a receiving time by hardware when the wireless clock synchronization slave module receives the time stamp at the physical layer, corrects a local time offset according to a preset delay parameter, and updates an internal hardware clock and a PPS generation logic of the wireless clock synchronization slave module; S150: the wireless clock synchronization slave module outputs a time service signal to the connected slave device through a PPS signal interface and a time stamp interface, so that the slave device completes time alignment with the master device.

[0036] In the specific embodiment of the present specification, a master device acquires a current time through an internal real-time clock of the master device, which can be an industrial control computer or a data fusion center. The master device sends the acquired current time to a wireless clock synchronization master module connected thereto through a serial interface or an SPI interface to initialize an internal hardware clock of the wireless clock synchronization master module. After receiving the time information, the wireless clock synchronization master module generates a periodic PPS signal based on the internal hardware clock. When each PPS edge arrives, the wireless clock synchronization master module generates a time stamp by hardware latching a current time, and sends the time stamp in a broadcast mode through a physical layer direct forwarding unit after a predetermined fixed delay. When the wireless clock synchronization slave module located in a coverage range receives the time stamp at the physical layer, the wireless clock synchronization slave module captures an accurate receiving time by hardware, corrects a local clock offset according to a preset delay parameter, and updates an internal hardware clock and a PPS generation logic of the wireless clock synchronization slave module. Finally, the wireless clock synchronization slave module outputs a time service signal to a connected slave device through a PPS signal interface and a time stamp interface, so that the slave device can complete time alignment with the master device according to the time service signal, and realize microsecond-level time synchronization.

[0037] Optionally, the wireless clock synchronization master module generates a periodic PPS signal based on the internal hardware clock, which includes: The wireless clock synchronization master module loads the current time into the internal hardware real-time clock unit after receiving the current time from the master device, and the time anchor generation unit establishes the correspondence between the hardware real-time clock unit and the PPS generation logic, ensuring that the PPS edge output at the next whole second is accurately aligned with the current time.

[0038] In the detailed description of the present specification, the wireless clock synchronization master module loads the current time into the internal hardware real-time clock unit after receiving the current time from the master device through the serial interface or SPI interface, completing the initial time setting. Subsequently, the time anchor generation unit inside the module automatically establishes the correspondence between the hardware real-time clock unit and the PPS generation logic, ensuring that the count value of the hardware real-time clock is accurately associated with the PPS output edge. After this setting, the wireless clock synchronization master module can output the PPS edge from the PPS interface at the next whole second, which is accurately aligned with the time provided by the master device, establishing a reliable hardware time reference for subsequent high-precision time synchronization.

[0039] Optionally, the generation of a time stamp at each PPS edge by hardware latching the current time and broadcasting the time stamp through the physical layer direct forwarding unit after a fixed delay includes: The time stamp capture and latching unit generates a high-precision hardware time stamp containing absolute time information by hardware logic from the hardware real-time clock unit in response to detecting the PPS edge, and delivers the time stamp to the physical layer direct forwarding unit.

[0040] In the detailed description of the present specification, the time stamp capture and latching unit inside the wireless clock synchronization master module monitors the PPS signal in real time. When detecting the arrival of the PPS edge, the unit immediately responds by latching the current complete time value from the hardware real-time clock unit by pure hardware logic within the same hardware clock cycle, generating a high-precision hardware time stamp containing year, month, day, hour, minute, second, and nanosecond level information. After latching, the time stamp is directly delivered to the physical layer direct forwarding unit without any software processing or data buffering. The physical layer direct forwarding unit automatically triggers the wireless transmitter when the preset fixed delay arrives, broadcasting the wireless frame containing the time stamp at the physical layer.

[0041] Optionally, the fixed delay is determined by the hardware circuit inside the wireless clock synchronization master module, and the fixed delay has a deterministic time interval between the capture time of the time stamp and the wireless transmission time, which does not change with software load or environmental changes.

[0042] In the detailed description of the present specification, the fixed delay is determined by a special hardware circuit inside the wireless clock synchronization master module, and the length is fixed at the design of the module. The fixed delay accurately defines the time interval between the timestamp capture time and the wireless transmission time. Since the delay is completely realized by hardware circuit, without involving any software scheduling or interrupt processing, the time interval has strict determinacy, and will not fluctuate due to the load change of the operating system, the busy degree of the application program or the change of the external environment, ensuring that the delay of each time information propagation path is consistent and repeatable.

[0043] Optionally, the wireless clock synchronization slave module captures the receiving time by hardware when receiving the timestamp at the physical layer, corrects the local time offset according to the preset delay parameter, and updates the internal hardware clock and PPS generation logic of the wireless clock synchronization slave module, including: the hardware capture unit inside the wireless clock synchronization slave module immediately latches the count value of the current hardware real-time clock when detecting that the physical layer receives a wireless frame, to generate the receiving time.

[0044] In the detailed description of the present specification, the hardware capture unit inside the wireless clock synchronization slave module continuously monitors the physical layer receiving channel. When the physical layer detects that a wireless frame arrives, the hardware capture unit immediately responds, and at the moment when the physical layer starts receiving the wireless frame, the count value of the current hardware real-time clock is accurately latched to generate the accurate receiving time of the timestamp. The capture process is completely completed by hardware logic, avoiding the interrupt delay and processing jitter caused by software intervention, ensuring the accuracy of the receiving time.

[0045] Optionally, the wireless clock synchronization slave module captures the receiving time by hardware when receiving the timestamp at the physical layer, corrects the local time offset according to the preset delay parameter, and updates the internal hardware clock and PPS generation logic of the wireless clock synchronization slave module, including: the wireless clock synchronization slave module loads the corrected time value into the internal hardware real-time clock unit, and re-establishes the correspondence between the hardware real-time clock unit and the PPS generation logic by the time anchor generation unit, so that the subsequent output PPS signal is aligned with the PPS signal of the wireless clock synchronization master module.

[0046] In the detailed description of the present specification, after the wireless clock synchronization slave module calculates the local time offset and completes the correction, the corrected accurate time value is loaded into the internal hardware real-time clock unit to update the local time. At the same time, the time anchor generation unit in the module re-establishes the correspondence between it and the PPS generation logic according to the updated hardware real-time clock. After this adjustment, the PPS signal edge output by the slave module subsequently is strictly aligned with the second count value of the internal hardware real-time clock, thereby ensuring that the PPS signal of the slave module is accurately synchronized with the PPS signal of the wireless clock synchronization master module.

[0047] Optionally, the wireless clock synchronization slave module outputs the time signal to the connected slave device through the PPS signal and timestamp interface, so that the slave device completes the time alignment with the master device, including: the PPS interface of the wireless clock synchronization slave module outputs the hardware PPS pulse strictly synchronized with the master module to the slave device, and at the same time outputs the current time information corresponding to the PPS pulse to the slave device through the serial or SPI interface, so that the slave device can complete the accurate setting of the local time based on the PPS pulse and the time information.

[0048] In the detailed description of the present specification, the wireless clock synchronization slave module outputs a hardware PPS pulse signal strictly synchronized with the master module to the connected slave device through its PPS interface, and the rising edge of the pulse is a high-precision time reference point. At the same time, the slave module outputs the current time information corresponding to the PPS pulse to the slave device through the serial interface or SPI interface, and the time information accurately describes the year, month, day, hour, minute, second, and nanosecond values corresponding to the rising edge of the PPS. After receiving the PPS pulse, the slave device can complete the accurate setting and alignment of the high-precision time in its local area in combination with the time information obtained through the serial interface or SPI interface.

[0049] In the present application, the time synchronization accuracy mainly comes from the hardware time anchor and the deterministic propagation path, rather than relying on complex software algorithms or multiple round-trip calibration. The timestamp is generated by hardware latching at the PPS edge and sent through the physical layer direct forwarding unit after a fixed delay. The receiving time is captured by hardware at the physical layer. The whole process avoids the uncertainty delay of software scheduling and high-layer protocol stack, making the synchronization error controllable and stable, and achieving microsecond-level synchronization accuracy reliably. The time information is directly forwarded at the physical layer or near the physical layer. The generation, transmission and sending of the timestamp are all completed by hardware logic without passing through the operating system and high-layer protocol stack. The fixed delay is determined by hardware circuit and does not change with the environment, so that the whole path delay from time capture to wireless sending has determinism and repeatability, fundamentally eliminating the time jitter caused by software processing in traditional schemes. The synchronization process does not depend on network congestion state, channel competition or communication load, and is not affected by operating system scheduling and cache mechanism. Therefore, in the multi-node deployment and complex indoor wireless environment, stable synchronization performance can still be maintained, and there is no significant decrease in synchronization accuracy due to the increase in the number of nodes or environmental changes. The timing system is constructed by self-developed high-precision wireless clock synchronization master module and slave module. Each module has a standard PPS interface and a timestamp interface, which can be flexibly connected with different types of master devices and slave devices. This modular structure enables the present application to be easily applied to indoor multi-device collaborative systems of various scales, with good scalability and adaptability. The general wireless module takes data communication throughput as the main design goal, while the wireless clock synchronization module of the present application is optimized for time synchronization applications, with low delay and deterministic propagation of time information as the core design goal. Therefore, it has an irreplaceable advantage in synchronization accuracy and stability compared with the general scheme.

[0050] Figure 2 A schematic diagram of the principle of an indoor wireless time synchronization device according to an embodiment of the present application is provided. The device can include: The acquisition module 10 is configured to acquire the current time by the master device. The sending module 20 is configured to send the current time to the wireless clock synchronization master module by the master device to initialize the internal hardware clock of the wireless clock synchronization master module. The generation module 30 is configured to generate a periodic PPS signal based on the internal hardware clock by the wireless clock synchronization master module, generate a timestamp by hardware latching at each PPS edge, and broadcast the timestamp through the physical layer direct forwarding unit after a fixed delay. The update module 40 is configured to capture the receiving time by hardware when the wireless clock synchronization slave module receives the timestamp at the physical layer, correct the local time offset according to a preset delay parameter, and update the internal hardware clock and PPS generation logic of the wireless clock synchronization slave module. An alignment module 50 is configured to output a time signal to a connected slave device through a PPS signal and a timestamp interface from the wireless clock synchronization slave module, so that the slave device completes time alignment with the master device.

[0051] Optionally, the generation module 30 comprises: After receiving the current time from the master device, the wireless clock synchronization master module loads the current time into an internal hardware real-time clock unit, and establishes a correspondence between the hardware real-time clock unit and PPS generation logic by a time anchor generation unit, to ensure that the next whole second moment outputs a PPS edge that is accurately aligned with the current time.

[0052] Optionally, the generation module 30 comprises: In response to detecting the PPS edge, the timestamp capture and latch unit latches the current moment from the hardware real-time clock unit by hardware logic, generates a high-precision hardware timestamp containing absolute time information, and delivers the timestamp to the physical layer direct forwarding unit.

[0053] Optionally, the fixed delay is determined by a hardware circuit inside the wireless clock synchronization master module, and the fixed delay has a deterministic time interval between the capture moment of the timestamp and the wireless transmission moment, which does not change with software load or environmental changes.

[0054] Optionally, the update module 40 comprises: a hardware capture unit inside the wireless clock synchronization slave module latches the count value of the current hardware real-time clock immediately when detecting that the physical layer receives a wireless frame, to generate the reception moment.

[0055] Optionally, the update module 40 comprises: the wireless clock synchronization slave module loads the corrected time value into the internal hardware real-time clock unit, and re-establishes the correspondence between the hardware real-time clock unit and the PPS generation logic by the time anchor generation unit, so that the subsequently output PPS signal remains aligned with the PPS signal of the wireless clock synchronization master module.

[0056] Optionally, the alignment module 50 comprises: the PPS interface of the wireless clock synchronization slave module outputs a hardware PPS pulse strictly synchronized with the master module to the slave device, and outputs current moment information corresponding to the PPS pulse to the slave device through a serial or SPI interface, so that the slave device can complete accurate setting of the local time based on the PPS pulse and the moment information.

[0057] The functions of the device of the embodiments of the present application have been described in the method embodiments described above, and thus the description of the present embodiments will not be described in detail. For details not described in the present embodiments, please refer to the relevant description in the foregoing embodiments.

[0058] Based on the same inventive concept, the embodiments of the present specification also provide an electronic device.

[0059] The electronic device embodiments of the present application are described below, which can be regarded as a specific physical implementation of the above-mentioned method and device embodiments of the present application. For the details described in the electronic device embodiments of the present application, it should be regarded as a supplement to the above-mentioned method or device embodiments; for the details not disclosed in the electronic device embodiments of the present application, please refer to the above-mentioned method or device embodiments to realize.

[0060] Figure 3 A structural schematic diagram of an electronic device provided by the embodiments of the present specification is shown. The electronic device 300 according to the embodiments of the present application is described below with reference to Figure 3 Figure 3 The electronic device 300 shown is only an example and should not limit the functions and use range of the embodiments of the present application.

[0061] As shown in Figure 3 , the electronic device 300 is in the form of a general computing device. The components of the electronic device 300 can include but are not limited to: at least one processing unit 310, at least one storage unit 320, a bus 330 connecting different system components (including the storage unit 320 and the processing unit 310), a display unit 340, etc.

[0062] The storage unit stores program codes, which can be executed by the processing unit 310, so that the processing unit 310 executes the steps according to various exemplary embodiments of the present application described in the processing method part of the present specification. For example, the processing unit 310 can execute the steps as shown in Figure 1 .

[0063] The storage unit 320 can include a readable medium in the form of a volatile storage unit, such as a random access memory (RAM) 3201 and / or a cache memory unit 3202, and can further include a read-only memory (ROM) 3203.

[0064] The storage unit 320 can also include program / utilities 3204 with a set of (at least one) program modules 3205, such as an operating system, one or more application programs, other program modules, and program data, each of which or some combination of which can include the implementation of a network environment. ​

[0065] Bus 330 can be one or more of several types of bus structure including a memory bus or memory controller, a peripheral bus, a graphics bus, a processor or local bus using any of a variety of bus architectures.

[0066] Electronic device 300 can also communicate with one or more external devices 400 such as a keyboard or pointing device, a Bluetooth device, etc. ; other devices associated with electronic device 300 ; and / or one or more devices that enable Figure 3 Other hardware and / or software modules that can be used in conjunction with the electronic device 300 can also include, but are not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc., as non-limiting examples.

[0067] Those skilled in the art will readily recognize that the present application as described in exemplary embodiments can be implemented in software and / or hardware, and that the exemplary embodiments are only examples of the present application. Therefore, the technical solutions of the present application can be embodied in the form of a software product, which can be stored in a computer readable storage medium (which can be a CD-ROM, U disk, mobile hard disk, etc. ) or network, including a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc. ) execute the above-mentioned methods according to the present application. When the computer program is executed by a data processing device, the computer readable medium can realize the above-mentioned methods of the present application, i.e., the method shown in Figure 1 .

[0068] Figure 4 A schematic diagram of a computer readable medium according to an embodiment of the present application.

[0069] Implementation Figure 1A computer program of the illustrated method can be stored on one or more computer readable media. The computer readable media can be a readable signal medium or a readable storage medium. A readable storage medium, for example, can be but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include an electrical connection having one or more wires, a portable disc, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0070] The computer readable storage medium can include a data signal transported over a carrier wave and can be baseband or propagated along with carriers. The propagated carrier can take any suitable form, including but not limited to electro-magnetic, optical, or any suitable combination thereof. A computer readable medium can be any medium that can be read by a computer. Such mediums can include, but are not limited to, optical, electrical or magnetic tapes, optical, electrical, or magnetic disks, memory chips, or the like. The computer readable medium can be a medium that can be used to store or transport the program and / or data for use by or in connection with the instruction execution system, apparatus, or device.

[0071] The program code can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++, or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the audience computing device, partly on the audience computing device, as a stand-alone software package, partly on the audience computing device and partly on a remote computing device or entirely on the remote computing device or server. In the latter scenario, the remote computing device can be connected to the audience computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computing device, such as through the Internet using an Internet Service Provider.

[0072] In light of the above, the present application can be implemented in hardware, or implemented in software modules running on one or more processors, or implemented in a combination of the two. Those skilled in the art should understand that some or all of the functions of some or all of the components according to the embodiments of the present application can be implemented in practice using a general-purpose data processing device such as a microprocessor or a digital signal processor (DSP). The present application can also be implemented as a device or apparatus program (for example, a computer program and a computer program product) for performing part or all of the methods described herein. Such a program implementing the present application can be stored on a computer readable medium or can be in the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0073] The above-described specific embodiments further illustrate the purposes, technical solutions and beneficial effects of the present application. It should be understood that the present application is not inherently related to any specific computer, virtual device or electronic device, and various general-purpose devices can implement the present application. The above-described specific embodiments are merely examples of the present application and are not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

[0074] Each of the embodiments in the specification is described in a progressive manner, and the same or similar parts between the embodiments can be mutually referred to. Each embodiment focuses on the differences from other embodiments.

[0075] The above-described specific embodiments are merely examples of the present application and are not intended to limit the present application. Those skilled in the art can make various changes and modifications to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A method of indoor wireless time synchronization, characterized by, The method comprises the following steps: The master device acquires the current time; The master device sends the current time to the wireless clock synchronization master module to initialize the internal hardware clock of the wireless clock synchronization master module; The wireless clock synchronization master module generates a periodic PPS signal based on the internal hardware clock, generates a time stamp at each PPS edge by locking the current time by hardware, and broadcasts and sends the time stamp after a fixed delay through a physical layer direct forwarding unit; The wireless clock synchronization slave module captures the receiving time by hardware when receiving the time stamp at the physical layer, corrects the local time offset according to a preset delay parameter, and updates the internal hardware clock and PPS generation logic of the wireless clock synchronization slave module; The wireless clock synchronization slave module outputs a time service signal to the connected slave device through the PPS signal and time stamp interface, so that the slave device completes time alignment with the master device.

2. The indoor wireless time synchronization method of claim 1, wherein, The wireless clock synchronization master module generates a periodic PPS signal based on the internal hardware clock, which comprises the following steps: After receiving the current time from the master device, the wireless clock synchronization master module loads the current time into the internal hardware real-time clock unit, and establishes the correspondence between the hardware real-time clock unit and the PPS generation logic by the time anchor generation unit, so as to ensure that the PPS edge output at the next whole second time is accurately aligned with the current time.

3. The indoor wireless time synchronization method of claim 1, wherein, The wireless clock synchronization master module generates a periodic PPS signal based on the internal hardware clock, which comprises the following steps: The time stamp capture and latch unit responds to the detection of the PPS edge to latch the current time by hardware logic from the hardware real-time clock unit, generates a high-precision hardware time stamp containing absolute time information, and delivers the time stamp to the physical layer direct forwarding unit.

4. The indoor wireless time synchronization method of claim 1, wherein, The fixed delay is determined by the hardware circuit inside the wireless clock synchronization master module, and the fixed delay makes the time interval between the capture time of the time stamp and the wireless sending time deterministic, which does not change with software load or environmental changes.

5. The indoor wireless time synchronization method of claim 1, wherein, The wireless clock synchronization slave module captures the receiving time by hardware when receiving the time stamp at the physical layer, corrects the local time offset according to a preset delay parameter, and updates the internal hardware clock and PPS generation logic of the wireless clock synchronization slave module, which comprises the following steps:

6. The indoor wireless time synchronization method of claim 1, wherein, The hardware capture unit inside the wireless clock synchronization slave module latches the count value of the current hardware real-time clock immediately when detecting that the physical layer receives a wireless frame, and generates the receiving time. The wireless clock synchronization slave module captures the receiving time by hardware when receiving the time stamp at the physical layer, corrects the local time offset according to a preset delay parameter, and updates the internal hardware clock and PPS generation logic of the wireless clock synchronization slave module, which comprises the following steps: The wireless clock synchronization slave module loads the corrected time value into the internal hardware real-time clock unit, and re-establishes the correspondence between the hardware real-time clock unit and the PPS generation logic by the time anchor generation unit, so that the subsequent output PPS signal remains aligned with the PPS signal of the wireless clock synchronization master module.

7. The indoor wireless time synchronization method of claim 1, wherein, The wireless clock synchronization slave module outputs a time signal to the connected slave device through a PPS signal and a timestamp interface, so that the slave device completes time alignment with the master device, including: the PPS interface of the wireless clock synchronization slave module outputs a hardware PPS pulse strictly synchronized with the master module to the slave device, and at the same time outputs current time information corresponding to the PPS pulse to the slave device through a serial or SPI interface, so that the slave device can complete accurate setting of local time based on the PPS pulse and the time information.

8. An indoor wireless time synchronization apparatus, characterized by comprising: Comprise: The acquisition module is used for the master device to acquire the current time; The sending module is used for the master device to send the current time to the wireless clock synchronization master module to initialize the internal hardware clock of the wireless clock synchronization master module; The generation module is used for the wireless clock synchronization master module to generate a periodic PPS signal based on the internal hardware clock, to generate a timestamp by hardware latching the current time at each PPS edge, and to broadcast and send the timestamp through a physical layer direct forwarding unit after a fixed delay; The update module is used for the wireless clock synchronization slave module to capture the reception time by hardware when receiving the timestamp at the physical layer, to correct the local time offset according to a preset delay parameter, and to update the internal hardware clock and the PPS generation logic of the wireless clock synchronization slave module; The alignment module is used for the wireless clock synchronization slave module to output a time signal to the connected slave device through a PPS signal and a timestamp interface, so that the slave device completes time alignment with the master device.

9. An electronic device, comprising: The electronic device comprises: a processor; and a memory storing computer-executable instructions that, when executed, cause the processor to perform the method of any of claims 1-7.

10. A computer readable storage medium, wherein, The computer-readable storage medium stores one or more programs, which when executed by a processor, implement the method of any of claims 1-7.