Distance determination method and device, electronic equipment and readable storage medium

CN121532955APending Publication Date: 2026-02-13BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202280004637.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2022-05-26
Publication Date
2026-02-13

AI Technical Summary

Technical Problem

In the existing technology, in short-distance ranging, infrared ranging cannot detect nearly black-body objects, electromagnetic wave ranging is costly and susceptible to interference, and acoustic wave ranging is flexible but its application in electronic equipment is not perfect.

Method used

By sending and receiving acoustic wave detection signals between electronic devices, and calculating the distance based on the received target detection signal and time difference, it ensures the monitoring of channel status and the timely transmission of confirmation messages, and improves the success rate and refresh frequency of ranging.

Benefits of technology

It achieves accurate distance measurement between electronic devices, improves the success rate and refresh frequency of ranging, reduces the ranging interval, and is suitable for a variety of scenarios such as indoor positioning and mobile payment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121532955A_ABST
    Figure CN121532955A_ABST
Patent Text Reader

Abstract

The invention relates to a distance determination method and device, electronic equipment and a readable storage medium, and the method comprises the steps: in a current distance measurement process, sequentially transmitting at least one first detection signal to second electronic equipment until a confirmation message of the second electronic equipment for a first target detection signal in the at least one first detection signal is received, sending at least one first detection signal in the next distance measurement process; receiving a second target detection signal sent by a second electronic device for the first target detection signal in the current distance measurement process, and a first target time difference; and determining the distance between the first electronic equipment and the second electronic equipment in the current distance measurement process according to the second target detection signal and the first target time difference. According to the method disclosed by the invention, the next distance measurement process can be efficiently started, the distance measurement frequency is improved, accurate data transmission is facilitated, and the success rate of distance measurement is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Distance determination method, device, electronic device, and readable storage medium Technical Field

[0001] The present disclosure relates to the field of electronic devices, and in particular to a distance determination method, device, electronic device, and readable storage medium. Background Art

[0002] With technological advancements, short-range distance measurement can be achieved using various methods, including infrared ranging and electromagnetic ranging. Infrared ranging cannot detect the distance to objects that approximate black bodies, while electromagnetic ranging is costly and susceptible to electromagnetic interference. Acoustic ranging is widely used in short-range distance measurement scenarios due to its ease of implementation and flexibility. However, the application of acoustic ranging in electronic devices is still not fully developed.

[0003] Summary of the Invention

[0004] To overcome the problems existing in the related art, the present disclosure provides a distance determination method, device, electronic device and readable storage medium.

[0005] According to a first aspect of an embodiment of the present disclosure, a distance determination method is provided, which is applied to a first electronic device, and the method includes:

[0006] In the current ranging process, at least one first detection signal is sequentially sent to the second electronic device until a confirmation message of the first target detection signal in the at least one first detection signal is received from the second electronic device, and then at least one first detection signal is sent in the next ranging process;

[0007] receiving a second target detection signal and a first target time difference sent by a second electronic device in response to the first target detection signal in the current ranging process, wherein the first target time difference is used to represent: a time difference between a time when the second electronic device receives the first target detection signal and a time when an acoustic wave receiver within the second electronic device receives the second target detection signal;

[0008] The distance between the first electronic device and the second electronic device in the current ranging process is determined according to the time difference between the second target detection signal and the first target.

[0009] In some embodiments, the method further comprises:

[0010] Before sending the at least one first detection signal in the current ranging process, corresponding numbers are sequentially configured for the at least one first detection signal.

[0011] In some embodiments, the sending at least one first detection signal to the second electronic device in sequence includes:

[0012] Sending a first detection signal with a current number to the second electronic device;

[0013] In response to not receiving a confirmation message corresponding to the first detection signal with the current number, retransmitting the first detection signal with a number next to the current number.

[0014] In some embodiments, the receiving a second target detection signal sent by a second electronic device in response to the first target detection signal in the current ranging process, and the first target time difference, includes:

[0015] receiving a second target detection signal carrying a target number sent by the second electronic device;

[0016] receiving a first target time difference carrying the target number and sent by the second electronic device;

[0017] The target number is the number of the first target detection signal.

[0018] In some embodiments, determining the distance between the first electronic device and the second electronic device in the current ranging process based on the second target detection signal and the time difference between the first target includes:

[0019] determining, according to the target number carried by the second target detection signal and the target number carried by the first target time difference, the first target detection signal corresponding to the target number;

[0020] The distance is determined according to the first target detection signal, the second target detection signal, and the first target time difference.

[0021] In some embodiments, determining the distance based on the first target detection signal, the second target detection signal, and the first target time difference includes:

[0022] determining a time when the first electronic device receives the first target detection signal;

[0023] determining a second time difference based on the time when the first electronic device receives the first target detection signal and the time when the first electronic device receives the second target detection signal;

[0024] The distance is determined according to the first target time difference and the second time difference.

[0025] In some embodiments, the method further comprises:

[0026] In response to receiving the second target detection signal and the first target time difference, corresponding confirmation messages are respectively sent to the second electronic device.

[0027] In some embodiments, the method further comprises:

[0028] Before sending the first detection signal and during the process of sending the first detection signal, monitoring a channel state of a channel corresponding to the first detection signal;

[0029] If the channel is occupied before sending the first detection signal, sending the first detection signal when the channel is idle;

[0030] If a signal collision occurs in the channel during the process of sending the first detection signal, the sending of the first detection signal is stopped.

[0031] According to a second aspect of an embodiment of the present disclosure, a distance determination method is provided, which is applied to a second electronic device. The method includes:

[0032] In response to receiving a first target detection signal sent by a first electronic device during the current ranging process, sending a confirmation message corresponding to the first target detection signal to the first electronic device, wherein the first target detection signal is a detection signal among the at least one first detection signal sent by the first electronic device during the current ranging process;

