Synchronization method, apparatus and system for data communication

In low-power Bluetooth data communication, a specific data packet is sent between the data sending end and the data listening end to calculate the clock offset and synchronizes with preset periods, the problem of clocks being out of sync between the data listening end and the data sending end is solved, and the stability of data communication monitoring is improved.

WO2025060895A1PCT designated stage expired Publication Date: 2025-03-27SHENZHEN GOODIX TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/117157
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-09-21
Filing Date
2024-09-05
Publication Date
2025-03-27

AI Technical Summary

Technical Problem

In data communication such as Bluetooth low power consumption, the data monitor end is not synchronized with the data sending end, resulting in the data monitor end being unable to distinguish the source of the received data packets, which in turn affects the stability of data communication monitoring.

Method used

By sending a specific data packet between the data sending end and the data listening end, including clock information and packet time difference, the data listening end can calculate the clock offset with the data sending end and perform synchronization processing in a preset period to maintain clock synchronization.

Benefits of technology

Through preset period synchronization processing, it is ensured that the data monitor terminal can receive data packets sent by the data sending end without expanding the time window for receiving data packets, which significantly improves the stability of data communication monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024117157_27032025_PF_FP_ABST
    Figure CN2024117157_27032025_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a synchronization method, apparatus and system for data communication, applied to a data listening end. The method comprises: receiving a first data packet sent by a first data sending end at a first packet sending moment, the first data packet comprising a first Bluetooth clock of the first data sending end, and enabling the first data sending end to record a first packet sending completion moment of the first data packet; receiving a second data packet sent by the first data sending end, the second data packet comprising a difference between the first packet sending completion moment and the first packet sending moment; and on the basis of the received difference between the first packet sending completion moment and the first packet sending moment, and the first Bluetooth clock, obtaining an offset between the first data sending end and the data listening end, and on the basis of the offset, performing synchronization processing on the first data sending end and the data listening end in a preset period. The embodiments of the present application enhance the stability of data communication monitoring.
Need to check novelty before this filing date? Find Prior Art

Description

A data communication synchronization method, device and system

[0001] This application claims priority to the invention application with application date of September 21, 2023, application number "202311237534.1", and patent name "A method, device and system for synchronizing data communication", and all contents of which are incorporated herein by reference. Technical Field

[0002] The embodiments of the present application relate to the field of electronic technology, and in particular to a data communication synchronization method, device, and system. Background Art

[0003] In data communications such as Bluetooth Low Energy (BLE), data communication is typically achieved by a first data transmitter and a second data transmitter sending a first data packet and a second data packet to each other. A data monitor monitors the data communication between the first and second data transmitters by receiving the first and second data packets. However, if the clocks of the data monitor and the first data transmitter, or the clocks of the data monitor and the second data transmitter are out of sync, and the data monitor cannot distinguish whether the received data packet is sent by the first or the second data transmitter, the data monitor will need to continuously expand the time window for receiving data packets to avoid affecting the stability of data communication monitoring due to the inability to receive data packets.

[0004] Therefore, how to improve the stability of data communication monitoring has become a technical problem that needs to be solved urgently.

[0005] Summary of the Invention

[0006] In view of this, one of the technical problems solved by the embodiments of the present application is to provide a data communication synchronization method, device, and system, which enhance the stability of data communication monitoring.

[0007] In the first aspect, an embodiment of the present application provides a data communication synchronization method, which is applied to a data listening end, wherein a first data sending end and a second data sending end send Bluetooth data packets to each other to realize Bluetooth data communication, and the data listening end receives the Bluetooth data packet to realize data communication monitoring. The method includes: receiving a first data packet sent by the first data sending end at a first packet sending moment, wherein the first data packet includes a first Bluetooth clock of the first data sending end, and the first data sending end records the first packet sending completion moment of the first data packet; receiving a second data packet sent by the first data sending end, wherein the second data packet includes the difference between the first packet sending completion moment and the first packet sending moment; obtaining an offset between the first data sending end and the data listening end based on the difference between the received first packet sending completion moment and the first packet sending moment and the first Bluetooth clock, and synchronizing the first data sending end and the data listening end according to the offset at a preset period.

[0008] In the second aspect, an embodiment of the present application provides a data communication synchronization method, which is applied to a first data sending end, wherein the first data sending end and the second data sending end send Bluetooth data packets to each other to realize Bluetooth data communication, and the data listening end receives the Bluetooth data packet to realize data communication monitoring, and is characterized in that the method includes: sending a first data packet at a first packet sending moment, the first data packet includes a first Bluetooth clock of the first data sending end, and records the first packet sending completion moment of the first data packet; sending a second data packet, the second data packet includes: the difference between the first packet sending completion moment and the first packet sending moment, so that the data listening end obtains the offset between the first data sending end and the data listening end based on the received difference and the first Bluetooth clock, and synchronizes the first data sending end and the data listening end according to the offset at a preset period.

[0009] In the third aspect, an embodiment of the present application provides a data communication synchronization device, which is applied to a data listening end, wherein a first data sending end and a second data sending end send Bluetooth data packets to each other to realize Bluetooth data communication, and the data listening end receives the Bluetooth data packet to realize data communication monitoring. The device includes: a first receiving module, which is used to receive a first data packet sent by the first data sending end at a first packet sending time, wherein the first data packet includes a first Bluetooth clock of the first data sending end, so that the first data sending end records the first packet sending completion time of the first data packet; a second receiving module, which is used to receive a second data packet sent by the first data sending end, wherein the second data packet includes the difference between the first packet sending completion time and the first packet sending time; an offset calculation module, which is used to obtain the offset between the first data sending end and the data listening end based on the difference between the received first packet sending completion time and the first packet sending time and the first Bluetooth clock, and synchronize the first data sending end and the data listening end according to the offset at a preset period.

[0010] In a fourth aspect, an embodiment of the present application provides a data communication synchronization device, which is applied to a first data sending end, and the first data sending end and the second data sending end send Bluetooth data packets to each other to realize Bluetooth data communication, and the data listening end receives the Bluetooth data packet to realize data communication monitoring, and is characterized in that the device includes: a first sending module, which is used to send a first data packet at a first packet sending time, and the first data packet includes a first Bluetooth clock of the first data sending end, and records the first packet sending completion time of the first data packet; a second sending module, which is used to send a second data packet, and the second data packet includes: the difference between the first packet sending completion time and the first packet sending time, so that the data listening end obtains the offset between the first data sending end and the data listening end according to the received difference and the first Bluetooth clock, and synchronizes the first data sending end and the data listening end according to the offset at a preset period.

