Data synchronization method and related device

By detecting and adjusting the data frame field configuration in short-distance wireless communication, the problems of low measurement accuracy when the channel environment is harsh and high power consumption when the signal quality is good in the prior art are solved, and the communication configuration is automatically adjusted to improve the accuracy and Power saving effect.

CN115119186BActive Publication Date: 2024-11-26GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110287248.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-17
Publication Date
2024-11-26
Estimated Expiration
2041-03-17

AI Technical Summary

Technical Problem

The existing short-distance wireless communication technology cannot automatically adjust the communication configuration according to environmental factors, resulting in low measurement accuracy when the channel environment is harsh and high power consumption when the signal quality is good.

Method used

By detecting the field configuration of the data frame sent by the target device, if it does not meet the preset symbol length, adjust the field configuration to determine the new data frame, and perform short-distance wireless communication interaction, and automatically adjust the length of the preset field to match the signal quality Status to ensure measurement accuracy and power saving.

Benefits of technology

Automatically determine the optimal communication configuration based on the communication quality status, improving measurement accuracy and power efficiency of communication interaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115119186B_ABST
    Figure CN115119186B_ABST
Patent Text Reader

Abstract

The present application provides a data synchronization method and related devices, firstly, detecting a first field configuration of a first data frame from a target device, wherein the first field configuration includes a first length of a preset field; when the first length does not conform to a preset symbol length, adjusting the first field configuration to a second field configuration to determine a second data frame, wherein the length of the preset field in the second field configuration is the preset symbol length; finally, performing short-range wireless communication interaction of the second data frame with the target device, so that the electronic device and the target device adjust the length of the preset field to the preset symbol length. The optimal communication configuration can be automatically determined according to the communication quality status of the short-range wireless communication to ensure the accuracy of the communication interaction and save the power consumed by the communication interaction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of wireless short-range communication, and in particular to a data synchronization method and related devices. Background Art

[0002] With the development of existing technologies, the application of short-range wireless communication technology is becoming more and more extensive. Existing short-range wireless communication technologies include ultra-wideband communication, etc. In the process of communication interaction, current short-range wireless communication technologies often use fixed communication configurations and cannot automatically adjust the communication configurations according to environmental factors. For example, when it is necessary to measure the arrival angle of the target device relative to the electronic device, the ultra-wideband communication interaction with fixed configuration may result in the final measured arrival angle being of low accuracy due to the harsh channel environment, the long communication distance, etc. It can also be because. It can be seen that the existing short-range wireless communication is not flexible enough and cannot fully adapt to the current communication interaction needs. Summary of the invention

[0003] Based on the above problems, the present application proposes a data synchronization method and related devices, which can automatically determine the optimal communication configuration according to the communication quality status of short-range wireless communication to ensure the accuracy of communication interaction and save the power consumed by communication interaction.

[0004] In a first aspect, an embodiment of the present application provides a data synchronization method, which is applied to an electronic device and includes:

[0005] Detecting a first field configuration of a first data frame from a target device, wherein the first field configuration includes a first length of a preset field;

[0006] When the first length does not conform to a preset symbol length, adjusting the first field configuration to a second field configuration to determine a second data frame, wherein the length of the preset field in the second field configuration is the preset symbol length;

[0007] Perform short-range wireless communication interaction of the second data frame with the target device, so that the electronic device and the target device adjust the length of the preset field to the preset symbol length.

[0008] In a second aspect, an embodiment of the present application provides a data synchronization device, which is applied to an electronic device, including:

[0009] A detection unit, configured to detect a first field configuration of a first data frame from a target device, wherein the first field configuration includes a first length of a preset field;

[0010] An adjusting unit, configured to adjust the first field configuration to a second field configuration to determine a second data frame when the first length does not conform to a preset symbol length, wherein the length of the preset field in the second field configuration is the preset symbol length;

[0011] A synchronization unit is used to perform short-range wireless communication interaction of the second data frame with the target device, so that the electronic device and the target device adjust the length of the preset field to the preset symbol length.

[0012] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing the steps in the first aspect of the embodiment of the present application.

[0013] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps described in the first aspect of the embodiment of the present application.

[0014] In a fifth aspect, an embodiment of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps described in the first aspect of the embodiment of the present application. The computer program product may be a software installation package.

