Distance measurement method and device, electronic equipment and storage medium

By using pseudo-random numbers and random durations to determine the distance between channel probe devices in Bluetooth Low Energy devices, the problem of distance information leakage between channel probe receiving devices is solved, thus improving device security and privacy protection.

CN122063572APending Publication Date: 2026-05-19BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING XIAOMI MOBILE SOFTWARE CO LTD
Filing Date
2024-11-19
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

In existing Bluetooth Low Energy technologies, the distance information of the channel detection receiving device is easily leaked by third-party devices, posing privacy and security issues.

Method used

By pre-determining a first pseudo-random number between the channel detection transmitting and receiving devices, and using pseudo-random durations to determine the distance between the channel detection devices, the distance information is avoided from being exposed at fixed durations by using random duration delays or advances in sending signals.

Benefits of technology

Distance encryption between channel detection devices is achieved, which improves security, prevents third-party devices from obtaining distance information, and enhances information security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122063572A_ABST
    Figure CN122063572A_ABST
Patent Text Reader

Abstract

The invention relates to a distance measurement method and device, electronic equipment and a storage medium. The distance measurement method comprises: in response to a first signal received by a channel detection sending device at a first moment and used for distance measurement, determining a first pseudo-random number used for generating the first signal, the first signal representing a signal that a channel detection receiving device responds to a second signal sent by the channel detection sending device; determining a first pseudo-random duration corresponding to the first pseudo-random number based on a corresponding relationship between the pseudo-random number and the pseudo-random duration; based on a second moment, the first moment and the first pseudo-random duration, the distance between the channel detection sending device and the channel detection receiving device is determined, and the second moment represents the moment when the channel detection sending device sends the second signal. According to the invention, the security of the distance between the channel detection sending device and the channel detection receiving device is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of communication technology, and in particular to a distance measurement method, apparatus, electronic device, and storage medium. Background Technology

[0002] Bluetooth Low Energy (BLE) is a wireless communication technology that provides communication capabilities for devices requiring low power consumption and supports Channel Sounding (CS) technology, determining the distance between devices based on time and phase information. A channel sounding transmitter sends an electromagnetic wave signal of a specific phase, and a channel sounding receiver responds with an electromagnetic wave signal with a fixed phase difference or time difference. Upon receiving the response, the channel sounding transmitter measures the phase difference and / or time difference between the transmitted and received electromagnetic waves. Since the distance between the channel sounding transmitter and receiver is linearly related to the phase difference measured by the transmitter within a certain range, the channel sounding transmitter can calculate the distance between them.

[0003] However, because the channel detection receiving device in the relevant technology sends a reply electromagnetic wave signal to the channel detection transmitting device through a fixed phase difference, if a third-party device receives the reply electromagnetic wave signal near the channel detection transmitting device, the third-party device can also calculate the distance to the channel detection receiving device based on the fixed phase difference and time difference, which leads to privacy and security issues for the channel detection receiving device. Summary of the Invention

[0004] To overcome the problems existing in related technologies, this disclosure provides a distance measurement method, apparatus, electronic device, and storage medium.

[0005] According to a first aspect of the present disclosure, a distance measurement method is provided, comprising: in response to a channel sounding transmitting device receiving a first signal for performing distance measurement at a first moment, determining a first pseudo-random number used to generate the first signal, wherein the first signal characterizes a signal in which a channel sounding receiving device responds to a second signal transmitted by the channel sounding transmitting device; determining a first pseudo-random duration corresponding to the first pseudo-random number based on a correspondence between the pseudo-random number and the pseudo-random duration; and determining a distance between the channel sounding transmitting device and the channel sounding receiving device based on a second moment, the first moment, and the first pseudo-random duration, wherein the second moment characterizes the moment when the channel sounding transmitting device transmits the second signal.

[0006] In one embodiment, determining the distance between the channel sounding transmitter and the channel sounding receiver based on a second time point, a first time point, and a first pseudo-random duration includes: determining a third duration, wherein the third duration is a preset duration for delaying the transmission of the first signal; determining a target delay duration based on the third duration and the first pseudo-random duration, wherein the target delay duration characterizes the delay duration for the channel sounding receiver to transmit the first signal; determining a target duration based on the target delay duration and an interval duration, wherein the interval duration is determined based on the first time point and the second time point, and the target duration characterizes the sum of the duration for transmitting the first signal and the duration for transmitting the second signal; and determining the distance between the channel sounding transmitter and the channel sounding receiver based on the target duration, the transmission speeds of the first signal and the second signal.

[0007] In one embodiment, the first pseudo-random duration represents the duration of sending the first signal earlier or later, and determining the target delay duration based on the third duration and the first pseudo-random duration includes: in response to the first pseudo-random duration representing the duration of sending the first signal earlier, determining the target delay duration as the difference between the first pseudo-random duration and the third duration; and in response to the first pseudo-random duration representing the duration of sending the first signal later, determining the target delay duration as the sum of the first pseudo-random duration and the third duration.

[0008] In one embodiment, the first signal and the second signal are transmitted in a first channel. The method further includes: transmitting an interference signal in a second channel, wherein the interference signal does not carry channel probe information, the third duration corresponding to the response signal of the interference signal is a random duration, and the second channel is a channel other than the first channel among the channels supported by the channel probe receiving device and the channel probe transmitting device.

[0009] In one embodiment, the method further includes: determining the first pseudo-random number in response to the establishment of an encrypted connection between the channel sounding transmitter and the channel sounding receiver; wherein the first pseudo-random number is generated based on preset data, or the first pseudo-random number is determined by negotiation between the channel sounding transmitter and the channel sounding receiver.

[0010] According to a second aspect of the present disclosure, a distance measurement method is provided, comprising: in response to a channel sounding receiving device receiving a second signal transmitted by a channel sounding transmitting device at a second time moment, determining a first pseudo-random number corresponding to the second signal; determining a first pseudo-random duration corresponding to the first pseudo-random number based on a correspondence between the pseudo-random number and a pseudo-random duration; and delaying the transmission of a first signal to the channel sounding transmitting device based on the first pseudo-random duration, wherein the first signal represents a signal in which the channel sounding receiving device responds to the second signal transmitted by the channel sounding transmitting device, and the channel sounding transmitting device receives the first signal at a first time moment; wherein the first time moment, the second time moment, and the first pseudo-random duration are used to determine the distance between the channel sounding transmitting device and the channel sounding receiving device.

[0011] In one embodiment, delaying the transmission of the first signal to the channel sounding transmitter based on the first pseudo-random duration includes: determining a third duration, the third duration being a preset duration for delaying the transmission of the first signal; determining a target delay duration based on the third duration and the first pseudo-random duration, the target delay duration representing the delay duration for the channel sounding receiver to transmit the first signal; and delaying the target delay duration to transmit the first signal to the channel sounding transmitter.

[0012] In one embodiment, the method further includes: in response to receiving a third signal sent by the channel probe transmitting device, delaying the target delay duration, and sending a response signal of the third signal to the channel probe transmitting device, wherein the third signal represents a low-power Bluetooth communication signal other than the first signal and the second signal.

[0013] In one embodiment, determining the target delay duration based on the third duration and the first pseudo-random duration includes: in response to the first pseudo-random duration representing the duration of early transmission of the first signal, determining the target delay duration as the difference between the first pseudo-random duration and the third duration; and in response to the first pseudo-random duration representing the duration of delayed transmission of the first signal, determining the target delay duration as the sum of the first pseudo-random duration and the third duration.

[0014] In one embodiment, the first signal and the second signal are transmitted in a first channel. The method further includes: transmitting an interference signal in a second channel, wherein the interference signal does not carry channel probe information, the third duration corresponding to the response signal of the interference signal is a random duration, and the second channel is a channel other than the first channel among the channels supported by the channel probe receiving device and the channel probe transmitting device.

[0015] In one embodiment, the method further includes: in response to receiving an interference signal in a second channel, transmitting a response signal of the interference signal, wherein the interference signal does not carry channel detection information, the third duration corresponding to the response signal of the interference signal is a random duration, and the second channel is a channel other than the first channel among the channels supported by the channel detection receiving device and the channel detection transmitting device.