[0011] In the fifth aspect, an embodiment of the present application provides a data communication synchronization system, including a first data sending end, a second data sending end and a data listening end, wherein the first data sending end and the second data sending end send data packets to each other to realize data communication, and the data listening end receives the data packets to realize data communication monitoring, the first data sending end executes the method described in the second aspect, and the data listening end executes the method described in the first aspect.

[0012] In an embodiment of the present application, the first data transmitting end sends a first data packet at the first packet sending moment, the first data packet includes the first Bluetooth clock of the first data transmitting end, and records the first packet sending completion moment of the first data packet. The first data transmitting end sends a second data packet, and the second data packet includes: the difference between the first packet sending completion moment and the first packet sending moment. The data listening end obtains the offset between the first data transmitting end and the data listening end based on the received difference and the first Bluetooth clock, and synchronizes the first data transmitting end and the data listening end according to the offset at a preset period. Therefore, the embodiment of the present application synchronizes the first data transmitting end and the data listening end through a preset period, so that the data listening end can receive the data packet sent by the first data transmitting end without expanding the time window for receiving the data packet, thereby enhancing the stability of data communication monitoring. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Hereinafter, some specific embodiments of the present application will be described in detail in an exemplary and non-limiting manner with reference to the accompanying drawings. The same reference numerals in the accompanying drawings indicate the same or similar components or parts. It should be understood by those skilled in the art that these drawings are not necessarily drawn to scale. In the accompanying drawings:

[0014] FIG1 is a schematic diagram of sending and receiving data packets in data communication;

[0015] FIG2 is a flow chart of a data communication synchronization method according to an embodiment of the present application;

[0016] FIG3 is a flow chart of another data communication synchronization method according to an embodiment of the present application;

[0017] FIG4 is a schematic diagram of sending and receiving a data packet in data communication;

[0018] FIG5 is a schematic diagram of another data packet sending and receiving in data communication;

[0019] FIG6 is a schematic structural diagram of a data communication synchronization device according to an embodiment of the present application;

[0020] FIG7 is a schematic structural diagram of another data communication synchronization device according to an embodiment of the present application;

[0021] FIG8 is a schematic structural diagram of a data communication monitoring system according to an embodiment of the present application. DETAILED DESCRIPTION

[0022] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and detailedly described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by those skilled in the art based on the embodiments in the embodiments of the present invention should fall within the scope of protection of the embodiments of the present invention.

[0023] In the following detailed description, reference is made to the accompanying drawings, which form a part of the detailed description and illustrate exemplary embodiments. In addition, it is understood that other embodiments may be utilized and structural and / or logical changes may be made without departing from the scope of the claimed subject matter. It should also be noted that directions and references (e.g., up, down, top, bottom, etc.) may be used merely to facilitate the description of features in the drawings. Therefore, the following detailed description is not to be construed in a limiting sense, and the scope of the claimed subject matter is limited solely by the appended claims and their equivalents.

[0024] In the following description, numerous details are set forth. However, it will be apparent to those skilled in the art that the embodiments herein may be practiced without these specific details. In some cases, well-known methods and apparatus are shown in block diagram form rather than in detail to avoid blurring the embodiments herein. References throughout this specification to "an embodiment" or "one embodiment" or "some embodiments" mean that the specific features, structures, functions, or characteristics described in conjunction with the embodiment are included in at least one embodiment herein. Therefore, the phrases "in an embodiment" or "in one embodiment" or "some embodiments" appearing throughout this specification do not necessarily refer to the same embodiment. In addition, in one or more embodiments, specific features, structures, functions, or characteristics may be combined in any suitable manner. For example, the first embodiment may be combined with the second embodiment in any case where the specific features, structures, functions, or characteristics associated with the two embodiments are not mutually exclusive.

[0025] As used in the description and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0026] The terms "coupled" and "connected," along with their derivatives, may be used herein to describe functional or structural relationships between components. It should be understood that these terms are not intended to be synonymous with each other. On the contrary, in certain embodiments, "connected" may be used to indicate that two or more elements are in direct physical, optical, or electrical contact with each other. "Coupled" may be used to indicate that two or more elements are in direct or indirect (with other intermediate elements between them) physical or electrical contact with each other, and / or that two or more elements collaborate or interact with each other (e.g., as in a cause-and-effect relationship).

[0027] As used herein, the terms "above," "below," "between," and "on" refer to the relative position of one component or material with respect to other components or materials where such physical relationship is significant. For example, in the context of materials, a material or materials positioned above or below another material may be in direct contact or may have one or more intervening materials. Moreover, a material positioned between two materials or materials may be in direct contact with both layers or may have one or more intervening layers. In contrast, a first material or materials "above" a second material or materials is in direct contact with the second material or materials. Similar distinctions apply in the context of component assembly.

[0028] As used throughout this description and in the claims, a list of items linked by the term "at least one of" or "one or more of" may mean any combination of the listed items. For example, the phrase "at least one of A, B, or C" may mean A; B; C; A and B; A and C; B and C; or A, B, and C.

[0029] The term "circuit" or "module" may refer to one or more passive and / or active components that are arranged to cooperate with each other to provide a desired functionality. The term "signal" may refer to at least one current signal, voltage signal, or magnetic signal. The terms "substantially," "close to," "approximately," "close to," and "approximately" generally mean within + / - 10% of a target value.

[0030] The specific implementation of the embodiment of the present invention is further described below with reference to the accompanying drawings of the embodiment of the present invention.

[0031] In Bluetooth data communications, such as Bluetooth Low Energy (BLE), data communication is typically performed by exchanging Bluetooth data packets between a first data transmitter and a second data transmitter. A data monitoring terminal monitors the data communication between the first and second data transmitters and monitors the data communication by receiving Bluetooth data packets sent by the first and second data transmitters, respectively. By monitoring the Bluetooth data packets from the second data transmitter, the data monitoring terminal obtains valid monitoring information, such as a received signal strength indicator (RSSI).

[0032] Taking Bluetooth low energy digital communication as an example, the first data transmitter and the second data transmitter are the central and peripheral roles of data communication, respectively. The data monitoring end monitors the Bluetooth data packets sent by the central and peripheral roles of communication, respectively.

[0033] The following specifically illustrates the implementation of data communication monitoring through a car digital key system.