[0015] It can be seen that through the above data synchronization method and related devices, first, the first field configuration of the first data frame from the target device is detected, and the first field configuration includes a first length of a preset field; when the first length does not meet the preset symbol length, the first field configuration is adjusted to a second field configuration to determine a second data frame, and the length of the preset field in the second field configuration is the preset symbol length; finally, the short-range wireless communication interaction of the second data frame is performed with the target device, so that the electronic device and the target device adjust the length of the preset field to the preset symbol length. The optimal communication configuration can be automatically determined according to the communication quality status of the short-range wireless communication to ensure the accuracy of the communication interaction and save the power consumed by the communication interaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.

[0017] Figure 1A A schematic diagram of an application scenario of an arrival angle measurement method provided in an embodiment of the present application;

[0018] Figure 1B A schematic diagram of an application scenario of another arrival angle measurement method provided in an embodiment of the present application;

[0019] Figure 1C A schematic diagram of the composition of a short-range wireless communication data frame provided in an embodiment of the present application;

[0020] Figure 1D A schematic diagram of a standard deviation curve of a signal quality state and a measurement angle provided in an embodiment of the present application;

[0021] Figure 2 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0022] Figure 3 A schematic diagram of a flow chart of an angle of arrival measurement method provided in an embodiment of the present application;

[0023] Figure 4 A schematic diagram of a flow chart of another method for measuring angle of arrival provided in an embodiment of the present application;

[0024] Figure 5 A block diagram of the functional units of an arrival angle measurement device provided in an embodiment of the present application;

[0025] Figure 6 A block diagram of the functional units of another arrival angle measurement device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0027] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0028] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0029] In order to better understand the solutions of the embodiments of the present application, the relevant terms and concepts that may be involved in the embodiments of the present application are first introduced below.

[0030] Short-range wireless communication: including Bluetooth communication, Wi-Fi communication, ultra-wideband UWB (Ultra Wide Band, UWB) communication, ZigBee communication, etc. In the embodiments of the present application, UWB communication positioning and measuring the angle of arrival (Angle of Arrival, AOA) of the target device are mainly used for explanation.

[0031] UWB communication: It is a method of wireless communication that uses pulses with extremely short time intervals (less than 1ns) without using a carrier. In the embodiment of the present application, UWB communication positioning can be performed, including using UWB to determine the relative distance between the electronic device and the target device and using UWB to determine the angle of arrival (AOA) of the target device relative to the electronic device; generally, two-way ranging (Two-Way Ranging, TWR) is used for ranging, and TWR includes a single-sided two-way ranging (Single-Sided Two-Way Ranging, SS-TWR) algorithm and a double-sided two-way ranging (Double-Sided Two-Way Ranging, DS-TWR) algorithm; the method for calculating AOA generally uses a phase difference of arrival (PDOA) algorithm for calculation.

[0032] Specifically, in the SS-TWR algorithm, the electronic device sends a UWB signal to the target device once, and the target device responds to the UWB signal and feeds back a UWB signal to the electronic device. This process can be called a UWB communication interaction in SS-TWR, and only two messages need to be exchanged between the electronic device and the target device. In the DS-TWR algorithm, the target device sends a UWB signal to the electronic device once, and the electronic device sends a UWB signal to the target device once. At the same time, the electronic device also responds to the UWB signal of the target device and feeds back a UWB signal to the target device once. Then, the target device responds to the UWB signal sent by the electronic device and feeds back a UWB signal to the electronic device once. In this way, a UWB communication interaction in DS-TWR is completed. The electronic device and the target device need to exchange four messages. Since the electronic device sends the UWB signal and responds to the UWB signal of the target device successively, these two messages can be combined into one message, that is, the electronic device and the target device need to exchange three messages. Since the number of message exchanges in the process is reduced, the ranging time is reduced on the one hand, and the ranging power consumption is reduced on the other hand, without affecting the ranging accuracy.

[0033] Specifically, the PDOA algorithm requires that the electronic device be equipped with two antennas with a specific distance between them. The electronic device can measure the phase of the UWB signal of the target device received by the first antenna and the second antenna, thereby calculating the phase difference PDOA, and further calculate the distance between the antenna of the target device and the first antenna and the second antenna through PDOA, and further calculate the arrival angle AOA of the target device relative to the electronic device.

[0034] The above-mentioned distance measurement method and arrival angle measurement method can refer to the existing technology and will not be described in detail here.

