WO2020087370A1 - Method and device for time synchronization, and storage medium - Google Patents

Method and device for time synchronization, and storage medium Download PDF

Info

Publication number
WO2020087370A1
WO2020087370A1 PCT/CN2018/113119 CN2018113119W WO2020087370A1 WO 2020087370 A1 WO2020087370 A1 WO 2020087370A1 CN 2018113119 W CN2018113119 W CN 2018113119W WO 2020087370 A1 WO2020087370 A1 WO 2020087370A1
Authority
WO
WIPO (PCT)
Prior art keywords
wireless device
time
signal
synchronization
synchronization request
Prior art date
Application number
PCT/CN2018/113119
Other languages
French (fr)
Chinese (zh)
Inventor
王春龙
周永林
杨柯
Original Assignee
深圳市汇顶科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市汇顶科技股份有限公司 filed Critical 深圳市汇顶科技股份有限公司
Priority to PCT/CN2018/113119 priority Critical patent/WO2020087370A1/en
Priority to CN201880002135.8A priority patent/CN109565772A/en
Publication of WO2020087370A1 publication Critical patent/WO2020087370A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation

Abstract

A method and device for time synchronization, and a storage medium. The method comprises: sending a synchronization request signal, and receiving an acknowledgement signal; determining a transmission time according to a first time at which the synchronization request signal is sent and a time at which the acknowledgement signal is received; receiving a synchronization response signal comprising information about a second time; and adjusting a system time of a first wireless device according to the first time, the transmission time and the second time. The invention can realize accurate time synchronization between wireless devices.

Description