[0034] With the increasing popularity of digital car key systems in new energy vehicles, they have become a key application scenario for data communication monitoring. In a typical application scenario, a digital car key system installs three or more anchor nodes around the vehicle body as data monitoring terminals, while a central node is installed in the central control position as the first data transmitter. A mobile terminal (e.g., a mobile phone, key, or other wearable device) serves as the second data transmitter. The mobile terminal (second data transmitter) and the central node (first data transmitter) establish a connection and implement security authentication by exchanging Bluetooth data packets. The anchor node (data monitoring terminal) monitors the Bluetooth data packets sent by the mobile terminal (second data transmitter) and the central node (first data transmitter), obtains the signal strength indication of the signal transmitted from the mobile terminal (second data transmitter) to the anchor node (data monitoring terminal), and uses this as the basis for ranging. For signal strength indication ranging in digital car key systems, one of the commonly used solutions is signal strength indication ranging based on Bluetooth Low Energy.

[0035] The anchor node (data monitoring end) can only receive data packets from the mobile terminal (second data sending end) and the central node (first data sending end), but cannot distinguish whether the data packet is sent by the central node (first data sending end) or the mobile terminal (second data sending end). This can easily cause data communication monitoring errors of the anchor node (data monitoring end).

[0036] As shown in Figure 1, if the central node (first data transmitter) and the mobile terminal (second data transmitter) send data packets with a large connection interval or are out of sync for a long time, the anchor node (data listener) will need to open a larger receive (Rx) time window to receive the first data packet in the current connection event. Furthermore, the anchor node (data listener) cannot distinguish whether the data packet is sent by the central node (first data transmitter) or the mobile terminal (second data transmitter) based on the packet format. The anchor node (data listener) may mistake the data packet sent by the central node (first data transmitter) for the data packet sent by the mobile terminal (second data transmitter), resulting in errors in the anchor node's monitoring timing. The signal strength indication obtained by the anchor node (data listener) may also be incorrect, leading to inaccurate ranging and even loss of the monitoring link.

[0037] If the connection interval between the central node (first data transmitter) and the mobile terminal (second data transmitter) is long, or if there is a long period of desynchronization due to environmental reasons, the clock of the anchor node (data listener) and the Bluetooth clock will deviate significantly. The Bluetooth clock is the clock used for the Bluetooth connection between the central node (first data transmitter) and the mobile terminal (second data transmitter). For example, in Bluetooth Low Energy (BLE) data communication, when in sleep mode, BLE uses a low-precision, slow clock. The clock deviation between the anchor node (data listener) and the Bluetooth Low Energy clock can reach 500 PPM. The Bluetooth Low Energy clock is the clock used for the Bluetooth Low Energy connection between the central node (first data transmitter) and the mobile terminal (second data transmitter). To ensure that the anchor node (data listener) receives the first data packet of the current connection event, the anchor node (data listener) needs to increase the size of its initial receive window (Rx). Therefore, as long as the clock deviation of the anchor node (data listening end) and the central node (first data sending end) is controlled, and the mobile terminal (second data sending end) and the central node (first data sending end) are synchronized, the window size of the first receiving time window Rx can be effectively controlled. As long as the window size of the first receiving time window Rx is smaller than the range of a low-power Bluetooth empty packet plus a time threshold, the situation of receiving wrong packets can be avoided. Specifically, the time threshold range can be 150 microseconds.

[0038] In response to the above situation, the embodiment of the present application synchronizes the processing of the central node (first data sending end) and the anchor node (data listening end) through a preset period, so that the anchor node (data listening end) can receive the data packets sent by the central node (first data sending end) without expanding the time window for receiving data packets, thereby enhancing the stability of data communication monitoring.

[0039] The embodiment of the present application provides a data communication monitoring method, which is applied to a first data sending end and a data monitoring end respectively. In the embodiment of the present application, the second data sending end and the first data sending end send Bluetooth data packets to each other to realize Bluetooth data communication.

[0040] Specifically, in the embodiment of the present application, the first data transmitting end executes steps S1 to S2 of the embodiment of the present application, and the data monitoring end executes steps T1 to T2 of the embodiment of the present application to implement the data communication monitoring of the embodiment of the present application. The second data transmitting end can be any device that can establish a Bluetooth communication connection with the first data transmitting end, and the Bluetooth data packets sent by the second data transmitting end can be received by the data monitoring end.

[0041] Specifically, in the embodiment of the present application, the first data sending end and the second data sending end realize low-power Bluetooth data communication. The first data sending end and the second data sending end respectively serve as the data communication central role and data communication peripheral role in the data communication, and send data packets to each other to realize low-power Bluetooth data communication.

[0042] For example, in the application scenario of a car digital key system, the first data sending end can be the central node of the vehicle's central control, the second data sending end can be a mobile terminal, and the data monitoring end can be the anchor nodes installed around the vehicle body.

[0043] For another example, in a smart home application scenario, the first data sending end may be the central control of an appliance in the smart home, the second data sending end may be a mobile terminal, and the data monitoring end may be an anchor node installed on the appliance.

[0044] In the application scenario of the automobile digital key system, the central node (first data transmitter) can serve as the data communication central role or data communication peripheral role in low-power Bluetooth data communication; the mobile terminal (second data transmitter) can also serve as the data communication central role or data communication peripheral role in low-power Bluetooth data communication. The central node (first data transmitter) and the mobile terminal (second data transmitter) send low-power Bluetooth data packets to each other to achieve low-power Bluetooth data communication. The anchor node (data monitoring end) obtains the signal strength indication of the signal transmitted by the mobile terminal (second data transmitter) and the central node (first data transmitter) by monitoring the data packets sent by the mobile terminal (second data transmitter) and the central node (first data transmitter) respectively, and uses this as the basis for ranging judgment.

[0045] For example, when the mobile terminal (second data sending end) acts as a data communication peripheral role in low-power Bluetooth data communication, the mobile terminal (second data sending end) consumes less power, and an electronic car key can be used as the mobile terminal (second data sending end).

[0046] For example, when the mobile terminal (second data sending end) serves as the central role of data communication in low-power Bluetooth data communication, the power consumed by the mobile terminal (second data sending end) is higher, and a mobile phone can be used as the mobile terminal (second data sending end).

[0047] In the embodiment of the present application, the first data sending end is selected as the Bluetooth data communication central role or the Bluetooth data communication peripheral role as needed; correspondingly, the second data sending end is selected as the Bluetooth data communication peripheral role or the Bluetooth data communication central role.

[0048] 2 , the method according to an embodiment of the present application is applied to a first data transmitting end. The method includes:

[0049] Step S1: Send a first data packet at a first packet sending time, and record a first packet sending completion time of the first data packet, wherein the first data packet includes: a first Bluetooth clock of a first data sending end.

[0050] Specifically, description is made by taking the low-power Bluetooth data communication between the first data sending end and the second data sending end as an example.