[0035] However, in the existing technology, since a fixed communication configuration is used in UWB communication, the communication configuration cannot be dynamically adjusted when the signal quality is poor, resulting in inaccurate AOA results obtained from the final communication interaction measurement. In addition, the communication configuration cannot be dynamically adjusted when the signal quality is very good, resulting in high power consumption in the communication interaction.

[0036] To solve the above problems, the embodiments of the present application provide a data synchronization method and related devices, which can dynamically select the communication configuration according to the quality of the UWB signal in the early stage, and synchronize the appropriate communication configuration to the electronic device and the target device, which can not only ensure the accuracy of the AOA obtained by subsequent measurements, but also save power consumption during the communication interaction process.

[0037] like Figure 1A As shown, Figure 1AAn application scenario diagram of a data synchronization method provided in an embodiment of the present application, taking UWB communication in short-range wireless communication as an example, it can be seen that based on SS-TWR, a communication interaction process is: the electronic device sends a UWB signal to the target device; the target device feeds back the UWB signal to the electronic device. It can be understood that each communication interaction process can be monitored in real time to determine its signal quality status. When the signal quality status matches the current communication configuration, the arrival angle of the target device relative to the electronic device can be measured based on PDOA, which will not be repeated here; when the signal quality status does not match the current communication configuration, that is, the Kth communication interaction process finds an abnormality, K is a natural number greater than or equal to 1, and the communication configuration data that needs to be adjusted can be automatically determined. The communication configuration data may include the length of the preset field in the UWB data frame. It should be noted that the length of the preset field will affect the sensitivity of the electronic device and the target device to receive the UWB signal, the AOA measurement accuracy, and the communication power consumption, etc., which will be described in detail below. After determining the adjusted communication configuration data, the K+1th communication interaction can be performed. As shown in the figure, the electronic device sends a UWB signal containing the adjusted communication configuration data to the target device. After receiving the signal, the target device can directly make corresponding communication configuration adjustments and send a feedback signal to the electronic device to indicate that the adjusted communication configuration data has been received. After receiving the feedback signal, the electronic device synchronously adjusts its own communication configuration data to the adjusted communication configuration data. In this way, the K+2th communication interaction can be performed to determine the arrival angle of the target device relative to the electronic device, thereby ensuring the measurement accuracy while preventing waste of power consumed by the communication interaction.

[0038] The above is the UWB communication interaction process based on SS-TWR. Figure 1BThe application scenario of another data synchronization method in the embodiment of the present application is described. Based on DS-TWR, it can be seen that at this time, a communication interaction process is: the target device sends a UWB signal to the electronic device; the electronic device sends a UWB signal to the target device, and at the same time, the electronic device feeds back a UWB signal to the target device; the target device feeds back a UWB signal to the electronic device. It can be understood that each communication interaction process can be monitored in real time to determine its signal quality status. When the signal quality status matches the current communication configuration, the angle of arrival of the target device relative to the electronic device can be measured based on PDOA, which will not be repeated here; when the signal quality status does not match the current communication configuration, that is, the Kth communication interaction process finds an abnormality, K is a natural number greater than or equal to 1, and the communication configuration data that needs to be adjusted can be automatically determined. The communication configuration data may include the length of the preset field in the UWB data frame. It should be noted that the length of the preset field will affect the sensitivity of the electronic device and the target device to receive the UWB signal, the AOA measurement accuracy, and the communication power consumption, etc., which will be described in detail below. After determining the adjusted communication configuration data, the K+1th communication interaction can be executed. As shown in the figure, the target device sends a UWB signal to the electronic device; the electronic device sends a UWB signal containing the adjusted communication configuration data to the target device. After receiving the signal, the target device can directly make corresponding communication configuration adjustments and send a feedback signal to the electronic device to indicate that the adjusted communication configuration data has been received. After receiving the feedback signal, the electronic device synchronously adjusts its own communication configuration data to the adjusted communication configuration data. In this way, the K+2th communication interaction can be executed to determine the arrival angle of the target device relative to the electronic device, thereby ensuring the measurement accuracy while ensuring that the power consumed by the communication interaction is not wasted.

[0039] It can be understood that the above-mentioned UWB signal can be equivalent to the UWB data frame, and the above-mentioned application scenario is an exemplary description. There is no distinction between good and bad, and it can be flexibly switched according to actual conditions, and no specific limitation is made here.

[0040] Combine the following Figure 1C The UWB frame structure in the embodiment of the present application is described. Figure 1C A schematic diagram of the composition of a short-range wireless communication data frame provided in an embodiment of the present application, wherein the fields of the UWB data frame include SYNC, SFD, PHR, Payload, and STS.

