A data communication monitoring method, device and system
By determining the synchronization time and clock drift in Bluetooth Low Energy data communication, the sender of the data packet can be distinguished, solving the problem that the data listening end cannot distinguish the source of the data packet, and improving the accuracy and stability of ranging.
Patent Information
- Application Number
- CN202410539889.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-26
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2044-04-26
AI Technical Summary
In Bluetooth Low Energy data communication, the data listening end cannot distinguish the source of the received data packets, resulting in incorrect received signal strength indication and thus affecting the accuracy of ranging.
By determining the synchronization time at which the first data packet is correctly received in the first connection event, and calculating the clock drift of the actual packet reception time relative to the theoretical packet reception time for the first data packet received in the second connection event, the sender of the data packet is determined based on whether the clock drift is less than the sum of the empty packet transmission time and the inter-frame interval, and the synchronization time is updated.
It improves the stability of data communication monitoring, reduces monitoring errors, ensures the accuracy of ranging, and has no compatibility issues, making it highly adaptable.
Smart Images

Figure CN118509954B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic technology, and in particular to a data communication monitoring method, apparatus, and system. Background Technology
[0002] In data communication systems such as Bluetooth Low Energy, data communication typically involves a central data communication role and peripheral data communication roles sending data packets to each other. A data monitoring end receives these data packets to listen to the data communication between the central and peripheral roles and reports the corresponding received signal strength (RSS) for ranging. However, because the data monitoring end cannot distinguish whether the received data packets originate from the central or peripheral role, the reported RSS is incorrect, leading to inaccurate ranging.
[0003] Therefore, how the data monitoring end can distinguish the source of the received data packets has become a technical problem that urgently needs to be solved. Summary of the Invention
[0004] In view of this, one of the technical problems solved by the embodiments of this application is to provide a data communication monitoring method, apparatus, and system that enables the data monitoring end to identify the source of the received data packets.
[0005] In a first aspect, embodiments of this application provide a data communication monitoring method, applied to a data monitoring end, wherein a central data communication role and a peripheral data communication role send data packets to each other to achieve data communication, and the data monitoring end receives the data packets to achieve data communication monitoring. The method is characterized by comprising: determining the synchronization time of the first correctly received data packet in a first connection event, wherein the synchronization time is the synchronization time between the data monitoring end and the central data communication role; calculating the clock drift amount of the actual packet reception time of the first data packet received in a second connection event relative to its theoretical packet reception time, wherein the theoretical packet reception time is the sum of the synchronization time and N times the connection interval, where N is the number of connection events from the first connection event to the second connection event, and the second connection event is a connection event following the first connection event; and determining the sender of the first received data packet and whether to update the synchronization time based on whether the clock drift amount is less than the sum of the empty packet transmission duration and the inter-frame interval.
[0006] Secondly, embodiments of this application provide a data communication monitoring device applied to a data monitoring end. A central data communication role and a peripheral data communication role send data packets to each other to achieve data communication. The data monitoring end receives the data packets to achieve data communication monitoring. The device comprises: a determining module, used to determine the synchronization time of the first correctly received data packet in a first connection event, wherein the synchronization time is the synchronization time between the data monitoring end and the central data communication role; a calculating module, used to calculate the clock drift of the actual packet reception time of the first data packet received in a second connection event relative to its theoretical packet reception time, wherein the theoretical packet reception time is the sum of the synchronization time and N times the connection interval, where N is the number of connection events from the first connection event to the second connection event, and the second connection event is a connection event following the first connection event; and a comparing module, used to determine the sender of the first received data packet and whether to update the synchronization time based on whether the clock drift is less than the sum of the empty packet transmission time and the inter-frame interval.
[0007] Thirdly, embodiments of this application provide a data communication monitoring system, including a central data communication role, peripheral data communication roles, and a data monitoring terminal. The central data communication role and the peripheral data communication roles send data packets to each other to achieve data communication. The data monitoring terminal receives the data packets to achieve data communication monitoring. The data monitoring terminal executes the method described in any one of claims 1-10.
[0008] This application embodiment determines the synchronization time of the first correctly received data packet in the first connection event and calculates the clock drift of the actual packet reception time of the first data packet received in the second connection event relative to its theoretical packet reception time. The theoretical packet reception time is the sum of the synchronization time and N times the connection interval, where N is the number of connection events from the first connection event to the second connection event, and the second connection event is the connection event following the first connection event. Based on whether the clock drift is less than the sum of the empty packet transmission time and the inter-frame interval, the sender of the first received data packet and whether to update the synchronization time are determined. Therefore, the clock drift of the actual packet reception time of the first received data packet relative to its theoretical packet reception time in this application embodiment distinguishes the sender of the first received data packet, reduces data communication monitoring errors, and improves the stability of data communication monitoring. Furthermore, this application embodiment has no compatibility issues and good adaptability. Attached Figure Description
[0009] The following sections will describe some specific embodiments of the present application in a detailed manner, by way of example and not limitation, with reference to the accompanying drawings. The same reference numerals in the drawings denote the same or similar parts or components. Those skilled in the art should understand that these drawings are not necessarily drawn to scale. In the drawings:
[0010] Figure 1 This is a schematic diagram illustrating the sending and receiving of data packets in data communication.
[0011] Figure 2 This is a flowchart illustrating a data communication monitoring method according to an embodiment of this application;
[0012] Figure 3 This is a flowchart illustrating a data communication monitoring method for an application example according to an embodiment of this application;
[0013] Figure 4 This is a schematic diagram of the structure of a data communication monitoring device according to an embodiment of this application;
[0014] Figure 5 This is a schematic diagram of the structure of a data communication monitoring system according to an embodiment of this application. Detailed Implementation
[0015] 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 thoroughly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art should fall within the protection scope of the present invention.
[0016] Reference is made to the accompanying drawings, which form part of the detailed description and illustrate exemplary embodiments. Furthermore, it should be 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 orientations 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 defined only by the appended claims and their equivalents.
[0017] Numerous details are set forth in the following description. However, it will be apparent to those skilled in the art that the embodiments described herein can be practiced without these specific details. In some instances, well-known methods and apparatus are shown in block diagram form rather than in detail to avoid obscuring the embodiments described herein. Throughout this specification, references to “embodiment,” “one embodiment,” or “some embodiments” mean that a particular feature, structure, function, or characteristic described in connection with that embodiment is included in at least one embodiment herein. Therefore, the phrases “in an embodiment,” “in one embodiment,” or “some embodiments” appearing throughout this specification do not necessarily refer to the same embodiment. Furthermore, in one or more embodiments, particular features, structures, functions, or characteristics can be combined in any suitable manner. For example, a first embodiment can be combined with a second embodiment in any way that does not mutually exclude particular features, structures, functions, or characteristics associated with two embodiments.
[0018] As used in the description and appended claims, the singular forms “a (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 includes any and all possible combinations of one or more of the associated listed items.
[0019] The terms “coupling” and “connection”, along with their derivatives, are used herein to describe functional or structural relationships between components. It should be understood that these terms are not intended to be synonyms for each other. Rather, in certain embodiments, “connection” can be used to indicate that two or more elements are in direct physical, optical, or electrical contact with each other. “Coupling” can be used to indicate that two or more elements are in direct or indirect physical or electrical contact with each other (with other intermediary elements between them), and / or that two or more elements cooperate or interact with each other (e.g., as in a causal relationship).
[0020] As used herein, the terms “above,” “below,” “between,” and “on” refer to the relative position of a component or material with respect to other components or materials, where such physical relationships are noteworthy. For example, in the context of materials, a material positioned above or below another material may be in direct contact with it, or may have one or more intermediate materials. Furthermore, a material positioned between two materials may be in direct contact with both layers, or may have one or more intermediate layers. In contrast, a first material or material “on” a second material or material is in direct contact with that second material / material. Similar distinctions are made in the context of component assembly.
[0021] As described throughout this document and in the claims, a list of items connected by the terms “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.
[0022] The terms “circuit” or “module” can refer to one or more passive and / or active components arranged to cooperate with each other to provide a desired function. The term “signal” can refer to at least one current signal, voltage signal, or magnetic signal. The terms “substantially,” “close to,” “approximately,” “near,” and “about” generally refer to within + / -10% of the target value.
[0023] The specific implementation of the embodiments of the present invention will be further described below with reference to the accompanying drawings.
[0024] In data communication such as Bluetooth Low Energy (BLE), data communication is usually achieved by a central role and a peripheral role sending data packets to each other. The data listening end listens to the data communication between the central role and the peripheral role by receiving data packets and obtains valid listening information, such as Received Signal Strength Indication (RSSI).
[0025] The following section uses a car digital key system to illustrate the implementation of data communication monitoring.
[0026] With the increasing adoption of digital key systems in new energy vehicles, these systems have become a crucial application scenario for data communication monitoring. In a typical application scenario, a digital key system installs three or more anchor nodes around the vehicle as data monitoring terminals, while a central node is installed at the center console. If the central role in data communication is the central node, the peripheral role is the mobile terminal; if the central role is the mobile terminal, the peripheral role is the central node. The mobile terminal and the central node establish a connection and achieve security authentication by exchanging data packets. The anchor nodes (data monitoring terminals) monitor the data packets sent by the mobile terminal and the central node, obtaining the signal strength indication of the signal transmitted from the mobile terminal to the anchor node (data monitoring terminal), and using this as the basis for distance measurement. One commonly used solution for signal strength indication distance measurement in digital key systems is based on Bluetooth Low Energy (BLE).
[0027] Anchor nodes (data listening terminals) can only receive data packets from mobile terminals and central nodes, but they cannot distinguish whether the data packets were sent by the central node or the mobile terminal. This can easily lead to data communication listening errors on the anchor node (data listening terminal). For example, if the anchor node (data listening terminal) mistakes a data packet sent by the central node for a data packet sent by the mobile terminal, and performs ranging based on the data packet sent by the central node, the ranging will be inaccurate, and the listening link will be lost.
[0028] See Figure 1 If the connection interval between the central and peripheral roles in data communication is large, or if there is a prolonged period without synchronization, the data sniffer will need to open a large receive (Rx) time window to receive data packets in the connection event. Furthermore, the data sniffer cannot distinguish whether a data packet originated from the central or peripheral role based on its packet format, leading to timing errors in the sniffer's monitoring, potentially resulting in incorrect signal strength indications, inaccurate ranging, or even loss of the listening link.
[0029] For the data monitoring end, the data packets sent by the central node and the mobile terminal cannot be distinguished from each other based on the packet header or payload. In many cases, both the central node and the mobile terminal send Bluetooth Low Energy empty packets, with only a few fields differing in the payload header. However, these fields cannot determine whether the received data packet belongs to the central node or the mobile terminal, or which data packet it is. Therefore, the anchor node (data monitoring end) is prone to misjudgment under practical conditions. This misjudgment prevents the anchor node (data monitoring end) from obtaining the signal strength indication of the signal transmitted from the mobile terminal to the anchor node (data monitoring end), resulting in inaccurate ranging.
[0030] To address the above issues, this application embodiment determines the synchronization time of the first correctly received data packet in the first connection event and calculates the clock drift of the actual packet reception time of the first data packet received in the second connection event relative to its theoretical packet reception time. The theoretical packet reception time is the sum of the synchronization time and N times the connection interval, where N is the number of connection events from the first connection event to the second connection event, and the second connection event is the connection event following the first connection event. Based on whether the clock drift is less than the sum of the empty packet transmission time and the inter-frame interval, the sender of the first received data packet and whether to update the synchronization time are determined. Therefore, the clock drift of the actual packet reception time of the first received data packet relative to its theoretical packet reception time in this application embodiment distinguishes the sender of the first received data packet, reduces data communication monitoring errors, and improves the stability of data communication monitoring. Furthermore, this application embodiment has no compatibility issues and good adaptability.
[0031] This application provides a data communication monitoring method, applied to a data monitoring terminal. In this embodiment, a central data communication role and peripheral data communication roles send data packets to each other to achieve data communication, and the data monitoring terminal receives the data packets to monitor the data communication.
[0032] This application uses Bluetooth Low Energy (BLE) digital communication as an example for illustration. In the application scenario of a car digital key system, the central role in BLE data communication can be the central node of the vehicle's central control system, with the mobile terminal acting as the peripheral role. Alternatively, the peripheral role in BLE data communication can also be the central node of the vehicle's central control system, with the mobile terminal acting as the central role. The data monitoring end is an anchor node installed around the vehicle body. The anchor node (data monitoring end) listens to the data packets sent by the mobile terminal and the central node, obtains the signal strength indication of the signal transmitted from the mobile terminal to the anchor node, and uses this as the basis for distance measurement.
[0033] For example, in smart home application scenarios, the central role of data communication in Bluetooth Low Energy (BLE) data communication can be the central control unit of a certain appliance in the smart home, the peripheral role of data communication in BLE data communication can be a mobile terminal, and the data listening end is the anchor node installed in a certain appliance.
[0034] In this embodiment, a central node is selected as either the central role or the peripheral role in data communication, as needed; correspondingly, a mobile terminal is selected as either the peripheral role or the central role in data communication.
[0035] See Figure 2 The method described in this application is applied to a data monitoring end, and the method includes:
[0036] Step S1: Determine the synchronization time of the first correctly received data packet in the first connection event. The synchronization time is the synchronization time between the data listening end and the central role of data communication.
[0037] A connection event is the process by which data communication central roles and peripheral roles exchange data packets. The first connection event is the data packet transmission of the current frame between the data communication central role and the data communication peripheral role, and the second connection event is the data packet transmission of the next frame between the data communication central role and the data communication peripheral role.
[0038] The time when the data packet is correctly received for the first time in the first connection event of data communication, i.e. the time when the data communication packet is correctly received, is determined as the synchronization time between the data listening end and the first data sending end.
[0039] For example, the time when the first data packet is correctly received in the first connection event can be determined by transmitting two consecutive empty packets for the duration of transmission, or by transmitting connectable non-directional broadcast packets for the duration of transmission. This time is the synchronization time between the data listening end and the first data sending end. This application does not limit how the synchronization time between the data listening end and the first data sending end is determined.
[0040] Step S2: Calculate the clock drift amount of the actual packet reception time of the first data packet received in the second connection event relative to its theoretical packet reception time.
[0041] The theoretical packet reception time is the sum of the synchronization time and N times the connection interval, where N is the number of connection events from the first connection event to the second connection event, and the second connection event is the connection event after the first connection event.
[0042] Specifically, in the Bluetooth Low Energy data communication connection event, the central role of data communication sends the first data packet first. That is, after the Bluetooth Low Energy data communication is established, the central role of data communication sends the first data packet.
[0043] In this embodiment, during the second connection event of the connection event where the synchronization time T1 of correctly receiving the data packet is determined, the first data packet is received. This embodiment records the actual reception time of the first data packet, which is obtained through actual measurement. Furthermore, this embodiment calculates the theoretical reception time of the first data packet, which is the sum of T1 and the connection interval.
[0044] It is worth noting that N represents the number of connection events from the first connection event to the second connection event. That is, if the first connection event, where the synchronization time T1 determines that the data packet has been correctly received, is the first connection event, and the first data packet is received in the second connection event following the first connection event, and the second connection event is the next two connection events after the first connection event, then there are a total of 2 connection events from the first connection event to the second connection event, meaning N is 2. Therefore, the theoretical packet reception time for the first data packet is the sum of T1 and twice the connection interval. Similarly, if the first data packet is received in the Nth connection event after the first connection event (i.e., the second connection event), where the synchronization time T1 determines that the data packet has been correctly received, then the theoretical packet reception time for the first data packet is the sum of T1 and N times the connection interval.
[0045] This application embodiment further calculates the clock drift of the actual packet reception time of the first data packet relative to its theoretical packet reception time, that is, the difference between the actual measured packet reception time and the theoretically calculated packet reception time of the first data packet.
[0046] Taking Bluetooth Low Energy (BLE) digital communication as an example, the central data communication role and the peripheral data communication role send data packets to each other to achieve data communication. The data listening end receives data packets to monitor the data communication. The central data communication role has control over the clock of the entire connection. The peripheral data communication role needs to receive the data packet from the central data communication role first. After the transmission inter-frame pacing (TIFS) following the first data packet in the connection event, the second data packet received by the data listening end is the data packet sent by the peripheral data communication role. Specifically, the TIFS of BLE digital communication is 150µs. The transmission duration of the first data packet sent by the central data communication role determines the transmission duration of the first data packet sent by the peripheral data communication role. That is, the transmission duration of the first data packet sent by the central data communication role plus the 150µs TIFS equals the transmission duration of the first data packet sent by the peripheral data communication role. It should be understood that in the connection event, the first data packet sent by the central data communication role is the first packet in the connection event, and the first data packet sent by the peripheral data communication role is the second packet in the connection event.
[0047] Step S3: Determine the sender of the first received data packet and whether to update the synchronization time based on whether the clock drift is less than the sum of the empty packet transmission time and the inter-frame interval.
[0048] Specifically, step S3 is as follows: if the clock drift is less than the sum of the empty packet transmission time and the transmission frame interval, then the sender of the first received data packet is determined to be the central role in data communication, and the reception time of the first received data packet is recorded as the updated synchronization time.
[0049] Specifically, the central role in data communication can send various types of data packets, among which the shortest transmission time is for empty packets. The transmission time of empty packets at various physical layer transmission speeds (PHY) is shown in Table 1.
[0050] Table 1
[0051] Phy Fisrst Empty Packet Transmit Time(us) Second Packet Transmit Time From First Packet(us) 1M 80 230 2M 44 194 Coded Physics (S=2) 462 612 Coded Physics (S=8) 720 870
[0052] Referring to Table 1, at a 1M physical layer transmission speed, the transmission time for the central data communication role to send the first data packet (the first packet in the first connection event) is 80µs (First Empty Packet Transmit Time). Since this first data packet is empty, the time for the peripheral data communication role to send the first data packet (the second packet in the first connection event) is 230µs (Second Empty Packet Transmit Time) after the central data communication role sends the first data packet. At a 2M physical layer transmission speed, the transmission time for the central data communication role to send the first data packet is 44µs, and the time for the peripheral data communication role to send the first data packet is 194µs after the central data communication role sends the first data packet. For each physical layer transmission speed in Table 1, the sum of the transmission times of the central data communication role sending the first data packet (the first packet in the first connection event) and the inter-frame interval of 150µs gives the transmission time of the peripheral data communication role sending the first data packet (the second packet in the first connection event).
[0053] Among them, with a physical layer transmission speed of 2M, the transmission time of the peripheral data communication role sending the first data packet (the second data packet in the first connection event) after the central data communication role sends the first data packet (the first packet in the first connection event) is the shortest, which is 194us.
[0054] Specifically, the data monitoring end obtains the clock precision of the central role in data communication. For example, the clock precision of the central role in data communication can be obtained at the initial stage of the data monitoring end's creation. The size of the receiving time window opened by the data monitoring end (i.e., the time window precision) is jointly determined by the clock precision of the central role in data communication and the data monitoring end. For example, in this embodiment of the application, the clock precision of both the central role in data communication and the data monitoring end is 500 PPM. With a physical layer transmission speed of 2M, the clock drift between the actual packet reception time and the theoretical packet reception time of the data monitoring end receiving the first data packet in the receiving time window of the second connection event is only 194µs in the worst case. At this time, the synchronization difference between the two correctly received data packets in the worst case is 194ms, i.e., 194µs ÷ (500 + 500) PPM = 194ms. Among them, the clocks of the central role in data communication and the data monitoring end drift 500 PPM in opposite directions.
[0055] Therefore, with a 2M physical layer transmission speed, if the synchronization time difference between two correctly received data packets at the data listening end is less than 194ms, then the calculated clock drift between two adjacent connection events must be less than 194us. When the connection interval between the central and peripheral roles in data communication is less than 194ms, if the clock drift of the data listening end receiving the second data packet relative to the first data packet is less than 194us, it indicates that the data listening end received the first data packet in that connection event (i.e., the data packet sent by the central role in data communication); if the clock drift of the data listening end receiving the second data packet relative to the first data packet is greater than 194us, it indicates that the data listening end received the second data packet (i.e., the data packet sent by the peripheral role in data communication).
[0056] Therefore, the data monitoring end can determine whether the first received data packet was sent by the central data communication role or a peripheral data communication role based on the clock drift of the second received data packet relative to the first received data packet. Typically, the clock accuracy of both the central data communication role and the data monitoring end will not reach such a low level as 500 PPM. Furthermore, referring to Table 1, at a 1M physical layer transmission speed or a coded physical layer transmission speed, the transmission time of the first data packet is longer. Therefore, the transmission time of the peripheral data communication role sending the second data packet after receiving the first data packet from the central data communication role will be greater than 194 µs. Therefore, this embodiment of the application determines the sender of the first received data packet and whether to update the synchronization time by checking whether the clock drift of the actual reception time of the first data packet received in the second connection event relative to its theoretical reception time is less than the sum of the empty packet and the inter-frame interval.
[0057] Therefore, the clock drift amount between the actual reception time of the first data packet received in this application embodiment and its theoretical reception time distinguishes the sender of the first received data packet, reducing data communication monitoring errors and improving the stability of data communication monitoring. Furthermore, this application embodiment has no compatibility issues and good adaptability.
[0058] In some specific implementations of the embodiments of this application, step S3 includes:
[0059] Step S31: If the clock drift is less than the sum of the empty packet transmission time and the transmission frame interval, then the sender of the first received data packet is determined to be the central role in data communication, and the reception time of the first received data packet is recorded as the updated synchronization time.
[0060] If the clock drift is less than the sum of the empty packet transmission time and the inter-frame interval, then the sender of the first data packet in the connection event is determined to be the central role in data communication.
[0061] In some specific implementations of the embodiments of this application, step S3 further includes:
[0062] Step S32: If the clock drift is greater than or equal to the sum of the empty packet transmission duration and the inter-frame interval, then return to step S2.
[0063] If the clock drift is greater than or equal to the sum of the empty packet transmission duration and the inter-frame interval, it is determined that the first data packet received by the data listening end in the connection event was not sent by the central role in data communication, indicating a data communication packet reception error. Due to the data communication packet reception error, the synchronization time between the data listening end and the central role in data communication is not updated, and the process returns to step S2.
[0064] In some specific implementations of the embodiments of this application, step S3 further includes:
[0065] Step S33: If the time interval between the actual reception time of the received data packet and the synchronization time is greater than or equal to the judgment interval, then the synchronization time is re-determined.
[0066] The judgment interval can be set based on the cumulative value of the empty packet transmission duration and the inter-frame interval and the clock precision of both parties. For example, in Table 1, when the PHY is 2M, the empty packet transmission duration is 44us and the inter-frame interval (TIFS) is 150us. Then the cumulative value of the empty packet transmission duration and the inter-frame interval is 194us. If the clock precision of both parties is 500PPM, then the judgment interval can be set to 194ms, that is, 194us ÷ (500 + 500)PPM = 194ms.
[0067] If the actual packet reception time of the received data packet is greater than or equal to the time interval between the synchronization time and the judgment interval, it means that it is impossible to determine whether the received data packet is the first or second data packet in the connection event, so the synchronization time needs to be re-determined.
[0068] Specifically, the synchronization time is redefined, including:
[0069] The synchronization time is redefined by using either two consecutive empty packet transmission durations or by transmitting connectable non-directional broadcast type packets with empty packet transmission durations.
[0070] In this embodiment of the application, the synchronization time of the first correctly received data packet in the first connection event is determined by the above method. Then, by comparing the clock drift of the actual packet reception time of the first data packet in the next connection time with its theoretical packet reception time, the cumulative value of the empty packet transmission time and the transmission inter-frame interval, the sender of the first received data packet and whether to update the synchronization time can be determined.
[0071] The embodiments of this application further ensure that when the first correctly received data packet is not at the correct synchronization time, the synchronization time needs to be re-determined to ensure the accuracy and executability of data communication monitoring.
[0072] In some specific implementations of the embodiments of this application, step S31 further includes:
[0073] Step S311: Obtain the received signal strength indication.
[0074] Specifically, in the application scenario of a car digital key system, if the central role of data communication in Bluetooth Low Energy data communication is the central node of the vehicle's central control system and the mobile terminal is the peripheral role of data communication, then the anchor node (data listening end) obtains the received signal strength indication based on the data packets received from the mobile terminal (data communication peripheral role); if the peripheral role of data communication in Bluetooth Low Energy data communication is the central node of the vehicle's central control system and the mobile terminal is the central role of data communication, then the anchor node (data listening end) obtains the received signal strength indication based on the data packets received from the mobile terminal (data communication central role).
[0075] In some specific implementations of the embodiments of this application, step S31 further includes:
[0076] Step S312: Perform distance measurement based on the received signal strength indication.
[0077] Specifically, in the application scenario of a car digital key system, if the central role of data communication in Bluetooth Low Energy data communication is the central node of the vehicle's central control system, and the mobile terminal is the peripheral role of data communication, then the anchor node (data listening end) obtains the received signal strength indication based on the data packets received from the mobile terminal (data communication peripheral role) to achieve distance measurement; if the peripheral role of data communication in Bluetooth Low Energy data communication is the central node of the vehicle's central control system, and the mobile terminal is the central role of data communication, then the anchor node (data listening end) obtains the received signal strength indication based on the data packets received from the mobile terminal (data communication central role) to achieve distance measurement.
[0078] The implementation of the embodiments of this application is further illustrated below through a specific application example.
[0079] For example, in this application paradigm, the connection interval for connection events between the central and peripheral roles in data communication is 50ms.
[0080] See Figure 3 The application example includes the following steps:
[0081] Step 301: Determine the synchronization time T1 when the data packet is correctly received for the first time in the first connection event.
[0082] Step 302: Receive the first data packet in the second connection event.
[0083] Step 303: Calculate the clock drift amount of the actual packet reception time of the first data packet received in the second connection event relative to its theoretical packet reception time.
[0084] Specifically, the theoretical packet reception time is T1+50ms. The hardware will automatically record the actual packet reception time T2 of the first data packet received in the second connection event. Then, the clock drift clk_drift = T2 – (T1+50).
[0085] Step 304: Determine whether the clock drift is less than the sum of the empty packet transmission duration and the inter-frame interval.
[0086] Step 305: If yes, then determine that the sender of the first received data packet is the central role of data communication, and record the reception time of the first received data packet as the updated synchronization time T1.
[0087] Step 306: If not, determine whether the time interval between the actual packet reception time and the synchronization time of the received data packet is greater than or equal to the judgment interval.
[0088] If not, return to step 302. If yes, return to step 301.
[0089] Specifically, if the clock drift clk_drift is greater than or equal to the sum of the empty packet transmission duration and the inter-frame interval, the received packet is not the actual first data packet of the connection event. That is, the sender of the first received data packet is not the central role in data communication. Do not report the received signal strength indication, nor update the synchronization time T1, and then proceed with the subsequent packet reception of the second connection event.
[0090] If no data packets are received or incorrect data packets are received in several consecutive connection events, and the time interval between the actual packet reception time and the synchronization time is greater than or equal to the judgment interval, then a new synchronization time T1 needs to be determined. This can be done by using two consecutive empty packet transmission durations or by transmitting a connectable non-directional broadcast type packet with an empty packet transmission duration.
[0091] For the methods described above, please refer to [link / reference]. Figure 4 This application also provides a data communication monitoring device, applied at a data monitoring end, wherein a central data communication role and a peripheral data communication role send data packets to each other to achieve data communication, and the data monitoring end receives data packets to achieve data communication monitoring. The device includes:
[0092] The determination module 401 is used to determine the synchronization time when the data packet is correctly received for the first time in the first connection event. The synchronization time is the synchronization time between the data listening end and the central role of data communication.
[0093] The calculation module 402 is used to calculate the clock drift of the actual packet reception time of the first data packet received in the second connection event relative to its theoretical packet reception time. The theoretical packet reception time is the sum of the synchronization time and N times the connection interval, where N is the number of connection events from the first connection event to the second connection event, and the second connection event is the connection event after the first connection event.
[0094] The comparison module 403 is used to determine the sender of the first received data packet and whether to update the synchronization time based on whether the clock drift is less than the sum of the empty packet transmission time and the transmission frame interval.
[0095] For the methods described above, see [link to relevant documentation]. Figure 5 This application also provides a data communication monitoring system, including a central data communication role, a peripheral data communication role, and a data monitoring terminal. The central data communication role and the peripheral data communication role send data packets to each other to achieve data communication. The data monitoring terminal receives data packets to achieve data communication monitoring. The data monitoring terminal executes the above-described method.
[0096] Specific embodiments of the subject matter have now been described. Other embodiments are within the scope of the appended claims. In some cases, the actions described in the claims can be performed in a different order and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing can be advantageous.
[0097] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, 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, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.
[0098] The controller can be implemented in any suitable manner. For example, it 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 Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0099] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can 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 any combination of these devices.
[0100] For ease of description, the above devices are described separately by function as various units. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware.
[0101] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0102] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0103] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0104] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0105] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0106] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0107] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, 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 technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0108] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0109] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0110] This application can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific transactions or implement specific abstract data types. This application can also be practiced in distributed computing environments where transactions are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0111] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0112] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A data communication monitoring method, applied to a data monitoring end, a data communication central role and a data communication peripheral role send data packets to each other to realize data communication, and the data monitoring end receives the data packets to realize data communication monitoring, characterized in that, The method comprises: determining a synchronization time of a first correct reception of a data packet in a first connection event, the synchronization time being a synchronization time between the data monitoring terminal and the data communication central role; calculating a clock drift of an actual packet reception time of a first received data packet in a second connection event relative to a theoretical packet reception time, the theoretical packet reception time being a sum of the synchronization time and N times of a connection interval, where N is a number of connection events from the first connection event to the second connection event, and the second connection event is a connection event after the first connection event; determining a sender of the first received data packet and whether to update the synchronization time according to whether the clock drift is less than a sum of a null packet transmission time length and a transmission interframe interval; the determining a sender of the first received data packet and whether to update the synchronization time according to whether the clock drift is less than a sum of a null packet transmission time length and a transmission interframe interval comprises: if the clock drift is less than the sum of the null packet transmission time length and the transmission interframe interval, determining that the sender of the first received data packet is the data communication central role, and recording a packet reception time of the first received data packet as the updated synchronization time.
2. The data communication interception method of claim 1, wherein, the determining a sender of the first received data packet and whether to update the synchronization time according to whether the clock drift is less than a sum of a null packet transmission time length and a transmission interframe interval further comprises: if the clock drift is greater than or equal to the sum of the null packet transmission time length and the transmission interframe interval, returning to the calculating a clock drift of an actual packet reception time of a first received data packet in a second connection event relative to a theoretical packet reception time.
3. The data communication interception method of claim 2, wherein, the returning to the calculating a clock drift of an actual packet reception time of a first received data packet in a second connection event relative to a theoretical packet reception time if the clock drift is greater than or equal to the sum of the null packet transmission time length and the transmission interframe interval further comprises: if a time interval of an actual packet reception time of a received data packet relative to the synchronization time is greater than or equal to a judgment interval, re-determining the synchronization time.
4. The data communication interception method of claim 3, wherein, the judgment interval is set according to a sum of the null packet transmission time length and the transmission interframe interval, clock accuracies of the data communication central role and the data communication peripheral role.
5. The data communication interception method of claim 4, wherein, the re-determining the synchronization time comprises: re-determining the synchronization time by using a mode of transmitting a continuous two null packet transmission time lengths or a connectable non-directional broadcast type packet and a null packet transmission time length.
6. The data communication interception method of claim 1, wherein, the determining that the sender of the first received data packet is the data communication central role and recording a packet reception time of the first received data packet as the updated synchronization time further comprises: obtaining a received signal strength indication.
7. The data communication interception method of claim 6, wherein, the obtaining the received signal strength indication between the data monitoring terminal and the data communication central role according to the first received data packet further comprises: realizing ranging according to the received signal strength indication.
8. The data communication interception method of claim 7, wherein, The data monitoring end is an anchor node, and if the data communication central role is a central node and the data communication peripheral role is a mobile terminal, or if the data communication central role is a mobile terminal and the data communication peripheral role is a central node.
9. A data communication monitoring device, applied to a data monitoring end, a data communication central role and a data communication peripheral role send data packets to each other to realize data communication, and the data monitoring end receives the data packets to realize data communication monitoring, characterized in that, The apparatus comprises: a determination module configured to determine a synchronization time at which a data packet is correctly received for the first time in a first connection event, the synchronization time being a synchronization time between the data monitoring end and the data communication central role; a calculation module configured to calculate a clock drift amount of an actual packet receiving time of a first data packet received in a second connection event relative to a theoretical packet receiving time, the theoretical packet receiving time being an accumulation of the synchronization time and N times of a connection interval, where N is a number of connection events from the first connection event to the second connection event, and the second connection event is a connection event after the first connection event; a comparison module configured to determine a sender of the received first data packet and whether to update the synchronization time according to whether the clock drift amount is less than an accumulation of a null packet transmission time length and a transmission interframe interval; the determination of the sender of the received first data packet and whether to update the synchronization time according to whether the clock drift amount is less than the accumulation of the null packet transmission time length and the transmission interframe interval comprises: if the clock drift amount is less than the accumulation of the null packet transmission time length and the transmission interframe interval, determining that the sender of the received first data packet is the data communication central role, and recording a packet receiving time of the received first data packet as the updated synchronization time.
10. A data communication monitoring system comprising a data communication central role, a data communication peripheral role, and a data monitoring end, the data communication central role and the data communication peripheral role sending data packets to each other to implement data communication, and the data monitoring end receiving the data packets to implement data communication monitoring, the data monitoring end performing the method of any one of claims 1-8.
Citation Information
Patent Citations
Data receiving method and device based on Bluetooth BLE connection mode
CN114710255A
Data communication monitoring method, device and system
CN117580130A