[0016] According to a third aspect of the present disclosure, a distance measuring apparatus is provided, comprising: a first determining unit, configured to, in response to a channel sounding transmitting device receiving a first signal for distance measurement at a first moment, determine a first pseudo-random number used to generate the first signal, wherein the first signal characterizes a signal in which a channel sounding receiving device responds to a second signal transmitted by the channel sounding transmitting device, and determine a first pseudo-random duration corresponding to the first pseudo-random number based on a correspondence between the pseudo-random number and the pseudo-random duration; and a first processing unit, configured to, based on a second moment, the first moment, and the first pseudo-random duration, determine the distance between the channel sounding transmitting device and the channel sounding receiving device, wherein the second moment characterizes the moment when the channel sounding transmitting device transmits the second signal.

[0017] In one embodiment, the first processing unit determines the distance between the channel sounding transmitter and the channel sounding receiver based on a second time point, a first time point, and a first pseudo-random duration as follows: a third duration is determined, which is a preset duration for delaying the transmission of the first signal; a target delay duration is determined based on the third duration and the first pseudo-random duration, where the target delay duration represents the delay duration for the channel sounding receiver to transmit the first signal; a target duration is determined according to the target delay duration and an interval duration, where the interval duration is determined based on the first time point and the second time point, and the target duration represents the sum of the duration for transmitting the first signal and the duration for transmitting the second signal; and the distance between the channel sounding transmitter and the channel sounding receiver is determined based on the target duration, the transmission speeds of the first signal and the second signal.

[0018] In one embodiment, the first pseudo-random duration represents the duration of sending the first signal earlier or later, and the step of determining the target delay duration based on the third duration and the first pseudo-random duration is as follows: in response to the first pseudo-random duration representing the duration of sending the first signal earlier, the target delay duration is determined to be the difference between the first pseudo-random duration and the third duration; in response to the first pseudo-random duration representing the duration of sending the first signal later, the target delay duration is determined to be the sum of the first pseudo-random duration and the third duration.

[0019] In one embodiment, the first signal and the second signal are transmitted in a first channel, and the first processing unit is further configured to: transmit an interference signal in a second channel, wherein the interference signal does not carry channel detection information, the third duration corresponding to the response signal of the interference signal is a random duration, and the second channel is a channel other than the first channel among the channels supported by the channel detection receiving device and the channel detection transmitting device.

[0020] In one embodiment, the first processing unit is further configured to: determine the first pseudo-random number in response to the establishment of an encrypted connection between the channel sounding transmitting device and the channel sounding receiving device; wherein the first pseudo-random number is generated based on preset data, or the first pseudo-random number is determined by negotiation between the channel sounding transmitting device and the channel sounding receiving device.

[0021] According to a fourth aspect of the present disclosure, a distance measuring device is provided, comprising: a second determining unit, configured to, in response to a channel sounding receiving device receiving a second signal transmitted by a channel sounding transmitting device at a second time, determine a first pseudo-random number corresponding to the second signal; and, based on a correspondence between the pseudo-random number and a pseudo-random duration, determine a first pseudo-random duration corresponding to the first pseudo-random number; and a second processing unit, configured to, based on the first pseudo-random duration, delay transmitting a first signal to the channel sounding transmitting device, the first signal representing a signal in which the channel sounding receiving device responds to the second signal transmitted by the channel sounding transmitting device, the channel sounding transmitting device receiving the first signal at a first time; wherein the first time, the second time, and the first pseudo-random duration are used to determine the distance between the channel sounding transmitting device and the channel sounding receiving device.

[0022] In one embodiment, the second processing unit delays sending a first signal to the channel sounding transmitter based on the first pseudo-random duration by: determining a third duration, the third duration being a preset duration for delaying the transmission of the first signal; determining a target delay duration based on the third duration and the first pseudo-random duration, the target delay duration representing the delay duration for the channel sounding receiver to transmit the first signal; and delaying the target delay duration while transmitting the first signal to the channel sounding transmitter.

[0023] In one embodiment, the second processing unit is further configured to: in response to receiving a third signal sent by the channel probe transmitting device, delay the target delay duration, and send a response signal of the third signal to the channel probe transmitting device, wherein the third signal represents a low-power Bluetooth communication signal other than the first signal and the second signal.

[0024] In one embodiment, the second processing unit determines the target delay duration based on the third duration and the first pseudo-random duration in the following manner: in response to the first pseudo-random duration representing the duration of sending the first signal ahead of schedule, the target delay duration is determined to be the difference between the first pseudo-random duration and the third duration; in response to the first pseudo-random duration representing the duration of delaying the transmission of the first signal, the target delay duration is determined to be the sum of the first pseudo-random duration and the third duration.

[0025] In one embodiment, the first signal and the second signal are transmitted in a first channel, and the second processing unit is further configured to: transmit an interference signal in a second channel, wherein the interference signal does not carry channel detection information, the third duration corresponding to the response signal of the interference signal is a random duration, and the second channel is a channel other than the first channel among the channels supported by the channel detection receiving device and the channel detection transmitting device.

[0026] In one embodiment, the processing unit is further configured to: in response to receiving an interference signal in a second channel, send a response signal of the interference signal, wherein the interference signal does not carry channel detection information, the third duration corresponding to the response signal of the interference signal is a random duration, and the second channel is a channel other than the first channel among the channels supported by the channel detection receiving device and the channel detection transmitting device.

[0027] According to a fifth aspect of the present disclosure, an electronic device is provided, comprising:

[0028] A processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the distance measurement method described in the first aspect, the second aspect, any one embodiment of the first aspect, or any one embodiment of the second aspect.

[0029] According to a sixth aspect of the present disclosure, a storage medium is provided, the storage medium storing instructions that, when executed by a processor of an electronic device, can perform the methods described in the first aspect, the second aspect, any one of the embodiments of the first aspect, or any one of the embodiments of the second aspect.

[0030] The technical solutions provided by the embodiments of this disclosure can include the following beneficial effects: A first pseudo-random duration is determined by a first pseudo-random number predetermined by the channel detection transmitting device and the channel detection receiving device, and the distance between the channel detection transmitting device and the channel detection receiving device is determined based on the first pseudo-random duration. Since the first pseudo-random duration varies at different times, it cannot be obtained by other devices, thus achieving encryption and determination of the distance between the channel detection transmitting device and the channel detection receiving device, and improving the security of the channel detection transmitting device and the channel detection receiving device.

[0031] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0032] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0033] Figure 1 This is a flowchart illustrating a distance measurement method according to an exemplary embodiment. Figure 1 .

[0034] Figure 2 This is a flowchart illustrating a distance measurement method according to an exemplary embodiment. Figure 2 .

[0035] Figure 3 This is a flowchart illustrating a method for determining a target delay duration according to an exemplary embodiment.

[0036] Figure 4 This is a flowchart illustrating a distance measurement method according to an exemplary embodiment. Figure 3 .

[0037] Figure 5 This is a flowchart illustrating a distance measurement method according to an exemplary embodiment. Figure 4 .

[0038] Figure 6 This is a flowchart illustrating a distance measurement method according to an exemplary embodiment. Figure 5 .

[0039] Figure 7 This is a flowchart illustrating a distance measurement method according to an exemplary embodiment. Figure 6 .

[0040] Figure 8 This is a flowchart illustrating a distance measurement method according to an exemplary embodiment. Figure 7 .

[0041] Figure 9 This is a flowchart illustrating a distance measurement method according to an exemplary embodiment. Figure 8 .

[0042] Figure 10 This is a flowchart illustrating a distance measurement method according to an exemplary embodiment. Figure 9 .

[0043] Figure 11 This is a flowchart illustrating a distance measurement method according to an exemplary embodiment. Figure 10 .

[0044] Figure 12 This is a block diagram of a distance measuring device according to an exemplary embodiment. Figure 1 .

[0045] Figure 13 This is a block diagram of a distance measuring device according to an exemplary embodiment. Figure 2 .

[0046] Figure 14 This is a block diagram illustrating an electronic device for distance measurement according to an exemplary embodiment. Detailed Implementation

[0047] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure.

[0048] In the accompanying drawings, the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The described embodiments are some, but not all, of the embodiments of this disclosure. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this disclosure, and should not be construed as limiting this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure. The embodiments of this disclosure will be described in detail below with reference to the accompanying drawings.

[0049] The distance measurement method provided in this disclosure is mainly applied to Channel Sounding (CS) scenarios. CS technology, based on the Bluetooth or Bluetooth Low Energy (BLE) physical layer, provides a distance detection technique based on time difference and phase difference. Specifically, CS includes two distance measurement methods: 1. Phase-Based Range (PBR), which has the advantages of high measurement accuracy and small measurement range (half a wavelength, approximately 6 cm). 2. Round Trip Time (RTT) based distance measurement, which has the advantages of low measurement accuracy and large measurement range.