[0041] The SYNC part is also called the synchronization code Preamble part, which is used for frame synchronization. It is expanded from a periodic autocorrelation code into a symbol. The length specified by the protocol is 16 / 64 / 1024 / 4096 symbols.

[0042] The SFD (Start of Frame Delimiter) part is used for timestamp detection.

[0043] The physical layer PHR (PHY header) is used to record the frame format, communication function, checksum, etc.

[0044] The Payload part carries the specific content of the communication.

[0045] The Scrambled Timestamp Sequence (STS) part is a pseudo-random pulse sequence generated by the AES-128 encryption algorithm, which is used for timestamp encryption and is an important part for PDoA measurement. The protocol stipulates that the STS length is 16 / 32 / 64 / 128 / 256 symbols.

[0046] The embodiment of the present application mainly adjusts the STS length and the SYNC length. The STS length affects the accuracy of measuring the arrival angle, and the SYNC affects the sensitivity of receiving the UWB signal.

[0047] Specifically, Figure 1D As shown, Figure 1D It is a curve of the UWB signal quality parameter (the proportion of qualified symbols in the STS part) and the PDoA standard deviation measured by the electronic device. The smaller the PDoA standard deviation, the more stable the PDoA measurement value, which is beneficial to improve the measurement stability of AoA. The proportion of qualified symbols in the STS part can be calculated automatically, which will not be repeated here. It can be seen that the larger the proportion of qualified symbols in the STS part, the better the signal quality. However, the STS length cannot be increased indefinitely, because the SYNC part and the STS part occupy the main part of the UWB frame in time. The longer the length of the two, the longer the UWB frame, the longer the sending time and the receiving time, and the greater the power consumption of the UWB system. Conversely, the shorter the length of the two, the shorter the UWB frame, the shorter the sending time and the receiving time, and the lower the power consumption of the UWB system. Through the data synchronization method of the present application, the balance between power consumption and accuracy can be guaranteed.

[0048] Furthermore, the following is combined Figure 2 The electronic device in the embodiment of the present application is described. Figure 2 A structural schematic diagram of an electronic device provided in an embodiment of the present application, the electronic device 110 includes a processor 111, a memory 112, a UWB module 113, a first antenna 114 and a second antenna 115, the memory 112 is connected to the processor 111, the processor 111 is connected to the UWB module 113, and the UWB module 113 is connected to the first antenna 114 and the second antenna 115.

[0049] The above-mentioned UWB module 113 can be a UWB chip, including a microcontroller unit (MCU), etc., which is used to control the working status of the first antenna 114 and the second antenna 115, and can also be used to process the received UWB signal. Specifically, the above-mentioned UWB chip can receive the data packet loaded on the UWB wireless signal from the target device 120 through the first antenna 114 and the second antenna 115, and further perform internal processing to obtain PDOA data. The processor 111 can call the relevant program of the memory 112 to detect whether the length of the preset field of the UWB frame needs to be modified. When the length of the preset field needs to be modified, the length of the modified preset field is determined, and the length of the modified preset field is synchronized between itself and the target device. After the communication configuration is adjusted, the arrival angle can be further calculated. I will not go into details here.

[0050] In the embodiment of the present application, the target device is an electronic device with a short-range wireless communication function, and its structure can refer to the description of the electronic device 100 and is not specifically limited here.

[0051] The above is a description of the application scenario and system hardware. Figure 3 A data synchronization method in an embodiment of the present application is described. Figure 3 A flowchart of a data synchronization method provided in an embodiment of the present application is applied to an electronic device and specifically includes the following steps:

[0052] Step 301: Detect a first field configuration of a first data frame from a target device.

[0053] The first data frame may be a UWB frame, the first field configuration may include a first length of a preset field, and the preset field may include an STS field in the UWB frame.

[0054] Specifically, the electronic device and the target device may communicate and interact based on SS-TWR or DS-TWR, which is not specifically limited here. The electronic device may receive a first data frame from the target device and perform detection.

[0055] In a possible embodiment, the detection steps are as follows:

[0056] The electronic device obtains a first data frame from the target device through UWB communication.