[0033] sending at least one second detection signal to the first electronic device in sequence until receiving a confirmation message from the first electronic device regarding a second target detection signal in the at least one second detection signal;

[0034] Determining a first time difference, wherein the first time difference is used to represent: a time difference between a time when the second electronic device receives the first target detection signal and a time when an acoustic wave receiver inside the second electronic device receives the second target detection signal;

[0035] At least one first time difference is sent to the first electronic device in sequence, and until a confirmation message of the first target time difference in the at least one first time difference is received from the first electronic device, at least one second detection signal is sent in the next ranging process.

[0036] In some embodiments, the at least one first detection signal is sequentially assigned a corresponding number;

[0037] The sending at least one second detection signal to the first electronic device in sequence includes:

[0038] generating, according to the target number of the first target detection signal, at least one second detection signal carrying the target number in a set order;

[0039] At least one second detection signal carrying the target number is sent to the first electronic device in sequence.

[0040] In some embodiments, the at least one first detection signal is sequentially assigned a corresponding number;

[0041] The determining of the first time difference includes:

[0042] determining a time when the second electronic device receives the second target detection signal;

[0043] determining a difference between a time when the second electronic device receives the second target detection signal and a time when the second electronic device receives the first target detection signal;

[0044] At least one first time difference carrying the target number in a set order is generated according to the difference value and the target number of the first target detection signal.

[0045] In some embodiments, the method further comprises:

[0046] Before sending the second detection signal or the first time difference, or during sending the second detection signal or the first time difference, monitoring a channel state of a corresponding channel;

[0047] If the channel is occupied before sending the second detection signal or the first time difference, sending the signal when the channel is idle;

[0048] If a signal collision occurs in the channel during the process of sending the second detection signal or the first time difference, the sending of the second detection signal or the first time difference is stopped.

[0049] According to a third aspect of an embodiment of the present disclosure, a distance determination device is provided, which is configured in a first electronic device, and includes:

[0050] a first sending module, configured to sequentially send at least one first detection signal to a second electronic device during a current ranging process, and to send at least one first detection signal during a next ranging process after receiving a confirmation message from the second electronic device regarding a first target detection signal in the at least one first detection signal;

[0051] a receiving module, configured to receive a second target detection signal and a first target time difference sent by a second electronic device in response to the first target detection signal in the current ranging process, wherein the first target time difference is used to represent: a time difference between a time when the second electronic device receives the first target detection signal and a time when an acoustic wave receiver within the second electronic device receives the second target detection signal;

[0052] The first determining module is configured to determine the distance between the first electronic device and the second electronic device during the current ranging process according to the second target detection signal and the first target time difference.

[0053] According to a fourth aspect of an embodiment of the present disclosure, a distance determination device is provided, which is configured in a second electronic device, and includes:

[0054] a second sending module, configured to, in response to receiving a first target detection signal sent by a first electronic device during a current ranging process, send a confirmation message corresponding to the first target detection signal to the first electronic device, wherein the first target detection signal is a detection signal among the at least one first detection signal sent by the first electronic device during the current ranging process;

[0055] The second sending module is further configured to sequentially send at least one second detection signal to the first electronic device until receiving a confirmation message from the first electronic device regarding a second target detection signal in the at least one second detection signal;

[0056] a second determining module, configured to determine a first time difference, wherein the first time difference is used to represent a time difference between a time when the second electronic device receives the first target detection signal and a time when an acoustic wave receiver inside the second electronic device receives the second target detection signal;

[0057] The second sending module is also used to send at least one first time difference to the first electronic device in sequence, and until a confirmation message of the first target time difference in the at least one first time difference is received from the first electronic device, at least one second detection signal is sent in the next ranging process.

[0058] According to a fifth aspect of the embodiments of the present disclosure, there is provided an electronic device, including:

[0059] processor;

[0060] a memory for storing processor-executable instructions;

[0061] The processor is configured to: execute the distance determination method as described in any one of the first aspect or the second aspect.

[0062] According to a sixth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the distance determination method as described in any one of the first aspect or the second aspect.

[0063] The technical solutions provided by the embodiments of the present disclosure may have the following beneficial effects:

[0064] In the disclosed method, the first electronic device can promptly and accurately obtain data transmission status based on the feedback from the first detection signal sent during the current ranging process. This facilitates the timely and efficient initiation of the next ranging process upon receipt of a confirmation message, and also facilitates accurate data transmission, improving the success rate of ranging. Furthermore, by immediately initiating the next ranging process upon receipt of a confirmation message, the time interval between two ranging measurements is effectively reduced, thereby increasing the refresh rate of ranging measurements.

[0065] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0067] Fig. 1 is a schematic diagram showing an application scenario according to an exemplary embodiment.

[0068] Fig. 2 is a flow chart showing a distance determination method according to an exemplary embodiment.

[0069] Fig. 3 is a flow chart showing a distance determination method according to an exemplary embodiment.

[0070] Fig. 4 is a timing diagram showing information transmission and reception at a first electronic device according to an exemplary embodiment.

[0071] Fig. 5 is a timing diagram showing information transmission and reception at a second electronic device according to an exemplary embodiment.

[0072] Fig. 6 is a timing diagram showing the first electronic device sending and receiving part of information according to an exemplary embodiment.

[0073] Fig. 7 is a timing diagram showing the second electronic device sending and receiving part of information according to an exemplary embodiment.

[0074] Fig. 8 is a block diagram showing a distance determination apparatus according to an exemplary embodiment.

[0075] Fig. 9 is a block diagram showing a distance determination apparatus according to an exemplary embodiment.

[0076] Fig. 10 is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0077] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, like numbers in different figures represent the same or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with certain aspects of the present invention, as detailed in the appended claims.

[0078] In related technologies, to ensure the independence of each ranging process, the following two methods are generally used:

[0079] First, each ranging process is completely independent in time. For example, when device A sends a detection signal and receives a detection signal from device B, device A will not send the next detection signal until it has calculated the distance between the two devices based on the data sent by device B.

[0080] In this method, each distance measurement is completely independent in time, and the time interval between the output of two adjacent distance values ​​is too large, which greatly reduces the refresh frequency of the distance measurement.

[0081] Second, each ranging process uses a frequency division method. For example, device A can send multiple detection signals on different signal frequency bands, and combine them with the detection signals sent by device B on each signal frequency band to calculate the distance in each signal frequency band.

[0082] This method can solve the problem of low ranging refresh frequency, but it will cause spectrum waste.

[0083] Furthermore, the aforementioned two methods do not account for missed or erroneous signal detection. This means that the methods described in the related art cannot determine whether data transmission is successful. For example, device B may not be able to successfully receive or decode the detection signal sent by device A, which could result in ranging failure.

[0084] FIG1 is a schematic diagram of an application scenario of a distance determination method according to an exemplary embodiment. As shown in FIG1 , the distance determination method of the embodiment of the present disclosure can be applied to detect the distance between a first electronic device 101 and a second electronic device 102. The first electronic device 101 can be a mobile phone, a smart speaker, a tablet computer, a smart wearable device, a laptop computer, a smart home Internet of Things (IoT) device, etc. The second electronic device 102 can also be a mobile phone, a smart speaker, a tablet computer, a smart wearable device, a laptop computer, a smart home Internet of Things (IoT) device, etc. The types of the first electronic device 101 and the second electronic device 102 can be the same or different, and the first electronic device 101 can be the control device of the two electronic devices.

[0085] The first electronic device 101 includes a first acoustic wave transmitter 1011 and a first acoustic wave receiver 1012, while the second electronic device 102 includes a second acoustic wave transmitter 1021 and a second acoustic wave receiver 1022. The first and second electronic devices 101 and 102 are capable of both transmitting and receiving acoustic waves. The first acoustic wave transmitter 1011 or the second acoustic wave transmitter 1021 includes an acoustic wave signal generator, a digital-to-analog converter (DAC), and an acoustic wave signal transmitter. The first acoustic wave receiver 1012 or the second acoustic wave receiver 1022 includes an acoustic wave signal receiver, an analog-to-digital converter (ADC), and an acoustic wave signal detector.

[0086] It is understandable that for terminal devices such as mobile phones, the speakers, receivers or microphones inside the terminal devices can be regarded as ultrasonic transmitting / receiving devices, without the need to add additional hardware structures.

[0087] The distance determination method in the embodiments of the present disclosure can be applied to the following scenarios, for example:

[0088] In an indoor positioning scenario, the first electronic device 101 is, for example, a smart speaker, and the second electronic device 102 is, for example, a robot vacuum. The distance determination method in the embodiment of the present disclosure is used to locate the position of the second electronic device 102.

[0089] In a mobile payment scenario, the first electronic device 101 is, for example, a payment terminal, and the second electronic device 102 is, for example, a cash register or other payment device. The distance determination method in the disclosed embodiments is used to determine the distance to the second electronic device 102, so as to facilitate customizable control strategies, such as waking up a payment interface when the distance to the second electronic device 102 is less than a threshold.

[0090] In the password sharing scenario, both the first electronic device 101 and the second electronic device 102 can be mobile phones. The distance determination method in the disclosed embodiment is used to determine the distance between the two mobile phones so that the password can be transmitted when the distance is less than a threshold. Compared with existing methods (such as scanning a code), it is simpler, faster, and reduces power consumption.

[0091] In a speaker relay scenario, the first electronic device 101 is, for example, a mobile phone, and the second electronic device is, for example, a speaker. The distance determination method in the disclosed embodiments is used to determine the distance between the two devices and perform personalized control based on the distance. For example, when the distance is greater than a threshold, the first electronic device 101 plays audio or video, and when the distance is less than the threshold, the second electronic device 102 continues to play the aforementioned audio or video.

[0092] FIG2 is a flow chart of a distance determination method according to an exemplary embodiment. As shown in FIG2 , the distance determination method is used in a first electronic device. The method of this embodiment may include the following steps.

[0093] Step S210: In the current ranging process, at least one first detection signal is sequentially sent to the second electronic device until a confirmation message of the first target detection signal in the at least one first detection signal is received from the second electronic device, and then at least one first detection signal is sent in the next ranging process.

[0094] Step S220: receiving a second target detection signal sent by a second electronic device in response to the first target detection signal in the current ranging process, and the first target time difference.

[0095] Step S230: Determine the distance between the first electronic device and the second electronic device in the current ranging process according to the second target detection signal and the first target time difference.

[0096] Among them, in step S210, the current ranging process can be applied to any ranging of the first electronic device, and the next ranging process corresponds to the first ranging process after the current ranging process. The confirmation message (ACK) is used to indicate that the second electronic device has successfully received and successfully decoded the first target detection signal. The first electronic device can send a signal in the form of a sound wave (such as ultrasound), such as a first detection signal, through its own first sound wave transmitter 1011, and the second electronic device can send a signal in the form of a sound wave, such as ACK, through the corresponding second sound wave transmitter 1021; the sound wave receiver in the first electronic device or the second electronic device is used to receive a signal in the form of a sound wave, such as the first detection signal.

[0097] In this step, in conjunction with the timing diagrams of the first electronic device shown in FIG4 to FIG7, the first electronic device may sequentially send at least one first detection signal (signal A) at a set time interval. 1-2 ), the first electronic device stops sending the first detection signal of the current ranging process and starts sending the first detection signal of the next ranging process. When sending the first detection signal of the next ranging process, the first electronic device does not need to wait for the detection signal (signal B) or the first time difference (signal C) sent by the second electronic device. This can effectively shorten the interval between the two ranging processes and increase the ranging refresh frequency.