[0050] Phase-based distance measurement mainly involves: a channel detection transmitting device sending an electromagnetic wave signal of a certain phase; and a channel detection receiving device responding with an electromagnetic wave signal of the same phase or a fixed phase difference after receiving the signal. For example, after receiving the electromagnetic wave signal sent by the channel detection transmitting device, the channel detection receiving device responds with an electromagnetic wave signal after a fixed delay of 150 microseconds (μs). When the channel detection transmitting device receives the response, it measures the phase difference between the transmitted and received electromagnetic waves. Since the distance between the channel detection transmitting device and the channel detection receiving device is linearly related to the phase difference measured by the channel detection transmitting device within a certain range, the channel detection transmitting device can calculate the distance between them.

[0051] Furthermore, since the phase difference is only represented within the range of [0, 2π), the linear relationship between the phase difference and distance will become confusing when the distance between the two sides in channel detection exceeds a certain range. To accurately measure distances beyond a preset range, a method based on RTT (Real-Time To-Time) distance measurement can be used. The channel detection transmitting device sends a signal, and the channel detection receiving device replies with a signal at a fixed time difference. When the channel detection transmitting device receives the reply, it measures the time difference between the transmitted and received signals. The distance between the channel detection transmitting and receiving devices is linearly related to the time difference measured by the channel detection transmitting device, allowing the channel detection transmitting device to calculate the distance range between the two sides.

[0052] It should be understood that the phase difference in phase-based distance measurement and the time difference in round-trip time-based distance detection are two ways of representing the time between the channel sounding transmitter initiating a signal and the channel sounding transmitter receiving a reply signal during the CS distance measurement process. Both can be understood as the total transmission time of the signal sent by the channel sounding transmitter to the channel sounding receiver and the signal replied by the channel sounding receiver to the channel sounding transmitter. In the following text, "time" can be understood as time difference or phase difference, and "moment" can also refer to "phase".

[0053] In related technologies, it is stipulated that after receiving a second signal from a channel detection transmitter, the channel detection receiver transmits a first signal after a fixed delay specified in the protocol. The second signal is sent by the channel detection transmitter for CS distance measurement, and the first signal is sent by the channel detection receiver in response to the second signal. However, because the fixed delay specified in the protocol is a known duration, third-party devices near the channel detection transmitter can monitor and acquire the timing of the transmission of the second signal and the reception of the first signal. Based on the fixed delay, they can determine the distance between the channel detection transmitter and the channel detection receiver, leading to the leakage of the distance between them and posing privacy and security issues.

[0054] In view of this, embodiments of this disclosure provide a distance measurement method that determines a first pseudo-random duration based on a first pseudo-random number and a preset correspondence, which serves as the duration for a channel detection receiving device to delay transmitting a first signal. Based on this first pseudo-random duration, the method determines the duration used for signal transmission between the channel detection transmitting device and the channel detection receiving device, and also determines the distance between them, thereby improving information security between the channel detection transmitting device and the channel detection receiving device. The channel detection transmitting device and the channel detection receiving device of this disclosure may include a Bluetooth Low Energy device.

[0055] Figure 1 This is a flowchart illustrating a distance measurement method according to an exemplary embodiment. Figure 1 This distance measurement method can be applied to channel sounding transmission equipment, such as... Figure 1 As shown, it includes the following steps.

[0056] In step S11, in response to the channel sounding transmitting device receiving a first signal for distance measurement at a first moment, a first pseudo-random number used to generate the first signal is determined.

[0057] In this embodiment of the disclosure, the first signal represents a signal in which the channel sounding receiving device responds to the second signal sent by the channel sounding transmitting device. The first signal and the second signal are used for channel sounding, including data packets to be transmitted for CS distance measurement.

[0058] In this embodiment of the disclosure, the first moment represents the moment when the channel sounding transmitter receives the first signal, wherein the first moment can be determined by the phase corresponding to the first signal received by the channel sounding transmitter.

[0059] In step S12, the first pseudo-random duration corresponding to the first pseudo-random number is determined based on the correspondence between the pseudo-random number and the pseudo-random duration.

[0060] In this embodiment of the disclosure, regarding the correspondence between pseudo-random numbers and pseudo-random durations, each pseudo-random number has a unique corresponding pseudo-random duration. The pseudo-random duration corresponding to the first pseudo-random number can be determined based on the first pseudo-random number and used as the first pseudo-random duration.

[0061] In step S13, the distance between the channel sounding transmitter and the channel sounding receiver is determined based on the second time, the first time, and the first pseudo-random duration.

[0062] In this embodiment of the disclosure, the second moment represents the moment when the channel sounding transmitter transmits the second signal. Based on the second moment, the first moment, and the first pseudo-random duration, the duration used for transmitting the first and second signals between the channel sounding transmitter and the channel sounding receiver can be determined. Furthermore, since the speed of radio waves in the air is a known value, the distance between the channel sounding transmitter and the channel sounding receiver can be determined based on the duration used for transmitting the first and second signals.

[0063] In this embodiment of the disclosure, the second moment represents the moment when the channel sounding transmitting device transmits the second signal.

[0064] In this embodiment, a first pseudo-random number predetermined by the channel detection transmitting device and the channel detection receiving device is used to determine the random duration of the delay in transmitting the first signal by the channel detection receiving device. Based on the random duration, the distance between the channel detection transmitting device and the channel detection receiving device is determined. This achieves encryption and determination of the distance between the channel detection transmitting device and the channel detection receiving device, improving the security of the channel detection transmitting device and the channel detection receiving device.

[0065] In this embodiment of the disclosure, the first pseudo-random duration can be used to advance or delay the preset delay for transmitting the first signal. The duration used to transmit the first and second signals during CS distance measurement can be referred to as the target duration.

[0066] Figure 2 This is a flowchart illustrating a distance measurement method according to an exemplary embodiment. Figure 2 ,like Figure 2 As shown, it includes the following steps.

[0067] In step S21, the third duration is determined.

[0068] In this embodiment of the disclosure, the third duration is a preset duration for delaying the transmission of the first signal. The first pseudo-random duration is a time length shorter than the third duration.

[0069] In step S22, the target delay duration is determined based on the third duration and the first pseudo-random duration.

[0070] In this embodiment of the disclosure, the target delay duration characterizes the delay duration for the channel sounding receiver to transmit the first signal. The target delay duration, which has randomness, can be determined based on a preset third duration and a determined first pseudo-random duration, and used as the target delay duration for the channel sounding receiver to transmit the first signal.

[0071] In step S23, the target duration is determined based on the target delay duration and the interval duration, with the interval duration determined based on the first time point and the second time point.

[0072] In this embodiment of the disclosure, the interval duration represents the time length between the transmission of the second signal and the receipt of the first signal by the channel sounding transmitting device. The interval duration includes a target duration and a target delay duration. The target duration represents the sum of the transmission duration of the first signal and the transmission duration of the second signal.

[0073] In step S24, the distance between the channel sounding transmitter and the channel sounding receiver is determined based on the target duration and the transmission speeds of the first and second signals.

[0074] In this embodiment of the disclosure, during the possible distance measurement process based on channel detection, the first signal and the second signal are radio signals, and the propagation speeds corresponding to the first signal and the second signal are fixed values.

[0075] In this embodiment of the disclosure, after obtaining the target duration representing the time used to transmit the first and second signals, half of the product of the target duration and the transmission speeds of the first and second signals can be determined as the distance between the channel sounding transmitter and the channel sounding receiver. For example, if the first time is determined to be T1, the second time to be T2, the third duration to be A, the first pseudo-random duration to be B, and the transmission speeds of the first and second signals to be V during the CS distance measurement process, then the target delay duration C can be determined to be A+B, and the interval duration D can be determined to be T1-T2. The target duration E is then T1-T2-(A+B). The distance S between the channel sounding transmitter and the channel sounding receiver can be determined as [T1-T2-(A+B)]*V.

[0076] In this embodiment of the disclosure, the time taken for the channel sounding receiver to process the received second signal and generate the first signal can be collectively referred to as the processing time. The processing time can be included in the target delay time. By setting the target delay time based on the third time, the problem that if the first pseudo-random time is used as the target delay time, the channel sounding receiver may be unable to complete the processing of the received second signal and generate the first signal due to the first pseudo-random time being shorter than the processing time.