[0057] Next, the signal quality parameters of the electronic device and the target device are determined according to the first data frame. The signal quality parameters may include the arrival phase difference PDoA quality parameters. Specifically, the PDoA quality parameters may be calculated by any one or any combination of the qualified field ratio, such as the proportion of STS qualified symbols, signal strength, and signal-to-noise ratio. For example, when the qualified field ratio is between 90% and 100%, the quality is good; when it is between 60% and 90%, the quality is average; when it is less than 60%, the quality is poor. When the signal strength is greater than -82dBm, the quality is good; when it is between -90% and -82dBm, the quality is average; when it is less than -90dBm, the quality is poor. When the signal-to-noise ratio is greater than 10dB, the quality is good; when it is between 3 and 10dB, the quality is average; when it is less than 3dB, the quality is poor. The above is only an exemplary description and does not represent a specific limitation on the embodiments of the present application.

[0058] Specifically, the qualified field ratio weight, signal strength weight, and signal-to-noise ratio weight can be set. After parsing the UWB frame to obtain the STS qualified symbol ratio, signal strength, and signal-to-noise ratio, the PDoA quality parameter can be calculated using the following formula:

[0059] (STS qualified symbol ratio * qualified field ratio weight + signal strength * signal strength weight + signal-to-noise ratio * signal-to-noise ratio weight) ÷ 3

[0060] After obtaining the value of the PDoA quality parameter, further, the preset symbol length corresponding to the PDoA quality parameter can be obtained from the first mapping table, as shown in the following table:

[0061] PDoA quality parameters Preset STS length ≥Threshold 1 Length_1 <Threshold 1 and ≥Threshold 2 Length_2 <Threshold 2 (and ≥Threshold 3) Length_3 … …

[0062] First mapping table

[0063] Among them, threshold 1 is greater than threshold 2, and threshold 1 is greater than threshold 3. The larger the threshold, the better the signal quality. Length_1<Length_2<Length_3<…. It can be seen that the better the signal quality, the shorter the preset symbol length of STS.

[0064] Finally, the STS field length in the current first data frame, i.e., the first length, is compared with the preset symbol length. If the first length meets the preset symbol length, the step of measuring the angle is executed, which will not be repeated here; if the first length does not meet the preset symbol length, step 302 is executed.

[0065] In a possible embodiment, the detection step may also be as follows:

[0066] The electronic device obtains a first data frame from the target device through UWB communication.

[0067] Next, the relative distance between the electronic device and the target device can be determined based on the timestamp data in the first data frame. Specifically, the first timestamp difference between the electronic device sending the UWB signal and receiving the UWB signal can be obtained, and the second timestamp difference between the target device receiving the UWB signal and sending the UWB signal can be obtained, and then the relative distance can be determined by the following formula:

[0068] 0.5*speed of light*(difference of first timestamp - difference of second timestamp)

[0069] It is a prior art to calculate the signal flight time through the timestamp data to further determine the relative distance between the electronic device and the target device, which will not be described in detail here. After determining the relative distance, the preset symbol length corresponding to the relative distance can be obtained from the second mapping table. As shown in the following table:

[0070] Relative distance Preset STS length ≤Threshold 1 Length_1 >Threshold 1 and ≤Threshold 2 Length_2 >Threshold 2 (and ≤Threshold 3) Length_3 … …

[0071] Second mapping table

[0072] Wherein, Threshold 1 < Threshold 2 < Threshold 3, and Length_1 < Length_2 < Length_3. The larger the relative distance, the worse the signal quality, and at this time the relative distance is proportional to the preset STS length.

[0073] Finally, the STS field length in the current first data frame, i.e., the first length, is compared with the preset symbol length. If the first length meets the preset symbol length, the step of measuring the angle is executed, which will not be repeated here; if the first length does not meet the preset symbol length, step 302 is executed.

[0074] It can be seen that the signal quality status of the current communication interaction process can be flexibly determined in a variety of ways to improve the accuracy of the determined signal quality status.

[0075] Step 302: When the first length does not meet the preset symbol length, the first field configuration is adjusted to a second field configuration to determine a second data frame.

[0076] Among them, the length of the preset field in the second field configuration is the preset symbol length, the preset field includes STS, the first length includes the first STS length, and the preset symbol length includes a determined preset STS length. When the first scrambled time sequence length is different from the preset scrambled time sequence length, the length of the scrambled time sequence in the first field configuration can be adjusted to the preset scrambled time sequence length to obtain the second field configuration; and the second field configuration is written into the physical layer field, i.e., the PHR part, in the first data frame to obtain the second data frame.