[0098] In step S220, the first target time difference is used to represent the time difference between the time when the second electronic device receives the first target detection signal and the time when the sound wave receiver inside the second electronic device receives the second target detection signal. The first target time difference (t2 = t BB –t BA ) is determined by the second electronic device. The detailed implementation method can be referred to the description of the following embodiment and will not be repeated here.

[0099] In this step, after receiving the first detection signal, the second electronic device will also send a second detection signal in the form of sound waves and the first time difference. The second detection signal received by the first electronic device is referred to as the second target detection signal, and the first time difference received is referred to as the first target time difference.

[0100] In one example, as shown in FIG4 to FIG7, after successfully receiving the message sent by the second electronic device, the first electronic device may also reply a confirmation message to the second electronic device. The method in this example may also include the following steps:

[0101] Step S221: In response to receiving the second target detection signal and the first target time difference, the first electronic device sends a corresponding confirmation message to the second electronic device. In this step, the first electronic device sends a corresponding confirmation message to the second electronic device after successfully receiving the second target detection signal (such as B 1- 2-2 ) after successfully receiving the first target time difference (such as C 1-2-2-1 ) After the data transmission is completed, an ACK is also sent to the second electronic device. This ensures that both communicating parties can be informed of the data transmission status in a timely manner to prevent the ranging results of the current ranging process from being affected by data omissions or decoding failures. In addition, after confirming that the data transmission is successful, calculations can be performed in a timely manner to improve ranging efficiency.

[0102] In step S230, the first detection signal sent by the first electronic device can be received by the second electronic device and can also be received by the first electronic device's own sound wave receiver; similarly, the second detection signal sent by the second electronic device can be received by the first electronic device and can also be received by the second electronic device's own sound wave receiver. Therefore, in the current ranging process, the first electronic device and the second electronic device can transmit and receive sound wave signals to and from each other. In the ranging process, the first electronic device and the second electronic device are used as the transmitting end or the receiving end respectively, and the transmitting and receiving devices are separated to avoid using echoes for ranging and improve the problem of sound wave absorption.

[0103] In this step, the first electronic device can measure the time of flight (TOF) of the acoustic wave signal in the air based on the parameter information corresponding to the second target detection signal (such as the reception time) and the first target time difference, thereby determining the distance between the two devices based on the TOF principle.

[0104] In the disclosed method, the first electronic device can promptly and accurately obtain data transmission status based on the feedback from the first detection signal sent during the current ranging process. This facilitates the timely and efficient initiation of the next ranging process upon receipt of a confirmation message, and also facilitates accurate data transmission, improving the success rate of ranging. Furthermore, by immediately initiating the next ranging process upon receipt of a confirmation message, the time interval between two ranging measurements is effectively reduced, thereby increasing the refresh rate of ranging measurements.

[0105] In an exemplary embodiment, the method of this embodiment may further include the following steps:

[0106] Step S200: Before sending at least one first detection signal in the current ranging process, sequentially configure corresponding numbers for at least one first detection signal.

[0107] In step S200, the first electronic device may encode at least one first detection signal according to a preset numbering rule during each ranging process. a-n Each first detection signal is represented by a numbering form, where A represents the signal sent by the first electronic device, a represents the a-th ranging process, and n represents the n-th first detection signal of the a-th ranging process.

[0108] As shown in FIG4 , taking the current ranging process as the first ranging as an example, the at least one first detection signal in the current ranging process may be: A 1-1 , A 1-2 ,……,A 1-n The content of each first detection signal is the same, but the number is different, so the first detection signals other than the first first detection signal can also be regarded as copies of the first first detection signal. At least one first detection signal in the next ranging of the current ranging process can be: A 2-1 , A 2-2 ,……,A 2-n .

[0109] In one embodiment of this step, before each first detection signal is transmitted during each ranging process, the first detection signals are sequentially assigned corresponding numbers. In another embodiment of this step, before each ranging process, a predetermined number of first detection signals are pre-assigned corresponding numbers during the ranging process. It will be appreciated that in this approach, if an ACK is received from the second electronic device, the predetermined number of first detection signals need not be transmitted in full.

[0110] In an exemplary embodiment, the method of this embodiment may include step S200 and steps S210 to S230.

[0111] In the first example, in step S210 of this embodiment, sending at least one first detection signal to the second electronic device in sequence may include the following steps:

[0112] Step S2101: Send a first detection signal with a current number to a second electronic device.

[0113] Step S2102: In response to not receiving a confirmation message corresponding to the first detection signal of the current number, retransmit the first detection signal of the next number to the current number.

[0114] Among them, in step S2101, combined with Figure 4, the current number is A 1-1 The first electronic device sends A to the second electronic device. 1-1 The first detection signal.

[0115] In step S2102, if the first electronic device does not receive the corresponding ACK during the process of sending the first detection signal to the second electronic device, it will retransmit the first detection signal in the current ranging process, such as sending ACK. 1-2 , so as to ensure that the second electronic device can successfully receive the first detection signal in the current ranging process, thereby facilitating the completion of the current ranging process. As shown in FIG4 , two adjacent ranging processes have an intersection on the time axis, which can effectively reduce the output interval between the two ranging results and increase the refresh rate of the ranging results.

[0116] In the second example, step S220 of this embodiment may include the following steps:

[0117] Step S2201: Receive a second target detection signal carrying a target number sent by a second electronic device.

[0118] Step S2202: Receive a first target time difference carrying a target number sent by a second electronic device.

[0119] The target number is the number of the first target detection signal.

[0120] In step S2201, the second electronic device may use a matching numbering rule to number the second detection signal. a-n-m Each first detection signal is represented by a numbering format, where B represents the signal sent by the second electronic device, a represents the a-th ranging process, n represents the n-th first detection signal received by the second electronic device during the a-th ranging process, and m represents the m-th second detection signal during the a-th ranging process.

