Terminal equipment synchronization method and device, equipment and medium
Through 5G network technology and intelligent gateway, it responds to the synchronization request of the terminal device, generates and sends time synchronization packets, solves the problems of complex deployment and high cost of existing device synchronization methods, and realizes a flexible and economical device synchronization solution.
Patent Information
- Application Number
- CN202410667415.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-28
- Publication Date
- 2024-09-06
AI Technical Summary
Existing device synchronization methods have large deployments, high costs, and inflexible interfaces, making it difficult to meet the growing requirements for device synchronization in fields such as industry and robotics.
Through the terminal device synchronization method, 5G network technology and smart gateways are used to determine the reference source in response to the synchronization request, generate a time synchronization package, send it to the terminal device, and perform time stamp correction based on the feedback package to achieve device synchronization.
It achieves device synchronization with smaller scale, simple and flexible deployment, meets the synchronization requirements of users, and reduces the cost and complexity of the synchronization system.
Smart Images

Figure CN118612834A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet technology, and in particular to a terminal device synchronization method, device, equipment and medium. Background Art
[0002] With the rapid development of 5G infrastructure and applications, various applications of 5G networks have been continuously implemented and played a huge role in industries or fields such as smart factories, smart parks, smart security, and smart cities. 5G smart gateways are widely used in various scenarios. At the same time, with the rapid development of industries such as industry and robotics, the synchronization requirements between devices are increasing day by day.
[0003] Currently, synchronization between devices can be achieved through professional synchronization equipment. However, the use of professional synchronization equipment results in a large overall deployment, high cost, and an inflexible interface, making it inconvenient for conventional communication equipment to access.
[0004] In summary, a device synchronization method with small scale, simple deployment and flexible operation is needed. Summary of the invention
[0005] The embodiments of the present invention provide a terminal device synchronization method, apparatus, equipment and medium, which can realize device synchronization with a small scale and simple and flexible deployment.
[0006] According to one aspect of the present invention, a terminal device synchronization method is provided, the method being applied to a terminal device synchronization apparatus, comprising:
[0007] In response to a non-local area network first synchronization request of a terminal device, determining a reference source corresponding to the first synchronization request according to a type of the synchronization request;
[0008] Generate a time synchronization packet based on the reference source, and send the time synchronization packet to the terminal device;
[0009] receiving a feedback packet from the terminal device, wherein the feedback packet indicates that the terminal device has successfully received the time synchronization packet;
[0010] A timestamp correction is performed based on the feedback packet to synchronize the terminal device.
[0011] Optionally, the type of the synchronization request includes: GPS synchronization; accordingly, determining a reference source corresponding to the first synchronization request according to the type of the synchronization request includes:
[0012] Determine GPS time information as the reference source based on time phase locking;
[0013] The step of generating a time synchronization packet based on the reference source and sending the time synchronization packet to the terminal device comprises:
[0014] Internal synchronization is performed according to the GPS time information and the time synchronization package is generated, and the time synchronization package is sent to the terminal device via WiFi, 5G network or wired network.
[0015] Optionally, the type of the synchronization request includes: GPS synchronization; accordingly, determining a reference source corresponding to the first synchronization request according to the type of the synchronization request includes:
[0016] The type of the synchronization request includes: 5G network synchronization; accordingly, determining the reference source corresponding to the first synchronization request according to the type of the synchronization request includes:
[0017] The B code output by the 5G module is analyzed based on time phase locking as the reference source;
[0018] The step of generating a time synchronization packet based on the reference source and sending the time synchronization packet to the terminal device comprises:
[0019] The time synchronization package is generated according to the B code, and the time synchronization package is sent to the terminal device via WiFi or a wired network.
[0020] Optionally, the performing timestamp correction based on the feedback packet to synchronize the terminal device includes:
[0021] Correction is performed through the feedback packet to obtain a timestamp;
[0022] When data is exchanged with the terminal device, the timestamp is carried in the data packet, so that after the terminal device receives the data packet with the timestamp, it uses the timestamp as a reference for synchronization.
[0023] Optionally, the method further includes:
[0024] In response to a second synchronization request of the local area network of the terminal device, a time synchronization packet is sent through a WiFi or wired network, a feedback packet from the terminal device is received, and correction is performed according to the feedback packet to obtain a timestamp;
[0025] When data is exchanged with the terminal device, the timestamp is carried in the data packet, so that after the terminal device receives the data packet with the timestamp, it uses the timestamp as a reference for synchronization.
[0026] Optionally, the method further includes:
[0027] When there is another terminal device synchronization device in the local area network, automatic synchronization is performed with the terminal device synchronization device via WiFi or a wired network.
[0028] According to another aspect of the present invention, there is provided a terminal device synchronization apparatus, comprising:
[0029] a determining unit, configured to respond to a first synchronization request of a terminal device not belonging to a local area network and determine a reference source corresponding to the first synchronization request according to a type of the synchronization request;
[0030] A sending unit, configured to generate a time synchronization packet based on the reference source, and send the time synchronization packet to the terminal device;
[0031] A receiving unit, configured to receive a feedback packet from the terminal device, wherein the feedback packet indicates that the terminal device has successfully received the time synchronization packet;
[0032] A correction unit is used to perform timestamp correction based on the feedback packet to synchronize the terminal device.
[0033] Optionally, the device further comprises: a synchronization device;
[0034] The synchronization unit is used to automatically synchronize with another terminal device synchronization device via WiFi or a wired network when there is another terminal device synchronization device in the local area network.
[0035] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0036] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the terminal device synchronization method described in any embodiment of the present invention.
[0037] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the terminal device synchronization method described in any embodiment of the present invention when executed.
[0038] The embodiments of the present invention provide a terminal device synchronization method, apparatus, device and medium, which responds to a first synchronization request of a terminal device from a non-local area network, determines a reference source corresponding to the first synchronization request according to the type of the synchronization request; generates a time synchronization package based on the reference source, and sends the time synchronization package to the terminal device; receives a feedback package from the terminal device, the feedback package indicates that the terminal device has successfully received the time synchronization package; and performs timestamp correction based on the feedback package to synchronize the terminal device. The solution of the embodiments of the present invention uses 5G technology and 5G smart gateway technology to realize a miniaturized synchronization system, which is simple and flexible to deploy and meets the synchronization requirements of users.
[0039] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0041] Figure 1 is a flow chart of a terminal device synchronization method provided by an embodiment of the present invention;
[0042] Figure 2 It is a functional schematic diagram of a terminal device synchronization device provided by an embodiment of the present invention;
[0043] Figure 3 It is a schematic diagram of executing a terminal device synchronization method provided by an embodiment of the present invention;
[0044] Figure 4 It is a structural schematic diagram of a terminal device synchronization device provided by an embodiment of the present invention;
[0045] Figure 5 It is a structural schematic diagram of an electronic device for implementing the terminal device synchronization method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0047] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0048] With the rapid development of 5G infrastructure and applications, various applications of 5G networks have been continuously implemented in industries or fields such as smart factories, smart parks, smart security, and smart cities, and have played a huge role. 5G smart gateways are widely used in various scenarios. At the same time, with the rapid development of industries such as industry and robotics, the synchronization requirements between devices are increasing day by day. The use of professional synchronization equipment requires a large overall deployment, high cost, and inflexible interfaces, which is not convenient for conventional communication equipment to access.
[0049] The main technologies used in the present invention are as follows:
[0050] 5G Network Technology:
[0051] The fifth generation mobile communication technology (5G) is a new generation of broadband mobile communication technology with the characteristics of high speed, low latency and large connection. 5G communication facilities are the network infrastructure for realizing the interconnection of man, machine and things. 5G has three major characteristics: high speed, ultra-large connection and ultra-low latency.
[0052] Network interconnection technology:
[0053] Network interconnection refers to connecting two or more communication networks through certain methods and one or more network communication devices to form a larger network system. The purpose of network interconnection is to enable users in different networks to communicate with each other, share software and data, etc.
[0054] 5G Smart Gateway Technology:
[0055] 5G smart gateways can integrate the information collected by different objects and transmit it to the next level, so that information can be transmitted between each part. 5G smart gateways can realize protocol conversion between perception networks and communication networks, as well as between different types of perception networks, and can realize both wide-area interconnection and local-area interconnection.
[0056] Figure 1 is a flow chart of a terminal device synchronization method provided by an embodiment of the present invention, the method is applied to a terminal device synchronization device, such as Figure 1 As shown, the method includes:
[0057] S110. In response to a first non-local area network synchronization request of a terminal device, determine a reference source corresponding to the first synchronization request according to a type of the synchronization request.
[0058] A reference source is a time source. A time source refers to a device or server that provides a time base reference signal. Its purpose is to provide accurate and reliable time information for other devices in the network.
[0059] The time source can be a variety of devices or servers, including but not limited to:
[0060] Global Navigation Satellite Systems (GNSS), such as GPS, provide precise time information worldwide.
[0061] UTC laboratories in various countries maintain the accuracy of UTC (Coordinated Universal Time) through high-precision equipment such as atomic clocks.
[0062] A network time server, such as an NTP (Network Time Protocol) server, obtains time information from the above time sources and then broadcasts it to other devices through the network to achieve time synchronization.
[0063] The accuracy and reliability of a time source is critical for all devices and services in a network that rely on precise time. For example, in a computer network, time synchronization is necessary for security, logging, and many other critical applications. By using a time source, you can ensure that all devices in the network use the same time reference, thus avoiding errors and problems caused by time deviations.
[0064] S120: Generate a time synchronization package based on the reference source, and send the time synchronization package to the terminal device.
[0065] S130, receiving a feedback packet from the terminal device, the feedback packet indicating that the terminal device successfully received the time synchronization packet.
[0066] S140. Perform timestamp correction based on the feedback packet to synchronize the terminal device.
[0067] In the embodiment of the present invention, the type of the synchronization request includes: GPS synchronization; accordingly, determining the reference source corresponding to the first synchronization request according to the type of the synchronization request includes:
[0068] Determine GPS time information as the reference source based on time phase locking;
[0069] The step of generating a time synchronization packet based on the reference source and sending the time synchronization packet to the terminal device comprises:
[0070] Internal synchronization is performed according to the GPS time information and the time synchronization package is generated, and the time synchronization package is sent to the terminal device via WiFi, 5G network or wired network.
[0071] In the embodiment of the present invention, the type of the synchronization request includes: GPS synchronization; accordingly, determining the reference source corresponding to the first synchronization request according to the type of the synchronization request includes:
[0072] The type of the synchronization request includes: 5G network synchronization; accordingly, determining the reference source corresponding to the first synchronization request according to the type of the synchronization request includes:
[0073] The B code output by the 5G module is analyzed based on time phase locking as the reference source;
[0074] The step of generating a time synchronization packet based on the reference source and sending the time synchronization packet to the terminal device comprises:
[0075] The time synchronization package is generated according to the B code, and the time synchronization package is sent to the terminal device via WiFi or a wired network.
[0076] IRIG-B format, referred to as B code, is a signal carrier with a frequency of 1kHz that loads time synchronization signals and time code information such as seconds, minutes, hours, and days. The GPS system receives satellite time signals and outputs IRIG-B time code sequences. Substation intelligent devices can be connected to a unified time bus for time synchronization.
[0077] The B code signal is a time code with one frame per second. One frame contains 100 code elements with a frequency of 1kHz, so each code element takes 10ms. Its basic code elements are "0" code element, "1" code element and "P" code element. The pulse widths corresponding to code elements "0" and "1" are 2ms and 5ms respectively. The "P" code element is a position code element with a corresponding pulse width of 8ms.
[0078] In the embodiment of the present invention, the performing timestamp correction based on the feedback packet to synchronize the terminal device includes:
[0079] Correction is performed through the feedback packet to obtain a timestamp;
[0080] When data is exchanged with the terminal device, the timestamp is carried in the data packet, so that after the terminal device receives the data packet with the timestamp, it uses the timestamp as a reference for synchronization.
[0081] Figure 2 This is a functional schematic diagram of a terminal device synchronization device provided by an embodiment of the present invention, wherein the terminal device synchronization device includes a 5G module, GPS, WIFI, a time lock module, a time synchronization module and a CPU module.
[0082] GPS Sync Refers to the use of GPS (Global Positioning System) signals to synchronize the time of two or more clocks. This process involves receiving signals from GPS satellites and using these signals to adjust local clocks to align with GPS time.
[0083] The GPS synchronized clock is mainly composed of the following parts: GPS / GNSS receiver (can receive GPS, GLONASS, Beidou, GALILEO and other signals), high-precision OCXO (temperature compensated crystal oscillator) or rubidium clock, local synchronization calibration unit, difference measurement unit, error processing and control structure, input and output, etc. Its working principle is to control the crystal oscillator through the signal of GPS or other satellite navigation system, so as to achieve high-precision frequency and time signal output. This technology is currently an effective way to achieve nanosecond-level timing accuracy and stability.
[0084] In addition, GPS synchronization is also widely used in automation systems, such as computers, control devices, etc., by acquiring standard time signals from GPS satellites and transmitting this information to devices that require time information through different interfaces to achieve time synchronization of the entire system.
[0085] When the terminal device sends a request for GPS synchronization, after receiving the request, it automatically selects GPS as the reference source in the time lock module, and completes the internal synchronization of the system according to the GPS time information. The time synchronization module sends the synchronization package through WiFi, 5G module or wired network. When the terminal device receives the time synchronization package, it immediately sends a feedback package. After receiving the feedback package from the terminal device, it is corrected in the time synchronization module, and the corrected timestamp is added to the subsequent data. After the terminal device receives the data packet with the timestamp, it uses the time as a reference to achieve the synchronization requirement.
[0086] When the terminal device sends a request for 5G network synchronization, after receiving the request, it automatically parses the B code output by the 5G module in the time lock module as a reference source. The time synchronization module sends a synchronization package via WiFi or a wired network. When the terminal device receives the time synchronization package, it immediately sends a feedback package. After receiving the feedback package from the terminal device, the time synchronization module makes corrections and adds the corrected timestamp to the subsequent data. After the terminal device receives the data packet with the timestamp, it uses the time as a reference to achieve synchronization requirements.
[0087] In an embodiment of the present invention, the method further includes: in response to a second synchronization request of a local area network of a terminal device, sending a time synchronization packet through a WiFi or wired network, receiving a feedback packet from the terminal device, and performing correction through the feedback packet to obtain a timestamp;
[0088] When data is exchanged with the terminal device, the timestamp is carried in the data packet, so that after the terminal device receives the data packet with the timestamp, it uses the timestamp as a reference for synchronization.
[0089] When two or more devices appear in the local area network, synchronization will be completed automatically.
[0090] Figure 3 It is a schematic diagram of executing a terminal device synchronization method provided by an embodiment of the present invention.
[0091] This method aims to realize a miniaturized synchronization system through 5G technology and 5G intelligent gateway technology, which is simple and flexible to deploy and meet the synchronization requirements of users.
[0092] Figure 4 is a schematic diagram of the structure of a terminal device synchronization device provided by an embodiment of the present invention, such as Figure 4 As shown, the device comprises:
[0093] A determination unit 410 is configured to respond to a non-local area network first synchronization request of a terminal device and determine a reference source corresponding to the first synchronization request according to a type of the synchronization request;
[0094] A sending unit 420, configured to generate a time synchronization packet based on the reference source, and send the time synchronization packet to the terminal device;
[0095] The receiving unit 430 is configured to receive a feedback packet from the terminal device, wherein the feedback packet indicates that the terminal device has successfully received the time synchronization packet;
[0096] The correction unit 440 is used to perform timestamp correction based on the feedback packet to synchronize the terminal device.
[0097] Optionally, the device may further include: a synchronization unit 450;
[0098] The synchronization unit 450 is used to automatically synchronize with another terminal device synchronization device via WiFi or a wired network when there is another terminal device synchronization device in the local area network.
[0099] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the terminal device synchronization device. In other embodiments of the present invention, the terminal device synchronization device may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0100] The information interaction, execution process and other contents between the units in the above-mentioned device are based on the same concept as the embodiment of the method of the present invention. For specific contents, please refer to the description in the embodiment of the method of the present invention, and no further description is given here.
[0101] Figure 5 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0102] like Figure 5 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0103] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0104] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a terminal device synchronization method.
[0105] In some embodiments, the terminal device synchronization method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the terminal device synchronization method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the terminal device synchronization method in any other appropriate manner (e.g., by means of firmware).
[0106] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0107] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0108] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0109] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0110] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0111] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0112] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0113] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. Terminal device synchronization method, It is characterized in that The method is applied to a terminal equipment synchronization device, comprising: In response to a non-local area network first synchronization request of a terminal device, determining a reference source corresponding to the first synchronization request according to a type of the synchronization request; Generate a time synchronization packet based on the reference source, and send the time synchronization packet to the terminal device; receiving a feedback packet from the terminal device, wherein the feedback packet indicates that the terminal device has successfully received the time synchronization packet; A timestamp correction is performed based on the feedback packet to synchronize the terminal device.
2. The method according to claim 1, It is characterized in that The type of the synchronization request includes: GPS synchronization; accordingly, determining the reference source corresponding to the first synchronization request according to the type of the synchronization request includes: Determine GPS time information as the reference source based on time phase locking; The step of generating a time synchronization packet based on the reference source and sending the time synchronization packet to the terminal device comprises: Internal synchronization is performed according to the GPS time information and the time synchronization package is generated, and the time synchronization package is sent to the terminal device via WiFi, 5G network or wired network.
3. The method according to claim 1, It is characterized in that The type of the synchronization request includes: GPS synchronization; accordingly, determining the reference source corresponding to the first synchronization request according to the type of the synchronization request includes: The type of the synchronization request includes: 5G network synchronization; accordingly, determining the reference source corresponding to the first synchronization request according to the type of the synchronization request includes: The B code output by the 5G module is analyzed based on time phase locking as the reference source; The step of generating a time synchronization packet based on the reference source and sending the time synchronization packet to the terminal device comprises: The time synchronization package is generated according to the B code, and the time synchronization package is sent to the terminal device via WiFi or a wired network.
4. The method according to claim 1, It is characterized in that The performing timestamp correction based on the feedback packet to synchronize the terminal device includes: Correction is performed through the feedback packet to obtain a timestamp; When data is exchanged with the terminal device, the timestamp is carried in the data packet, so that after the terminal device receives the data packet with the timestamp, it uses the timestamp as a reference for synchronization.
5. The method according to claim 4, It is characterized in that Further including: In response to a second synchronization request of the local area network of the terminal device, a time synchronization packet is sent through a WiFi or wired network, a feedback packet from the terminal device is received, and correction is performed according to the feedback packet to obtain a timestamp; When data is exchanged with the terminal device, the timestamp is carried in the data packet, so that after the terminal device receives the data packet with the timestamp, it uses the timestamp as a reference for synchronization.
6. The method according to claim 1, It is characterized in that Further including: When there is another terminal device synchronization device in the local area network, automatic synchronization is performed with the terminal device synchronization device via WiFi or a wired network.
7. Terminal equipment synchronization device, It is characterized in that include: a determining unit, configured to respond to a first synchronization request of a terminal device not belonging to a local area network and determine a reference source corresponding to the first synchronization request according to a type of the synchronization request; A sending unit, configured to generate a time synchronization packet based on the reference source, and send the time synchronization packet to the terminal device; A receiving unit, configured to receive a feedback packet from the terminal device, wherein the feedback packet indicates that the terminal device has successfully received the time synchronization packet; A correction unit is used to perform timestamp correction based on the feedback packet to synchronize the terminal device.
8. The device according to claim 7, It is characterized in that Further including: Synchronous unit; The synchronization unit is used to automatically synchronize with another terminal device synchronization device via WiFi or a wired network when there is another terminal device synchronization device in the local area network.
9. Electronic equipment, It is characterized in that include: at least one processor; And a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the terminal device synchronization method described in any one of claims 1-7.
10. Computer readable media, It is characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the terminal device synchronization method according to any one of claims 1 to 7 when executed.