[0077] In a possible embodiment, the preset field may also include a synchronization code SYNC. When the STS length is to be increased, the SYNC length may also be increased to improve the receiving sensitivity of the UWB module. However, when the STS length is to be reduced, the SYNC length may also be reduced to reduce the power consumption of UWB communication.

[0078] Specifically, when the preset symbol length is determined by the signal instruction parameter, the preset SYNC length can be obtained through the third mapping table a, as shown in the following table:

[0079] PDoA quality parameters Preset STS length Preset SYNC length ≥Threshold 1 Length_1 Length_a <Threshold 1 and ≥Threshold 2 Length_2 Length_b <Threshold 2 (and ≥Threshold 3) Length_3 Length_c … … …

[0080] The third mapping table a

[0081] Among them, threshold 1 is greater than threshold 2, and threshold 1 is greater than threshold 3. The larger the threshold, the better the signal quality. Length_1<Length_2<Length_3<…, Length_a<Length_b<Length_c<…, the preset SYNC length is the minimum value that is greater than or equal to the preset STS length, that is, Length_a is the minimum value in the SYNC configuration table that is greater than or equal to Length_1, Length_b is the minimum value in the SYNC configuration table that is greater than or equal to Length_2, Length_c is the minimum value in the SYNC configuration table that is greater than or equal to Length_3, and so on, which will not be repeated here.

[0082] Specifically, when the preset symbol length is determined by the relative distance, the preset SYNC length may be obtained by the third mapping table b, as shown in the following table:

[0083] Relative distance Preset STS length Preset SYNC length ≤Threshold 1 Length_1 Length_a >Threshold 1 and ≤Threshold 2 Length_2 Length_b >Threshold 2 (and ≤Threshold 3) Length_3 Length_c … … …

[0084] The third mapping table b

[0085] Wherein, threshold 1 < threshold 2 < threshold 3, where Length_1 < Length_2 < Length_3. The greater the relative distance, the worse the signal quality, at this time the relative distance is proportional to the preset STS length, and the preset STS length is proportional to the preset SYNC length.

[0086] Through the above steps, the second data frame can be determined, and the second data frame carries the communication configuration information that needs to be adjusted.

[0087] Step 303: Perform short-range wireless communication interaction of the second data frame with the target device, so that the electronic device and the target device adjust the length of the preset field to the preset symbol length.

[0088] The second data frame may be sent to the target device through short-range wireless communication interaction, so that the target device adjusts the length of the scrambled time sequence to the preset scrambled time sequence length, or so that the target device adjusts the length of the scrambled time sequence to the preset scrambled time sequence length and adjusts the length of the synchronization code to the preset synchronization code length;

[0089] Then, a feedback data frame is received from the target device through short-range wireless communication interaction, so that the electronic device adjusts the length of the scrambled time sequence to the preset scrambled time sequence length, or adjusts the length of the scrambled time sequence to the preset scrambled time sequence length and the length of the synchronization code to the preset synchronization code length.

[0090] It can be seen that through the above data synchronization method, first, the first field configuration of the first data frame from the target device is detected, and the first field configuration includes a first length of a preset field; when the first length does not meet the preset symbol length, the first field configuration is adjusted to a second field configuration to determine a second data frame, and the length of the preset field in the second field configuration is the preset symbol length; finally, the short-range wireless communication interaction of the second data frame is performed with the target device, so that the electronic device and the target device adjust the length of the preset field to the preset symbol length. The optimal communication configuration can be automatically determined according to the communication quality status of the short-range wireless communication to ensure the accuracy of the communication interaction and save the power consumed by the communication interaction.

[0091] Combine the following Figure 4 Another data synchronization method in an embodiment of the present application is described. Figure 4 A flow chart of another data synchronization method provided in an embodiment of the present application, which is applied to an electronic device, specifically includes the following steps:

[0092] Step 401: An electronic device performs a first UWB communication with a target device to obtain a first data frame from the target device.

[0093] The first UWB communication may be the Kth UWB communication interaction, K is a natural number greater than or equal to 1, and the first UWB communication is set as a communication interaction process in which the signal quality state does not match the current communication configuration.

[0094] Step 402: The electronic device determines a signal quality parameter and / or a relative distance according to the first data frame.

[0095] Step 403: The electronic device determines a second data frame according to a signal quality parameter or a relative distance.

[0096] Step 404: The electronic device performs a second UWB communication with the target device using the second data frame to adjust the length of the preset field to a preset symbol length.