[0121] 5, taking the current ranging process as the first ranging as an example, the target number of the first detection signal, i.e., the first target detection signal, received by the second electronic device during the current ranging process may be: A1-2 In the current ranging process, the second electronic device may send at least one second detection signal, and the at least one second detection signal is: B 1-2-1 , B 1-2-2 ,……,B 1-2-m The second detection signal received by the first electronic device is recorded as the second target detection signal. For example, the second target detection signal is numbered: B 1-2-2 .

[0122] In step S2202, the second electronic device may use C a-n-m-k In the numbering format, C represents the signal determined and sent by the second electronic device, a represents the a-th ranging process, n represents the n-th first detection signal received by the second electronic device during the a-th ranging process, m represents the m-th second detection signal received by the first electronic device during the a-th ranging process, and k represents the k-th first time difference during the a-th ranging process.

[0123] In combination with FIG. 4 to FIG. 5 and the above examples, if the first detection signal number received by the second electronic device is: A 1- 2. The number of the second detection signal (second target detection signal) received by the first electronic device is: B 1-2-2 Then, in the current ranging process, the second electronic device may determine and send at least one first time difference, and the at least one first time difference is: C 1- 2-2-1 , C 1-2-2-2 ,……,C 1-2-2-m The first time difference received by the first electronic device is recorded as the first target time difference. For example, the first target time difference is numbered as: C 1-2-2-1 .

[0124] In this embodiment, during the numbering process of the second electronic device, both the second detection signal and the first time difference carry the number information of the received first detection signal, such as "1-2" in the example of FIG. 4 or FIG. 5 .

[0125] In the third example, step S230 in this embodiment may include the following steps:

[0126] Step S2301: Determine the first target detection signal corresponding to the target number according to the target number carried by the second target detection signal and the target number carried by the first target time difference.

[0127] Step S2302: Determine the distance based on the first target detection signal, the second target detection signal, and the first target time difference.

[0128] In step S2301, after receiving the second target detection signal or the first target time difference, the first electronic device can know that the first detection signal received by the second electronic device is the first target detection signal based on the target numbers carried by the two.

[0129] In step S2302, the first electronic device determines the distance based on the first target detection signal, the second target detection signal and the relevant parameters of the first target time difference (such as the receiving time), combined with the timing diagrams of Figures 6 to 7. Figures 6 and 7 illustrate the timing diagrams of the signals received by the device. According to the TOF principle, the distance can be determined.

[0130] In a possible implementation, step S2302 may include the following steps:

[0131] Step S2302-1: Determine the time when the first electronic device receives the first target detection signal. In this step, after the first electronic device learns that the first detection signal received by the second electronic device is the first target detection signal, it can determine the time when its own sound wave receiver receives the first target detection signal, which is recorded as t AA .

[0132] Step S2302-2: Determine the second time difference based on the time when the first electronic device receives the first target detection signal and the time when the first electronic device receives the second target detection signal. In this step, the time when the first electronic device receives the second target detection signal can be recorded as t AB , the second time difference t1 = t AB –t AA .

[0133] Step S2302-3, according to the first target time difference (t2=t BB –t BA ) and the second time difference to determine the distance. In this step, combined with the first target time difference (t2) determined and sent by the second electronic device, the first electronic device can determine the distance d between it and the second electronic device. d satisfies:

[0134]

[0135] Wherein, D is the sum of the distance between the sound wave transmitter and the sound wave receiver in the first electronic device and the distance between the sound wave transmitter and the sound wave receiver in the second electronic device, and u is the speed of sound in air (approximately 340 m / s).

[0136] For example, the speed of sound under different temperature conditions can be calculated by the following formula: u=331.6+0.6T (m / s), where T is degrees Celsius and 331.6 m / s is the propagation speed of sound waves in air at a temperature of 0 degrees Celsius.

[0137] In an exemplary embodiment, the method of this embodiment may further include the following steps:

[0138] Step S201: Before sending a first detection signal and during sending the first detection signal, monitor the channel state of the channel corresponding to the first detection signal.

[0139] Step S202: If the channel is occupied before the first detection signal is sent, the first detection signal is sent when the channel is idle.

[0140] Step S203: If a signal collision occurs in the channel during the process of sending the first detection signal, stop sending the first detection signal.

[0141] This embodiment is applicable to the first electronic device adjusting the timing of sending a signal by performing channel monitoring before or during sending a signal.

[0142] In step S201, the first electronic device may monitor the channel based on the carrier sense multicast (CSMA) mechanism and transmit a signal when the channel is idle. It is understood that during monitoring, multiple devices may transmit simultaneously due to an idle channel. Therefore, during the process of sending the first detection signal, the channel status must still be monitored to determine whether there is a signal collision.

[0143] In step S202, if the channel is occupied before sending the first detection signal (such as the second electronic device may occupy the channel to send the second detection signal), the first electronic device remains waiting and sends the first detection signal when the channel is idle to avoid a collision of the sent signals, which may cause both signals to fail to be successfully demodulated.

[0144] In step S203, if there is a signal collision during the process of sending the first detection signal, all signal-sending devices need to stop sending and adopt a backoff strategy. In this step, the first electronic device stops sending the first detection signal and still keeps monitoring the channel.

[0145] FIG3 is a flow chart of a distance determination method according to an exemplary embodiment. As shown in FIG3 , the distance determination method is used in a second electronic device. The method of this embodiment may include the following steps.

[0146] Step S310: In the current ranging process, in response to receiving a first target detection signal sent by a first electronic device, sending a confirmation message corresponding to the first target detection signal to the first electronic device.

[0147] Step S320: sending at least one second detection signal to the first electronic device in sequence until receiving a confirmation message from the first electronic device regarding the second target detection signal in the at least one second detection signal.

[0148] Step S330: determine the first time difference.

[0149] Step S340: sending at least one first time difference to the first electronic device in sequence, until receiving a confirmation message from the first electronic device for the first target time difference in the at least one first time difference, and sending at least one second detection signal in the next ranging process.