[0051] When the first data sending end is a data communication central role, it sends a first data packet at a first packet sending time T_cen_0, wherein the first data packet includes: a first Bluetooth clock T_ble_cen_0 of the data communication central role, and records a first packet sending completion time T_cen_1 of the first data packet.

[0052] The first Bluetooth clock T_ble_cen_0 is: the Bluetooth clock of the first data sending end (data communication central role) at the first packet sending time T_cen_0.

[0053] The first packet sending time T_cen_0 is: the local clock of the first data sending end (data communication central role) sending the first data packet.

[0054] The first packet sending completion time T_cen_1 is the local clock of the first data sending end (data communication central role) when the data monitoring end receives the first data packet. Correspondingly, when the data monitoring end receives the first data packet, the local clock of the data monitoring end is the first packet receiving time T_an_0.

[0055] In some specific implementations of the embodiments of the present application, if the first data sending end and the data listening end are connected by wire, the first packet sending completion time T_cen_1 of the first data packet is the local clock of the first data sending end when the data listening end receives all the data of the first data packet; if the first data sending end and the data listening end are connected by wireless, the first packet sending completion time T_cen_1 of the first data packet is the local clock of the first data sending end when the data listening end just receives the data of the first data packet.

[0056] Step S2: Send a second data packet, wherein the second data packet includes: the difference between the first packet completion time and the first packet transmission time, so that the data listening end obtains the offset between the first data sending end and the data listening end based on the received difference and the first Bluetooth clock, and synchronizes the first data sending end and the data listening end according to the offset at a preset period.

[0057] Specifically, the first data sending end, as a central role in data communication, packages and sends the second data packet, where the second data packet includes: a difference T_cen_1-T_cen_0 between the first packet sending completion time T_cen_1 and the first packet sending time T_cen_0.

[0058] The second packet receiving time T_an_1 is: the local clock of the data monitoring end when the data monitoring end receives the second data packet.

[0059] The second packet sending completion time T_cen_2 is the local clock of the first data sending end (data communication central role) when the data monitoring end receives the second data packet.

[0060] The second Bluetooth clock T_ble_cen_1 is: the Bluetooth clock of the first data sending end (data communication central role) at the second packet sending completion time T_cen_2.

[0061] The data monitoring end calculates an offset between the first data sending end and the data monitoring end.

[0062] The third Bluetooth clock T_ble_cen_2 is the Bluetooth clock of the first data sending end (data communication central role) when calculating the offset.

[0063] The fourth Bluetooth clock T_ble_an_1 is: the Bluetooth clock of the data monitoring end when calculating the offset.

[0064] The first calculation time T_cen_3 is: the local clock of the first data sending end (data communication central role) when calculating the offset.

[0065] The second calculation time T_an_2 is: the local clock of the data monitoring end when calculating the offset.

[0066] The offset is calculated using Formula 1, specifically: offset = T_ble_an_1 - T_ble_cen_2. Wherein, offset is the offset between the data listening end and the first data transmitting end (the central role in data communication). The fourth Bluetooth clock, T_ble_an_1, can be directly read by the software on the data listening end. The third Bluetooth clock, T_ble_cen_2, is obtained based on the difference between the first packet sending completion time and the first packet sending time, and the first Bluetooth clock.

[0067] Specifically, the third Bluetooth clock T_ble_cen_2 is calculated using Formula 2: T_ble_cen_2=(T_cen_3–T_cen_2)+(T_cen_2–T_cen_1)+(T_cen_1–T_cen_0)+T_ble_can_0.

[0068] Since the first data transmitting end (data communication central role) and the data monitoring end are connected via wired or wireless connection, the following relationship exists between the first data transmitting end (data communication central role) and the data monitoring end: T_cen_3 - T_cen_2 = T_an_2 - T_an_1; T_cen_2 - T_cen_1 = T_an_1 - T_an_0.

[0069] Therefore, Formula 2 can be transformed into Formula 3: T_ble_cen_2 = (T_an_2 – T_an_1) + (T_an_1 – T_an_0) + (T_cen_1 – T_cen_0) + T_ble_can_0. Since T_cen_1 – T_cen_0 (i.e., the second data packet) and T_ble_can_0 (i.e., the first data packet) have already been sent to the data listener via two packets from the first data transmitter (data communication central role), and the data listener can directly read its own local clock, namely, T_an_2, T_an_1, and T_an_0, the data listener can calculate the third Bluetooth clock T_ble_cen_2 and thus calculate the offset between the data listener and the first data transmitter (data communication central role) according to Formula 1.

[0070] Specifically, Formula 1 can be transformed into Formula 4: Formula 4: offset=T_ble_an_1-((T_an_2-T_an_1)+(T_an_1-T_an_0)+(T_cen_1-T_cen_0)+T_ble_can_0). That is, the offset between the first data sending end and the data listening end is: the difference between the fourth Bluetooth clock T_ble_an_1 (read by the data listening end) and the third Bluetooth clock T_ble_cen_2, where the third Bluetooth clock T_ble_cen_2 is the difference between the second calculation moment T_an_2 (read by the data listening end) and the second packet receiving moment T_an_1 (read by the data listening end), plus the difference between the second packet receiving moment T_an_1 (read by the data listening end) and the first packet receiving moment T_an_0 (read by the data listening end), plus the difference between the first packet sending completion moment T_cen_1 and the first packet sending moment T_cen_0 (second data packet), plus the first Bluetooth clock T_ble_cen_0 (first data packet) is calculated.

[0071] In the embodiment of the present application, the data listening end can obtain the difference between the first packet completion time and the first packet sending time (first data packet) and the first Bluetooth clock (second data packet) respectively by receiving the first data packet and the second data packet. Combined with the local clock of the data listening end when the data listening end receives the second data packet, and the local clock of the data listening end when the second data packet is received, the third Bluetooth clock T_ble_cen_2 can be calculated, and the calculation method is simpler.

[0072] Therefore, in the embodiment of the present application, the data listening end obtains the offset between the first data sending end and the data listening end according to the received difference T_cen_1-T_cen_0 and the first Bluetooth clock T_ble_cen_0.

[0073] In the embodiment of the present application, the first data sending end and the data listening end are synchronized according to the offset at a preset period.

[0074] In this way, when the first data transmitter is the central role in data communication, the first data transmitter and the data listener are synchronized according to the offset at a preset period, keeping the clock deviation between the first data transmitter (the central role in data communication) and the data listener within a very small range. If the data listener fails to detect a data packet between the first and second data transmitters, it can synchronize with the first data transmitter to receive data packets from both parties at a later time (first receiving the data packet from the central role, then receiving the data packet from the peripheral role), without having to open a large receive time window Rx. This avoids packet reception errors.