[0097] The second UWB communication is the K+1th UWB communication interaction process.

[0098] Step 405: The electronic device performs a third UWB communication with the target device to determine an arrival angle of the target device.

[0099] The third UWB communication is the K+2th UWB communication interaction process.

[0100] Through the above method, the optimal communication configuration can be automatically determined according to the communication quality of short-range wireless communication, which greatly improves the accuracy of the measured arrival angle while also taking into account the power consumption of the communication process.

[0101] For details not described above, please refer to Figure 3 All or part of the methods described in will not be repeated here.

[0102] The above mainly introduces the scheme of the embodiment of the present application from the perspective of the execution process on the method side. It is understandable that, in order to realize the above functions, the electronic device includes a hardware structure and / or software module corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in combination with the units and algorithm steps of each example described in the embodiments provided herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.

[0103] The embodiment of the present application can divide the electronic device into functional units according to the above method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0104] In the case of dividing each functional module according to each function, the following is combined Figure 5 A data synchronization device in an embodiment of the present application is described in detail. Figure 5This is a block diagram of the functional units of a data synchronization device 500 provided in an embodiment of the present application. The device is applied to an electronic device, and the device includes:

[0105] A detection unit 510, configured to detect a first field configuration of a first data frame from a target device, wherein the first field configuration includes a first length of a preset field;

[0106] An adjusting unit 520 is configured to adjust the first field configuration to a second field configuration to determine a second data frame when the first length does not conform to a preset symbol length, wherein the length of the preset field in the second field configuration is the preset symbol length;

[0107] The synchronization unit 530 is used to perform short-range wireless communication interaction of the second data frame with the target device, so that the electronic device and the target device adjust the length of the preset field to the preset symbol length.

[0108] In the case of an integrated unit, the following combination Figure 6 Another data synchronization device 600 in an embodiment of the present application is described in detail. The device is applied to an electronic device, and the data synchronization device 600 includes a processing unit 601 and a communication unit 602, wherein the processing unit 601 is used to execute any step in the above method embodiment, and when performing data transmission such as sending, the communication unit 602 can be selectively called to complete the corresponding operation.

[0109] The data synchronization device 600 may further include a storage unit 603 for storing program codes and data. The processing unit 601 may be a microcontroller unit, the communication unit 602 may be a touch screen or a UWB antenna transceiver, and the storage unit 603 may be a memory.

[0110] The processing unit 601 is specifically used for:

[0111] Detecting a first field configuration of a first data frame from a target device, wherein the first field configuration includes a first length of a preset field;

[0112] When the first length does not conform to a preset symbol length, adjusting the first field configuration to a second field configuration to determine a second data frame, wherein the length of the preset field in the second field configuration is the preset symbol length;

[0113] Perform short-range wireless communication interaction of the second data frame with the target device, so that the electronic device and the target device adjust the length of the preset field to the preset symbol length.

[0114] It is understandable that since the method embodiment and the device embodiment are different presentation forms of the same technical concept, the content of the method embodiment part of this application should be synchronously adapted to the device embodiment part, and will not be repeated here. The above-mentioned data synchronization device 500 and the data synchronization device 600 can both execute all the data synchronization methods included in the above-mentioned embodiments.

[0115] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps of any method recorded in the above method embodiments, and the above computer includes an electronic device.

[0116] The present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps of any method described in the above method embodiment. The computer program product may be a software installation package.

[0117] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0118] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0119] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the above-mentioned units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0120] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0121] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0122] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the above-mentioned methods of each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or CD-ROM and other media that can store program codes.

[0123] A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: a flash drive, a read-only memory (English: Read-Only Memory, abbreviated as: ROM), a random access memory (English: Random Access Memory, abbreviated as: RAM), a magnetic disk or an optical disk, etc.

[0124] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. At the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A data synchronization method, characterized in that: The method is applied to an electronic device, comprising: Detecting a first field configuration of a first data frame from a target device, the first field configuration including a first length of a preset field, specifically, acquiring the first data frame from the target device through short-range wireless communication interaction; determining a relative distance between the electronic device and the target device according to timestamp data in the first data frame; determining a preset symbol length of the preset field corresponding to the relative distance in a second mapping table, wherein the relative distance in the second mapping table is proportional to the preset symbol length; and comparing the first length of the preset field with the preset symbol length; When the first length does not conform to the preset symbol length, adjusting the first field configuration to a second field configuration to determine a second data frame, wherein the length of the preset field in the second field configuration is the preset symbol length; Perform short-range wireless communication interaction of the second data frame with the target device, so that the electronic device and the target device adjust the length of the preset field to the preset symbol length.