[0150] In step S310, the first target detection signal is a detection signal in at least one first detection signal sent by the first electronic device during the current ranging process. After the second electronic device receives the first target detection signal and successfully decodes it (decodes and passes the check code verification), it sends an ACK to the first electronic device.

[0151] In step S320, in combination with the timing diagram of the second electronic device shown in Figure 5, after receiving the first target detection signal, the second electronic device will send at least one second detection signal in the current ranging process at a set time interval until it receives an ACK from the first electronic device and stops sending the second detection signal of the current ranging process.

[0152] In step S330, the first time difference represents the time difference between the time when the second electronic device receives the first target detection signal and the time when the acoustic wave receiver within the second electronic device receives the second target detection signal. In this step, after receiving the ACK from the first electronic device, the second electronic device can calculate and determine the first time difference (t2).

[0153] In step S340, the second electronic device continues to transmit the first time difference using a retransmission method, i.e., it transmits at least one first time difference at a set time interval until it receives an ACK from the first electronic device. After receiving the ACK from the first electronic device for the first time difference, the second electronic device can initiate transmission of the second detection signal during the next ranging process. This effectively reduces waiting time on the timeline and helps increase the ranging refresh rate.

[0154] In an exemplary embodiment, at least one first detection signal is sequentially assigned a corresponding number. In this embodiment, step S320 may include the following steps:

[0155] Step S3201: Generate at least one second detection signal carrying the target number in a set order according to the target number of the first target detection signal.

[0156] Step S3202: Send at least one second detection signal carrying a target number to the first electronic device in sequence.

[0157] Among them, in step S3201, the second electronic device uses the set numbering rule to generate the corresponding number of the second detection signal according to the target number. Combined with Figures 4 to 5 and the description of the above embodiment, if the target number of the first detection signal received by the second electronic device is: A 1-2 , then the second electronic device may use the following numbering format for at least one second detection signal: B 1-2-m , where B represents the signal sent by the second electronic device, and m represents the mth second detection signal. The number of the second detection signal carries the target number "1-2".

[0158] In step S3202, the second electronic device sequentially sends at least one second detection signal carrying "1-2" to the first electronic device at a set time interval, for example, the second detection signals B and B are sequentially sent. 1-2-1 , B 1-2-2 ,……,B 1-2- m.

[0159] In an exemplary embodiment, at least one first detection signal is sequentially assigned a corresponding number. In this embodiment, step S330 may include the following steps:

[0160] Step S3301: Determine the time when the second electronic device receives the second target detection signal.

[0161] Step S3302: Determine the difference between the time when the second electronic device receives the second target detection signal and the time when the second electronic device receives the first target detection signal.

[0162] Step S3303: Generate at least one first time difference carrying the target number in a set order according to the difference value and the target number of the first target detection signal.

[0163] Among them, in step S3301, the second target detection signal is the second detection signal successfully received by the first electronic device, that is, the second detection signal corresponding to the ACK received by the second electronic device. In this step, the second electronic device determines the time when its own sound wave receiver receives the second target detection signal, which is recorded as t BB .

[0164] In step S3302, the time when the second electronic device receives the first target detection signal is recorded as t BA The second electronic device calculates the difference t2 = t BB –t BA .

[0165] In step S3303, the second electronic device encodes the difference value and the number together to obtain a first time difference carrying the number.

[0166] In combination with the description of the above embodiments shown in FIG. 4 and FIG. 5, if the target number of the first detection signal received by the second electronic device is: A 1-2 The number of the second detection signal (second target detection signal) received by the first electronic device is: B 1- 2-2 Then the second electronic device may use the following numbering format for at least one first time difference: C 1-2-2-k , where B represents the signal determined and sent by the second electronic device, and k represents the kth first time difference. The first time difference is numbered to carry the target number "1-2," or in other words, to carry the number of the second target detection signal containing the target number, i.e., "1-2-2."

[0167] In an exemplary embodiment, the method of this embodiment further includes:

[0168] Step S301: Before sending the second detection signal or the first time difference, or during the process of sending the second detection signal or the first time difference, monitor the channel status of the corresponding channel.

[0169] Step S302: If the channel is occupied before sending the second detection signal or the first time difference, send the signal when the channel is idle.

[0170] Step S303: If there is a signal collision in the channel during the process of sending the second detection signal or the first time difference, stop sending the second detection signal or the first time difference.

[0171] This embodiment is applicable to the second electronic device adjusting the timing of sending a signal by performing channel monitoring before or during sending a signal.

[0172] In step S301, the second electronic device may monitor the channel based on the carrier sense multicast (CSMA) mechanism and transmit a signal when the channel is idle. It is understandable that during monitoring, multiple devices may transmit simultaneously due to the channel being idle. Therefore, during the process of sending the second detection signal or the first time difference, the channel status must still be monitored to determine whether there is a signal collision.

[0173] In step S302, if the channel is occupied before sending the second detection signal or the first time difference (such as the first electronic device may occupy the channel to send the first detection signal), the second electronic device remains waiting and sends again when the channel is idle to avoid a collision of the sent signals, which may cause both signals to fail to be successfully demodulated.

[0174] In step S303, if there is a signal collision during the transmission of the second detection signal or the first time difference, the signal transmitting device needs to stop transmitting and adopt a backoff strategy. In this step, the second electronic device stops transmitting the first detection signal and still keeps monitoring the channel.

[0175] FIG8 is a block diagram of a distance determination device according to an exemplary embodiment. Referring to FIG8 , the device is configured in a first electronic device and includes a first sending module 810 , a receiving module 820 , and a first determining module 830 .

[0176] The first sending module 810 is configured to send at least one first detection signal to the second electronic device in sequence during the current ranging process, and to send at least one first detection signal in the next ranging process until a confirmation message of the second electronic device for the first target detection signal in the at least one first detection signal is received.