[0075] Similarly, when the first data sending end is a data communication peripheral role, since the clocks of the first data sending end (data communication peripheral role) and the second data sending end (data communication central role) are always in a synchronized state, the data listening end does not need to open a large receiving time window Rx when it fails to listen to the data packet between the first data sending end and the second data sending end. It can then receive the data packets of both parties again at a later time through synchronization with the first data sending end (data communication peripheral role) (first receive the data packet of the data communication peripheral role, and then receive the data packet of the data communication central role), thereby avoiding the occurrence of packet reception errors.

[0076] The embodiment of the present application also provides a data communication monitoring method, which is applied to a data monitoring terminal.

[0077] Referring to FIG3 , the method of the embodiment of the present application includes:

[0078] Step T1: receiving a first data packet sent by a first data transmitting end at a first transmitting time, wherein the first data packet includes a first Bluetooth clock of the first data transmitting end, and instructing the first data transmitting end to record a first transmitting completion time of the first data packet.

[0079] Step T2: receiving a second data packet sent by the first data sending end, wherein the second data packet includes the difference between the first packet sending completion time and the first packet sending time.

[0080] Step T3: obtaining an offset between the first data transmitting end and the data listening end according to the received difference and the first Bluetooth clock, and performing synchronization processing on the first data transmitting end and the data listening end according to the offset at a preset period.

[0081] Specifically referring to the above discussion of steps S1 and S2, the data listening end calculates the offset between the first data transmitting end and the data listening end according to formulas 1 to 4. The calculation method is: the offset between the first data transmitting end and the data listening end is equal to the difference between the fourth Bluetooth clock T_ble_an_1 (read by the data listening end) and the third Bluetooth clock T_ble_cen_2, where the third Bluetooth clock T_ble_cen_2 is the difference between the second calculation time T_an_2 (read by the data listening end) and the second packet receiving time T_an_1 (read by the data listening end), plus the difference between the second packet receiving time T_an_1 (read by the data listening end) and the first packet receiving time T_an_0 (read by the data listening end), plus the difference between the first packet sending completion time T_cen_1 and the first packet sending time T_cen_0 (second data packet), plus the first Bluetooth clock T_ble_cen_0 (first data packet).

[0082] Therefore, in the embodiment of the present application, the data listening end obtains the offset between the first data sending end and the data listening end according to the received difference T_cen_1-T_cen_0 and the first Bluetooth clock T_ble_cen_0.

[0083] In this way, when the first data transmitter is the central role in data communication, the first data transmitter and the data listener are synchronized according to the offset at a preset period, keeping the clock deviation between the first data transmitter (the central role in data communication) and the data listener within a very small range. If the data listener fails to detect a data packet between the first and second data transmitters, it can synchronize with the first data transmitter to receive data packets from both parties at a later time (first receiving the data packet from the central role, then receiving the data packet from the peripheral role), without having to open a large receive time window Rx. This avoids packet reception errors.

[0084] Similarly, when the first data sending end is a data communication peripheral role, since the clocks of the first data sending end (data communication peripheral role) and the second data sending end (data communication central role) are always in a synchronized state, the data listening end does not need to open a large receiving time window Rx when it fails to listen to the data packet between the first data sending end and the second data sending end. It can then receive the data packets of both parties again at a later time through synchronization with the first data sending end (data communication peripheral role) (first receive the data packet of the data communication peripheral role, and then receive the data packet of the data communication central role), thereby avoiding the occurrence of packet reception errors.

[0085] In some specific implementations of the embodiments of the present application, if the first data sending end and the data listening end are connected by wire, for example, it can be a wired connection such as a CAN bus connection or a LIN bus connection.

[0086] The embodiment of the present application takes the CAN bus connection method as an example. Sending the first data packet and the second data packet through the buffer of the CAN bus can further reduce the synchronization error between the first data sending end and the data listening end, and can effectively reduce the monitoring error of the data listening end caused by the clock drift of the first data sending end and the second data sending end, thereby improving the stability of the monitoring system.

[0087] In some specific implementations of the embodiments of the present application, the first data packet and the second data packet are respectively placed into the buffer of the CAN bus through software.

[0088] The embodiment of the present application uses software to place the first data packet and the second data packet into the buffer of the CAN bus respectively, thereby making the synchronization method of data communication in the embodiment of the present application easier to implement.

[0089] The implementation of the embodiment of the present application is further illustrated below through the data packet situation of the first data sending end and the data listening end.

[0090] The following description is made by taking the low-power Bluetooth data communication between the first data sending end and the second data sending end, the first data sending end and the data monitoring end being connected via a CAN bus, and the first data sending end being the central role of the data communication as an example.

[0091] 4 , the data packet situation between the first data sending end and the data listening end includes:

[0092] Step 401: A first data packet is sent at a first data transmitting end (data communication central role) at time T_cen_0. ​​The first data packet includes a first Bluetooth clock T_ble_cen_0 of the first data transmitting end (data communication central role). The first data packet is put into a buffer of the CAN bus.

[0093] Step 402: The CAN bus sends the first data packet to the data listening terminal via the CAN bus. The data listening terminal records the completion time of packet reception as the first packet reception time T_an_0. Meanwhile, the first data sending terminal (data communication central role) records the first packet transmission completion time T_cen_1 of the first data packet.

[0094] Step 403: The first data sending end (data communication central role) sends a second data packet again. The second data packet includes the difference T_cen_1-T_cen_0 between the first packet sending completion time T_cen_1 and the first packet sending time T_cen_0. ​​The second data packet is packaged into the buffer of the Can bus and sent out through the Can bus.

[0095] Step 404: The data monitoring end receives the second data packet at the second packet receiving time T_an_1. At this time, the second packet sending completion time T_cen_2 of the second data packet is recorded. The Bluetooth clock of the first data sending end (data communication central role) at the second packet sending completion time T_cen_2 corresponds to the second Bluetooth clock T_ble_cen_1.

[0096] Step 405: The data listening end calculates the offset between the data listening end and the first data sending end (data communication central role).

[0097] The offset between the data listening end and the first data sending end (the central role in data communication) is the difference between the fourth Bluetooth clock T_ble_an_1 and the third Bluetooth clock T_ble_cen_2.

[0098] The following is a detailed description of each parameter and calculation formula:

[0099] The first Bluetooth clock T_ble_cen_0 is: the Bluetooth clock of the first data sending end (data communication central role) at the first packet sending time T_cen_0.