[0077] Furthermore, a maximum and / or minimum value can be set for the first pseudo-random duration to avoid the determined target delay duration affecting the channel sounding receiver's processing of the received second signal and generation of the first signal.

[0078] In this embodiment of the disclosure, the channel detection transmitting device and the channel detection receiving device, during different distance measurement processes, determine the first pseudo-random duration corresponding to different first pseudo-random numbers, and adjust the third duration differently. This enables the determination of the delay duration for the channel detection receiving device to delay transmitting the first signal during different distance measurement processes, and further determines the distance between the channel detection transmitting device and the channel detection receiving device, thereby encrypting the information of the channel detection transmitting device and the channel detection receiving device during each distance detection process.

[0079] In this embodiment of the disclosure, the first pseudo-random duration can characterize the duration for which the first signal is sent earlier or later than a preset delay duration.

[0080] Figure 3 This is a flowchart illustrating a method for determining a target delay duration according to an exemplary embodiment, such as... Figure 3 As shown, it includes the following steps.

[0081] Figure 3 Step S31 and the steps in Figure 2 The steps in step S21 are the same and will not be repeated here. Please refer to the relevant descriptions in the above embodiments. The following only describes the differences.

[0082] In step S32a, in response to the first pseudo-random duration representing the duration of the early transmission of the first signal, the target delay duration is determined to be the difference between the first pseudo-random duration and the third duration.

[0083] In this embodiment of the disclosure, if the random duration is a scalar, an identifier can be set. If the identifier is a first identifier, it indicates that the random duration is the duration of sending the first signal earlier than the third duration. The target delay duration is the difference between the first pseudo-random duration and the third duration.

[0084] In step S32b, in response to the first pseudo-random duration representing the duration of delay in transmitting the first signal, the target delay duration is determined to be the sum of the first pseudo-random duration and the third duration.

[0085] In this embodiment of the disclosure, if the first pseudo-random duration is a scalar, an identifier can be set. If the identifier is a second identifier, it indicates that the random duration is the duration of delaying the transmission of the first signal based on the third duration. The target delay duration obtained is the sum of the first pseudo-random duration and the third duration.

[0086] In this embodiment of the disclosure, the first pseudo-random duration can also be set as a vector value. The sign of the first pseudo-random duration determines whether the transmission is advanced or delayed based on the third duration. For example, if the first pseudo-random duration is negative, it represents the duration for which the first signal is transmitted earlier than the third duration; if the first pseudo-random duration is positive, it represents the duration for which the first signal is transmitted later than the third duration.

[0087] In this embodiment of the disclosure, the first signal and the second signal are transmitted in the first channel. Interference signals can also be transmitted in the second channel, which is one of the channels supported by the channel sounding receiver and the channel sounding transmitter, excluding the first channel.

[0088] Figure 4 This is a flowchart illustrating a distance measurement method according to an exemplary embodiment. Figure 3 ,like Figure 4 As shown, it includes the following steps.

[0089] Figure 4 Step S41 and the steps in Figure 1 The steps in S11 are the same as those in the above embodiments, and will not be repeated here. Please refer to the relevant descriptions in the above embodiments. The following only describes the differences.

[0090] In step S42, an interference signal is transmitted in the second channel.

[0091] In this embodiment of the disclosure, the second channel is an idle channel in which the channel detection transmitting device and the channel detection receiving device can communicate.

[0092] In this embodiment, the interference signal is a signal that does not carry channel detection information, includes invalid data, and the third duration corresponding to the response signal of the interference signal is a random duration. The channel detection transmitting device and the channel detection receiving device simulate distance measurement based on channel detection in the second channel, providing false ranging signals to a third-party device. This interferes with the third-party device's acquisition of the distance between the channel detection transmitting device and the channel detection receiving device, thereby improving the security of the location information of the channel detection transmitting device and the channel detection receiving device.

[0093] Figure 5 This is a flowchart illustrating a distance measurement method according to an exemplary embodiment. Figure 4 ,like Figure 5 As shown, it includes the following steps.

[0094] In step S51, in response to the establishment of an encrypted connection between the channel sounding transmitting device and the channel sounding receiving device, a first pseudo-random number is determined.

[0095] In this embodiment of the disclosure, the first pseudo-random number is generated based on preset data, or the first pseudo-random number is determined by negotiation between the channel sounding transmitting device and the channel sounding receiving device.

[0096] In this embodiment, the first pseudo-random number can be a preset fixed value or determined based on a preset rule. For example, the first pseudo-random number can be generated based on a deterministic random bit generator (DRBG) and a preset pseudo-random seed. Furthermore, the preset rule can be set to change with the number of CS distance measurements. For example, the pseudo-random seed can be set to change with the number of CS distance measurements. In each CS distance measurement process, the channel sounding transmitting device or the channel sounding receiving device can use the same DRBG to determine a first pseudo-random number different from the previous distance measurement process.

[0097] In this embodiment of the disclosure, the first pseudo-random number can also be reused in the encrypted mode, where the channel sounding transmitting device and the channel sounding receiving device have negotiated and determined the data to determine the first pseudo-random number set by the channel sounding transmitting device and the channel sounding receiving device during the distance measurement process. For example, the first pseudo-random number during the distance measurement process can be determined based on the personalized vector (128-bit Personalization Vector, CS_PV) determined in the encrypted mode.

[0098] In step S52, in response to the channel sounding transmitting device receiving a first signal for distance measurement at a first moment, a first pseudo-random number used to generate the first signal is determined.

[0099] In this embodiment of the disclosure, the channel sounding receiving device can also randomly determine the time for delaying the transmission of the first signal based on the first pseudo-random number.

[0100] Figure 6 This is a flowchart illustrating a distance measurement method according to an exemplary embodiment. Figure 5 It can be applied to channel sounding receivers, such as Figure 6 As shown, it includes the following steps.

[0101] In step S61, in response to the channel sounding receiving device receiving the second signal sent by the channel sounding transmitting device at the second time, the first pseudo-random number corresponding to the second signal is determined.

[0102] In this embodiment of the disclosure, after the channel sounding receiving device sends the second signal, the channel sounding receiving device determines a pseudo-random number determined by the channel sounding transmitting device as the first pseudo-random number corresponding to the second signal, and determines the duration of the first pseudo-random number based on the correspondence.

[0103] In step S62, based on the correspondence between pseudo-random numbers and pseudo-random durations, the first pseudo-random duration corresponding to the first pseudo-random number is determined.

[0104] In this embodiment, the correspondence can be a preset formula or a preset mapping table. In the preset correspondence, the first pseudo-random number has a unique corresponding first pseudo-random duration. The first signal represents the signal in which the channel sounding receiving device responds based on the received second signal.

[0105] In step S63, the first signal is sent to the channel sounding transmitting device with a delay based on the first pseudo-random duration.

[0106] In this embodiment of the disclosure, the first moment, the second moment, and the first pseudo-random duration are used to determine the distance between the channel sounding transmitting device and the channel sounding receiving device.

[0107] In this embodiment, the first signal represents the signal in which the channel sounding receiver responds to the second signal sent by the channel sounding transmitter. The channel sounding transmitter is able to receive the delayed first signal at a first moment. Based on a first pseudo-random number, a preset third duration is adjusted to randomly adjust the target delay duration. This prevents a third-party device that cannot determine the first pseudo-random number from accurately determining the duration of the delayed first signal sent by the channel sounding receiver, thus preventing the third-party device from determining the distance between the channel sounding transmitter and the channel sounding receiver, thereby protecting the distance between the channel sounding transmitter and the channel sounding receiver.

[0108] In this embodiment of the disclosure, to prevent a third-party device from monitoring signals of other Bluetooth Low Energy (BLE) communications between the sender and the channel probe receiver during the CS distance measurement process, and from obtaining the distance between the sender and the channel probe receiver, a first pseudo-random number can be used to prevent the third-party device from acquiring the first signal and determining the distance between the channel probe receiver and the channel probe sender, thus ensuring the security of the channel probe sender and the channel probe receiver.

[0109] Figure 7 This is a flowchart illustrating a distance measurement method according to an exemplary embodiment. Figure 6 ,like Figure 7 As shown, it includes the following steps.

[0110] In step S71, the third duration is determined.