时间同步方法、设备及存储介质Time synchronization method, equipment and storage medium 技术领域Technical field
本申请实施例涉及通信技术,尤其涉及一种时间同步方法、设备及存储介质。The embodiments of the present application relate to communication technologies, and in particular, to a time synchronization method, device, and storage medium.
背景技术Background technique
随着无线技术的持续发展,基于无线传输的多设备协同工作的场景也越来越多。基于无线技术的数据采集,便需多设备协同工作。With the continuous development of wireless technology, there are more and more scenarios where wireless devices work together based on wireless transmission. Data collection based on wireless technology requires multiple devices to work together.
而实际的数据采集应用中,对时间同步要求比较高。例如,桥梁状态监测、大坝监测、飞机的静力试验,飞机的动态力学实验等,由于采集点比较多,采集速度从几赫兹到几百赫兹不等,而这些采集点之间的时间同步是个大问题。目前,在一些存在有线网络中,可通过总线广播的方式进行时间同步,根据网络部署,其同步精度在1ms-100ms不等。However, in actual data acquisition applications, the requirements for time synchronization are relatively high. For example, bridge condition monitoring, dam monitoring, aircraft static test, aircraft dynamic mechanics test, etc., because there are many collection points, the collection speed varies from a few hertz to a few hundred hertz, and the time between these collection points is synchronized Is a big problem. At present, in some existing wired networks, time synchronization can be performed by means of bus broadcasting. According to network deployment, the synchronization accuracy varies from 1 ms to 100 ms.
然而,在基于无线网络中,不同设备的传输时间的不确定性,使得广播方式进行时间同步的可靠性较差,因而如何准确地实现设备之间的时间同步显得格外重要。However, in wireless-based networks, the uncertainty of the transmission time of different devices makes the reliability of time synchronization in the broadcast mode poor, so how to accurately achieve time synchronization between devices is extremely important.
发明内容Summary of the invention
本申请实施例提供一种时间同步方法、设备及存储介质,以准确实现设备之间的时间同步。Embodiments of the present application provide a time synchronization method, device, and storage medium to accurately achieve time synchronization between devices.
第一方面,本申请实施例提供一种时间同步方法,包括:In a first aspect, an embodiment of the present application provides a time synchronization method, including:
第一无线设备向第二无线设备发送同步请求信号;The first wireless device sends a synchronization request signal to the second wireless device;
所述第一无线设备接收所述第二无线设备发送的确认ACK信号;The first wireless device receives an acknowledgement ACK signal sent by the second wireless device;
所述第一无线设备根据发送所述同步请求信号的第一时间,以及接收到所述ACK信号的时间,确定传输时间;The first wireless device determines the transmission time according to the first time when the synchronization request signal is sent and the time when the ACK signal is received;
所述第一无线设备接收所述第二无线设备发送的同步响应信号;所述同步响应信号包括:第二时间的信息;所述第二时间为所述第二无线设备接收到所述同步请求信号的时间;The first wireless device receives a synchronization response signal sent by the second wireless device; the synchronization response signal includes: information at a second time; the second time is when the second wireless device receives the synchronization request Signal time
所述第一无线设备根据所述第一时间、所述传输时间以及所述第二时间,调节所述第一无线设备的系统时间。The first wireless device adjusts the system time of the first wireless device according to the first time, the transmission time, and the second time.
第二方面,本申请实施例还可提供一种时间同步方法,包括:In a second aspect, an embodiment of the present application may also provide a time synchronization method, including:
第二无线设备接收第一无线设备发送的同步请求信号;The second wireless device receives the synchronization request signal sent by the first wireless device;
所述第二无线设备在接收到所述同步请求信号时,向所述第一无线设备发送确认ACK信号;所述ACK信号用于使得所述第一无线设备根据发送所述同步请求信号的第一时间,以及接收到所述ACK信号的时间,确定传输时间;When receiving the synchronization request signal, the second wireless device sends an acknowledgement ACK signal to the first wireless device; the ACK signal is used to cause the first wireless device to send the synchronization request signal according to the first A time, and the time when the ACK signal is received, determine the transmission time;
所述第二无线设备向所述第一无线设备发送同步响应信号,所述同步响应信号包括:第二时间的信息;所述第二时间为所述第二无线设备接收到所述同步请求信号的时间;所述第二时间用于使得所述第一无线设备根据所述第一时间、所述传输时间以及所述第二时间,调节所述第一无线设备的系统时间。The second wireless device sends a synchronization response signal to the first wireless device, the synchronization response signal includes: information at a second time; the second time is when the second wireless device receives the synchronization request signal The second time is used to allow the first wireless device to adjust the system time of the first wireless device according to the first time, the transmission time, and the second time.
第三方面,本申请实施例还可提供一种无线设备,所述无线设备为第一无线设备,所述无线设备包括:In a third aspect, an embodiment of the present application may further provide a wireless device. The wireless device is a first wireless device, and the wireless device includes:
发送模块,用于向第二无线设备发送同步请求信号;A sending module, configured to send a synchronization request signal to the second wireless device;
第一接收模块,用于接收所述第二无线设备发送的确认ACK信号;A first receiving module, configured to receive an acknowledgement ACK signal sent by the second wireless device;
确定模块,用于根据发送所述同步请求信号的第一时间,以及接收到所述ACK信号的时间,确定传输时间;A determining module, configured to determine the transmission time according to the first time when the synchronization request signal is sent and the time when the ACK signal is received;
第二接收模块,用于接收所述第二无线设备发送的同步响应信号;所述同步响应信号包括:第二时间的信息;所述第二时间为所述第二无线设备接收到所述同步请求信号的时间;A second receiving module, configured to receive a synchronization response signal sent by the second wireless device; the synchronization response signal includes: information at a second time; the second time is when the second wireless device receives the synchronization Request signal time;
调节模块,用于根据所述第一时间、所述传输时间以及所述第二时间,调节所述第一无线设备的系统时间。The adjustment module is configured to adjust the system time of the first wireless device according to the first time, the transmission time, and the second time.
第四方面,本申请实施例还可提供一种无线设备,所述无线设备为第二无线设备,包括:According to a fourth aspect, an embodiment of the present application may further provide a wireless device. The wireless device is a second wireless device, including:
接收模块,用于接收第一无线设备发送的同步请求信号;A receiving module, configured to receive a synchronization request signal sent by the first wireless device;
第一发送模块,用于在接收到所述同步请求信号时,向所述第一无线设备发送确认ACK信号;所述ACK信号用于使得所述第一无线设备根据发送所述同步请求信号的第一时间,以及接收到所述ACK信号的时间,确定传输时间;A first sending module, configured to send an acknowledgement ACK signal to the first wireless device when receiving the synchronization request signal; the ACK signal is used to enable the first wireless device to send the synchronization request signal according to the The first time, and the time when the ACK signal is received, determines the transmission time;
第二发送模块,用于向所述第一无线设备发送同步响应信号,所述同步响应信号包括:第二时间的信息;所述第二时间为所述第二无线设备接收到所述同步请求信号的时间;所述第二时间用于使得所述第一无线设备根据所述第一时间、所述传输时间以及所述第二时间,调节所述第一无线设备的系统时间。A second sending module, configured to send a synchronization response signal to the first wireless device, the synchronization response signal includes: information at a second time; the second time is when the second wireless device receives the synchronization request The time of the signal; the second time is used to allow the first wireless device to adjust the system time of the first wireless device according to the first time, the transmission time, and the second time.
第五方面,本申请实施例还可提供一种无线设备,所述无线设备包括:存储器和处理器;所述存储器与所述处理器耦合;According to a fifth aspect, an embodiment of the present application may further provide a wireless device. The wireless device includes: a memory and a processor; the memory is coupled to the processor;
所述存储器,用于存储程序指令;The memory is used to store program instructions;
所述处理器,用于调用所述存储器存储的程序指令,使得所述无线设备执行第一方面所述的时间同步方法。The processor is configured to call program instructions stored in the memory, so that the wireless device executes the time synchronization method described in the first aspect.
第六方面,本申请实施例还可提供一种无线设备,所述无线设备包括:存储器和处理器;所述存储器与所述处理器耦合;According to a sixth aspect, an embodiment of the present application may further provide a wireless device. The wireless device includes: a memory and a processor; the memory is coupled to the processor;
所述存储器,用于存储程序指令;The memory is used to store program instructions;
所述处理器,用于调用所述存储器存储的程序指令,使得所述无线设备执行上述第二方面所述的时间同步方法。The processor is configured to call program instructions stored in the memory, so that the wireless device executes the time synchronization method described in the second aspect.
第七方面,一种计算机可读存储介质,其特征在于,包括:其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现上述第一方面所述的时间同步方法。According to a seventh aspect, a computer-readable storage medium includes: a computer program stored thereon, wherein the computer program is executed by a processor to implement the time synchronization method described in the first aspect.
第八方面,一种计算机可读存储介质,其特征在于,包括:其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现上述第二方面所述的时间同步方法。An eighth aspect is a computer-readable storage medium, comprising: a computer program stored thereon, wherein the computer program is executed by a processor to implement the time synchronization method described in the second aspect above.
本申请实施例提供的时间同步方法、设备及存储介质,可通过第一无线设备向第二无线设备发送同步请求信号,并接收该第二无线设备发送的ACK信号,并根据发送该同步请求信号的第一时间,以及接收到该ACK信号的时间,确定传输时间,还接收该第二无线设备发送的同步响应信号,该同步响应信号包括:该第二无线设备接收到该同步请求信号的第二时间的第二时间的信息,从而可根据该第一时间、该传输时间以及该第二时间,调节该第一无线设备的时间。该方法可通过调节第一无线设备的系统时间,实现了第一无线设备与第二无线设备之间的时间同步,使得与第二无线设备连接的其它无线设备之间的系统时间也同步,从而准确实现无线设备之间的时间同步。The time synchronization method, device, and storage medium provided in the embodiments of the present application may send a synchronization request signal to a second wireless device through a first wireless device, and receive an ACK signal sent by the second wireless device, and send the synchronization request signal The first time and the time when the ACK signal is received, determine the transmission time, and also receive the synchronization response signal sent by the second wireless device, the synchronization response signal includes: the second wireless device receives the synchronization request signal The second time information of the two times, so that the time of the first wireless device can be adjusted according to the first time, the transmission time, and the second time. The method can realize the time synchronization between the first wireless device and the second wireless device by adjusting the system time of the first wireless device, so that the system time between other wireless devices connected to the second wireless device is also synchronized, thereby Accurately synchronize time between wireless devices.
附图说明BRIEF DESCRIPTION
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly explain the embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings required in the embodiments or the description of the prior art. Obviously, the drawings in the following description These are some embodiments of the present application. For those of ordinary skill in the art, without paying creative labor, other drawings may be obtained based on these drawings.
图1为本申请实施例提供的一种时间同步方法所适用于的网络拓扑结构的示意图;1 is a schematic diagram of a network topology structure to which a time synchronization method according to an embodiment of the present application is applicable;
图2为本申请实施例提供的一种时间同步方法的流程图一;2 is a flowchart 1 of a time synchronization method provided by an embodiment of the present application;
图3为本申请实施例提供的第一无线设备与第二无线设备之间的时间关系图;3 is a time relationship diagram between a first wireless device and a second wireless device provided by an embodiment of this application;
图4为本申请实施例提供的一种时间同步方法的流程图二;4 is a flowchart 2 of a time synchronization method provided by an embodiment of the present application;
图5为本申请实施例提供的一种用于经典蓝牙系统的时间同步方法中射频信号的时序示意图;FIG. 5 is a timing diagram of a radio frequency signal in a time synchronization method for a classic Bluetooth system provided by an embodiment of this application;
图6为本申请实施例提供的一种用于BLE系统的时间同步方法中同步射频信号的时序示意图;6 is a timing diagram of synchronizing radio frequency signals in a time synchronization method for a BLE system provided by an embodiment of the present application;
图7为本申请实施例提供的一种无线设备的结构示意图一;7 is a schematic structural diagram 1 of a wireless device according to an embodiment of the present application;
图8为本申请实施例提供的一种无线设备的结构示意图二;8 is a second schematic structural diagram of a wireless device according to an embodiment of the present application;
图9为本申请实施例提供的一种无线设备的结构示意图三;9 is a schematic structural diagram 3 of a wireless device according to an embodiment of the present application;
图10为本申请实施例提供的一种无线设备的结构示意图四。10 is a fourth structural diagram of a wireless device according to an embodiment of the present application.
具体实施方式detailed description
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments It is a part of the embodiments of this application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中在本申请的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本申请。本文所 使用的术语“和/或”包括一个或多个相关的所列项目的任意的和所有的组合。下面结合附图,对本申请的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field of the present application. The terminology used in the specification of the present application herein is for the purpose of describing specific embodiments only, and is not intended to limit the present application. As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items. In the following, some embodiments of the present application will be described in detail with reference to the drawings. In the case of no conflict, the following embodiments and the features in the embodiments can be combined with each other.
本申请下述各实施例提供的时间同步方法、设备及存储介质,可应用于基于无线技术,又称“无线传输技术”的多设备的网络拓扑结构中。如下结合示例对网络拓扑结构进行说明,图1为本申请实施例提供的一种时间同步方法所适用于的网络拓扑结构的示意图。如图1所示,服务(server)端设备11可连接有至少一个客户(client)端设备12。服务端设备11还可称为主(master)设备,客户(client)端设备12还可称为从设备。在本申请中,服务端设备11和每个客户端设备12均为无线设备。The time synchronization method, device and storage medium provided by the following embodiments of the present application can be applied to a multi-device network topology based on wireless technology, also known as "wireless transmission technology". The network topology structure will be described below in conjunction with examples. FIG. 1 is a schematic diagram of a network topology structure to which a time synchronization method according to an embodiment of the present application is applicable. As shown in FIG. 1, at least one client device 12 can be connected to the server device 11. The server device 11 may also be called a master device, and the client device 12 may also be called a slave device. In this application, the server device 11 and each client device 12 are wireless devices.
本申请所涉及的方案所适用的网络拓扑可应用于基于无线技术的数据采集领域,也可应用于非数据采集领域。在基于无线技术的数据采集领域中,该服务端设备11可以为手机、平板电脑、数据采集装置等,该客户端设备12可以为数据传感器等。在非数据采集领域中,该服务端设备11可以为手机、平板电脑等,客户端设备12可以为耳机、腕表、手环、或者其它智能穿戴设备等。The network topology applicable to the solution involved in this application can be applied to the field of data collection based on wireless technology, and can also be applied to the field of non-data collection. In the field of data collection based on wireless technology, the server device 11 may be a mobile phone, a tablet computer, a data collection device, etc., and the client device 12 may be a data sensor. In the non-data collection field, the server device 11 may be a mobile phone, a tablet computer, etc., and the client device 12 may be a headset, wrist watch, bracelet, or other smart wearable device.
服务端设备11和客户端设备12之间所采用的无线技术,例如可以为无线保真(Wireless-Fidelity,简称WiFi)、红外数据组织(Infrared Data Association,简称IrDA)、蓝牙、低功耗蓝牙(Bluetooth Low Energy,简称BLE)、紫峰(Zigbee)等任一类型的无线传输技术。以蓝牙技术为例,则服务端设备11和客户端设备12均可以为蓝牙设备。The wireless technology used between the server device 11 and the client device 12 may be, for example, Wireless-Fidelity (WiFi), Infrared Data Association (IrDA), Bluetooth, Bluetooth Low Energy (Bluetooth Low Energy, referred to as BLE), Zigbee and other types of wireless transmission technology. Taking Bluetooth technology as an example, both the server device 11 and the client device 12 may be Bluetooth devices.
当服务端设备11同时连接多个客户端设备12,由于每个无线设备分别具有各自的时钟,因而,不同的无线设备,如服务端设备11与每个客户端设备12或者,不同的客户端设备12,之间均可能存在时间不同步。时间的不同步可能会引起彼此之间传输的数据误差,因此,本申请实施例提供下述各方法,以实现无线设备之间的时间同步,避免数据误差。When the server device 11 is connected to multiple client devices 12 at the same time, since each wireless device has its own clock, different wireless devices, such as the server device 11 and each client device 12 or different clients There may be time out-of-sync between devices 12. Unsynchronized time may cause data errors transmitted between each other. Therefore, the embodiments of the present application provide the following methods to achieve time synchronization between wireless devices and avoid data errors.
如下通过多个示例进行说明。图2为本申请实施例提供的一种时间同步方法的流程图一。该时间同步方法可由第一无线设备和第二无线设备交互进行实现。该第一无线设备例如可以为上述图1中所示的任一客户端设备12,第二无线设备例如可以为上述图1中所示的服务端设备11。如图2所示,该 方法可包括:Several examples are used to illustrate the following. FIG. 2 is a flowchart 1 of a time synchronization method provided by an embodiment of the present application. The time synchronization method can be implemented interactively by the first wireless device and the second wireless device. The first wireless device may be, for example, any client device 12 shown in FIG. 1 above, and the second wireless device may be, for example, the server device 11 shown in FIG. 1. As shown in Figure 2, the method may include:
S201、第一无线设备向第二无线设备发送同步请求(sync_request)信号。S201. The first wireless device sends a synchronization request (sync_request) signal to the second wireless device.
该第一无线设备可采用预设的无线技术,向第二无线设备发送同步请求信号。该预设的无线技术,例如可以为蓝牙技术,则该第一无线设备和该第二无线设备可以为蓝牙设备。需要说明的是,在本申请中,蓝牙设备指代的是支持蓝牙技术的设备,而并非仅支持蓝牙技术的设备,也就是说,该蓝牙设备在支持蓝牙技术的基础上,还可支持其他的传输技术,在此不再赘述。The first wireless device may use a preset wireless technology to send a synchronization request signal to the second wireless device. The preset wireless technology may be, for example, Bluetooth technology, and the first wireless device and the second wireless device may be Bluetooth devices. It should be noted that, in this application, a Bluetooth device refers to a device that supports Bluetooth technology, not just a device that supports Bluetooth technology. That is to say, the Bluetooth device can also support other devices based on Bluetooth technology. The transmission technology is not repeated here.
该第一无线设备可在与该第二无线设备建立无线连接的情况下,向第二无线设备发送同步请求信号。也就是说,在S201中第一无线设备向第二无线设备发送同步请求信号之前,该方法还可包括:The first wireless device may send a synchronization request signal to the second wireless device when establishing a wireless connection with the second wireless device. That is to say, before the first wireless device sends a synchronization request signal to the second wireless device in S201, the method may further include:
该第一无线设备与该第二无线设备建立无线连接。The first wireless device establishes a wireless connection with the second wireless device.
在该实施例中,可由第一无线设备发起请求,以与该第二无线设备建立无线连接,也可由第二无线设备发起请求以与该第一无线设备建立无线连接。In this embodiment, the first wireless device may initiate a request to establish a wireless connection with the second wireless device, or the second wireless device may initiate a request to establish a wireless connection with the first wireless device.
该第一无线设备在向该第二无线设备发送该同步请求时,并记录发送该同步请求信号的第一时间如T1。该第一时间可以为该第一无线设备发送该同步请求信号时的本地时间。When sending the synchronization request to the second wireless device, the first wireless device records the first time such as T1 when the synchronization request signal is sent. The first time may be the local time when the first wireless device sends the synchronization request signal.
S202、第二无线设备接收第一无线设备发送的同步请求信号。S202. The second wireless device receives the synchronization request signal sent by the first wireless device.
S203、第二无线设备向第一无线设备发送确认(ACKnowledgement,简称ACK)信号。S203. The second wireless device sends an acknowledgement (ACKnowledgement, ACK for short) signal to the first wireless device.
该第二无线设备向第一无线设备发送该ACK信号,以指示其接收到该同步请求信号。该第二无线设备在接收到该同步请求信号时,便向第一无线设备发送该ACK信号。The second wireless device sends the ACK signal to the first wireless device to indicate that it received the synchronization request signal. When receiving the synchronization request signal, the second wireless device sends the ACK signal to the first wireless device.
S204、第一无线设备接收第二无线设备发送的ACK信号。S204. The first wireless device receives the ACK signal sent by the second wireless device.
该第一无线设备在发送该同步请求信号后,便监测该第二无线设备发送的信号,当接收到该ACK信号,便可确定接收到该ACK信号的时间。After sending the synchronization request signal, the first wireless device monitors the signal sent by the second wireless device, and when the ACK signal is received, the time when the ACK signal is received can be determined.
S205、第一无线设备可根据发送该同步请求信号的第一时间,和接收到该ACK信号的时间,确定传输时间。S205. The first wireless device may determine the transmission time according to the first time when the synchronization request signal is sent and the time when the ACK signal is received.
该传输时间如t1,可以为该第一无线设备与第二无线设备间的信号传输时间。The transmission time, such as t1, may be the signal transmission time between the first wireless device and the second wireless device.
S206、第二无线设备向第一无线设备发送同步响应(sync_response)信 号,该同步响应信号包括:第二时间的信息。S206. The second wireless device sends a synchronization response (sync_response) signal to the first wireless device, where the synchronization response signal includes: second time information.
该第二无线设备在接收到该同步请求信号时,还可确定接收到该同步请求信号的第二时间如T2,并将该第二时间的信息携带在该同步响应信号中,发送至该第一无线设备。该第二时间可以为该第二无线设备接收到该同步请求信号时的本地时间。When the second wireless device receives the synchronization request signal, it can also determine the second time when the synchronization request signal is received, such as T2, and carry the information of the second time in the synchronization response signal and send it to the first One wireless device. The second time may be the local time when the second wireless device receives the synchronization request signal.
S207、第一无线设备接收第二无线设备发送的该同步响应信号。S207. The first wireless device receives the synchronization response signal sent by the second wireless device.
该第二时间的信息可以为该第二时间的指示信息。The information at the second time may be indication information at the second time.
S208、第一无线设备根据该第一时间、该传输时间以及该第二时间,调节该第一无线设备的系统时间。S208. The first wireless device adjusts the system time of the first wireless device according to the first time, the transmission time, and the second time.
该第一无线设备可根据该第一时间、该传输时间以及该第二时间,调节该第一无线设备的系统时间,使得该第一无线设备的系统时间与该第二无线设备的系统时间同步。其中,系统时间同步,可包括:系统时间相同,或者,系统时间的偏差在预设范围内。The first wireless device may adjust the system time of the first wireless device according to the first time, the transmission time, and the second time, so that the system time of the first wireless device is synchronized with the system time of the second wireless device . Among them, the system time synchronization may include: the system time is the same, or the deviation of the system time is within a preset range.
该第一无线设备可根据该第一时间、该传输时间以及该第二时间,确定该第一无线设备与该第二无线设备的时钟偏差如sync_offset,继而根据该时钟偏差,调节该第一无线设备的系统时间。例如,该第一无线设备可根据该第一时间、该传输时间以及该第二时间,采用预设的公式,得到该时钟偏差。该预设的公式可以为sync_offset=T2-(T1+t1),其中,sync_offset为该时钟偏差,T2为该第二时间,T1为该第一时间,t1为该传输时间。The first wireless device may determine the clock deviation of the first wireless device and the second wireless device according to the first time, the transmission time, and the second time, such as sync_offset, and then adjust the first wireless device according to the clock deviation The system time of the device. For example, the first wireless device may use a preset formula according to the first time, the transmission time, and the second time to obtain the clock deviation. The preset formula may be sync_offset = T2- (T1 + t1), where sync_offset is the clock deviation, T2 is the second time, T1 is the first time, and t1 is the transmission time.
例如可参照图3,图3为本申请实施例提供的第一无线设备与第二无线设备之间的时间关系图。如图3所示,该第一无线设备可先与第二无线设备建立无线连接如蓝牙连接,并向第二无线设备发送同步请求信号,该第一无线设备发送该同步请求信号的时间可为T1。该第二无线设备接收该第一无线设备发送的同步请求信号,该第二无线设备接收到该第二同步请求信号可为T2。该第二无线设备在接收到该同步请求信号时,便向第一无线设备发送ACK信号,以指示其接收到该同步请求信号。该第一无线设备还接收该第二无线设备发送的ACK信号,并根据接收到该ACK信号的时间以及发送该同步请求信号的时间T1,例如将接收到该ACK信号的时间,减去发送该同步请求信号的时间T1,得到第一无线设备的传输时间t1。由于该第一无线设备和第二无线设备之间存在时钟偏差sync_offset,因此,该第一无线设备接收到该ACK信 号的时间与第二无线设备发送该ACK信号的时间存在时钟偏差,如发送该ACK信号的时间为接收到该同步请求信号的时间T2,则T1、T2、t1及sync_offset之间存在如下所示的对应关系:T2=T1+t1+sync_offset。For example, reference may be made to FIG. 3, which is a time relationship diagram between the first wireless device and the second wireless device according to an embodiment of the present application. As shown in FIG. 3, the first wireless device may first establish a wireless connection such as a Bluetooth connection with the second wireless device, and send a synchronization request signal to the second wireless device. The time for the first wireless device to send the synchronization request signal may be T1. The second wireless device receives the synchronization request signal sent by the first wireless device, and the second wireless device receives the second synchronization request signal may be T2. When receiving the synchronization request signal, the second wireless device sends an ACK signal to the first wireless device to indicate that it receives the synchronization request signal. The first wireless device also receives the ACK signal sent by the second wireless device, and based on the time when the ACK signal is received and the time T1 when the synchronization request signal is sent, for example, the time when the ACK signal is received is subtracted from The time T1 of the synchronization request signal obtains the transmission time t1 of the first wireless device. Since there is a clock deviation sync_offset between the first wireless device and the second wireless device, there is a clock deviation between the time when the first wireless device receives the ACK signal and the time when the second wireless device sends the ACK signal, such as sending the The time of the ACK signal is the time T2 when the synchronization request signal is received, then there is a correspondence between T1, T2, t1 and sync_offset as shown below: T2 = T1 + t1 + sync_offset.
该第二无线设备还向该第一无线设备发送该同步响应信号,并将T2的信息打包携带在该同步响应消息中。该第一无线设备在接收到该同步响应信号的情况下,便可基于该T1、T2、t1,得到sync_offset,继而根据sync_offset调节该第一无线设备的系统时间。The second wireless device also sends the synchronization response signal to the first wireless device, and packages the information of T2 in the synchronization response message. When receiving the synchronization response signal, the first wireless device may obtain sync_offset based on the T1, T2, and t1, and then adjust the system time of the first wireless device according to sync_offset.
需要说明的是,该第一无线设备例如还可根据该第一时间、该传输时间以及该第二时间,采用其它的方式,调节该第一无线设备的系统时间。该其它的方式中,可无需先确定该时钟偏差,而直接基于该第一时间、该传输时间以及该第二时间中的任一时间参数进行调节,继而根据该第一时间、该传输时间以及该第二时间中的其它时间参数进行再次调节,在此不再赘述。It should be noted that, for example, the first wireless device may also adjust the system time of the first wireless device in other ways according to the first time, the transmission time, and the second time. In this other mode, the clock deviation can be determined without first determining, but directly adjusting based on any one of the first time, the transmission time, and the second time, and then adjusting according to the first time, the transmission time, and The other time parameters in the second time are adjusted again, which will not be repeated here.
本申请实施例提供的时间同步方法,可通过第一无线设备向第二无线设备发送同步请求信号,并接收该第二无线设备发送的ACK信号,并根据发送该同步请求信号的第一时间,以及接收到该ACK信号的时间,确定传输时间,还接收该第二无线设备发送的同步响应信号,该同步响应信号包括:该第二无线设备接收到该同步请求信号的第二时间的第二时间的信息,从而可根据该第一时间、该传输时间以及该第二时间,调节该第一无线设备的时间。该方法可通过调节第一无线设备的系统时间,实现了第一无线设备与第二无线设备之间的时间同步,使得与第二无线设备连接的其它无线设备之间的系统时间也同步,从而准确实现无线设备之间的时间同步。The time synchronization method provided by the embodiment of the present application may send a synchronization request signal to a second wireless device through the first wireless device, and receive an ACK signal sent by the second wireless device, and according to the first time when the synchronization request signal is sent, And the time when the ACK signal is received, the transmission time is determined, and the synchronization response signal sent by the second wireless device is also received. The synchronization response signal includes: the second time at the second time when the second wireless device receives the synchronization request signal Time information, so that the time of the first wireless device can be adjusted according to the first time, the transmission time, and the second time. The method can realize the time synchronization between the first wireless device and the second wireless device by adjusting the system time of the first wireless device, so that the system time between other wireless devices connected to the second wireless device is also synchronized, thereby Accurately synchronize time between wireless devices.
例如,该第一无线设备可以为一个耳机,第二无线设备为手机或平板电脑,该第一无线设备也可以为与该第二无线设备连接的另一个耳机。通过执行本申请实施例的时间同步方法,可使得该一个耳机与手机或平板电脑的系统时间同步,由于该另一个耳机也可执行该时间同步方法,从而可实现两个耳机之间的系统时间同步,避免了左右两个耳机的播放不同步,提高了用户体验。For example, the first wireless device may be a headset, the second wireless device may be a mobile phone or a tablet computer, and the first wireless device may also be another headset connected to the second wireless device. By performing the time synchronization method of the embodiment of the present application, the system time of the one headset and the mobile phone or tablet can be synchronized. Since the other headset can also execute the time synchronization method, the system time between the two headsets can be achieved Synchronization prevents the playback of the two left and right headphones from being synchronized and improves the user experience.
无论是第一无线设备还是第二无线设备,其系统时间均可以根据各自的预设定时器进行循环超时计数,继而根据该计数值以及各自预设的计数偏差,得到。无论哪个无线设备,其预设定时器可以为软件定时器,也可以为硬件 定时器,若为硬件定时器,其可以为输入时钟大于10MHz的硬件定时器,以保证时钟精度。预设定时器的循环超时计数,指的是,当该预设定时器超时,便进行计数,如更新计数值,同时,触发该预设定时器重新开始计时,并在该预设定时器超时,再次计数。Regardless of whether it is the first wireless device or the second wireless device, its system time can be counted according to the respective preset timer cycle timeout, and then based on the count value and the respective preset count deviations. No matter which wireless device, the preset timer can be a software timer or a hardware timer. If it is a hardware timer, it can be a hardware timer with an input clock greater than 10MHz to ensure clock accuracy. The cyclic timeout count of the preset timer refers to counting when the preset timer times out, such as updating the count value, and at the same time, triggering the preset timer to restart timing and timing out at the preset timer And count again.
可选的,该硬件定时器例如可以为1ms产生一次超时中断的定时器,即该硬件定时器的时长例如可以为1ms,当该硬件定时的时长超过1ms,便产生中断,以更新计数值。Optionally, the hardware timer may be, for example, a timer that generates a timeout interrupt for 1 ms, that is, the duration of the hardware timer may be, for example, 1 ms, and when the hardware timing duration exceeds 1 ms, an interrupt is generated to update the count value.
如下以第一无线设备为例进行说明,该第一无线设备例如可具有一预设定时器,如硬件定时器,以产生系统时间。该第一无线设备可对该预设定时器进行循环超时计数,并根据该计数值和该预设的计数偏差得到,该第一无线设备到的系统时间。该预设的计数偏差例如可以为offset,其可以为整型数。The first wireless device is used as an example for description as follows. The first wireless device may have a preset timer, such as a hardware timer, to generate the system time. The first wireless device may perform a cycle time-out count on the preset timer, and obtain the system time of the first wireless device according to the count value and the preset count deviation. The preset count deviation may be, for example, offset, which may be an integer.
在上述实施例的基础上,上述S208中第一无线设备根据该第一时间、该传输时间以及该第二时间,调节该第一无线设备的系统时间可以包括:Based on the foregoing embodiment, adjusting the system time of the first wireless device according to the first time, the transmission time, and the second time in S208 in the foregoing S208 may include:
该第一无线设备根据该时钟偏差,调节该计数偏差以调节该第一无线设备的系统时间。The first wireless device adjusts the count deviation according to the clock deviation to adjust the system time of the first wireless device.
由于该第一无线设备的系统时间是由该第一无线设备对该预设定时器进行循环超时计数,并根据该计数值和该预设的计数偏差得到的,因而,调节该计数偏差,便可实现该第一无线设备的系统时间的调节。Since the system time of the first wireless device is counted by the first wireless device in a cyclic time-out for the preset timer and based on the count value and the preset count deviation, adjusting the count deviation The system time of the first wireless device can be adjusted.
在该示例中,该时钟偏差可以为整型数,也可以为浮点数。In this example, the clock deviation can be an integer or a floating point number.
由于该时钟偏差是由该第一无线设备根据该第一时间、第二时间以及该传输时间所得到的,因而,该第一时间、第二时间以及该传输时间中任一为浮点数,便可使得该时钟偏差为浮点数。Since the clock deviation is obtained by the first wireless device according to the first time, the second time, and the transmission time, any one of the first time, the second time, and the transmission time is a floating-point number. This clock deviation can be made a floating point number.
若该时钟偏差为浮点数,如单精度浮点数,则该方法中,该第一无线设备可根据该时钟偏差的整数部分,调节该计数偏差。If the clock deviation is a floating point number, such as a single precision floating point number, in this method, the first wireless device may adjust the count deviation according to the integer part of the clock deviation.
为保证系统时间的调节精度,该第一无线设备还可根据时钟偏差的小数部分,调节该预设定时器的时长以调节该第一无线设备的系统时间。To ensure the adjustment accuracy of the system time, the first wireless device may also adjust the duration of the preset timer according to the fractional part of the clock deviation to adjust the system time of the first wireless device.
也就是说,在该第一无线设备在根据该时钟偏差的整数部分调节该计数偏差的情况下,还可根据该时钟偏差的小数部分调节该预设定时器的时长。由于该第一无线设备的系统时间是由该第一无线设备对该预设定时器进行循环超时计数,并根据该计数值和该预设的计数偏差得到的,因而,调节该计 数偏差可实现该第一无线设备的系统时间的调节,调节该计数偏差以及该预设定时器的时长也可实现第一无线设备的系统时间的调节。That is, in the case where the first wireless device adjusts the count deviation according to the integer part of the clock deviation, it may also adjust the duration of the preset timer according to the fractional part of the clock deviation. Since the system time of the first wireless device is counted by the first wireless device in a cycle time-out for the preset timer, and is obtained according to the count value and the preset count deviation, adjustment of the count deviation can be achieved The adjustment of the system time of the first wireless device, the adjustment of the count deviation and the duration of the preset timer can also achieve the adjustment of the system time of the first wireless device.
该方法中,可根据该时钟偏差的小数部分调节该预设定时器的时长,使得该预设定时器的时长与该第二无线设备的预设定时器的时长相同或者差值在预设范围内,从而使得该第一无线设备的预设定时器与该第二无线设备的预设定时器的超时计数同步进行。In this method, the duration of the preset timer can be adjusted according to the fractional part of the clock deviation, so that the duration of the preset timer is the same as the duration of the preset timer of the second wireless device or the difference is within a preset range In this way, the timeout count of the preset timer of the first wireless device and the preset timer of the second wireless device are synchronized.
该方法中,可根据该时钟偏差的整数部分,调节该计数偏差,根据该时钟偏差的小数部分,调节该预设定时器的时长,从而实现该第一无线设备的系统时间的精确调节,保证了第一无线设备与第二无线设备的系统时间的同步。In this method, the count deviation can be adjusted according to the integer part of the clock deviation, and the duration of the preset timer can be adjusted according to the fractional part of the clock deviation, thereby achieving accurate adjustment of the system time of the first wireless device to ensure To synchronize the system time of the first wireless device and the second wireless device.
由于该第一无线设备的系统时间为该第一无线设备根据预设定时器的循环超时次数值,和预设的计数偏差得到的,而该预设定时器的计时频率为该第一无线设备根据系统时钟频率得到的,为避免随着时间的累积第一无线设备与第二无线设备的系统时间会再次不同步,本申请实施例在上述基础上,还可提供一种时间同步方法,还对该系统时钟频率进行调节。图4为本申请实施例提供的一种时间同步方法的流程图二。如图4所示,该方法还可包括:Since the system time of the first wireless device is obtained by the first wireless device according to the value of the number of cycle timeout times of a preset timer and a preset count deviation, and the timing frequency of the preset timer is the first wireless device Obtained according to the system clock frequency, in order to avoid that the system time of the first wireless device and the second wireless device will not be synchronized again with the accumulation of time, the embodiment of the present application may also provide a time synchronization method on the basis of the above, and Adjust the system clock frequency. FIG. 4 is a flowchart 2 of a time synchronization method provided by an embodiment of the present application. As shown in FIG. 4, the method may further include:
S401、第二无线设备向第一无线设备发送射频信号。S401. The second wireless device sends a radio frequency signal to the first wireless device.
该射频信号可以为该第二无线设备与该第一无线设备建立无线连接后中的任一时刻发送的射频信号。The radio frequency signal may be a radio frequency signal sent at any time after the second wireless device establishes a wireless connection with the first wireless device.
该射频信号可以预设的时间间距进行分包传输,即该第二无线设备可将该射频信号划分为多个时间间隔进行传输,每个时间间隔内传输对应的数据包接口。用以传输该射频信号的多个时间间隔中预设时间的起始时间固定,每个时间间隔的持续时间可固定不变,即相同。The radio frequency signal may be packetized and transmitted at a preset time interval, that is, the second wireless device may divide the radio frequency signal into multiple time intervals for transmission, and each time interval transmits a corresponding data packet interface. The start time of the preset time in the multiple time intervals used to transmit the radio frequency signal is fixed, and the duration of each time interval may be fixed and unchanged, that is, the same.
该第一无线设备和该第二无线设备可在无线连接的过程中,确定该多个时间间隔中预设时间的起始时间,以及每个时间间隔的持续时间。During the wireless connection, the first wireless device and the second wireless device may determine the start time of the preset time in the multiple time intervals and the duration of each time interval.
以蓝牙技术为例,则该射频信号可以为蓝牙空口的射频信号。Taking Bluetooth technology as an example, the radio frequency signal may be a radio frequency signal of a Bluetooth air interface.
上述每个时间间隔还可称为时隙(slot),可以与低功耗蓝牙(Low Power Bluetooth,简称BLE)系统的间隔(interval)对应。即每个时间间隔可包括至少一个BLE系统的间隔。Each of the above time intervals may also be referred to as a time slot (slot), which may correspond to an interval of a Bluetooth Low Energy (BLE) system. That is, each time interval may include at least one BLE system interval.
例如,图5为本申请实施例提供的一种用于经典蓝牙系统的时间同步方法 中射频信号的时序示意图。该第二无线设备可在时隙(TX slot)n内发送该射频信号的一个包,同时第一无线设备接收该射频信号的一个包,在时隙(RX slot)n+1内发送该射频信号的另一个包,同时第一无线设备接收该射频信号的另一个包,在时隙(TX slot)n+2内发送该射频信号的又一个包,同时第一无线设备接收该射频信号的又一个包。类似的,第二无线设备在多个时隙内向第一无线设备发送该射频信号,对应的,第一无线设备在该多个时隙内接收该射频信号,从而完成该射频信号的传输。在经典蓝牙系统中,每个时隙为预设的固定时长,如625us。For example, FIG. 5 is a timing diagram of a radio frequency signal in a time synchronization method for a classic Bluetooth system provided by an embodiment of the present application. The second wireless device may send a packet of the radio frequency signal in a time slot (TX slot) n, while the first wireless device receives a packet of the radio frequency signal and sends the radio frequency in a time slot (RX slot) n + 1 Another packet of the signal, at the same time the first wireless device receives another packet of the radio frequency signal, and sends another packet of the radio frequency signal in a time slot (TX slot) n + 2, and at the same time the first wireless device receives the Another bag. Similarly, the second wireless device sends the radio frequency signal to the first wireless device in multiple time slots. Correspondingly, the first wireless device receives the radio frequency signal in the multiple time slots, thereby completing the transmission of the radio frequency signal. In the classic Bluetooth system, each time slot is a preset fixed duration, such as 625us.
S402、第一无线设备接收该第二无线设备发送的该射频信号。S402. The first wireless device receives the radio frequency signal sent by the second wireless device.
S403、第一无线设备根据该射频信号,得到同步信号。S403. The first wireless device obtains a synchronization signal according to the radio frequency signal.
该第一无线设备可在接收到该射频信号的情况下,通过模数转换器,将该射频信号转换为数字信号,并对该数字信号进行调制解调,以得到该射频信号所包括的同步信号。因而,该射频信号还可称为同步射频信号。When receiving the radio frequency signal, the first wireless device may convert the radio frequency signal into a digital signal through an analog-to-digital converter, and modulate and demodulate the digital signal to obtain synchronization included in the radio frequency signal signal. Therefore, the radio frequency signal may also be referred to as a synchronous radio frequency signal.
例如,图6为本申请实施例提供的一种用于BLE系统的时间同步方法中同步射频信号的时序示意图。该第二无线设备可在间隔(Interval)n起始位置发送该同步射频信号的一个包,同时第一无线设备接收该同步射频信号的一个包;在间隔(Interval)n+1起始位置发送该同步射频信号的另一个包,同时第一无线设备接收该同步射频信号的另一个包;在间隔(Interval)n+2起始位置发送该同步射频信号的又一个包,同时第一无线设备接收该同步射频信号的又一个包。类似的,第二无线设备在多个间隔起始位置向第一无线设备发送该同步射频信号,第一无线设备在多个间隔内接收该同步射频信号,从而完成该同步射频信号的传输。在BLE系统中,每个间隔的时长为非固定时长,该每个间隔的时长可以为第一无线设备和第二无线设备协商所确定的时长。For example, FIG. 6 is a timing diagram of synchronizing radio frequency signals in a time synchronization method for a BLE system provided by an embodiment of the present application. The second wireless device may send a packet of the synchronous radio frequency signal at the starting position of Interval n, and at the same time the first wireless device receives a packet of the synchronous radio frequency signal; sending at the starting position of Interval n + 1 Another packet of the synchronous radio frequency signal, and at the same time the first wireless device receives another packet of the synchronous radio frequency signal; another packet of the synchronous radio frequency signal is sent at the starting position of Interval n + 2, and at the same time Receive another packet of the synchronous radio frequency signal. Similarly, the second wireless device sends the synchronous radio frequency signal to the first wireless device at the starting positions of multiple intervals, and the first wireless device receives the synchronous radio frequency signal within multiple intervals, thereby completing the transmission of the synchronous radio frequency signal. In the BLE system, the duration of each interval is a non-fixed duration, and the duration of each interval may be a duration determined by negotiation between the first wireless device and the second wireless device.
S404、第一无线设备根据得到的同步信号,和预设的同步信号,得到误差信号。S404. The first wireless device obtains an error signal according to the obtained synchronization signal and the preset synchronization signal.
该误差信号可包括:时域误差信号和/或频域误差信号。其中,时域误差信号还可称为定时同步误差信号,该频域误差信号还可称为载波同步误差信号。The error signal may include: a time domain error signal and / or a frequency domain error signal. Among them, the time domain error signal may also be called a timing synchronization error signal, and the frequency domain error signal may also be called a carrier synchronization error signal.
该第一无线设备可根据该同步信号的时域子信号以及预设的同步信号的时域子信号,得到该时域误差信号,根据该同步信号的频域子信号以及预设 的同步信号的频域子信号,得到该频域误差信号。The first wireless device may obtain the time domain error signal according to the time domain sub-signal of the synchronization signal and the preset time domain sub-signal of the synchronization signal, and according to the frequency domain sub-signal of the synchronization signal and the preset synchronization signal Frequency domain sub-signal to obtain the frequency domain error signal.
S405、第一无线设备根据该误差信号,调节该系统时钟频率。S405. The first wireless device adjusts the system clock frequency according to the error signal.
可选的,系统时钟频率可以为该第一无线设备根据锁相环的倍频系数以及晶体振荡器的震荡频率确定的。其中,该晶体振荡器还可称为晶振。Optionally, the system clock frequency may be determined by the first wireless device according to the frequency multiplication factor of the phase-locked loop and the oscillation frequency of the crystal oscillator. Among them, the crystal oscillator can also be called a crystal oscillator.
在一个示例中,该第一无线设备可根据该误差信号,调节该锁相环的倍频系数,以调节该系统时钟频率。In one example, the first wireless device may adjust the frequency multiplication factor of the phase-locked loop according to the error signal to adjust the system clock frequency.
在另一个示例中,该第一无线设备可根据该误差信号,调节该晶体振荡器的震荡频率,以调节该系统时钟频率。该第一无线设备可根据该误差信号,调节该晶体振荡器的负载电容,以调节该晶体振荡器的震荡频率。In another example, the first wireless device may adjust the oscillation frequency of the crystal oscillator according to the error signal to adjust the system clock frequency. The first wireless device can adjust the load capacitance of the crystal oscillator according to the error signal to adjust the oscillation frequency of the crystal oscillator.
无论是调节该锁相环的倍频系数,还是调节该晶体振荡器的震荡频率,第一无线设备可根据该误差信号,调节该系统时钟频率,使得第一无线设备的系统时钟频率,与第二无线设备的系统时钟频率同步,即相同或差值在预设范围内。Whether adjusting the frequency multiplication factor of the phase-locked loop or the oscillation frequency of the crystal oscillator, the first wireless device can adjust the system clock frequency according to the error signal, so that the system clock frequency of the first wireless device The system clock frequencies of the two wireless devices are synchronized, that is, the same or the difference is within a preset range.
需要说明的是,该系统时钟频率还可为该第一无线设备根据锁相环的倍频系数以及晶体振荡器的震荡频率,以及其他的参数确定的,则该第一无线设备还可根据该误差信号,调节该其它参数,在此不再赘述。It should be noted that the system clock frequency may also be determined by the first wireless device according to the frequency multiplication coefficient of the phase-locked loop, the oscillation frequency of the crystal oscillator, and other parameters, then the first wireless device may also determine The error signal adjusts the other parameters, which will not be repeated here.
该方法中,还可根据该误差信号,调节该系统时钟频率,可使得第一无线设备的系统时钟频率,与第二无线设备的系统时钟频率同步,避免随着时间的累积第一无线设备与第二无线设备的系统时间的不同步,保证了第一无线设备和第二无线设备的系统时间的持续同步。In this method, the system clock frequency can also be adjusted according to the error signal, so that the system clock frequency of the first wireless device can be synchronized with the system clock frequency of the second wireless device, avoiding accumulation of the first wireless device with time The unsynchronized system time of the second wireless device ensures the continuous synchronization of the system time of the first wireless device and the second wireless device.
通过执行该方法,还调节了该系统时钟频率,可使得第一无线设备和该第二无线设备之间的系统时间的偏差例如可在1us之内,提高了系统时间的同步精度,以满足大部分条件苛刻的应用场景。By performing this method, the system clock frequency is also adjusted, so that the deviation of the system time between the first wireless device and the second wireless device can be, for example, within 1 us, and the synchronization accuracy of the system time is improved to meet the large Some demanding application scenarios.
本申请实施例还可提供一种无线设备,该无线设备可作为第一无线设备。图7为本申请实施例提供的一种无线设备的结构示意图一。该无线设备可执行上述图2-图6中任一第一无线设备执行的所述的时间同步方法。如图7所示,该无线设备70可包括:An embodiment of the present application may further provide a wireless device, and the wireless device may serve as a first wireless device. 7 is a schematic structural diagram 1 of a wireless device according to an embodiment of the present application. The wireless device may perform the time synchronization method performed by any of the first wireless devices in FIG. 2 to FIG. 6 described above. As shown in FIG. 7, the wireless device 70 may include:
发送模块71,用于向第二无线设备发送同步请求信号。The sending module 71 is configured to send a synchronization request signal to the second wireless device.
第一接收模块72,用于接收该第二无线设备发送的ACK信号。The first receiving module 72 is configured to receive the ACK signal sent by the second wireless device.
确定模块73,用于根据发送该同步请求信号的第一时间,以及接收到该ACK信号的时间,确定传输时间。The determining module 73 is configured to determine the transmission time according to the first time when the synchronization request signal is sent and the time when the ACK signal is received.
第二接收模块74,用于接收该第二无线设备发送的同步响应信号;该同步响应信号包括:第二时间的信息;该第二时间为该第二无线设备接收到该同步请求信号的时间。The second receiving module 74 is configured to receive a synchronization response signal sent by the second wireless device; the synchronization response signal includes: information of a second time; the second time is the time when the second wireless device receives the synchronization request signal .
第一调节模块75,用于根据该第一时间、该传输时间以及该第二时间,调节该第一无线设备的系统时间。The first adjustment module 75 is configured to adjust the system time of the first wireless device according to the first time, the transmission time, and the second time.
可选的,第一调节模块75,具体用于根据该第一时间、该传输时间以及该第二时间,确定该第一无线设备与该第二无线设备的时钟偏差,并根据该时钟偏差,调节该第一无线设备的系统时间。Optionally, the first adjustment module 75 is specifically configured to determine the clock deviation between the first wireless device and the second wireless device based on the first time, the transmission time, and the second time, and based on the clock deviation, Adjust the system time of the first wireless device.
可选的,该第一无线设备的系统时间为该第一无线设备根据预设定时器的循环超时次数值,和预设的计数偏差得到的。Optionally, the system time of the first wireless device is obtained by the first wireless device according to a preset timer cycle timeout value and a preset count deviation.
第一调节模块75,具体用于根据该时钟偏差,调节该计数偏差,以调节该第一无线设备的系统时间。The first adjustment module 75 is specifically configured to adjust the count deviation according to the clock deviation to adjust the system time of the first wireless device.
可选的,该时钟偏差为浮点数。Optionally, the clock deviation is a floating point number.
第一调节模块75,具体用于根据该时钟偏差的整数部分,调节该计数偏差。The first adjustment module 75 is specifically configured to adjust the count deviation according to the integer part of the clock deviation.
可选的,第一调节模块75,还用于根据该时钟偏差的小数部分,调节该预设定时器的时长以调节该第一无线设备的系统时间。Optionally, the first adjustment module 75 is further configured to adjust the duration of the preset timer according to the fractional part of the clock deviation to adjust the system time of the first wireless device.
可选的,该预设定时器为硬件定时器。Optionally, the preset timer is a hardware timer.
可选的,该预设定时器的计时频率为该第一无线设备根据系统时钟频率得到的。该无线设备70还可包括:Optionally, the timing frequency of the preset timer is obtained by the first wireless device according to the system clock frequency. The wireless device 70 may further include:
第三接收模块,用于接收该第二无线设备发送的射频信号。The third receiving module is configured to receive the radio frequency signal sent by the second wireless device.
第二调节模块,用于根据该射频信号,得到同步信号,根据得到的同步信号,和预设的同步信号,得到误差信号,并根据该误差信号,调节该系统时钟频率。The second adjustment module is used to obtain a synchronization signal according to the radio frequency signal, obtain an error signal according to the obtained synchronization signal and the preset synchronization signal, and adjust the system clock frequency according to the error signal.
可选的,该系统时钟频率为该第一无线设备根据锁相环的倍频系数和晶体振荡器的震荡频率得到的。Optionally, the system clock frequency is obtained by the first wireless device according to the frequency multiplication factor of the phase locked loop and the oscillation frequency of the crystal oscillator.
第二调节模块,具体用于根据该误差信号,调节该锁相环的倍频系数,以调节该系统时钟频率。The second adjustment module is specifically used to adjust the frequency multiplication factor of the phase locked loop according to the error signal to adjust the system clock frequency.
可选的,该系统时钟频率为该第一无线设备根据锁相环的倍频系数和晶体振荡器的震荡频率得到的。Optionally, the system clock frequency is obtained by the first wireless device according to the frequency multiplication factor of the phase locked loop and the oscillation frequency of the crystal oscillator.
第二调节模块,具体用于根据该误差信号,调节该晶体振荡器的震荡频率,以调节该系统时钟频率。The second adjustment module is specifically used to adjust the oscillation frequency of the crystal oscillator according to the error signal to adjust the system clock frequency.
可选的,该误差信号包括:时域误差信号和/或频域误差信号。Optionally, the error signal includes: a time-domain error signal and / or a frequency-domain error signal.
可选的,该第一无线设备和该第二无线设备为蓝牙设备。Optionally, the first wireless device and the second wireless device are Bluetooth devices.
可选的,本申请还可提供一种无线设备。图8为本申请实施例提供的一种无线设备的结构示意图二。如图8所示,该无线设备80可作为第一无线设备,其可包括:存储器81和处理器82。存储器81和处理器82耦合。Optionally, this application may also provide a wireless device. FIG. 8 is a second schematic structural diagram of a wireless device according to an embodiment of the present application. As shown in FIG. 8, the wireless device 80 can serve as a first wireless device, which can include: a memory 81 and a processor 82. The memory 81 and the processor 82 are coupled.
存储器81,用于存储程序指令。The memory 81 is used to store program instructions.
处理器82,用于调用该存储器存储的程序指令,使得无线设备80执行上述图2-图6中所对应的任一实施例所示的第一无线设备执行的时间同步方法。The processor 82 is configured to call the program instructions stored in the memory so that the wireless device 80 executes the time synchronization method performed by the first wireless device shown in any of the embodiments corresponding to FIG. 2 to FIG. 6 described above.
本申请实施例还可提供一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器82执行时实现执行上述图2-图6中所对应的任一实施例所示的第一无线设备执行的时间同步方法。An embodiment of the present application may also provide a computer-readable storage medium on which a computer program is stored, which when executed by the processor 82 implements the execution shown in any of the embodiments corresponding to FIG. A time synchronization method performed by the first wireless device.
本申请实施例提供的设备及计算机可读存储介质,可执行上述任一所述实施例提供的第一无线设备执行的时间同步方法,其具体的实现过程及有益效果参见上述,在此不再赘述。The device and the computer-readable storage medium provided in the embodiments of the present application can execute the time synchronization method performed by the first wireless device provided in any of the foregoing embodiments. For the specific implementation process and beneficial effects, refer to the above, and will not be described here Repeat.
本申请实施例还可提供一种无线设备,该无线设备可作为第二无线设备。图9为本申请实施例提供的一种无线设备的结构示意图三。该无线设备可执行上述图2-图6中任一所述的无线设备执行的时间同步方法。如图9所示,该无线设备90可包括:An embodiment of the present application may further provide a wireless device, and the wireless device may serve as a second wireless device. 9 is a third structural diagram of a wireless device according to an embodiment of the present application. The wireless device may perform the time synchronization method performed by the wireless device described in any one of the foregoing FIGS. 2-6. As shown in FIG. 9, the wireless device 90 may include:
接收模块91,用于接收第一无线设备发送的同步请求信号。The receiving module 91 is configured to receive a synchronization request signal sent by the first wireless device.
第一发送模块92,用于在接收到该同步请求信号时,向该第一无线设备发送ACK信号;该ACK信号用于使得该第一无线设备根据发送该同步请求信号的第一时间,以及接收到该ACK信号的时间,确定传输时间。The first sending module 92 is configured to send an ACK signal to the first wireless device when receiving the synchronization request signal; the ACK signal is used to enable the first wireless device to send the synchronization request signal according to the first time, and When the ACK signal is received, the transmission time is determined.
第二发送模块93,用于向该第一无线设备发送同步响应信号,该同步响应信号包括:第二时间的信息;该第二时间为该第二无线设备接收到该同步请求信号的时间;该第二时间用于使得该第一无线设备根据该第一时间、该 传输时间以及该第二时间,调节该第一无线设备的系统时间。The second sending module 93 is configured to send a synchronization response signal to the first wireless device, the synchronization response signal includes: information of a second time; the second time is the time when the second wireless device receives the synchronization request signal; The second time is used to enable the first wireless device to adjust the system time of the first wireless device according to the first time, the transmission time, and the second time.
可选的,该第一无线设备和该第二无线设备为蓝牙设备。Optionally, the first wireless device and the second wireless device are Bluetooth devices.
可选的,本申请还可提供一种无线设备。图10为本申请实施例提供的一种无线设备的结构示意图四。如图10所示,该无线设备100可作为第二无线设备,其可包括:存储器101和处理器102。存储器101和处理器102耦合。Optionally, this application may also provide a wireless device. 10 is a fourth structural diagram of a wireless device according to an embodiment of the present application. As shown in FIG. 10, the wireless device 100 may serve as a second wireless device, which may include: a memory 101 and a processor 102. The memory 101 and the processor 102 are coupled.
存储器101,用于存储程序指令。The memory 101 is used to store program instructions.
处理器102,用于调用该存储器存储的程序指令,使得无线设备100执行上述图2-图6中所对应的任一实施例所示的第二无线设备执行的时间同步方法。The processor 102 is configured to call the program instructions stored in the memory, so that the wireless device 100 executes the time synchronization method performed by the second wireless device shown in any of the embodiments corresponding to FIG. 2 to FIG. 6 described above.
本申请实施例还可提供一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器102执行时实现执行上述图2-图6中所对应的任一实施例所示的第二无线设备执行的时间同步方法。An embodiment of the present application may also provide a computer-readable storage medium on which a computer program is stored, which when executed by the processor 102 implements the execution shown in any of the embodiments corresponding to FIG. 2 to FIG. 6 above A time synchronization method performed by the second wireless device.
本申请实施例提供的设备及计算机可读存储介质,可执行上述任一所述实施例提供的第二无线设备执行的时间同步方法,其具体的实现过程及有益效果参见上述,在此不再赘述。The device and the computer-readable storage medium provided by the embodiments of the present application can execute the time synchronization method performed by the second wireless device provided by any of the foregoing embodiments. For the specific implementation process and beneficial effects, refer to the above, which will not be repeated here Repeat.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art may understand that all or part of the steps to implement the above method embodiments may be completed by program instructions related hardware. The foregoing program may be stored in a computer-readable storage medium, and when the program is executed, The steps of the above method embodiments are included; and the foregoing storage media include various media that can store program codes, such as ROM, RAM, magnetic disks, or optical disks.
后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述各实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。It should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The technical solutions described in the foregoing embodiments can still be modified, or some or all of the technical features can be equivalently replaced; and these modifications or replacements do not deviate from the essence of the corresponding technical solutions of the technical solutions of the embodiments of the present application. range.