[0100] The first packet sending time T_cen_0 is: the local clock of the first data sending end (data communication central role) sending the first data packet.

[0101] The first packet receiving time T_an_0 is: the local clock of the data monitoring terminal when the data monitoring terminal receives the first data packet.

[0102] The first packet sending completion time T_cen_1 is: the local clock of the first data sending end (data communication central role) when the data listening end receives the first data packet.

[0103] The second packet receiving time T_an_1 is: the local clock of the data monitoring end when the data monitoring end receives the second data packet.

[0104] The second packet sending completion time T_cen_2 is the local clock of the first data sending end (data communication central role) when the data monitoring end receives the second data packet.

[0105] The second Bluetooth clock T_ble_cen_1 is: the Bluetooth clock of the first data sending end (data communication central role) at the second packet sending completion time T_cen_2.

[0106] The data monitoring end calculates an offset between the first data sending end and the data monitoring end.

[0107] The third Bluetooth clock T_ble_cen_2 is the Bluetooth clock of the first data sending end (data communication central role) when calculating the offset.

[0108] The fourth Bluetooth clock T_ble_an_1 is: the Bluetooth clock of the data monitoring end when calculating the offset.

[0109] The first calculation time T_cen_3 is: the local clock of the first data sending end (data communication central role) when calculating the offset.

[0110] The second calculation time T_an_2 is: the local clock of the data monitoring end when calculating the offset.

[0111] The offset between the data listener and the first data transmitter (the central role in data communication) can be calculated using Formula 1 by calculating the difference between the fourth Bluetooth clock T_ble_an_1 and the third Bluetooth clock T_ble_cen_2. For details, see Formula 1: offset = T_ble_an_1 - T_ble_cen_2. Here, offset is the offset between the data listener and the first data transmitter (the central role in data communication). The fourth Bluetooth clock T_ble_an_1 can be directly read by the data listener's software.

[0112] The third Bluetooth clock T_ble_cen_2 is calculated using Formula 2: T_ble_cen_2 = (T_cen_3 - T_cen_2) + (T_cen_2 - T_cen_1) + (T_cen_1 - T_cen_0) + T_ble_can_0.

[0113] Since the first data transmitting end (data communication central role) and the data monitoring end are connected via a wired connection, the following relationship exists between the first data transmitting end (data communication central role) and the data monitoring end: T_cen_3 - T_cen_2 = T_an_2 - T_an_1; T_cen_2 - T_cen_1 = T_an_1 - T_an_0.

[0114] Therefore, Formula 2 can be transformed into Formula 3: T_ble_cen_2 = (T_an_2 – T_an_1) + (T_an_1 – T_an_0) + (T_cen_1 – T_cen_0) + T_ble_can_0. Since T_cen_1 – T_cen_0 (i.e., the second data packet) and T_ble_can_0 (i.e., the first data packet) have already been sent to the data listener via two packets from the first data transmitter (the central role in data communication), and the data listener can directly read its own local clock, namely, T_an_2, T_an_1, and T_an_0, the data listener can calculate T_ble_cen_2 and, based on Formula 1, the offset between the data listener and the first data transmitter (the central role in data communication).

[0115] Specifically, Formula 1 can be transformed into Formula 4: Formula 4: offset=T_ble_an_1-((T_an_2-T_an_1)+(T_an_1-T_an_0)+(T_cen_1-T_cen_0)+T_ble_can_0). That is, the offset between the first data sending end and the data listening end is: the difference between the fourth Bluetooth clock T_ble_an_1 (read by the data listening end) and the third Bluetooth clock T_ble_cen_2, where the third Bluetooth clock T_ble_cen_2 is the difference between the second calculation moment T_an_2 (read by the data listening end) and the second packet receiving moment T_an_1 (read by the data listening end), plus the difference between the second packet receiving moment T_an_1 (read by the data listening end) and the first packet receiving moment T_an_0 (read by the data listening end), plus the difference between the first packet sending completion moment T_cen_1 and the first packet sending moment T_cen_0 (second data packet), plus the first Bluetooth clock T_ble_cen_0 (first data packet) is calculated.

[0116] Therefore, in the embodiment of the present application, the data listening end obtains the offset between the first data sending end and the data listening end according to the received difference T_cen_1-T_cen_0 and the first Bluetooth clock T_ble_cen_0.

[0117] In the embodiment of the present application, the first data sending end and the data listening end are synchronized according to the offset at a preset period.

[0118] In the embodiment of the present application, the first data sending end and the data listening end are synchronized according to the obtained offset in a preset period, that is, the data listening end is synchronized to align the Bluetooth clock for data communication between the first data sending end and the second data sending end, so that the clock deviation between the first data sending end and the data listening end is controlled within a very small range, avoiding the situation where packet reception errors occur during the monitoring process. For example, in the application scenario of the automobile digital key system, the first data sending end is the central node of the vehicle's central control, the second data sending end is the mobile terminal, and the data listening end is the anchor node installed around the vehicle body. The anchor node obtains the received signal strength indication between the mobile terminal and the anchor node by monitoring the data packet sent by the mobile terminal, so as to realize the distance measurement between the mobile terminal and the vehicle. The central node (first data sending end) and the mobile terminal (second data sending end) perform data communication via low-power Bluetooth. In the embodiment of the present application, the central node (first data sending end) and the anchor node (data listening end) are synchronized according to the obtained offset in a preset period. Therefore, during the monitoring process of the data monitoring end, if the data monitoring end does not monitor the data packets between the central node (first data sending end) and the mobile terminal (second data sending end), it does not need to open a large receiving time window Rx. It can receive the data packets of both parties again at a later time through synchronization with the central node (first data sending end), thereby avoiding the occurrence of packet reception errors.

[0119] In some specific implementations of the embodiments of the present application, the preset period is less than or equal to 190 milliseconds.

[0120] The main error in synchronizing the first data transmitter with the data listening end based on the offset between them comes from the accuracy of the CAN bus capture clock, with a maximum error of about 3 Bluetooth clock cycles. If a high-precision Bluetooth clock system is used (such as an XO 32M clock), the synchronization accuracy between the data listening end and the first data transmitter can theoretically be less than 1us. Therefore, as long as synchronization is performed every 190ms, even if the clocks of both parties drift by 500PPM, the maximum clock error will be less than 190us and will not exceed the data packet length of a low-power Bluetooth empty packet. Therefore, the situation in Figure 1 where the data packet sent by the central node (first data transmitter) is mistaken for the data packet sent by the mobile terminal (second data transmitter) will not occur.