[0111] In this embodiment of the disclosure, the third duration is a preset duration for delaying the transmission of the first signal. The first pseudo-random duration is a time length shorter than the third duration.

[0112] In step S72, the target delay duration is determined based on the third duration and the first pseudo-random duration.

[0113] In this embodiment of the disclosure, the first pseudo-random duration is a duration shorter than the third duration. The target delay duration characterizes the delay duration for the channel sounding receiver to transmit the first signal. A target delay duration with randomness can be determined based on a preset third duration and a determined first pseudo-random duration, and used as the duration for the channel sounding receiver to delay transmitting the first signal.

[0114] In this embodiment of the disclosure, the target delay duration characterizes the delay duration for the channel sounding receiver to transmit the first signal. The target delay duration, which has randomness, can be determined based on a preset third duration and a determined first pseudo-random duration, and used as the target delay duration for the channel sounding receiver to delay transmitting the first signal.

[0115] In step S73, the target delay duration is delayed, and a first signal is sent to the channel detection transmitting device.

[0116] In this embodiment of the disclosure, the third duration is adjusted by using a first pseudo-random duration to obtain a random target delay duration, thereby achieving random delayed transmission of the first signal and improving the information security of the first signal.

[0117] Figure 8 This is a flowchart illustrating a distance measurement method according to an exemplary embodiment. Figure 7 ,like Figure 8 As shown, it includes the following steps.

[0118] Figure 8 Step S81 and the steps in Figure 6 The same applies to S63 in the above embodiments, and will not be repeated here. Please refer to the relevant descriptions in the above embodiments. The following only describes the differences.

[0119] In step S82, in response to receiving the third signal sent by the channel probe transmitting device, the target delay time is delayed, and a response signal of the third signal is sent to the channel probe transmitting device.

[0120] In this embodiment of the disclosure, the third signal represents a low-power Bluetooth communication signal other than the first signal and the second signal.

[0121] In this embodiment of the disclosure, by setting the third signal to be sent after the delay target delay time and randomly delaying the transmission of the third signal, devices other than the channel sounding transmitting device that determines the first pseudo-random number cannot determine the distance information of the channel sounding transmitting device and the channel sounding receiving device by monitoring the third signal and the response signal of the third signal, thereby improving the security of the channel sounding transmitting device and the channel sounding receiving device.

[0122] Figure 9 This is a flowchart illustrating a distance measurement method according to an exemplary embodiment. Figure 8 ,like Figure 9 As shown, it includes the following steps.

[0123] In step S91, the third duration is determined.

[0124] In step S92a, in response to the first pseudo-random duration representing the duration of the early transmission of the first signal, the target delay duration is determined to be the difference between the first pseudo-random duration and the third duration.

[0125] In this embodiment of the disclosure, if the random duration is a scalar, the channel sounding receiver can set an identifier. If the identifier is a first identifier, it means that the random duration is the duration of sending the first signal in advance based on the third duration. The target delay duration obtained is the difference between the first pseudo-random duration and the third duration.

[0126] In step S92b, in response to the first pseudo-random duration representing the duration of delay in transmitting the first signal, the target delay duration is determined to be the sum of the first pseudo-random duration and the third duration.

[0127] In this embodiment of the disclosure, if the first pseudo-random duration is a scalar, the channel sounding receiver can set an identifier. If the identifier is a second identifier, it indicates that the random duration is the duration of delaying the transmission of the first signal based on the third duration. The target delay duration obtained is the sum of the first pseudo-random duration and the third duration.

[0128] In this embodiment of the disclosure, the first pseudo-random duration can also be set as a vector value. The channel sounding receiver determines whether the first pseudo-random duration represents an advance or delay based on the third duration by using the sign of the first pseudo-random duration. For example, if the first pseudo-random duration is negative, the first signal is sent earlier than the third duration; if the first pseudo-random duration is positive, the first signal is sent later than the third duration.

[0129] In this embodiment of the disclosure, the time taken for the channel sounding receiver to process the received second signal and generate the first signal can be collectively referred to as the processing time. The processing time can be included in the target delay time. By setting the target delay time based on the third time, the problem that if the first pseudo-random time is used as the target delay time, the channel sounding receiver may be unable to complete the processing of the received second signal and generate the first signal due to the first pseudo-random time being shorter than the processing time.

[0130] Furthermore, a maximum and / or minimum value can be set for the first pseudo-random duration to avoid the determined target delay duration affecting the channel sounding receiver's processing of the received second signal and generation of the first signal.

[0131] In this embodiment of the disclosure, the channel detection transmitting device and the channel detection receiving device, during different distance measurement processes, determine the first pseudo-random duration corresponding to different first pseudo-random numbers, and adjust the third duration differently. This enables the determination of the delay duration for the channel detection receiving device to delay transmitting the first signal during different distance measurement processes, and further determines the distance between the channel detection transmitting device and the channel detection receiving device, thereby encrypting the information of the channel detection transmitting device and the channel detection receiving device during each distance detection process.

[0132] Figure 10 This is a flowchart illustrating a distance measurement method according to an exemplary embodiment. Figure 9 ,like Figure 10 As shown, it includes the following steps.

[0133] Figure 10 The steps in step S101 and Figure 6 The same applies to S63 in the above embodiments, and will not be repeated here. Please refer to the relevant descriptions in the above embodiments. The following only describes the differences.

[0134] In step S102, in response to receiving an interference signal in the second channel, a response signal for the interference signal is sent.

[0135] In this embodiment, the interference signal does not carry channel detection information, the third duration corresponding to the response signal of the interference signal is a random duration, and the second channel is a channel other than the first channel among the channels supported by the channel detection receiving device and the channel detection transmitting device. The second channel can also be understood as a channel where the channel detection transmitting device and the channel detection receiving device can communicate and is idle. After receiving the interference signal sent by the channel detection transmitting device on the second channel, the channel detection receiving device sends a response signal to the channel detection transmitting device to interfere with the third-party device. By sending the response signal of the interference signal, the channel detection receiving device simulates distance measurement based on channel detection, providing false ranging signals to the third-party device, interfering with the third-party device's acquisition of the distance between the channel detection transmitting device and the channel detection receiving device, and improving the security of the location information of the channel detection transmitting device and the channel detection receiving device.

[0136] Figure 11 This is a flowchart illustrating a distance measurement method according to an exemplary embodiment. Figure 10 ,like Figure 11 As shown, it includes the following steps.

[0137] In step S111, in response to the establishment of an encrypted connection between the channel sounding transmitting device and the channel sounding receiving device, a first pseudo-random number is determined.

[0138] In this embodiment of the disclosure, the first pseudo-random number is generated based on preset data, or the first pseudo-random number is determined by negotiation between the channel sounding transmitting device and the channel sounding receiving device.

[0139] In this embodiment, the first pseudo-random number can be a preset fixed value or determined based on a preset rule. For example, the first pseudo-random number can be generated based on a deterministic random bit generator (DRBG) and a preset pseudo-random seed. Furthermore, the preset rule can be set to change with the number of CS distance measurements. For example, the pseudo-random seed can be set to change with the number of CS distance measurements. In each CS distance measurement process, the channel sounding transmitting device or the channel sounding receiving device can use the same DRBG to determine a first pseudo-random number different from the previous distance measurement process.

[0140] In this embodiment of the disclosure, the first pseudo-random number can also be reused in the encrypted mode, where the channel sounding transmitting device and the channel sounding receiving device have negotiated and determined the data to determine the first pseudo-random number set by the channel sounding transmitting device and the channel sounding receiving device during the distance measurement process. For example, the channel sounding receiving device can determine the first pseudo-random number during the distance measurement process based on the 128-bit Personalization Vector (CS_PV) determined in the encrypted mode.

[0141] In step S112, in response to the channel sounding receiving device receiving the second signal sent by the channel sounding transmitting device at the second time, the first pseudo-random number corresponding to the second signal is determined.

[0142] In this embodiment of the disclosure, by using a first pseudo-random number obtained based on preset data or negotiation as the first pseudo-random number corresponding to the second signal, the security of the first pseudo-random number that can be determined by the channel detection transmitting device and the channel detection receiving device is ensured.