Claims (19)

  1. 一种时间同步方法,其特征在于,包括:A time synchronization method, characterized in that it includes:
    第一无线设备向第二无线设备发送同步请求信号;The first wireless device sends a synchronization request signal to the second wireless device;
    所述第一无线设备接收所述第二无线设备发送的确认ACK信号;The first wireless device receives an acknowledgement ACK signal sent by the second wireless device;
    所述第一无线设备根据发送所述同步请求信号的第一时间,以及接收到所述ACK信号的时间,确定传输时间;The first wireless device determines the transmission time according to the first time when the synchronization request signal is sent and the time when the ACK signal is received;
    所述第一无线设备接收所述第二无线设备发送的同步响应信号;所述同步响应信号包括:第二时间的信息;所述第二时间为所述第二无线设备接收到所述同步请求信号的时间;The first wireless device receives a synchronization response signal sent by the second wireless device; the synchronization response signal includes: information at a second time; the second time is when the second wireless device receives the synchronization request Signal time
    所述第一无线设备根据所述第一时间、所述传输时间以及所述第二时间,调节所述第一无线设备的系统时间。The first wireless device adjusts the system time of the first wireless device according to the first time, the transmission time, and the second time.
  2. 根据权利要求1所述的方法,其特征在于,所述第一无线设备根据所述第一时间、所述传输时间以及所述第二时间,调节所述第一无线设备的系统时间,包括:The method of claim 1, wherein the first wireless device adjusting the system time of the first wireless device according to the first time, the transmission time, and the second time includes:
    所述第一无线设备根据所述第一时间、所述传输时间以及所述第二时间,确定所述第一无线设备与所述第二无线设备的时钟偏差;The first wireless device determines a clock deviation between the first wireless device and the second wireless device according to the first time, the transmission time, and the second time;
    所述第一无线设备根据所述时钟偏差,调节所述第一无线设备的系统时间。The first wireless device adjusts the system time of the first wireless device according to the clock deviation.
  3. 根据权利要求2所述的方法,其特征在于,所述第一无线设备的系统时间为所述第一无线设备根据预设定时器的循环超时次数值,和预设的计数偏差得到的;The method according to claim 2, wherein the system time of the first wireless device is obtained by the first wireless device according to a preset timer cycle timeout value and a preset count deviation;
    所述第一无线设备根据所述时钟偏差,调节所述第一无线设备的系统时间,包括:The first wireless device adjusting the system time of the first wireless device according to the clock deviation includes:
    所述第一无线设备根据所述时钟偏差,调节所述计数偏差,以调节所述第一无线设备的系统时间。The first wireless device adjusts the count deviation according to the clock deviation to adjust the system time of the first wireless device.
  4. 根据权利要求3所述的方法,其特征在于,所述时钟偏差为浮点数;The method according to claim 3, wherein the clock deviation is a floating point number;
    所述第一无线设备根据所述时钟偏差,调节所述计数偏差,包括:The first wireless device adjusting the count deviation according to the clock deviation includes:
    所述第一无线设备根据所述时钟偏差的整数部分,调节所述计数偏差。The first wireless device adjusts the count deviation according to the integer part of the clock deviation.
  5. 根据权利要求4所述的方法,其特征在于,所述第一无线设备根据所述时钟偏差,调节所述第一无线设备的系统时间,还包括:The method according to claim 4, wherein the first wireless device adjusts the system time of the first wireless device according to the clock deviation, further comprising:
    所述第一无线设备根据所述时钟偏差的小数部分,调节所述预设定时器的时长以调节所述第一无线设备的系统时间。The first wireless device adjusts the duration of the preset timer according to the fractional part of the clock deviation to adjust the system time of the first wireless device.
  6. 根据权利要求3所述的方法,其特征在于,所述预设定时器为硬件定时器。The method according to claim 3, wherein the preset timer is a hardware timer.
  7. 根据权利要求3所述的方法,其特征在于,所述预设定时器的计时频率为所述第一无线设备根据系统时钟频率得到的;所述方法还包括:The method according to claim 3, wherein the timing frequency of the preset timer is obtained by the first wireless device according to a system clock frequency; the method further includes:
    所述第一无线设备接收所述第二无线设备发送的射频信号;The first wireless device receives the radio frequency signal sent by the second wireless device;
    所述第一无线设备根据所述射频信号,得到同步信号;The first wireless device obtains a synchronization signal according to the radio frequency signal;
    所述第一无线设备根据得到的同步信号,和预设的同步信号,得到误差信号;The first wireless device obtains an error signal according to the obtained synchronization signal and the preset synchronization signal;
    所述第一无线设备根据所述误差信号,调节所述系统时钟频率。The first wireless device adjusts the system clock frequency according to the error signal.
  8. 根据权利要求7所述的方法,其特征在于,所述系统时钟频率为所述第一无线设备根据锁相环的倍频系数和晶体振荡器的震荡频率得到的;所述第一无线设备根据所述误差信号,调节所述系统时钟频率,包括:The method according to claim 7, wherein the system clock frequency is obtained by the first wireless device according to a frequency multiplication factor of a phase-locked loop and an oscillation frequency of a crystal oscillator; the first wireless device is based on The error signal adjusting the system clock frequency includes:
    所述第一无线设备根据所述误差信号,调节所述锁相环的倍频系数,以调节所述系统时钟频率。The first wireless device adjusts the frequency multiplication factor of the phase locked loop according to the error signal to adjust the system clock frequency.
  9. 根据权利要求7所述的方法,其特征在于,所述系统时钟频率为所述第一无线设备根据锁相环的倍频系数和晶体振荡器的震荡频率得到的;所述第一无线设备根据所述误差信号,调节所述系统时钟频率,包括:The method according to claim 7, wherein the system clock frequency is obtained by the first wireless device according to a frequency multiplication factor of a phase-locked loop and an oscillation frequency of a crystal oscillator; the first wireless device is based on The error signal adjusting the system clock frequency includes:
    所述第一无线设备根据所述误差信号,调节所述晶体振荡器的震荡频率,以调节所述系统时钟频率。The first wireless device adjusts the oscillation frequency of the crystal oscillator according to the error signal to adjust the system clock frequency.
  10. 根据权利要求7-9中任一项所述的方法,其特征在于,所述误差信号包括:时域误差信号和/或频域误差信号。The method according to any one of claims 7-9, wherein the error signal comprises: a time domain error signal and / or a frequency domain error signal.
  11. 根据权利要求1-9中任一项所述的方法,其特征在于,所述第一无线设备和所述第二无线设备为蓝牙设备。The method according to any one of claims 1-9, wherein the first wireless device and the second wireless device are Bluetooth devices.
  12. 一种时间同步方法,其特征在于,包括:A time synchronization method, characterized in that it includes:
    第二无线设备接收第一无线设备发送的同步请求信号;The second wireless device receives the synchronization request signal sent by the first wireless device;
    所述第二无线设备在接收到所述同步请求信号时,向所述第一无线设备发送确认ACK信号;所述ACK信号用于使得所述第一无线设备根据发送所述同步请求信号的第一时间,以及接收到所述ACK信号的时间,确定传输时间;When receiving the synchronization request signal, the second wireless device sends an acknowledgement ACK signal to the first wireless device; the ACK signal is used to cause the first wireless device to send the synchronization request signal according to the first A time, and the time when the ACK signal is received, determine the transmission time;
    所述第二无线设备向所述第一无线设备发送同步响应信号,所述同步响应信号包括:第二时间的信息;所述第二时间为所述第二无线设备接收到所述同步请求信号的时间;所述第二时间用于使得所述第一无线设备根据所述第一时间、所述传输时间以及所述第二时间,调节所述第一无线设备的系统时间。The second wireless device sends a synchronization response signal to the first wireless device, the synchronization response signal includes: information at a second time; the second time is when the second wireless device receives the synchronization request signal The second time is used to allow the first wireless device to adjust the system time of the first wireless device according to the first time, the transmission time, and the second time.
  13. 根据权利要求12所述的时间同步方法,其特征在于,所述第一无线设备和所述第二无线设备为蓝牙设备。The time synchronization method according to claim 12, wherein the first wireless device and the second wireless device are Bluetooth devices.
  14. 一种无线设备,其特征在于,所述无线设备为第一无线设备,所述无线设备包括:A wireless device, characterized in that the wireless device is a first wireless device, and the wireless device includes:
    发送模块,用于向第二无线设备发送同步请求信号;A sending module, configured to send a synchronization request signal to the second wireless device;
    第一接收模块,用于接收所述第二无线设备发送的确认ACK信号;A first receiving module, configured to receive an acknowledgement ACK signal sent by the second wireless device;
    确定模块,用于根据发送所述同步请求信号的第一时间,以及接收到所述ACK信号的时间,确定传输时间;A determining module, configured to determine the transmission time according to the first time when the synchronization request signal is sent and the time when the ACK signal is received;
    第二接收模块,用于接收所述第二无线设备发送的同步响应信号;所述同步响应信号包括:第二时间的信息;所述第二时间为所述第二无线设备接收到所述同步请求信号的时间;A second receiving module, configured to receive a synchronization response signal sent by the second wireless device; the synchronization response signal includes: information at a second time; the second time is when the second wireless device receives the synchronization Request signal time;
    调节模块,用于根据所述第一时间、所述传输时间以及所述第二时间,调节所述第一无线设备的系统时间。The adjustment module is configured to adjust the system time of the first wireless device according to the first time, the transmission time, and the second time.
  15. 一种无线设备,其特征在于,所述无线设备为第二无线设备,包括:A wireless device, characterized in that the wireless device is a second wireless device, including:
    接收模块,用于接收第一无线设备发送的同步请求信号;A receiving module, configured to receive a synchronization request signal sent by the first wireless device;
    第一发送模块,用于在接收到所述同步请求信号时,向所述第一无线设备发送确认ACK信号;所述ACK信号用于使得所述第一无线设备根据发送所述同步请求信号的第一时间,以及接收到所述ACK信号的时间,确定传输时间;A first sending module, configured to send an acknowledgement ACK signal to the first wireless device when receiving the synchronization request signal; the ACK signal is used to enable the first wireless device to send the synchronization request signal according to the The first time, and the time when the ACK signal is received, determines the transmission time;
    第二发送模块,用于向所述第一无线设备发送同步响应信号,所述同步响应信号包括:第二时间的信息;所述第二时间为所述第二无线设备接收到所述同步请求信号的时间;所述第二时间用于使得所述第一无线设备根据所述第一时间、所述传输时间以及所述第二时间,调节所述第一无线设备的系统时间。A second sending module, configured to send a synchronization response signal to the first wireless device, the synchronization response signal includes: information at a second time; the second time is when the second wireless device receives the synchronization request The time of the signal; the second time is used to allow the first wireless device to adjust the system time of the first wireless device according to the first time, the transmission time, and the second time.
  16. 一种无线设备,其特征在于,所述无线设备包括:存储器和处理器; 所述存储器与所述处理器耦合;A wireless device, characterized in that the wireless device includes: a memory and a processor; the memory is coupled to the processor;
    所述存储器,用于存储程序指令;The memory is used to store program instructions;
    所述处理器,用于调用所述存储器存储的程序指令,使得所述无线设备执行上述权利要求1-11中任一项所述的时间同步方法。The processor is configured to call program instructions stored in the memory, so that the wireless device executes the time synchronization method according to any one of claims 1-11.
  17. 一种无线设备,其特征在于,所述设备包括:存储器和处理器;所述存储器与所述处理器耦合;A wireless device, characterized in that the device includes: a memory and a processor; the memory is coupled to the processor;
    所述存储器,用于存储程序指令;The memory is used to store program instructions;
    所述处理器,用于调用所述存储器存储的程序指令,使得所述无线设备执行上述权利要求12或13所述的时间同步方法。The processor is configured to call program instructions stored in the memory, so that the wireless device executes the time synchronization method according to claim 12 or 13 above.
  18. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1-11中任一项所述的时间同步方法。A computer-readable storage medium on which a computer program is stored, characterized in that, when the computer program is executed by a processor, the time synchronization method according to any one of claims 1-11 is implemented.
  19. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求12或13所述的时间同步方法。A computer-readable storage medium on which a computer program is stored, characterized in that, when the computer program is executed by a processor, the time synchronization method according to claim 12 or 13 is realized.