[0121] Referring to Figure 5, taking the connection period of the first data sending end and the second data sending end as 100ms as an example, the second data sending end (data communication central role) is a mobile phone, the first data sending end (data communication peripheral role) is the central node of the vehicle's central control, and the data listening end is the anchor node. The first data sending end (data communication peripheral role) and the data listening end are connected via the CAN bus, and BLE clock synchronization is performed once with a period of less than 190ms. In this way, the clock deviation of the first data sending end (data communication peripheral role) and the data listening end is controlled within a very small range. Since the clocks of the first data sending end (data communication peripheral role) and the data listening end are always in a synchronized state, the data listening end does not need to open a large receiving time window Rx to receive the data packets of both parties at a later time when it fails to monitor the communication packet between the first data sending end and the second data sending end device, thus avoiding the packet receiving error described above.

[0122] Corresponding to the above method, referring to FIG6 , an embodiment of the present application further provides a data communication monitoring device, which is applied to a first data transmitting end. The first data transmitting end and a second data transmitting end send Bluetooth data packets to each other to implement Bluetooth data communication, and the data monitoring end receives the Bluetooth data packets to implement data communication monitoring. The device includes:

[0123] The first sending module 601 is configured to send a first data packet at a first sending time, where the first data packet includes a first Bluetooth clock of the first data sending end, and record a first sending completion time of the first data packet.

[0124] The second sending module 602 is used to send a second data packet, which includes: the difference between the first packet sending completion time and the first packet sending time, so that the data listening end obtains the offset between the first data sending end and the data listening end based on the received difference and the first Bluetooth clock, and synchronizes the first data sending end and the data listening end according to the offset at a preset period.

[0125] Corresponding to the above method, referring to FIG7 , an embodiment of the present application further provides a data communication monitoring device, which is applied to a data monitoring terminal. A first data transmitting terminal and a second data transmitting terminal send Bluetooth data packets to each other to implement Bluetooth data communication, and the data monitoring terminal receives the Bluetooth data packets to implement data communication monitoring. The device includes:

[0126] The first receiving module 701 is configured to receive a first data packet sent by the first data sending end at a first sending time, where the first data packet includes a first Bluetooth clock of the first data sending end, and enable the first data sending end to record a first sending completion time of the first data packet.

[0127] The second receiving module 702 is configured to receive a second data packet sent by the first data sending end, where the second data packet includes a difference between the first packet sending completion time and the first packet sending time.

[0128] The offset calculation module 703 is used to obtain the offset between the first data sending end and the data listening end based on the difference between the first packet completion time and the first packet sending time received and the first Bluetooth clock, and synchronize the first data sending end and the data listening end according to the offset at a preset period.

[0129] Corresponding to the above method, see Figure 8, an embodiment of the present application also provides a data communication monitoring system, including a first data sending end, a second data sending end and a data monitoring end. The first data sending end and the second data sending end send data packets to each other to realize data communication, and the data monitoring end receives the data packets to realize data communication monitoring. The first data sending end executes steps S1-S2 of the above method, and the data monitoring end executes steps T1-T2 of the above method.

[0130] Thus far, specific embodiments of the present subject matter have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recited in the claims can be performed in a different order and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing may be advantageous.

[0131] In the 1990s, technological improvements could be clearly distinguished as either hardware improvements (for example, improvements to circuit structures like diodes, transistors, and switches) or software improvements (improvements to process flows). However, with the advancement of technology, many process flow improvements today can now be considered direct improvements to hardware circuit structures. Designers almost always create the corresponding hardware circuit structure by programming the improved process flow into the hardware circuit. Therefore, it cannot be said that a process flow improvement cannot be implemented using hardware modules. For example, a programmable logic device (PLD), such as a field programmable gate array (FPGA), is an integrated circuit whose logical function is determined by user programming. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to hire a chip manufacturer to design and manufacture a dedicated integrated circuit chip. Moreover, nowadays, instead of manually fabricating integrated circuit chips, this programming is mostly done using "logic compiler" software. This is similar to the software compiler used when developing programs. Before compilation, the original code must also be written in a specific programming language, called a hardware description language (HDL). There is not just one HDL, but many, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art will also understand that by simply programming the method flow in one of these hardware description languages ​​and then programming it into an integrated circuit, a hardware circuit that implements the logic method flow can be easily obtained.

[0132] The controller can be implemented in any suitable manner. For example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also know that in addition to implementing the controller in a purely computer-readable program code format, the controller can be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered a hardware component, and the devices included therein for implementing various functions can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules that implement the method and structures within the hardware component.

[0133] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0134] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing this application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

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

[0136] The present application is described with reference to the flow chart and / or block diagram of the method, device (system), and computer program product according to the embodiment of the present application. It should be understood that each flow process and / or box in the flow chart and / or block diagram and the combination of the flow process and / or box in the flow chart and / or block diagram can be realized by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processing machine or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for realizing the function specified in one flow chart flow or multiple flows and / or one box or multiple boxes of the block diagram.

[0137] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0138] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

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

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

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

[0142] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

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

[0144] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communications network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0145] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.

[0146] The above are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.

Claims

1. A data communication synchronization method, applied to a data monitoring end, wherein a first data sending end and a second data sending end send Bluetooth data packets to each other to implement Bluetooth data communication, and the data monitoring end receives the Bluetooth data packets to implement data communication monitoring, characterized in that: The method comprises: receiving a first data packet sent by the first data transmitting end at a first packet transmitting time, wherein the first data packet includes a first Bluetooth clock of the first data transmitting end, and causing the first data transmitting end to record a first packet transmitting completion time of the first data packet; receiving a second data packet sent by the first data sending end, wherein the second data packet includes a difference between the first packet sending completion time and the first packet sending time; The offset between the first data sending end and the data listening end is obtained according to the difference between the first packet sending completion time and the first packet sending time received, and the first Bluetooth clock, and the first data sending end and the data listening end are synchronized according to the offset at a preset period.

2. The data communication synchronization method according to claim 1, characterized in that: The offset is: the difference between the fourth Bluetooth clock and the third Bluetooth clock, wherein the fourth Bluetooth clock is the Bluetooth clock of the data listening end when the offset is calculated, and the third Bluetooth clock is the Bluetooth clock of the first data sending end when the offset is calculated, and the third Bluetooth clock is obtained according to the difference between the first packet sending completion time and the first packet sending time and the first Bluetooth clock.