[0143] In an exemplary embodiment, a channel sounding transmitter and a channel sounding receiver establish a low-power Bluetooth connection according to a preset protocol. The channel sounding transmitter and the channel sounding receiver enter an encrypted mode according to the Bluetooth protocol description. In the encrypted mode, the information exchanged between the channel sounding transmitter and the channel sounding receiver is difficult for third-party devices to obtain. The channel sounding transmitter initiates a CS ranging process according to the preset protocol. In the encrypted mode, the channel sounding transmitter and the channel sounding receiver can negotiate and determine parameters. For example, the following parameters may be included: (1) a 128-bit initialization vector (CS_IV), which is vector data used for the initial state of the encryption algorithm. (2) a 64-bit initialization nonce (CS_IN), which is an initialization vector used to generate ciphertext. (3) a 128-bit personalization vector (CS_PV), which is used to add an additional layer of randomness or personalization features to the encryption or hash function. The negotiation between the channel probe transmitting device and the channel probe receiving device occurs after the encryption process. The parameters negotiated can be determined by the channel probe transmitting device and the channel probe receiving device, but third-party devices cannot obtain the parameters determined in the encryption mode. The channel probe transmitting device initiates the channel probe ranging process to measure the distance according to the method described in the Bluetooth protocol.

[0144] In encrypted mode, the channel sounding transmitter and receiver negotiate a 128-bit pseudo-random seed. The channel sounding transmitter generates the 128-bit pseudo-random seed and sends it to the channel sounding receiver. Upon receiving the 128-bit pseudo-random seed, the channel sounding receiver sends an acknowledgment response. Optionally, the channel sounding transmitter and receiver can utilize the negotiated parameters, using the aforementioned CS_PV as the pseudo-random seed, to determine the first pseudo-random number based on CS_PV, eliminating the need for negotiation and simplifying the process of determining the first pseudo-random number.

[0145] The pseudo-random seed can generate the first pseudo-random number through the following process: the first pseudo-random number is generated based on the 128-bit pseudo-random seed and the preset Deterministic Random Bit Generator (DRBG). Specifically, the DRBG requires 6 input values ​​to generate a 128-bit random number. The 6 input values ​​include: (1) 128-bit Initialization Vector (CS_IV); (2) 64-bit Initialization Nonce (CS_IN); (3) 128-bit Personalization Vector (CS_PV); (4) the number of CS checks (CS StepCounter); (5) the transaction ID, which indicates the content used to generate the first pseudo-random number (such as frequency hopping, random address, antenna group, etc.); and (6) the number of times the transaction ID is used (Transaction Counter), which indicates the number of times the Transaction ID is used (128-bit binary number). Here, CS Step Counter, Transaction ID, and Transaction Counter are data that change according to the rules determined by the channel sounding receiver and the channel sounding transmitter, while CS_IV, CS_IN, and CS_PV are parameters already determined in the encryption mode. When generating random numbers, the channel sounding receiver can use CS_PV as input, and by using CS_PV as one of the inputs to DRGB, it obtains the first pseudo-random number as the output. This allows the channel sounding receiver and the channel sounding transmitter to generate different first pseudo-random numbers during different distance measurements.

[0146] The channel sounding receiver can generate a 128-bit pseudo-random number x corresponding to the first signal each time it sends a first signal to the channel sounding transmitter, based on a pseudo-random seed and DRBG. The channel sounding receiver then generates a first pseudo-random duration within the range [-2µs, +2µs) to represent an earlier or later transmission, using this first pseudo-random duration to advance or delay a preset fixed delay time, thus obtaining the delayed transmission duration of the first signal. The first pseudo-random duration can be determined using the formula: y = (x MOD 4000) - 2000, where x is the first pseudo-random number, y is the generated first pseudo-random duration, x and y are in nanoseconds (ns), and MOD is the remainder calculation. If y < 0, the channel sounding receiver advances the signal by |y|ns based on the preset fixed delay time when responding, where "||" represents the absolute value. If y ≥ 0, the channel sounding receiver delays the first signal by |y|ns based on the preset fixed delay time when responding. Since both the channel sounding transmitter and the channel sounding receiver jointly determine the pseudo-random seed and use the same DRBG, the channel sounding transmitter can determine the first pseudo-random number x used by the channel sounding receiver in each distance measurement process, and calculate the time and / or phase at which the channel sounding transmitter should receive the reply signal (corresponding to the first signal) when calculating the target delay time of the first signal randomness based on x. A third-party device cannot determine the pseudo-random seed, cannot determine the first pseudo-random number x, and cannot determine the target delay time for the channel sounding receiver to postpone transmitting the first signal during this measurement process, nor the target duration used in the transmission of the first and second signals. Therefore, it cannot calculate the distance between the channel sounding receiver and the channel sounding transmitter.

[0147] In this embodiment of the disclosure, during the CS distance measurement process, a first pseudo-random duration is determined based on a random number and a preset correspondence. Based on the first pseudo-random duration, the first moment, and the second moment, the signal transmission time between the channel detection transmitting device and the channel detection receiving device is determined. This further enables the measurement of the distance between the channel detection transmitting device and the channel detection receiving device, improving the security of determining the distance between the channel detection transmitting device and the channel detection receiving device and avoiding distance leakage between the channel detection transmitting device and the channel detection receiving device.

[0148] Based on the same concept, embodiments of this disclosure also provide a distance measuring device.

[0149] It is understood that the distance measuring device provided in this disclosure includes hardware structures and / or software modules corresponding to each function in order to achieve the above-mentioned functions. In conjunction with the units and algorithm steps of the various examples disclosed in this disclosure, this disclosure can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the technical solutions of this disclosure.

[0150] Figure 12 This is a block diagram of a distance measuring device 100 according to an exemplary embodiment. Figure 1 . Reference Figure 12 The device includes a first determining unit 101 and a first processing unit 102.

[0151] The first determining unit 101 is configured to, in response to the channel sounding transmitting device receiving a first signal for distance measurement at a first moment, determine a first pseudo-random number used to generate the first signal, wherein the first signal represents the signal in which the channel sounding receiving device responds to the second signal sent by the channel sounding transmitting device, and determine a first pseudo-random duration corresponding to the first pseudo-random number based on the correspondence between the pseudo-random number and the pseudo-random duration.

[0152] The first processing unit 102 is used to determine the distance between the channel detection transmitting device and the channel detection receiving device based on the second time, the first time and the first pseudo-random duration, wherein the second time characterizes the time when the channel detection transmitting device transmits the second signal.

[0153] In one embodiment, the first processing unit 102 determines the distance between the channel detection transmitting device and the channel detection receiving device based on a second time moment, a first time moment, and a first pseudo-random duration as follows: determining a third duration, which is a preset duration for delaying the transmission of a first signal; determining a target delay duration based on the third duration and the first pseudo-random duration, whereby the target delay duration characterizes the delay duration for the channel detection receiving device to transmit the first signal; determining a target duration based on the target delay duration and an interval duration, whereby the interval duration is determined based on the first time moment and the second time moment, and the target duration characterizes the sum of the duration for transmitting the first signal and the duration for transmitting the second signal; and determining the distance between the channel detection transmitting device and the channel detection receiving device based on the target duration, the transmission speed of the first signal, and the transmission speed of the second signal.

[0154] In one embodiment, the first pseudo-random duration represents the duration of sending the first signal earlier or later. Based on the third duration and the first pseudo-random duration, a target delay duration is determined: in response to the first pseudo-random duration representing the duration of sending the first signal earlier, the target delay duration is determined to be the difference between the first pseudo-random duration and the third duration; in response to the first pseudo-random duration representing the duration of sending the first signal later, the target delay duration is determined to be the sum of the first pseudo-random duration and the third duration.

[0155] In one embodiment, the first signal and the second signal are transmitted in the first channel. The first processing unit 102 is further configured to: transmit an interference signal in the second channel, wherein the interference signal does not carry channel detection information, the third duration corresponding to the response signal of the interference signal is a random duration, and the second channel is a channel other than the first channel among the channels supported by the channel detection receiving device and the channel detection transmitting device.

[0156] In one embodiment, the first processing unit 102 is further configured to: determine a first pseudo-random number in response to the establishment of an encrypted connection between the channel detection transmitting device and the channel detection receiving device; wherein the first pseudo-random number is generated based on preset data, or the first pseudo-random number is determined by negotiation between the channel detection transmitting device and the channel detection receiving device.

[0157] Figure 13 This is a block diagram of a distance measuring device 200 according to an exemplary embodiment. Figure 2 . Reference Figure 13 The device includes a second determining unit 201 and a second processing unit 202.