PCT/CN2018/113119 2018-10-31 2018-10-31 Method and device for time synchronization, and storage medium WO2020087370A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/113119 WO2020087370A1 (en) 2018-10-31 2018-10-31 Method and device for time synchronization, and storage medium
CN201880002135.8A CN109565772A (en) 2018-10-31 2018-10-31 Method for synchronizing time, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/113119 WO2020087370A1 (en) 2018-10-31 2018-10-31 Method and device for time synchronization, and storage medium

Publications (1)

Publication Number Publication Date
WO2020087370A1 true WO2020087370A1 (en) 2020-05-07

Family

ID=65872667

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/113119 WO2020087370A1 (en) 2018-10-31 2018-10-31 Method and device for time synchronization, and storage medium

Country Status (2)

Country Link
CN (1) CN109565772A (en)
WO (1) WO2020087370A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111542038A (en) * 2020-05-14 2020-08-14 浙江强脑科技有限公司 Bluetooth networking system with time synchronization function
CN111817811B (en) * 2020-06-22 2022-10-11 芯原微电子(上海)股份有限公司 TWS earphone audio frequency synchronous playing method and system, TWS earphone
EP4024894A1 (en) 2020-11-05 2022-07-06 Shenzhen Goodix Technology Co., Ltd. Audio synchronization playback method, apparatus, device, and storage medium
CN113179468B (en) * 2020-11-05 2022-10-11 深圳市汇顶科技股份有限公司 Audio synchronous playing method, device, equipment and storage medium
CN112787742B (en) * 2021-03-16 2022-11-22 芯原微电子(成都)有限公司 Clock synchronization method and device, wireless earphone and readable storage medium
CN116560291B (en) * 2023-07-06 2023-09-29 深圳艾为电气技术有限公司 Dual MCU architecture high-voltage controller and speed detection error adjustment method thereof

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104202812A (en) * 2014-08-14 2014-12-10 杭州绿宇通信技术有限公司 High precision time synchronization method suitable for precise positioning system
CN104301868A (en) * 2014-10-10 2015-01-21 西北工业大学 High-precision indoor positioning method based on frame round-trip-time and time-of-arrival ranging technology
CN105071914A (en) * 2015-07-27 2015-11-18 深圳思凯微电子有限公司 Digital frequency modulation (FM) broadcast based clock synchronization method and FM broadcast receiver
CN105915308A (en) * 2016-07-08 2016-08-31 腾讯科技(深圳)有限公司 Time synchronization method, device and system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN203117837U (en) * 2013-03-20 2013-08-07 珠海市杰理科技有限公司 Clock calibration system
CN104244399B (en) * 2014-09-15 2018-04-17 歌尔股份有限公司 The method of time synchronization, wireless device and wireless communication system between wireless device
CN107046709A (en) * 2017-03-27 2017-08-15 成都凯力科技有限公司 wireless signal synchronous method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104202812A (en) * 2014-08-14 2014-12-10 杭州绿宇通信技术有限公司 High precision time synchronization method suitable for precise positioning system
CN104301868A (en) * 2014-10-10 2015-01-21 西北工业大学 High-precision indoor positioning method based on frame round-trip-time and time-of-arrival ranging technology
CN105071914A (en) * 2015-07-27 2015-11-18 深圳思凯微电子有限公司 Digital frequency modulation (FM) broadcast based clock synchronization method and FM broadcast receiver
CN105915308A (en) * 2016-07-08 2016-08-31 腾讯科技(深圳)有限公司 Time synchronization method, device and system