2. The method according to claim 1, characterized in that: The detecting a first field configuration of a first data frame from a target device further includes: Acquire the first data frame from the target device through short-range wireless communication interaction; determining a signal quality parameter between the electronic device and the target device according to the first data frame; Determine the preset symbol length of the preset field corresponding to the signal quality parameter in a first mapping table, wherein the signal quality parameter in the first mapping table is inversely proportional to the preset symbol length; The first length of the preset field is compared with the preset symbol length.

3. The method according to claim 2, characterized in that The determining, according to the first data frame, a signal quality parameter between the electronic device and the target device includes: Parsing the scrambled time series in the first data frame to determine any one or any combination of a qualified field ratio, a signal strength, and a signal-to-noise ratio; The signal quality parameter is determined according to any one or any combination of the qualified field ratio, the signal strength and the signal-to-noise ratio.

4. The method according to any one of claims 1 to 3, characterized in that: The preset field includes a scrambled time sequence, the first length includes a first scrambled time sequence length, and the preset symbol length includes a preset scrambled time sequence length; When the first length does not meet the preset symbol length, adjusting the first field configuration to a second field configuration to determine a second data frame includes: When the first scrambled time sequence length is different from the preset scrambled time sequence length, adjusting the length of the scrambled time sequence in the first field configuration to the preset scrambled time sequence length to obtain the second field configuration; The second field configuration is written into the physical layer field in the first data frame to obtain the second data frame.

5. The method according to claim 4, characterized in that The preset field also includes synchronization coding; when the first length does not conform to the preset symbol length, adjusting the first field configuration to a second field configuration to determine a second data frame includes: When the first scrambled time sequence length is different from the preset scrambled time sequence length, adjusting the length of the scrambled time sequence in the first field configuration to the preset scrambled time sequence length, and acquiring a preset synchronization code length corresponding to the preset scrambled time sequence length from a third mapping table, wherein the preset synchronization code length in the third mapping table is proportional to the preset scrambled time sequence; Adjusting the length of the synchronization code to the preset synchronization code length; Determining the second field configuration according to the preset scrambling time sequence length and the preset synchronization code length; The second field configuration is written into the physical layer field in the first data frame to obtain the second data frame.

6. The method according to claim 5, characterized in that The performing short-range wireless communication interaction of the second data frame with the target device so that the electronic device and the target device adjust the length of the preset field to the preset symbol length includes: Sending the second data frame to the target device through short-range wireless communication interaction, so that the target device adjusts the length of the scrambled time sequence to the preset scrambled time sequence length, or so that the target device adjusts the length of the scrambled time sequence to the preset scrambled time sequence length and adjusts the length of the synchronization code to the preset synchronization code length; A feedback data frame is received from the target device through short-range wireless communication interaction, so that the electronic device adjusts the length of the scrambled time sequence to the preset scrambled time sequence length, or adjusts the length of the scrambled time sequence to the preset scrambled time sequence length and adjusts the length of the synchronization code to the preset synchronization code length.

7. A data synchronization device, characterized in that: The device is applied to electronic equipment, including: A detection unit, configured to detect a first field configuration of a first data frame from a target device, wherein the first field configuration includes a first length of a preset field, and specifically, to obtain the first data frame from the target device through short-range wireless communication interaction; determine a relative distance between the electronic device and the target device according to timestamp data in the first data frame; determine a preset symbol length of the preset field corresponding to the relative distance in a second mapping table, wherein the relative distance in the second mapping table is proportional to the preset symbol length; and compare the first length of the preset field with the preset symbol length; An adjusting unit, configured to adjust the first field configuration to a second field configuration to determine a second data frame when the first length does not conform to the preset symbol length, wherein the length of the preset field in the second field configuration is the preset symbol length; A synchronization unit is used to perform short-range wireless communication interaction of the second data frame with the target device, so that the electronic device and the target device adjust the length of the preset field to the preset symbol length.

8. An electronic device, characterized in that: The method comprises a processor, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the programs include instructions for executing the steps in the method according to any one of claims 1 to 6.

9. A computer storage medium, characterized in that The computer storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is enabled to execute the method according to any one of claims 1 to 6.