[0158] The second determining unit 201 is used to determine the first pseudo-random number corresponding to the second signal in response to the channel sounding receiving device receiving the second signal sent by the channel sounding transmitting device at the second time; and to determine the first pseudo-random duration corresponding to the first pseudo-random number based on the correspondence between the pseudo-random number and the pseudo-random duration.

[0159] The second processing unit 202 is used to send a first signal to the channel detection transmitting device with a delay based on a first pseudo-random duration. The first signal represents the signal of the channel detection receiving device responding to the second signal sent by the channel detection transmitting device. The channel detection transmitting device receives the first signal at a first moment. The first moment, the second moment, and the first pseudo-random duration are used to determine the distance between the channel detection transmitting device and the channel detection receiving device.

[0160] In one embodiment, the second processing unit 202 delays the transmission of a first signal to the channel sounding transmitting device based on a first pseudo-random duration by: determining a third duration, which is a preset duration for delaying the transmission of the first signal; determining a target delay duration based on the third duration and the first pseudo-random duration, whereby the target delay duration characterizes the delay duration for the channel sounding receiving device to transmit the first signal; and delaying the target delay duration to transmit the first signal to the channel sounding transmitting device.

[0161] In one embodiment, the second processing unit 201 is further configured to: in response to receiving a third signal sent by the channel probe transmitting device, delay the target delay time, and send a response signal of the third signal to the channel probe transmitting device, wherein the third signal represents a low-power Bluetooth communication signal other than the first signal and the second signal.

[0162] In one embodiment, the second processing unit 201 determines the target delay duration based on a third duration and a first pseudo-random duration in the following manner: in response to the first pseudo-random duration representing the duration of sending the first signal ahead of schedule, the target delay duration is determined to be the difference between the first pseudo-random duration and the third duration; in response to the first pseudo-random duration representing the duration of delaying the transmission of the first signal, the target delay duration is determined to be the sum of the first pseudo-random duration and the third duration.

[0163] In one embodiment, the first signal and the second signal are transmitted in the first channel, and the second processing unit 201 is further configured to: transmit an interference signal in the second channel, wherein the interference signal does not carry channel detection information, the third duration corresponding to the response signal of the interference signal is a random duration, and the second channel is a channel other than the first channel among the channels supported by the channel detection receiving device and the channel detection transmitting device.

[0164] In one embodiment, the processing unit is further configured to: in response to receiving an interference signal in a second channel, transmit a response signal of the interference signal, wherein the interference signal does not carry channel detection information, the third duration corresponding to the response signal of the interference signal is a random duration, and the second channel is a channel other than the first channel among the channels supported by the channel detection receiving device and the channel detection transmitting device.

[0165] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0166] Figure 14 This is a block diagram illustrating an electronic device 300 for distance measurement according to an exemplary embodiment. For example, the electronic device 300 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0167] Reference Figure 14 The electronic device 300 may include one or more of the following components: processing component 302, memory 304, power component 306, multimedia component 308, audio component 310, input / output (I / O) interface 312, sensor component 314, and communication component 316.

[0168] Processing component 302 typically controls the overall operation of electronic device 300, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 302 may include one or more processors 320 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 302 may include one or more modules to facilitate interaction between processing component 302 and other components. For example, processing component 302 may include a multimedia module to facilitate interaction between multimedia component 308 and processing component 302.

[0169] Memory 304 is configured to store various types of data to support the operation of electronic device 300. Examples of such data include instructions for any application or method operating on electronic device 300, contact data, phonebook data, messages, pictures, videos, etc. Memory 304 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0170] Power component 306 provides power to various components of electronic device 300. Power component 306 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 300.

[0171] Multimedia component 308 includes a screen that provides an output interface between the electronic device 300 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 308 includes a front-facing camera and / or a rear-facing camera. When the electronic device 300 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0172] Audio component 310 is configured to output and / or input audio signals. For example, audio component 310 includes a microphone (MIC) configured to receive external audio signals when electronic device 300 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 304 or transmitted via communication component 316. In some embodiments, audio component 310 also includes a speaker for outputting audio signals.

[0173] I / O interface 312 provides an interface between processing component 302 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0174] Sensor assembly 314 includes one or more sensors for providing state assessments of various aspects of electronic device 300. For example, sensor assembly 314 can detect the on / off state of electronic device 300, the relative positioning of components such as the display and keypad of electronic device 300, changes in position of electronic device 300 or a component of electronic device 300, the presence or absence of user contact with electronic device 300, orientation or acceleration / deceleration of electronic device 300, and temperature changes of electronic device 300. Sensor assembly 314 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 314 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 314 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.

[0175] Communication component 316 is configured to facilitate wired or wireless communication between electronic device 300 and other devices. Electronic device 300 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 316 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 316 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0176] In an exemplary embodiment, the electronic device 300 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.

[0177] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 304 including instructions, which can be executed by a processor 320 of an electronic device 300 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0178] It is understood that in this disclosure, "multiple" refers to two or more, and other quantifiers are similar. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. The singular forms "a," "the," and "the" are also intended to include the plural forms unless the context clearly indicates otherwise.

[0179] It is further understood that the terms "first," "second," etc., are used to describe various types of information, but this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another, and do not indicate a specific order or degree of importance. In fact, the expressions "first," "second," etc., are completely interchangeable. For example, without departing from the scope of this disclosure, first information can also be referred to as second information, and similarly, second information can also be referred to as first information.

[0180] It can be further understood that, unless otherwise specified, "connection" includes both direct connections where no other components exist between the two parties and indirect connections where other components exist between them.

[0181] It is further understood that although operations are described in a specific order in the accompanying drawings in the embodiments of this disclosure, this should not be construed as requiring these operations to be performed in the specific order or serial order shown, or requiring all of the shown operations to be performed to obtain the desired result. In certain environments, multitasking and parallel processing may be advantageous.

[0182] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein.

[0183] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A distance measurement method, characterized in that, include: In response to the channel sounding transmitting device receiving a first signal for distance measurement at a first moment, a first pseudo-random number used to generate the first signal is determined, wherein the first signal characterizes the signal of the channel sounding receiving device in response to the second signal sent by the channel sounding transmitting device; Based on the correspondence between pseudo-random numbers and pseudo-random durations, the first pseudo-random duration corresponding to the first pseudo-random number is determined; The distance between the channel sounding transmitter and the channel sounding receiver is determined based on the second time, the first time, and the first pseudo-random duration, wherein the second time represents the time when the channel sounding transmitter sends the second signal.

2. The method according to claim 1, characterized in that, Determining the distance between the channel sounding transmitter and the channel sounding receiver based on the second time point, the first time point, and the first pseudo-random duration includes: A third duration is determined, wherein the third duration is a preset duration for delaying the transmission of the first signal; Based on the third duration and the first pseudo-random duration, a target delay duration is determined, wherein the target delay duration characterizes the delay duration for the channel sounding receiving device to transmit the first signal; The target duration is determined based on the target delay duration and the interval duration, wherein the interval duration is determined based on the first time and the second time, and the target duration represents the sum of the duration of transmitting the first signal and the duration of transmitting the second signal; Based on the target duration and the transmission speeds of the first and second signals, the distance between the channel sounding transmitter and the channel sounding receiver is determined.

3. The method according to claim 2, characterized in that, The first pseudo-random duration represents the duration by which the first signal is sent earlier or later. The step of determining the target delay duration based on the third duration and the first pseudo-random duration includes: In response to the first pseudo-random duration representing the duration of the early transmission of the first signal, the target delay duration is determined to be the difference between the first pseudo-random duration and the third duration; In response to the first pseudo-random duration representing the duration of delay in transmitting the first signal, the target delay duration is determined to be the sum of the first pseudo-random duration and the third duration.

4. The method according to claim 1, characterized in that, The first signal and the second signal are transmitted in a first channel, and the method further includes: An interference signal is transmitted in the second channel. The interference signal does not carry channel detection information. The third duration corresponding to the response signal of the interference signal is a random duration. The second channel is a channel other than the first channel among the channels supported by the channel detection receiving device and the channel detection transmitting device.

5. The method according to claim 1, characterized in that, The method further includes: In response to the establishment of an encrypted connection between the channel sounding transmitting device and the channel sounding receiving device, the first pseudo-random number is determined; The first pseudo-random number is generated based on preset data, or the first pseudo-random number is determined through negotiation between the channel sounding transmitting device and the channel sounding receiving device.