[0177] The receiving module 820 is configured to receive a second target detection signal sent by the second electronic device in response to the first target detection signal in the current ranging process, as well as a first target time difference, wherein the first target time difference is used to represent: the time difference between the time when the second electronic device receives the first target detection signal and the time when the acoustic wave receiver inside the second electronic device receives the second target detection signal.

[0178] The first determining module 830 is configured to determine the distance between the first electronic device and the second electronic device in the current ranging process according to the second target detection signal and the first target time difference.

[0179] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0180] FIG9 is a block diagram of a distance determination device according to an exemplary embodiment. Referring to FIG9 , the device is configured in a second electronic device and includes a second sending module 910 and a second determining module 920 .

[0181] The second sending module 910 is configured to, in response to receiving a first target detection signal sent by the first electronic device during the current ranging process, send a confirmation message corresponding to the first target detection signal to the first electronic device, wherein the first target detection signal is a detection signal among at least one first detection signal sent by the first electronic device during the current ranging process.

[0182] The second sending module 910 is configured to sequentially send at least one second detection signal to the first electronic device until receiving a confirmation message from the first electronic device regarding the second target detection signal in the at least one second detection signal.

[0183] The second determining module 920 is configured to determine a first time difference, wherein the first time difference is used to represent: a time difference between a time when the second electronic device receives the first target detection signal and a time when the acoustic wave receiver inside the second electronic device receives the second target detection signal;

[0184] The second sending module 910 is configured to send at least one first time difference to the first electronic device in sequence, and send at least one second detection signal in the next ranging process until a confirmation message of the first target time difference in the at least one first time difference is received from the first electronic device.

[0185] Figure 10 is a block diagram of an electronic device 1000 according to an exemplary embodiment. For example, the device 1000 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0186] 10 , apparatus 1000 may include one or more of the following components: a processing component 1002 , a memory 1004 , a power component 1006 , a multimedia component 1008 , an audio component 1010 , an input / output (I / O) interface 1012 , a sensor component 1014 , and a communication component 1016 .

[0187] The processing component 1002 generally controls the overall operation of the device 1000, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. The processing component 1002 may include one or more processors 1020 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 1002 may include one or more modules to facilitate interaction between the processing component 1002 and other components. For example, the processing component 1002 may include a multimedia module to facilitate interaction between the multimedia component 1008 and the processing component 1002.

[0188] The memory 1004 is configured to store various types of data to support the operations of the device 1000. Examples of such data include instructions for any application or method operating on the device 1000, contact data, phone book data, messages, pictures, videos, etc. The memory 1004 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 memory, flash memory, magnetic disk, or optical disk.

[0189] The power supply component 1006 provides power to the various components of the device 1000. The power supply component 1006 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device 1000.

[0190] The multimedia component 1008 includes a screen that provides an output interface between the device 1000 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 touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1008 includes a front camera and / or a rear camera. When the device 1000 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.

[0191] The audio component 1010 is configured to output and / or input audio signals. For example, the audio component 1010 includes a microphone (MIC) that is configured to receive external audio signals when the device 1000 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 1004 or transmitted via the communication component 1016. In some embodiments, the audio component 1010 also includes a speaker for outputting audio signals.

[0192] I / O interface 1012 provides an interface between processing component 1002 and peripheral interface modules, such as a keyboard, click wheel, buttons, etc. These buttons may include but are not limited to: a home button, volume buttons, a start button, and a lock button.

[0193] The sensor assembly 1014 includes one or more sensors for providing various aspects of the status assessment of the device 1000. For example, the sensor assembly 1014 can detect the open / closed state of the device 1000, the relative positioning of components, such as the display and keypad of the device 1000. The sensor assembly 1014 can also detect changes in the position of the device 1000 or a component of the device 1000, the presence or absence of user contact with the device 1000, the orientation or acceleration / deceleration of the device 1000, and changes in the temperature of the device 1000. The sensor assembly 1014 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 1014 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1014 can also include an accelerometer, a gyroscope, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0194] The communication component 1016 is configured to facilitate wired or wireless communication between the device 1000 and other devices. The device 1000 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1016 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1016 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0195] In an exemplary embodiment, the apparatus 1000 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 above-described methods.

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

[0197] Other embodiments of the present invention will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the invention being indicated by the following claims.

[0198] It should be understood that the present invention is not limited to the exact construction described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims. Industrial Applicability

[0199] In the disclosed method, the first electronic device can promptly and accurately obtain data transmission status based on the feedback from the first detection signal sent during the current ranging process. This facilitates the timely and efficient initiation of the next ranging process upon receipt of a confirmation message, and also facilitates accurate data transmission, improving the success rate of ranging. Furthermore, by immediately initiating the next ranging process upon receipt of a confirmation message, the time interval between two ranging measurements is effectively reduced, thereby increasing the refresh rate of ranging measurements.

Claims

1. A distance determination method, characterized in that: Applied to a first electronic device, the method includes: In the current ranging process, at least one first detection signal is sequentially sent to the second electronic device until a confirmation message of the first target detection signal in the at least one first detection signal is received from the second electronic device, and then at least one first detection signal is sent in the next ranging process; receiving a second target detection signal and a first target time difference sent by a second electronic device in response to the first target detection signal in the current ranging process, wherein the first target time difference is used to represent: a time difference between a time when the second electronic device receives the first target detection signal and a time when an acoustic wave receiver within the second electronic device receives the second target detection signal; The distance between the first electronic device and the second electronic device in the current ranging process is determined according to the time difference between the second target detection signal and the first target.

2. The distance determination method according to claim 1, wherein: The method further comprises: Before sending the at least one first detection signal in the current ranging process, corresponding numbers are sequentially configured for the at least one first detection signal.