Also Published As

Publication number Publication date
CN109565772A (en) 2019-04-02

Similar Documents

Publication Publication Date Title
WO2020087370A1 (en) Method and device for time synchronization, and storage medium
US11375312B2 (en) Method, device, loudspeaker equipment and wireless headset for playing audio synchronously
US20210160803A1 (en) Clock Synchronisation Between Devices Using Message Timestamps
US11082141B2 (en) Wireless apparatus and wireless apparatus processing method
US8689035B2 (en) Communication system, communication interface, and synchronization method
JP5321923B2 (en) Clock synchronization system, node, clock synchronization method and program
CN108462991B (en) Processor clock synchronization method, device and system
US9167545B2 (en) Receiver, method of calculating time difference, and program
CN112771941B (en) Data synchronization method, device, equipment, system and storage medium
US11895607B2 (en) Clock synchronization using wireless side channel
WO2012055360A1 (en) Method for time synchronization and device and system thereof
JP2018505576A (en) Techniques for synchronizing the timing of wireless streaming transmissions to multiple sink devices
WO2017054554A1 (en) Clock synchronization method, device, and communication apparatus
WO2018082665A1 (en) Frequency synchronization method and slave clock
CN104836630A (en) IEEE1588 clock synchronization system and implementation method therefor
US20130215910A1 (en) Transmission apparatus, transmission method, program, and communication system
US20100179673A1 (en) Multitrack recorder and synchronous recording method using a plurality of multitrack recorders
US20230048782A1 (en) Synchronization device and synchronization method
CN106656397B (en) Clock synchronizing method and device
JPS6097749A (en) Multi-dimension data communication device
WO2017113404A1 (en) Network node, packet transmission method and network
WO2016065642A1 (en) Synchronization device and method
JP5656306B1 (en) Synchronization establishment method
JP2018006913A (en) Information communication system and information communication equipment
KR101593822B1 (en) Apparatus for providing communication service, control method thereof, recording medium for recording program for executing the control method, application saved in the recording medium for executing the control method being combined with hardware

Legal Events

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

Ref document number: 18938740

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18938740

Country of ref document: EP

Kind code of ref document: A1