6. A distance measurement method, characterized in that, include: In response to the channel sounding receiving device receiving a second signal sent by the channel sounding transmitting device at a second time, the first pseudo-random number corresponding to the second signal is determined; Based on the correspondence between pseudo-random numbers and pseudo-random durations, the first pseudo-random duration corresponding to the first pseudo-random number is determined; Based on the first pseudo-random duration, a first signal is delayed and sent to the channel sounding transmitting device. The first signal represents the signal in which the channel sounding receiving device responds to the second signal sent by the channel sounding transmitting device. The channel sounding transmitting device receives the first signal at a first moment. The first time, the second time, and the first pseudo-random duration are used to determine the distance between the channel sounding transmitting device and the channel sounding receiving device.

7. The method according to claim 6, characterized in that, The step of delaying the transmission of the first signal to the channel sounding device based on the first pseudo-random duration includes: A third duration is determined, wherein the third duration is a preset duration for delaying the transmission of the first signal; Based on the third duration and the first pseudo-random duration, a target delay duration is determined, wherein the target delay duration characterizes the delay duration for the channel sounding receiving device to transmit the first signal; The first signal is sent to the channel detection and transmission device after the target delay duration is delayed.

8. The method according to claim 7, characterized in that, The method further includes: In response to receiving a third signal from the channel probe transmitting device, delaying the target delay duration, a response signal for the third signal is sent to the channel probe transmitting device, wherein the third signal represents a low-power Bluetooth communication signal other than the first signal and the second signal.

9. The method according to claim 7, characterized in that, The determination of the target delay duration based on the third duration and the first pseudo-random duration includes: In response to the first pseudo-random duration representing the duration of the early transmission of the first signal, the target delay duration is determined to be the difference between the first pseudo-random duration and the third duration; In response to the first pseudo-random duration representing the duration of delay in transmitting the first signal, the target delay duration is determined to be the sum of the first pseudo-random duration and the third duration.

10. The method according to claim 6, characterized in that, The first signal and the second signal are transmitted in a first channel, and the method further includes: In response to receiving an interference signal in the second channel, a response signal for the interference signal is transmitted. The interference signal does not carry channel detection information. The third duration corresponding to the response signal for the interference signal is a random duration. The second channel is a channel other than the first channel among the channels supported by the channel detection receiving device and the channel detection transmitting device.

11. The method according to claim 6, characterized in that, The method further includes: In response to the establishment of an encrypted connection between the channel sounding transmitting device and the channel sounding receiving device, the first pseudo-random number is determined; The first pseudo-random number is generated based on preset data, or the first pseudo-random number is determined through negotiation between the channel sounding transmitting device and the channel sounding receiving device.

12. A distance measuring device, characterized in that, include: The first determining unit is configured to, in response to the channel sounding transmitting device receiving a first signal for distance measurement at a first moment, determine a first pseudo-random number used to generate the first signal, wherein the first signal represents a signal in which the channel sounding receiving device responds to a second signal sent by the channel sounding transmitting device, and determine a first pseudo-random duration corresponding to the first pseudo-random number based on the correspondence between the pseudo-random number and the pseudo-random duration. The first processing unit is configured to determine the distance between the channel sounding transmitting device and the channel sounding receiving device based on the second time, the first time, and the first pseudo-random duration, wherein the second time represents the time when the channel sounding transmitting device transmits the second signal.

13. The apparatus according to claim 12, characterized in that, The first processing unit determines the distance between the channel sounding transmitter and the channel sounding receiver based on the second time point, the first time point, and the first pseudo-random duration in the following manner: A third duration is determined, wherein the third duration is a preset duration for delaying the transmission of the first signal; Based on the third duration and the first pseudo-random duration, a target delay duration is determined, wherein the target delay duration characterizes the delay duration for the channel sounding receiving device to transmit the first signal; The target duration is determined based on the target delay duration and the interval duration, wherein the interval duration is determined based on the first time and the second time, and the target duration represents the sum of the duration of transmitting the first signal and the duration of transmitting the second signal; Based on the target duration and the transmission speeds of the first and second signals, the distance between the channel sounding transmitter and the channel sounding receiver is determined.

14. The apparatus according to claim 13, characterized in that, The first pseudo-random duration represents the duration by which the first signal is sent earlier or later. The first processing unit determines the target delay duration based on the third duration and the first pseudo-random duration in the following manner: In response to the first pseudo-random duration representing the duration of the early transmission of the first signal, the target delay duration is determined to be the difference between the first pseudo-random duration and the third duration; In response to the first pseudo-random duration representing the duration of delay in transmitting the first signal, the target delay duration is determined to be the sum of the first pseudo-random duration and the third duration.

15. The apparatus according to claim 12, characterized in that, The first signal and the second signal are transmitted in the first channel, and the first processing unit is further configured to: An interference signal is transmitted in the second channel. The interference signal does not carry channel detection information. The third duration corresponding to the response signal of the interference signal is a random duration. The second channel is a channel other than the first channel among the channels supported by the channel detection receiving device and the channel detection transmitting device.

16. The apparatus according to claim 12, characterized in that, The first processing unit is further configured to: In response to the establishment of an encrypted connection between the channel sounding transmitting device and the channel sounding receiving device, the first pseudo-random number is determined; The first pseudo-random number is generated based on preset data, or the first pseudo-random number is determined through negotiation between the channel sounding transmitting device and the channel sounding receiving device.

17. A distance measuring device, characterized in that, include: The second determining unit is configured to determine a first pseudo-random number corresponding to the second signal in response to the channel sounding receiving device receiving a second signal sent by the channel sounding transmitting device at a second time. Based on the correspondence between pseudo-random numbers and pseudo-random durations, the first pseudo-random duration corresponding to the first pseudo-random number is determined; The second processing unit is configured to send a first signal to the channel sounding transmitter based on the first pseudo-random duration with a delay. The first signal represents the signal in which the channel sounding receiver responds to the second signal sent by the channel sounding transmitter. The channel sounding transmitter receives the first signal at a first moment. The first time, the second time, and the first pseudo-random duration are used to determine the distance between the channel sounding transmitting device and the channel sounding receiving device.

18. The apparatus according to claim 17, characterized in that, The second processing unit sends the first signal to the channel sounding transmission device with a delay based on the first pseudo-random duration as follows: A third duration is determined, wherein the third duration is a preset duration for delaying the transmission of the first signal; Based on the third duration and the first pseudo-random duration, a target delay duration is determined, wherein the target delay duration characterizes the delay duration for the channel sounding receiving device to transmit the first signal; The first signal is sent to the channel detection and transmission device after the target delay duration is delayed.

19. The apparatus according to claim 18, characterized in that, The second processing unit is further configured to: In response to receiving a third signal from the channel probe transmitting device, delaying the target delay duration, a response signal for the third signal is sent to the channel probe transmitting device, wherein the third signal represents a low-power Bluetooth communication signal other than the first signal and the second signal.

20. The apparatus according to claim 18, characterized in that, The second processing unit determines the target delay duration based on the third duration and the first pseudo-random duration in the following manner: In response to the first pseudo-random duration representing the duration of the early transmission of the first signal, the target delay duration is determined to be the difference between the first pseudo-random duration and the third duration; In response to the first pseudo-random duration representing the duration of delay in transmitting the first signal, the target delay duration is determined to be the sum of the first pseudo-random duration and the third duration.

21. The apparatus according to claim 17, characterized in that, The first signal and the second signal are transmitted in the first channel, and the second processing unit is further configured to: In response to receiving an interference signal in the second channel, a response signal for the interference signal is transmitted. The interference signal does not carry channel detection information. The third duration corresponding to the response signal for the interference signal is a random duration. The second channel is a channel other than the first channel among the channels supported by the channel detection receiving device and the channel detection transmitting device.

22. The apparatus according to claim 17, characterized in that, The processing unit is also used for: In response to the establishment of an encrypted connection between the channel sounding transmitting device and the channel sounding receiving device, the first pseudo-random number is determined; The first pseudo-random number is generated based on preset data, or the first pseudo-random number is determined through negotiation between the channel sounding transmitting device and the channel sounding receiving device.

23. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to perform the method of any one of claims 1 to 5 or 6 to 11.

24. A storage medium, characterized in that, The storage medium stores instructions that, when executed by a processor of an electronic device, enable the processor to perform the method described in any one of claims 1 to 5 or 6 to 11.