3. The data communication synchronization method according to claim 2, characterized in that: The third Bluetooth clock is: the sum of the difference between the second calculation time and the second packet receiving time, the difference between the second packet receiving time and the first packet receiving time, the difference between the first packet sending completion time and the first packet sending time, and the first Bluetooth clock. Among them, the second calculation time is the local clock of the data listening end when calculating the offset, the second packet receiving time is the local clock of the data listening end when the data listening end receives the second data packet, and the first packet receiving time is the local clock of the data listening end when the data listening end receives the first data packet.

4. The data communication synchronization method according to claim 1, characterized in that: If the first data sending end and the data listening end are connected by wire, the first packet sending completion time of the first data packet is the local clock of the first data sending end when the data listening end receives all the data of the first data packet; if the first data sending end and the data listening end are connected by wireless, the first packet sending completion time of the first data packet is the local clock of the first data sending end when the data listening end just receives the data of the first data packet.

5. The data communication synchronization method according to claim 4, characterized in that: If the first data sending end and the data listening end are connected via a CAN bus, the first data packet and the second data packet are respectively placed in a buffer of the CAN bus and sent via the CAN bus.

6. The data communication synchronization method according to claim 1, characterized in that: The preset period is less than or equal to 190 milliseconds.

7. The data communication synchronization method according to any one of claims 1 to 6, characterized in that: The first data sending end is a central node of the vehicle central control, the second data sending end is a mobile terminal, and the data The monitoring end is an anchor node installed around the vehicle body, and obtains the received signal strength indication between the mobile terminal and the anchor node through the data packet sent by the mobile terminal to achieve the distance measurement between the mobile terminal and the vehicle.

8. A data communication synchronization method, applied to a first data sending end, wherein the first data sending end and a second data sending end send Bluetooth data packets to each other to implement Bluetooth data communication, and a data monitoring end receives the Bluetooth data packets to implement data communication monitoring, characterized in that: The method comprises: Sending a first data packet at a first packet sending time, wherein the first data packet includes a first Bluetooth clock of the first data sending end, and recording a first packet sending completion time of the first data packet; Send a second data packet, wherein the second data packet includes: the difference between the first packet sending completion time and the first packet sending time, so that the data listening end obtains the offset between the first data sending end and the data listening end according to the received difference and the first Bluetooth clock, and synchronizes the first data sending end and the data listening end according to the offset at a preset period.

9. The data communication synchronization method according to claim 7, characterized in that: The offset is: the difference between the fourth Bluetooth clock and the third Bluetooth clock, wherein the fourth Bluetooth clock is the Bluetooth clock of the data listening end when the offset is calculated, and the third Bluetooth clock is the Bluetooth clock of the first data sending end when the offset is calculated, and the third Bluetooth clock is obtained according to the difference between the first packet sending completion time and the first packet sending time and the first Bluetooth clock.

10. The data communication synchronization method according to claim 9, characterized in that: The third Bluetooth clock is: the sum of the difference between the second calculation time and the second packet receiving time, the difference between the second packet receiving time and the first packet receiving time, the difference between the first packet sending completion time and the first packet sending time, and the first Bluetooth clock. Among them, the second calculation time is the local clock of the data listening end when calculating the offset, the second packet receiving time is the local clock of the data listening end when the data listening end receives the second data packet, and the first packet receiving time is the local clock of the data listening end when the data listening end receives the first data packet.

11. The data communication synchronization method according to claim 8, characterized in that: If the first data sending end and the data listening end are connected by wire, the first packet sending completion time of the first data packet is the local clock of the first data sending end when the data listening end receives all the data of the first data packet; if the first data sending end and the data listening end are connected by wireless, the first packet sending completion time of the first data packet is the local clock of the first data sending end when the data listening end just receives the data of the first data packet.

12. The data communication synchronization method according to claim 11, characterized in that: If the first data sending end and the data listening end are connected via a CAN bus, the first data packet and the second data packet are respectively placed in a buffer of the CAN bus and sent via the CAN bus.

13. The data communication synchronization method according to claim 8, characterized in that: The preset period is less than or equal to 190 milliseconds.

14. The data communication synchronization method according to any one of claims 8 to 13, characterized in that: The first data sending end is a central node of the vehicle's central control, the second data sending end is a mobile terminal, and the data monitoring end is an anchor node installed around the vehicle body. The anchor node obtains a received signal strength indication between the mobile terminal and the anchor node by monitoring the data packet sent by the mobile terminal, so as to realize the communication between the mobile terminal and the vehicle. Distance measurement between vehicles.

15. A data communication synchronization device, applied to a data monitoring end, wherein a first data sending end and a second data sending end send Bluetooth data packets to each other to implement Bluetooth data communication, and the data monitoring end receives the Bluetooth data packets to implement data communication monitoring, characterized in that: The device comprises: A first receiving module is used to receive a first data packet sent by the first data sending end at a first packet sending time, wherein the first data packet includes a first Bluetooth clock of the first data sending end, and enables the first data sending end to record a first packet sending completion time of the first data packet; A second receiving module, configured to receive a second data packet sent by the first data sending end, wherein the second data packet includes a difference between the first packet sending completion time and the first packet sending time; An offset calculation module is used to obtain an offset between the first data sending end and the data listening end according to the difference between the first packet sending completion time and the first packet sending time received and the first Bluetooth clock, and synchronize the first data sending end and the data listening end according to the offset at a preset period.

16. A data communication synchronization device, applied to a first data sending end, wherein the first data sending end and a second data sending end send Bluetooth data packets to each other to implement Bluetooth data communication, and a data monitoring end receives the Bluetooth data packets to implement data communication monitoring, characterized in that: The device comprises: A first sending module, configured to send a first data packet at a first packet sending time, wherein the first data packet includes a first Bluetooth clock of the first data sending end, and records a first packet sending completion time of the first data packet; The second sending module is used to send a second data packet, wherein the second data packet includes: the difference between the first packet sending completion time and the first packet sending time, so that the data listening end obtains the offset between the first data sending end and the data listening end according to the received difference and the first Bluetooth clock, and synchronizes the first data sending end and the data listening end according to the offset at a preset period.

17. A data communication synchronization system, comprising a first data sending end, a second data sending end and a data listening end, wherein the first data sending end and the second data sending end send data packets to each other to achieve data communication, and the data listening end receives the data packets to achieve data communication listening, the first data sending end executes the method described in any one of claims 8 to 14, and the data listening end executes the method described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Clock synchronization method and device

    CN110557826A

  • Bluetooth equipment and Bluetooth clock calibration method and system thereof

    CN114697923A

  • Multi-node digital key positioning method, device and equipment and storage medium

    CN114866293A

  • Positioning method, device and system, electronic equipment and storage medium

    CN116055998A

  • Method for monitoring by using auxiliary earphone as main device in TWS earphone

    CN116074676A