3. The distance determination method according to claim 2, wherein: The sending at least one first detection signal to the second electronic device in sequence includes: Sending a first detection signal with a current number to the second electronic device; In response to not receiving a confirmation message corresponding to the first detection signal with the current number, retransmitting the first detection signal with a number next to the current number.

4. The distance determination method according to claim 2, wherein: The receiving a second target detection signal sent by a second electronic device in response to the first target detection signal in the current ranging process, and the first target time difference, includes: receiving a second target detection signal carrying a target number sent by the second electronic device; receiving a first target time difference carrying the target number and sent by the second electronic device; The target number is the number of the first target detection signal.

5. The distance determination method according to claim 4, characterized in that: The determining, according to the second target detection signal and the time difference between the first target, the distance between the first electronic device and the second electronic device in the current ranging process includes: determining, according to the target number carried by the second target detection signal and the target number carried by the first target time difference, the first target detection signal corresponding to the target number; The distance is determined according to the first target detection signal, the second target detection signal, and the first target time difference.

6. The distance determination method according to claim 5, characterized in that: The determining the distance according to the first target detection signal, the second target detection signal, and the first target time difference includes: determining a time when the first electronic device receives the first target detection signal; determining a second time difference based on the time when the first electronic device receives the first target detection signal and the time when the first electronic device receives the second target detection signal; The distance is determined according to the first target time difference and the second time difference.

7. The distance determination method according to any one of claims 1 to 6, characterized in that: The method further comprises: In response to receiving the second target detection signal and the first target time difference, corresponding confirmation messages are respectively sent to the second electronic device.

8. The distance determination method according to any one of claims 1 to 6, characterized in that: The method further comprises: Before sending the first detection signal and during the process of sending the first detection signal, monitoring a channel state of a channel corresponding to the first detection signal; If the channel is occupied before sending the first detection signal, sending the first detection signal when the channel is idle; If a signal collision occurs in the channel during the process of sending the first detection signal, the sending of the first detection signal is stopped.

9. A distance determination method, characterized in that: Applied to a second electronic device, the method includes: In response to receiving a first target detection signal sent by a first electronic device during the current ranging process, sending a confirmation message corresponding to the first target detection signal to the first electronic device, wherein the first target detection signal is a detection signal among the at least one first detection signal sent by the first electronic device during the current ranging process; sending at least one second detection signal to the first electronic device in sequence until receiving a confirmation message from the first electronic device regarding a second target detection signal in the at least one second detection signal; Determining a first time difference, wherein the first time difference is used to represent: a time difference between a time when the second electronic device receives the first target detection signal and a time when an acoustic wave receiver inside the second electronic device receives the second target detection signal; At least one first time difference is sent to the first electronic device in sequence, and until a confirmation message of the first target time difference in the at least one first time difference is received from the first electronic device, at least one second detection signal is sent in the next ranging process.

10. The distance determination method according to claim 9, characterized in that: The at least one first detection signal is sequentially configured with a corresponding number; The sending at least one second detection signal to the first electronic device in sequence includes: generating, according to the target number of the first target detection signal, at least one second detection signal carrying the target number in a set order; At least one second detection signal carrying the target number is sent to the first electronic device in sequence.

11. The distance determination method according to claim 9, characterized in that: The at least one first detection signal is sequentially configured with a corresponding number; The determining of the first time difference includes: determining a time when the second electronic device receives the second target detection signal; determining a difference between a time when the second electronic device receives the second target detection signal and a time when the second electronic device receives the first target detection signal; At least one first time difference carrying the target number is generated in a set order according to the difference value and the target number of the first target detection signal.

12. The distance determination method according to any one of claims 9 to 11, characterized in that: The method further comprises: Before sending the second detection signal or the first time difference, or during sending the second detection signal or the first time difference, monitoring a channel state of a corresponding channel; If the channel is occupied before sending the second detection signal or the first time difference, sending the signal when the channel is idle; If a signal collision occurs in the channel during the process of sending the second detection signal or the first time difference, the sending of the second detection signal or the first time difference is stopped.

13. A distance determination device, characterized in that: The device is configured in a first electronic device and includes: a first sending module, configured to sequentially send at least one first detection signal to a second electronic device during a current ranging process, and to send at least one first detection signal during a next ranging process after receiving a confirmation message from the second electronic device regarding a first target detection signal in the at least one first detection signal; a receiving module, configured to receive a second target detection signal and a first target time difference sent by a second electronic device in response to the first target detection signal in the current ranging process, wherein the first target time difference is used to represent: a time difference between a time when the second electronic device receives the first target detection signal and a time when an acoustic wave receiver within the second electronic device receives the second target detection signal; The first determining module is configured to determine the distance between the first electronic device and the second electronic device during the current ranging process according to the second target detection signal and the first target time difference.

14. A distance determination device, characterized in that: The device is configured in a second electronic device and includes: a second sending module, configured to, in response to receiving a first target detection signal sent by a first electronic device during a current ranging process, send a confirmation message corresponding to the first target detection signal to the first electronic device, wherein the first target detection signal is a detection signal among the at least one first detection signal sent by the first electronic device during the current ranging process; The second sending module is further configured to sequentially send at least one second detection signal to the first electronic device until receiving a confirmation message from the first electronic device regarding a second target detection signal in the at least one second detection signal; a second determining module, configured to determine a first time difference, wherein the first time difference is used to represent a time difference between a time when the second electronic device receives the first target detection signal and a time when an acoustic wave receiver inside the second electronic device receives the second target detection signal; The second sending module is also used to send at least one first time difference to the first electronic device in sequence, and until a confirmation message of the first target time difference in the at least one first time difference is received from the first electronic device, at least one second detection signal is sent in the next ranging process.

15. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to: execute the distance determination method according to any one of claims 1 to 8 or any one of claims 9 to 12.

16. A non-transitory computer-readable storage medium, characterized in that When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the distance determination method according to any one of claims 1 to 8 or any one of claims 9 to 12.