Ranging method, readable medium, and electronic device

CN116699512BActive Publication Date: 2026-09-08HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210190807.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-28
Publication Date
2026-09-08
Estimated Expiration
2042-02-28

Smart Images

  • Figure CN116699512B_ABST
    Figure CN116699512B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of communication, in particular to a ranging method, readable medium and electronic device. The ranging method comprises the following steps: a first electronic device and a second electronic device establish a communication connection; the first electronic device receives a ranging instruction; the first electronic device receives a plurality of groups of sound wave signals sent by a loudspeaker in the second electronic device; then the first electronic device determines the real-time distance between the first electronic device and the second electronic device when each group of sound waves is received by the first electronic device according to the plurality of groups of sound wave signals, the sending time and the sound wave speed; finally, the first electronic device continuously refreshes and displays the real-time distance between the first electronic device and the second electronic device calculated. The ranging method is simple to operate and improves the user experience; even if the first electronic device moves slightly, the first electronic device can accurately and timely display the distance change between the first electronic device and the second electronic device, and the display precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a ranging method, a readable medium, and an electronic device. Background Technology

[0002] Distance is a crucial parameter that needs to be monitored in various situations and for control purposes. For example, when using one electronic device to locate another, Ultra Wide Band (UWB) technology is used to precisely measure the distance and angle between the two devices, informing the user of the exact distance and direction of the other device, thus enabling accurate location. Another example is multi-screen collaboration between two electronic devices. For security reasons, one device can only collaborate with other electronic devices within close range. In this case, measuring the distance between the electronic device and other devices can determine when to initiate and terminate multi-screen collaboration. Summary of the Invention

[0003] This application provides a ranging method, a readable medium, and an electronic device. The ranging method includes establishing a communication connection between a first electronic device and a second electronic device. The first electronic device generates a ranging command based on user-defined correlation operations. The first electronic device receives multiple sets of sound wave signals transmitted by a speaker in the second electronic device and determines the starting band of each set of sound wave signals through correlation calculation, thereby determining the reception time of each set of sound wave signals received by the first electronic device. Then, the first electronic device determines the real-time distance between the first and second electronic devices when each set of sound wave signals is received, based on the reception time, transmission time, and sound wave velocity. Finally, the first electronic device continuously refreshes and displays the calculated real-time distance between the first and second electronic devices.

[0004] In the above-described ranging method, the user performs relevant operations on the first electronic device, and the second electronic device continuously sends multiple sets of sound wave signals. The first electronic device can determine the arrival time of each set of sound wave signals based on the received signals. The first electronic device can then calculate the real-time distance between itself and the second electronic device when each set of sound wave signals arrives, based on the arrival time, transmission time, and sound wave velocity. Based on this, the first electronic device can continuously update the real-time distance between itself and the second electronic device. This ranging method offers several advantages: firstly, it simplifies user operation and improves the user experience; secondly, due to the high frequency of sound waves, the transmission interval between adjacent sets of sound wave signals can be flexibly adjusted, ensuring a consistent refresh frequency for the real-time distance. Even with slight movement of the user carrying the first electronic device, it can accurately and in real-time display the distance changes between itself and the second electronic device.

[0005] The first aspect of this application provides a ranging method, which includes establishing a communication connection between a first electronic device and a second electronic device, and the first electronic device detecting a ranging command. The first electronic device detects a first set of acoustic signals emitted by the second electronic device at a first moment, and determines a first distance between the first and second electronic devices at the corresponding first moment based on the first set of acoustic signals and first information corresponding to the first set of acoustic signals, wherein the first information includes first transmission time information of the second electronic device transmitting the first set of acoustic signals. After determining the first distance, the first electronic device displays the first distance. At a second moment after the first moment, the first electronic device detects a second set of acoustic signals emitted by the second electronic device, and determines a second distance between the first and second electronic devices at the corresponding second moment based on the second set of acoustic signals and second information corresponding to the second set of acoustic signals, wherein the second information includes second transmission time information of the second electronic device transmitting the second set of acoustic signals. After determining the second distance, the first electronic device displays the second distance. The first transmission time information includes the transmission time of the second electronic device transmitting the first set of acoustic signals. The second transmission time information includes the transmission time of the second electronic device transmitting the second set of acoustic signals. Alternatively, the second transmission time information may include the transmission time when the second electronic device transmits the first set of acoustic wave information, and the transmission interval between the transmission of the first set of acoustic wave signals and the second set of acoustic wave signals by the second electronic device. This application does not specifically limit this.

[0006] The methods by which the first electronic device and the second electronic device establish a communication connection are varied, and this application does not impose specific limitations on them. For example, the first electronic device and the second electronic device can connect via Bluetooth. The ranging command refers to the command information generated by the first electronic device based on user operation, used to instruct the first electronic device and the second electronic device to interact, thereby obtaining the real-time distance between the first electronic device and the second electronic device. It is understood that in some implementations, the ranging command also carries the identification information of the second electronic device, so as to accurately establish interaction with the second electronic device when there are multiple associated electronic devices around the first electronic device.

[0007] The first set of acoustic signals refers to a segment of acoustic signals received by the first electronic device from several sets of acoustic signals sent by the second electronic device. That is, the second electronic device sends several segments of acoustic signals, and the first electronic device receives the first set of acoustic signals at a first moment. The second set of acoustic signals refers to another segment of acoustic signals received by the first electronic device from several sets of acoustic signals sent by the second electronic device. That is, the second electronic device sends several segments of acoustic signals, and the first electronic device receives the second set of acoustic signals at a second moment. It is understood that in some implementations of this application, after the first electronic device receives the first set of acoustic signals, the subsequent received segment of acoustic signals is the second set of acoustic signals. In other alternative implementations of this application, after the first electronic device receives the first set of acoustic signals, it receives other segments of acoustic signals, and the subsequent received segment of acoustic signals is the second set of acoustic signals. That is, the first electronic device receives other sets of acoustic signals between the first and second sets of acoustic signals. For example, the first electronic device sequentially receives the first set of acoustic signals, the third set of acoustic signals, and the second set of acoustic signals.

[0008] Furthermore, the first distance between the first electronic device and the second electronic device at the first moment is not necessarily determined at the first moment, or rather, it is the distance between the first electronic device and the second electronic device displayed at the first moment. The first distance between the first electronic device and the second electronic device at the first moment refers to the distance between the first electronic device and the second electronic device at that moment. The first distance can be determined after a small delay relative to the first moment, or it can be the distance displayed on the first electronic device after a small delay relative to the first moment. The first distance characterizes the distance between the first electronic device and the second electronic device when the first set of sound wave signals arrives at the first electronic device. Similarly, the second distance between the first electronic device and the second electronic device is not described in detail in this application due to the similar principle.

[0009] In addition, it is worth noting that the above implementation only describes how the first and second distances between the first and second electronic devices are determined. However, in actual distance measurement, the second distance consists of multiple sets of data. That is, after determining the second distance between the first and second electronic devices, the first electronic device continues to update the second distance between the first and second electronic devices, thereby enabling the first electronic device to continuously display the distance between the first and second electronic devices.

[0010] The above-described ranging method allows the first electronic device to continuously update the real-time distance between itself and the second electronic device. This method offers several advantages: firstly, it simplifies user operation and enhances the user experience; secondly, due to the high frequency of sound waves, the transmission interval between adjacent sets of sound wave signals can be flexibly adjusted, ensuring a consistent refresh frequency for the real-time distance. Even with slight movement of the user carrying the first electronic device, it can accurately and in real-time display the distance changes between the first and second electronic devices.

[0011] In one possible implementation of the first aspect described above, in this ranging method, the first electronic device receives first information and second information from the second electronic device. That is, the first electronic device receives first transmission time information and second transmission time information from the second electronic device.

[0012] In a possible implementation of this application, the first information and the second information are confirmed by the second electronic device. The second electronic device can send a first set of sound wave signals based on the first information confirmed by the second electronic device, and can also send a second set of sound wave signals based on the second information. Subsequently, the second electronic device sends the first information and the second information to the first electronic device, so that the first electronic device can determine the first distance between the first electronic device and the second electronic device when the first set of sound wave signals arrives at the first electronic device based on the received first set of sound wave signals and the first information, and can also determine the second distance between the first electronic device and the second electronic device when the received second set of sound wave signals arrives at the first electronic device based on the received second set of sound wave signals and the second information.

[0013] The above ranging method eliminates the need for the second electronic device to receive first and second information from the first or other electronic devices before the second electronic device sends the first and second sound wave signals. This effectively shortens the response time before the second electronic device sends the first and second sound wave signals, allows for a more reasonable arrangement of the response cycles of the first and second electronic devices, and further enhances the user experience.

[0014] In one possible implementation of the first aspect described above, in this ranging method, the first electronic device sends first transmission time information and second transmission time information to the second electronic device, so that the second electronic device transmits a first set of acoustic wave signals according to the first transmission time information, and transmits a second set of acoustic wave signals according to the second transmission time information. The first information includes the first transmission time information, and the second information includes the second transmission time information.

[0015] In a possible implementation of this application, the first information and the second information are confirmed by the first electronic device. After confirming the first information and the second information, the first electronic device sends the first information and the second information to the second electronic device. Then, the second electronic device sends a first set of sound wave signals according to the first information and a second set of sound wave signals according to the second information. Subsequently, the first electronic device determines a first distance between the first electronic device and the second electronic device when the first set of sound wave signals arrives at the first electronic device based on the received first set of sound wave signals and the first information. At the same time, the first electronic device can determine a second distance between the first electronic device and the second electronic device when the received second set of sound wave signals arrives at the first electronic device based on the received second set of sound wave signals and the second information.

[0016] In the aforementioned ranging method, the first electronic device does not need to receive the first information of the first set of acoustic signals and the second information of the second set of acoustic signals from the second electronic device, reducing the interaction between the first and second information and improving the timeliness and accuracy of the ranging method. Furthermore, the first electronic device can reasonably adjust the transmission time information of subsequent sets of acoustic signals based on the distance already determined between it and the second electronic device.

[0017] For example, if the first distance value confirmed by the first electronic device is small, it means that the first electronic device and the second electronic device are close and the user is about to find the second electronic device. At this time, the distance display accuracy between the first electronic device and the second electronic device can be improved by shortening the transmission time interval between the first set of sound wave signals and the second set of sound wave signals, that is, reducing the difference between the first time and the second time. This allows the first electronic device to accurately capture the difference in distance between the first electronic device and the second electronic device even with slight movement.

[0018] For example, when the first distance value confirmed by the first electronic device is small, it means that the first electronic device and the second electronic device are close and the user is about to find the second electronic device. At this time, the display accuracy of the distance between the first electronic device and the second electronic device can be improved by slowing down the relative movement speed between the first electronic device and the second electronic device, so that the first electronic device can accurately capture the difference in distance between the first electronic device and the second electronic device even with slight movement.

[0019] In addition, in one possible implementation of the first aspect described above, in this ranging method, the first information is determined by a first electronic device, the second information is determined by a second electronic device, the first electronic device sends the first information to the second electronic device, and the second electronic device sends the second information to the first electronic device. Alternatively, the second information is determined by the first electronic device, the first information is determined by the second electronic device, the first electronic device sends the second information to the second electronic device, and the second electronic device sends the first information to the first electronic device.

[0020] In addition, in one possible implementation of the first aspect mentioned above, the ranging method involves determining the first information and the second information by a third electronic device, and acquiring the first information and the second information at both the first electronic device and the second electronic device.

[0021] It is understood that any combination of the above-mentioned implementation methods is within the scope of protection of this application, and this application does not make any specific limitations on it.

[0022] In one possible implementation of the first aspect described above, the ranging method further includes the first electronic device detecting a third set of acoustic signals emitted by the second electronic device at a fifth time. The fifth time is located between the first time and the second time. Furthermore, the first electronic device determines a first distance between the first and second electronic devices at the first time based on the first set of acoustic signals, the third set of acoustic signals, first information, and third information corresponding to the third set of acoustic signals; and the first electronic device determines a second distance between the first and second electronic devices at the second time based on the second set of acoustic signals, the third set of acoustic signals, second information, and third information.

[0023] In a possible implementation of this application, the first electronic device receives a first set of acoustic signals and a third set of acoustic signals at a first moment. The first electronic device determines a first distance between the first and second electronic devices at the corresponding first moment based on the first set of acoustic signals, the third set of acoustic signals, first information corresponding to the first acoustic signal, and third information corresponding to the third set of acoustic signals. The third information includes third transmission time information for the second electronic device sending the third set of acoustic signals. For example, the third information includes the transmission time of the second electronic device sending the third set of acoustic signals. Another example is that the third information includes the transmission interval between the third set of acoustic signals and the first acoustic signal when the second electronic device sends the third set of acoustic signals. This application does not specifically limit this aspect.

[0024] The aforementioned distance measurement method allows the first electronic device to determine and display the distance between itself and the second electronic device according to a preset display frequency when it receives multiple sets of acoustic signals from the second electronic device. This enables the first electronic device to adjust the display method of the distance between itself and the second electronic device based on actual display needs, achieving effective display between them and improving the user experience.

[0025] In one possible implementation of the first aspect described above, the ranging method further includes a first electronic device sending a sound command to a second electronic device, the sound command being used to instruct the second electronic device to send sound wave signals, wherein the sound wave signals include a first set of sound wave signals and a second set of sound wave signals.

[0026] The sound transmission command refers to the instruction information sent by the first electronic device to the second electronic device, which instructs the second electronic device to begin transmitting sound wave signals. It is understood that the sound transmission command may also include parameters such as the transmission time, transmission interval, or sound wave wavelength (i.e., sound wave frequency band) of the second electronic device transmitting the sound wave signal; this application will not impose specific limitations on these parameters.

[0027] In a possible implementation of this application, after establishing a communication connection with the second electronic device, the first electronic device can send a sound-emitting command to the second electronic device, causing the second electronic device to respond to the command and begin transmitting sound wave signals. This ranging method allows the first electronic device to control when the second electronic device emits sound, preventing the second electronic device from continuously emitting sound when ranging is not required, thus improving energy efficiency.

[0028] In one possible implementation of the first aspect above, in the ranging method described above, the sound command is used to instruct the second electronic device to send a sound wave signal, and the frequency range of the sound wave signal is a preset frequency range.

[0029] In a possible implementation of this application, the first electronic device is used to instruct the second electronic device to send an acoustic signal within a preset frequency range. This facilitates the first electronic device in distinguishing the acoustic signal from the second electronic device and avoids confusion with acoustic signals sent by other electronic devices. Furthermore, narrowing the frequency range of the acoustic signal reduces the difficulty for the first electronic device to process the acoustic signal and improves the efficiency of the first electronic device in processing the acoustic signal.

[0030] In one possible implementation of the first aspect described above, the ranging method further includes establishing a Bluetooth connection between the first electronic device and the second electronic device, and when the received signal strength of the Bluetooth signal emitted by the second electronic device received by the first electronic device is higher than a preset strength threshold, the first electronic device begins to detect the acoustic signal emitted by the second electronic device. The acoustic signal includes a first acoustic signal and a second acoustic signal.

[0031] The received signal strength of a Bluetooth signal represents the strength of the Bluetooth signal received by the first electronic device from the second electronic device. It can also be understood as the correlation between the first and second electronic devices in the current state. For example, a higher received signal strength value indicates that the first and second electronic devices are closer, meaning a stronger correlation and a more stable Bluetooth connection, making it easier for the user to locate the second electronic device through the first. Conversely, a lower received signal strength value indicates that the first and second electronic devices are farther apart, suggesting a weaker correlation and making it less likely for the user to locate the second electronic device through the first. The preset strength threshold is a proximity value for the received signal strength indication determined based on the correlation between the first and second electronic devices. The preset strength threshold is used to confirm whether the first electronic device is close to the second electronic device.

[0032] In a possible implementation of this application, when the first electronic device and the second electronic device are connected via Bluetooth, the first electronic device roughly determines the distance between the first electronic device and the second electronic device by the received signal strength of the Bluetooth signal from the second electronic device received by the first electronic device. When the first electronic device is relatively close to the second electronic device, the first electronic device begins to detect the sound wave signal sent by the second electronic device, wherein the sound wave signal includes a first sound wave signal and a second sound wave signal.

[0033] The above-described ranging method can determine when the first electronic device starts detecting the acoustic signal sent by the second electronic device by measuring the received signal strength of the Bluetooth signal received by the first electronic device from the second electronic device. This improves the effectiveness of the first electronic device in determining the distance between the first and second electronic devices and avoids invalid measurements of the distance between the first and second electronic devices when the Bluetooth connection strength between the first and second electronic devices is weak.

[0034] In one possible implementation of the first aspect described above, the ranging method further includes pairing the first electronic device with the second electronic device via Bluetooth at a third time to determine a first time offset between the first electronic device and the second electronic device corresponding to the third time. The first electronic device determines a first distance after the third time based on the first time offset, a first set of acoustic signals, and first information, and the first electronic device determines a second distance after the third time based on the first time offset, a second set of acoustic signals, and second information.

[0035] Here, Bluetooth time synchronization refers to determining the time offset between the first and second electronic devices using the Bluetooth modules in both devices. The time offset refers to the difference in displayed time between the first and second electronic devices. The first time offset refers to the difference in displayed time between the first and second electronic devices after the third time point.

[0036] It is easy to understand that both the first and second electronic devices have clocks, thus allowing for the separate calculation of the time corresponding to the first and second electronic devices. However, in some cases, due to setting or structural errors, the time corresponding to the first and second electronic devices may not be consistent. This inconsistency can be mitigated through Bluetooth time synchronization. The specific implementation method for obtaining the time offset between the first and second electronic devices via Bluetooth time synchronization has been described in detail later and will not be repeated here. Furthermore, the third moment is only used to distinguish between the first and second moments and does not represent a sequential relationship. In some implementations, the third moment precedes the first moment. In other alternative implementations, the third moment follows the first moment; for example, the third moment may be located between the first and second moments. This application does not specifically limit this.

[0037] The above-mentioned distance measurement method, by comprehensively considering the time offset between the first electronic device and the second electronic device, can reduce the error in the measurement result caused by the inconsistency of the display time between the first electronic device and the second electronic device in the distance measurement calculation, and improve the accuracy of the distance measured between the first electronic device and the second electronic device.

[0038] In one possible implementation of the first aspect described above, the ranging method further includes synchronized Bluetooth time between the first electronic device and the second electronic device at a fourth time after a preset duration following the third time, to determine a second time offset between the first and second electronic devices corresponding to the fourth time. The first electronic device determines a first distance after the fourth time based on the second time offset, a first set of acoustic signals, and first information, and the first electronic device determines a second distance after the fourth time based on the second time offset, a second set of acoustic signals, and second information.

[0039] The second time offset refers to the time deviation between the first and second electronic devices after the fourth time point. The fourth time point is located after the third time point. However, the fourth time point is only used to distinguish between the first, second, and third time points and does not represent a sequential relationship between the fourth time point and the first or second time points. In some implementations, the fourth time point is located after the first and second time points. In other alternative implementations, the fourth time point is located after the second time point. This application does not impose specific limitations on this.

[0040] In one possible implementation of the first aspect described above, the time interval between the third and fourth moments is a fixed value. For example, the time interval between the third and fourth moments is a preset time threshold. That is, after each preset time threshold, the first electronic device and the second electronic device perform Bluetooth time synchronization.

[0041] In the above ranging method, at the fourth moment, the first and second electronic devices restart Bluetooth time synchronization. After the Bluetooth time synchronization ends, the updated time offset is obtained, and the real-time distance calculation formula is updated accordingly. Based on this, the periodic Bluetooth time synchronization between the first and second electronic devices can correct the time drift (i.e., time offset) between the first and second electronic devices, ensuring the accuracy of the ranging results.

[0042] In one possible implementation of the first aspect described above, the ranging method further includes detecting a ranging command when the first electronic device detects a ranging operation by the user on the first electronic device and the second electronic device and / or a search operation by the user on the second electronic device.

[0043] In one possible implementation of the first aspect described above, the ranging method uses an acoustic signal with a frequency range of 20 Hz to 2*10 Hz. 4 Hz. Or, the frequency range of the sound wave signal is 2*10⁻⁶. 4 Hz~10 12 Hz. Or, the frequency range of the sound wave signal is 20Hz to 10Hz. 12 Hz. For example, the frequency range of a sound wave signal is 1.8*10 Hz. 4 Hz~2.2*104 Hz.

[0044] A second aspect of this application provides an electronic device including a memory for storing instructions and one or more processors, wherein when the instructions are executed by the one or more processors, the processors perform a ranging method as described in the first aspect or any possible implementation of the first aspect.

[0045] A third aspect of this application provides a computer-readable storage medium storing instructions that, when executed on an electronic device, cause the electronic device to perform a ranging method as described in the first aspect or any possible implementation of the first aspect.

[0046] A fourth aspect of this application provides a computer program product including instructions that, when executed by one or more processors, are used to implement the ranging method as described in the first aspect or any possible implementation of the first aspect. Attached Figure Description

[0047] Figure 1(a) shows some application scenarios for the ranging method of this application;

[0048] Figure 1(b) illustrates some other application scenarios to which the ranging method of this application is applicable;

[0049] Figure 2 This application illustrates search scenarios to which the ranging method is applicable in some embodiments;

[0050] Figure 3(a) shows the desktop of a mobile phone 100 applicable to the ranging method in some embodiments of this application;

[0051] Figure 3(b) shows the user interface of a mobile phone 100 applicable to the ranging method in some embodiments of this application;

[0052] Figure 4 This invention illustrates a schematic diagram of the distance measurement principle between a mobile phone 100 and a tag device 200 in some embodiments of this application.

[0053] Figure 5(a) shows the situation at t 31 The distance d1 between mobile phone 100 and tag device 200;

[0054] Figure 5(b) shows the situation at t 32 The distance d2 between mobile phone 100 and tag device 200;

[0055] Figure 5(c) shows the situation at t 33 The distance d3 between mobile phone 100 and tag device 200;

[0056] Figure 6The following are schematic diagrams illustrating the structure of the mobile phone 100 and the tag device 200 in some embodiments of this application;

[0057] Figure 7 The following are schematic diagrams illustrating the specific structures of the mobile phone 100 and the tag device 200 in some implementations of this application;

[0058] Figure 8 Flowcharts of ranging methods in some embodiments of this application are shown;

[0059] Figure 9 This paper shows a schematic diagram of the Bluetooth pair in the ranging method in some embodiments of this application;

[0060] Figure 10(a) shows a schematic diagram of the ranging method in some embodiments of this application, wherein the first information includes the transmission time of the acoustic signal and the second information includes the transmission time of the second set of acoustic signals.

[0061] Figure 10(b) shows a schematic diagram of the ranging method in some embodiments of this application, wherein the first information includes the transmission time of the acoustic signal, and the second information includes the transmission interval between the second set of acoustic signals and the first set of acoustic signals;

[0062] Figure 10(c) shows a schematic diagram of the ranging method in some embodiments of this application, wherein the first information includes the transmission time of the acoustic signal, and the second information includes the transmission interval between the second set of acoustic signals and the first set of acoustic signals, wherein the transmission interval is a constant value.

[0063] Figure 11 Some embodiments of this application are shown corresponding to Figure 8 Interaction diagram of the distance measurement method;

[0064] Figure 12 Flowcharts of ranging methods in some embodiments of this application are shown;

[0065] Figure 13 Some embodiments of this application are shown corresponding to Figure 12 Interaction diagram of the distance measurement method;

[0066] Figure 14 Flowcharts of ranging methods in some embodiments of this application are shown;

[0067] Figure 15 Some embodiments of this application are shown corresponding to Figure 14 Interaction diagram of the distance measurement method;

[0068] Figure 16 A schematic diagram of the hardware structure of a mobile phone 100 according to this application is shown;

[0069] Figure 17A schematic diagram of the structure of a notebook computer 400 according to this application is shown;

[0070] Figure 18 An architecture diagram of a mobile phone 100 is shown according to some embodiments of this application.

[0071] In the attached figures, the following labels are used:

[0072] 100-Mobile Phone;

[0073] 101 - Communication module; 101a - Bluetooth module;

[0074] 102 - Audio module; 102a - Microphone;

[0075] 103 - Processor;

[0076] 104 - Memory;

[0077] 105 - Display module;

[0078] 200-Tag equipment;

[0079] 201-Communication module; 201a-Bluetooth module;

[0080] 202 - Audio module; 202a - Speaker;

[0081] 203 - Processor;

[0082] 204 - Memory;

[0083] 205 - Display module. Detailed Implementation

[0084] The illustrative embodiments of this application include, but are not limited to, a ranging method, apparatus, readable medium, and electronic device.

[0085] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0086] The measurement system applicable to the ranging method in this application includes a first electronic device (a mobile phone 100 as shown in Figure 1(a) or Figure 1(b)) and a second electronic device (e.g., an electronic tag device 200 as shown in Figure 1(a) or a watch 300 as shown in Figure 1(b)), and the ranging scheme can be applied to a variety of scenarios.

[0087] In some application scenarios, such as shown in Figure 1(a), the ranging method provided in this application can be applied to scenarios where users use their mobile phone 100 to locate Tag device 200, and thus find items such as backpacks, bicycles, and keys. Tag device 200 is an electronic tag device used to indicate a specific item, generally including a Bluetooth module and a speaker. Specifically, to facilitate the search for items such as backpacks, bicycles, and keys that cannot be directly identified by electronic devices, Tag device 200 is typically added to these items. When a user wants to know the specific location of a backpack, bicycle, or key, they operate their mobile phone 100 to connect to the Tag device 200 via Bluetooth, and determine the distance between the mobile phone 100 and Tag device 200 by receiving sound waves emitted by the speaker of Tag device 200, providing a reference for the user to find backpacks, bicycles, keys, etc., and reducing the difficulty of the search.

[0088] In other application scenarios, such as those shown in Figure 1(b), the ranging method provided in this application can also be applied to the pairing and interaction scenarios of mobile phone 100 and watch 300. For example, in multi-screen collaboration, for security reasons, multi-screen collaboration can only be achieved when the distance between mobile phone 100 and watch 300 is within a certain range. When a user wants to achieve multi-screen collaboration between mobile phone 100 and watch 300, they can measure the distance between mobile phone 100 and watch 300 to determine when to initiate and terminate multi-screen collaboration, thereby achieving accurate judgment of multi-screen collaboration conditions and improving the security of multi-screen collaboration.

[0089] To better understand the technical solutions of the embodiments of this application, the following uses the application scenario of a user searching for a Tag device 200 via mobile phone 100 as an example to provide a detailed description of the technical solutions of this application.

[0090] like Figure 2 As shown, when a user wants to find the Tag device 200 using mobile phone 100, they can perform a first search operation on mobile phone 100 for Tag device 200 (for example, by clicking the search button corresponding to Tag device 200) to obtain the t 01 The system sets a first distance d1 between mobile phone 100 and tag device 200 and displays this first distance d1 to the user so that the user can adjust the position of mobile phone 100 based on the first distance d1. Subsequently, the user needs to perform a second search operation on mobile phone 100 for tag device 200 (e.g., clicking the search button corresponding to tag device 200 a second time) to obtain the t. 02The system continuously monitors the second distance d2 between the mobile phone 100 and the tag device 200, and displays the second distance d2 to the user so that the user can continue to adjust the position of the mobile phone 100 based on the first distance d1 and the second distance d2 until the distance d3 between the mobile phone 100 and the tag device 200 meets the requirements, such as when the user finds the tag device 200.

[0091] Therefore, Figure 2 The illustrated application scenario shows that when the distance between the mobile phone 100 and the tag device 200 is displayed in real time, it is easier to find the tag device 200 using the mobile phone 100. However, current distance measurement methods can only measure the distance between the mobile phone 100 and the tag device 200 at the moment the user performs a search operation. Therefore, the user needs to operate the mobile phone 100 multiple times to measure the distance between the mobile phone 100 and the tag device 200 at multiple times, which is cumbersome and results in a poor user experience. At the same time, current distance measurement methods cannot update the distance between the mobile phone 100 and the tag device 200 in a timely manner when the mobile phone 100 moves relative to the tag device 200, that is, they cannot provide the user with a timely reference benchmark. This makes it difficult for users to find the tag device 200 using the mobile phone 100, resulting in low search efficiency.

[0092] Therefore, this application proposes a method for ranging between electronic devices. For example... Figures 3(a) to 5(c) As shown, after the mobile phone 100 establishes a wireless communication connection with the tag device 200, the user performs a search operation on the mobile phone 100 for the tag device 200. For example, the search operation may include the start operation of starting the search program as shown in Figure 3(a), and the confirmation search operation for the tag device 200 as shown in Figure 3(b). Subsequently, the mobile phone 100 receives multiple sets of sound wave signals sent by the speaker in the tag device 200, and determines the starting band of each set of sound wave signals in the received multiple sets of sound wave signals through correlation calculation, thereby determining the reception time of the mobile phone 100 for each set of sound wave signals (e.g., Figure 4 t in 21 t 22 t 23 and t 2k Then, the mobile phone 100 determines the timing of each set of sound wave signals received (e.g., ...). Figure 4 t in 21 t 22 t 23 and t 2k ), Sending time (e.g.) Figure 4 t in 11 t 12 t 13 and t 1k ) and sound wave speed (e.g. Figure 4The v in the figure determines the real-time distance between mobile phone 100 and tag device 200 when each set of sound waves is received by mobile phone 100 (e.g., v). Figure 4 d1, d2, d3 and d k Finally, the mobile phone 100 continuously refreshes and displays the calculated real-time distance between the mobile phone 100 and the tag device 200. For example, as shown in Figure 5(a), the mobile phone 100 displays the calculated real-time distance between the mobile phone 100 and the tag device 200 at time t. 01 The system constantly displays "5.3 meters away from the Tag device," as shown in Figure 5(b). For example, mobile phone 100 is at t... 02 The device constantly displays "5.7 meters away from the Tag device," and as shown in Figure 5(c), mobile phone 100 is at t 03 It constantly displays "4.9 meters away from the Tag device".

[0093] In the above ranging method, when a user performs a search operation on mobile phone 100, the tag device 200 continuously sends multiple sets of sound wave signals. Mobile phone 100 can determine the arrival time of each set of sound wave signals based on the received signals. Mobile phone 100 can then calculate the real-time distance between mobile phone 100 and tag device 200 when each set of sound wave signals arrives, based on the arrival time, transmission time, and speed of sound. Therefore, mobile phone 100 can continuously update the real-time distance between itself and tag device 200. The above-mentioned ranging method is simple for users to operate, improving the user experience. On the other hand, because the frequency of sound waves is high, the transmission interval between two adjacent sets of sound wave signals can be flexibly adjusted, thus ensuring the refresh frequency of the real-time distance of the mobile phone 100. Even if the user moves the mobile phone 100 slightly, the mobile phone 100 can accurately and in real time display the distance change between the mobile phone 100 and the tag device 200, making it convenient for the user to adjust the search strategy for the tag device 200 in a timely manner and reducing the difficulty for the user to find the tag device 200.

[0094] It is understood that the first electronic device mentioned in this application above can be any portable electronic device, besides mobile phone 100, such as a watch, tablet computer, laptop computer, tag device, wearable device, head-mounted display, portable game console, portable music player, e-reader, etc. The second electronic device can be any portable electronic device, besides tag device 200, such as mobile phone, watch, tablet computer, laptop computer, wearable device, head-mounted display, portable game console, portable music player, e-reader, etc. Furthermore, exemplary embodiments of the first and second electronic devices include, but are not limited to, various electronic devices running Linux, Microsoft's Windows operating system, Apple's iOS mobile operating system, Android open-source operating system, HUAWEI Harmony OS, or other operating systems. This application does not specifically limit this.

[0095] For ease of explanation, the following text will continue to use mobile phone 100 as the first electronic device and tag device 200 as the second electronic device, referring to Figure 3 and... Figure 4 The distance measurement method in this application is described in detail.

[0096] Figure 6 Schematic diagrams of the structure of the mobile phone 100 and the tag device 200 in some embodiments of this application are shown. For example... Figure 6As shown, in some embodiments of this application, the mobile phone 100 includes a communication module 101, an audio module 102, a processor 103, a memory 104, and a display module 105. The tag device 200 includes a communication module 201 and an audio module 202. The communication module 101, audio module 102, processor 103, and display module 105 are connected via a bus to achieve data exchange. The communication module 201 and audio module 202 are signal-connected to achieve data exchange. The communication module 101 and communication module 201 are used to establish a communication connection between the mobile phone 100 and the tag device 200. For example, the communication module 101 and communication module 201 may be Bluetooth modules. The audio module 102 and audio module 202 are used to send and / or receive sound wave signals. For example, the audio module 102 may be a microphone, and the audio module 202 may be a speaker. The processor 103 can invoke relevant instructions to control the audio modules 110 and 210 to execute the ranging method described in this application. It can also obtain the real-time distance between the mobile phone 100 and the tag device 200 based on the execution structure of the audio modules 110 and 210. For example, the processor 103 can be a processing chip integrated into the mobile phone 100. The memory 104 is used to store distance measurement-related instructions and data such as multiple sets of received sound wave signals. The display module 105 is used to display the real-time distance obtained by the processor 103. For example, the display module 105 can be a display screen or a speaker; this application does not specifically limit the display method of the real-time distance.

[0097] In other embodiments of this application, the mobile phone 100 includes a communication module 101, an audio module 102, a processor 103, a memory 104, and a display module 105, while the Tag device 200 includes a communication module 201, an audio module 202, a processor 203, and a memory 204. The communication module 101, audio module 102, processor 103, memory 104, display module 105, communication module 201, and audio module 202 are the same as in the previous embodiment and will not be described again here. The processor 203 is used to process relevant instructions to obtain the transmission time corresponding to each group of sound wave signals, and the memory 204 is used to store relevant instructions for distance measurement and the transmission time corresponding to each group of sound wave signals. For example, the processor 203 may be a processing chip integrated into the Tag device 200.

[0098] In other embodiments of this application, the mobile phone 100 includes a communication module 101, an audio module 102, and a display module 105, while the tag device 200 includes a communication module 201, an audio module 202, a processor 203, and a memory 204. The communication module 101, audio module 102, display module 105, communication module 201, and audio module 202 are the same as in the aforementioned embodiments and will not be described again here. The processor 203 is used not only to process relevant instructions to obtain the transmission time corresponding to each group of sound wave signals, but also to process relevant instructions to obtain the real-time distance between the mobile phone 100 and the tag device 200. The memory 204 is used to store relevant instructions for distance measurement, the transmission times corresponding to each group of sound wave signals, and the real-time distance between the mobile phone 100 and the tag device 200.

[0099] Figure 7 The following are schematic diagrams illustrating the specific structures of the mobile phone 100 and the tag device 200 in some embodiments of this application.

[0100] like Figure 7 As shown, the mobile phone 100 includes a Bluetooth module 101a, a microphone 102a, a processor 103, a memory 104, and a display module 105. The tag device 200 includes a Bluetooth module 201a and a speaker 202a. The mobile phone 100 and the tag device 200 are communicatively connected via Bluetooth module 101a to transmit data and commands between them. The tag device 200 transmits sound wave signals through the speaker 202a, and the mobile phone 100 receives and collects the sound wave signals through the microphone 102a.

[0101] It is understood that this application does not specifically limit the sound wave signal transmitted by the speaker 202a or the sound wave signal received by the microphone 102a, as long as the frequency band of the sound wave signal transmitted by the speaker 202a is within the frequency band that the microphone 210a can receive. For example, in some implementations of this application, if the Tag device 200 emits an ultrasonic signal through the speaker 202a, the mobile phone 100 can receive and collect the ultrasonic signal through the microphone 102a. In the above measurement method, mobile phones, tablets, and laptops are all equipped with microphones and speakers, and Tag devices all have built-in speakers. Using ultrasound, distance measurements can be performed between any mobile phone, tablet, or laptop and the Tag device, or between any two of the mobile phone, tablet, or laptop, thus expanding the scope of application of this application, reducing hardware costs, and improving economic efficiency.

[0102] The measurement scheme of the measurement system provided in this application will be described in detail below with reference to specific embodiments.

[0103] Figure 8A flowchart of a ranging method in some embodiments of this application is shown. The following will be combined with… Figure 8 This application describes the distance measurement method provided. Specifically, such as... Figure 8 As shown, the ranging method provided in this application includes the following steps:

[0104] Step S801: The mobile phone 100 and the Tag device 200 establish a Bluetooth connection, and the mobile phone 100 receives the ranging command.

[0105] In this application, when a user wants to locate the Tag device 200 via mobile phone 100, they can perform a search operation for the Tag device 200 on mobile phone 100 (e.g., the descriptions of user operations in 3(a) and Figure 3(b) above). Mobile phone 100 receives a ranging command generated based on the search operation. This ranging command refers to instruction information generated by mobile phone 100 based on the user operation, instructing mobile phone 100 to interact with Tag device 200, thereby obtaining the real-time distance between mobile phone 100 and Tag device 200. In some implementations, the ranging command also carries the identification information of Tag device 200, enabling accurate establishment of interaction with Tag device 200 even when multiple associated electronic devices are present around mobile phone 100.

[0106] Simultaneously, mobile phone 100 establishes a Bluetooth connection with tag device 200 based on ranging commands. Of course, it's easy to understand that mobile phone 100 can also establish a communication connection with tag device 200 through other means, such as through a near-field communication (NFC) module or other methods. However, it's worth noting that since the user (i.e., mobile phone 100) does not know the specific location of tag device 200, the connection between mobile phone 100 and tag device 200 can only be wireless. Therefore, any method that enables wireless communication between mobile phone 100 and tag device 200 is within the scope of protection of this application, and this application does not impose specific limitations in its comparison.

[0107] In some implementations of this application, the mobile phone 100 and the tag device 200 establish a communication connection, and then the mobile phone 100 generates a ranging command based on the user's touch operation. In other alternative implementations of this application, the mobile phone 100 generates a ranging command based on the user's touch operation, and the first electronic device and the second electronic device establish a communication connection. In other alternative implementations of this application, the first electronic device and the second electronic device establish a communication connection, and the mobile phone 100 generates a ranging command based on the user's touch operation. That is, in this application, the order in which the first electronic device and the second electronic device establish a communication connection and the order in which the mobile phone 100 receives the ranging command are not specifically limited.

[0108] Step S802: Mobile phone 100 calculates the RSSI of Tag device 200.

[0109] In this application, the Bluetooth module 101a in the mobile phone 100 calculates the RSSI corresponding to the Tag device 200 based on the Bluetooth signal received from the Bluetooth module 201a in the Tag device 200. Here, RSSI refers to the Received Signal Strength Indication (RSSI) obtained based on the received Bluetooth signal. RSSI characterizes the strength of the Bluetooth signal received by the mobile phone 100 from the Tag device 200, and can also be understood as the correlation between the mobile phone 100 and the Tag device 200 in the current state.

[0110] For example, a higher RSSI value indicates that the mobile phone 100 and the tag device 200 are closer, meaning a stronger association between them, higher Bluetooth connection stability, and easier for the user to locate the tag device 200 via the mobile phone 100. Conversely, a lower RSSI value indicates that the mobile phone 100 and the tag device 200 are farther apart, meaning a weaker association between them, and a higher likelihood that the user will be unable to locate the tag device 200 via the mobile phone 100.

[0111] Step S803: Mobile phone 100 determines whether the RSSI of Tag device 200 is greater than the preset intensity threshold.

[0112] If yes, it means that the Bluetooth signal received by Bluetooth module 101a is strong, that is, Bluetooth module 101a is close to Bluetooth module 201a, and that mobile phone 100 is close to Tag device 200. Therefore, it is necessary to further determine the distance between mobile phone 100 and Tag device 200, and proceed to step S804; if no, it means that the Bluetooth signal received by Bluetooth module 101a is weak, that is, Bluetooth module 101a is far from Bluetooth module 201a, which may even lead to inaccurate distance measurement, and return to step S802.

[0113] In this application, after receiving the RSSI, the mobile phone 100 determines whether the RSSI is greater than a preset strength threshold. The preset strength threshold is a proximity value of the received signal strength indication determined based on the strength of the correlation between the mobile phone 100 and the tag device 200. The preset strength threshold is used to determine whether the mobile phone 100 is close to the tag device 200.

[0114] Step S804: The mobile phone 100 and the tag device 200 establish Bluetooth time synchronization to obtain the time offset between the mobile phone 100 and the tag device 200.

[0115] Bluetooth time synchronization refers to determining the time offset between mobile phone 100 and tag device 200 through Bluetooth module 101a in mobile phone 100 and Bluetooth module 201a in tag device 200. The time offset refers to the deviation in the displayed time between mobile phone 100 and tag device 200. It is easy to understand that both mobile phone 100 and tag device 200 have clocks, so the time corresponding to mobile phone 100 and tag device 200 can be calculated separately. However, in some cases, due to setting errors or structural errors, the time corresponding to mobile phone 100 and tag device 200 may not be consistent. To mitigate the distance error in ranging calculation caused by this inconsistency, some embodiments of this application also require measuring the time offset between mobile phone 100 and tag device 200.

[0116] In some embodiments of this application, the time offset can be Δ = T T -T P Where △ represents the time offset between mobile phone 100 and tag device 200, a positive value indicates that the time corresponding to tag device 200 is earlier than the time corresponding to mobile phone 100, and a negative value indicates that the time corresponding to tag device 200 is later than the time corresponding to mobile phone 100. T T T represents the time corresponding to Tag device 200 at the scheduled time. p This represents the time corresponding to the scheduled time on mobile phone 100.

[0117] In addition, because the transmission speed of electromagnetic waves is approximately 3 × 10⁻⁶ 8 When the distance between the mobile phone 100 and the tag device 200 is close, the transmission time is approximately 0 m / s. Based on this, when a single transmission occurs between the mobile phone 100 and the tag device 200 using a set of electromagnetic waves, the transmission and arrival times of the electromagnetic waves approximately characterize the time offset between the mobile phone 100 and the tag device 200. That is, T P1 ≈T T1 -△1, where △1 is the time offset corresponding to the first group, T P1 T represents the departure time of the electromagnetic wave from mobile phone 100 or the arrival time of the electromagnetic wave at mobile phone 100. T1 This indicates the departure time of the electromagnetic wave from Tag device 200 or the arrival time of the electromagnetic wave at Tag device 200. Similarly, T Pi ≈T Ti -△ i Where i ranges from 1 to k, this application does not impose a specific limitation, △ i T represents the time offset corresponding to the i-th group. PiT represents the departure time of the electromagnetic wave from mobile phone 100 or the arrival time of the electromagnetic wave at mobile phone 100. Ti This indicates the departure time of the electromagnetic wave from Tag device 200 or the arrival time of the electromagnetic wave at Tag device 200.

[0118] The following will combine Figure 9 This application details one Bluetooth time synchronization method. It is understood that, since the time offset Δ of each transmission cycle is affected by system scheduling, to reduce errors, the average of multiple time synchronizations can be used to weaken the impact of system scheduling on the time offset Δ. In some embodiments of this application, the mobile phone 100 first... P1 Constantly send Bluetooth time synchronization signal SEQ1 to Tag device 200, Tag device 200 in T T1 The Bluetooth time synchronization signal SEQ1 is received at all times. Where T... P1 The time recorded by the local clock of the mobile phone, T T1 The time recorded by the local clock of the Tag device is 200, i.e., △1≈T T1 -T P1 Where △1 is the time offset obtained from the first measurement. When the Tag device 200 receives the Bluetooth time synchronization signal SEQ1, it will adjust the time offset in T... T2 Constantly send Bluetooth time synchronization signal SEQ2 to mobile phone 100, mobile phone 100 in T P2 The Bluetooth time synchronization signal SEQ2 is received at all times. Where T... P2 The time recorded by the local clock of the mobile phone, T T2 The time recorded by the local clock of the Tag device is 200, i.e., Δ2≈T T2 -T P12 And so on, T P2n The time recorded by the local clock of the mobile phone, T T2n The time recorded by the local clock of the Tag device 200, i.e., △ 2n ≈T T2n -T P2n .

[0119] Based on this, the average time offset after 2n iterations can be obtained as follows:

[0120] It is not difficult to see that by respectively placing △1, △2, △3, ..., △ 2n-1 , △ 2n After expansion, we get the following formula (1):

[0121]

[0122] After deformation, we obtain the following formula (2):

[0123]

[0124] After further deformation, we obtain the following formula (3):

[0125]

[0126] In some implementations, the Tag device 200 can send the reception time T back to the mobile phone 100 each time it sends the SEQ signal. T(2i-1) and the receiving time is T T(2i-1) The Bluetooth time synchronization signal corresponds to the transmission time T. T2i After receiving the data, mobile phone 100 calculates the time offset Δ according to formula (3).

[0127] In some other implementations, since the left half of formula (3) (i.e. formula (4)) only involves the receiving and sending times of the tag device 200, its average value can be calculated first using formula (4), and then fed back to the mobile phone 100 via Bluetooth in a single transmission:

[0128]

[0129] Step S805: Mobile phone 100 notifies Tag device 200 to send several sets of sound wave signals, and detects the multiple sets of sound wave signals sent by Tag device 200.

[0130] In this application, mobile phone 100 generates a sound command to notify Tag device 200 to start sending sound wave signals, and sends the sound command to Tag device 200. Tag device 200 responds to the sound command by continuously emitting several sets of sound wave signals. Mobile phone 100 can continuously receive multiple sets of sound wave signals. The sound command refers to the instruction information sent by mobile phone 100 to Tag device 200, instructing Tag device 200 to start sending sound wave signals. It is understood that the sound command may also include parameters such as the transmission time, transmission interval, or sound wave wavelength (i.e., sound wave frequency band) of Tag device 200 sending sound wave signals, which will be described in detail below. The concept of the sound command will not be elaborated further below.

[0131] In some application scenarios, the Tag device 200 sends sound wave signals when in use, but not in a natural state. In some embodiments of this application, before the mobile phone 100 and the Tag device 200 establish a communication connection and before the mobile phone 100 receives a ranging command, the Tag device 200 needs to be bound to the relevant application of the mobile phone 100. Based on this, after the mobile phone 100 and the Tag device 200 establish a communication connection and the mobile phone 100 receives a ranging command, the mobile phone 100 can send a sound wave signal transmission request to the Tag device 200, so that the Tag device 200 sends sound wave information, and other devices other than the Tag device 200 do not send sound wave signals. Based on this, the above method can avoid the mobile phone 100 receiving sound wave signals initiated by other devices other than the Tag device 200, reduce the processing difficulty of the mobile phone 100, improve the processing efficiency of the mobile phone 100, thereby improving the response speed of the mobile phone 100 and further enhancing the user experience.

[0132] In other application scenarios, the Tag device 200 sends sound wave signals in both active and passive states. That is, in some embodiments, the Tag device 200 continuously sends sound wave signals, and the mobile phone 100 determines whether it needs to receive the sound wave signals sent by the Tag device 200 via RSSI. When the mobile phone 100 determines that it needs to receive the sound wave signals sent by the Tag device 200, it begins to receive them; when the mobile phone 100 determines that it does not need to receive the sound wave signals sent by the Tag device 200, it does not receive them.

[0133] However, in these application scenarios, when other electronic devices besides the Tag device 200 are distributed around the mobile phone 100, and these other electronic devices may also emit sound wave signals, the mobile phone 100 may be unable to identify the sound wave signal emitted by the Tag device 200 from the received sound wave signals. Therefore, in some implementations of this application, the sound wave signal emitted by the Tag device 200 also carries the device identifier of the Tag device 200. The mobile phone 100 identifies which sound wave signals are emitted by the Tag device 200 through the device identifier of the Tag device 200. In addition, in other implementations of this application, when the Tag device 200 sends time information to the mobile phone 100, the time information also carries the device identifier of the Tag device 200.

[0134] In some embodiments of this application, the mobile phone 100 detects (i.e. receives) a first set of sound wave signals at a first moment, and detects (i.e. receives) a second set of sound wave signals at a second moment after the first moment. The first set of sound wave signals is one segment of sound wave signal, and the second set of sound wave signals is another segment of sound wave signal. The mobile phone 100 can detect both the first and second sets of sound wave signals, and then determine the starting bands of the first and second sets of sound wave signals through relevant calculations, thereby separating the first and second sets of sound wave signals.

[0135] In some alternative embodiments of this application, the mobile phone 100 detects (i.e. receives) a first set of acoustic wave signals at a first moment, detects (i.e. receives) a third set of acoustic wave signals at a fifth moment, and detects (i.e. receives) a second set of acoustic wave signals at a second moment after the first moment. The fifth moment is located between the first and second moments. Specifically, the mobile phone 100 determines a first distance between the mobile phone 100 and the Tag device 200 at the first moment based on the first set of acoustic wave signals, the third set of acoustic wave signals, first information, and third information corresponding to the third set of acoustic wave signals. The first electronic device determines a second distance between the mobile phone 100 and the Tag device 200 at the second moment based on the second set of acoustic wave signals, the third set of acoustic wave signals, second information, and third information. For example, mobile phone 100 receives six sets of sound wave signals sent by tag device 200, in the order of receipt: sound wave signal 1, sound wave signal 2, sound wave signal 3, sound wave signal 4, sound wave signal 5, and sound wave signal 6. Based on the moving speed of mobile phone 100 and the distance between mobile phone 100 and tag device 200, mobile phone 100 needs to display the distance between mobile phone 100 and tag device 200 when sound wave signals 1, 4, and 6 arrive at mobile phone 100. Therefore, mobile phone 100 can determine the distance between mobile phone 100 and tag device 200 when sound wave signal 1 arrives (or may also include sound wave signal 2, or may include both sound wave signal 2 and sound wave signal 3) based on sound wave signal 1. Similarly, mobile phone 100 can determine the distance between mobile phone 100 and tag device 200 when sound wave signal 4 arrives based on sound wave signals 2, 3, and 4. Similarly, mobile phone 100 can determine the distance between mobile phone 100 and tag device 200 when sound wave signal 6 arrives at mobile phone 100 based on sound wave signal 5 and sound wave signal 6. The above are only some examples, and this application does not make any specific limitations.

[0136] It is understood that the above two types of embodiments are only partial examples of the sound wave signals received by the mobile phone 100. In this application, the mobile phone 100 can receive sound wave signals emitted by any group of tag devices 200 at any time, which are all within the protection scope of this application. This application does not make any specific limitations on this.

[0137] Step S806: The mobile phone 100 calculates the real-time distance between the mobile phone 100 and the Tag device 200 based on the detected sound wave signal, the information corresponding to the sound wave signal, and the time offset.

[0138] In this application, the information corresponding to the acoustic signal includes the transmission time information of the set of acoustic signals when the Tag device 200 transmits a set of acoustic signals. The transmission time information refers to information that can characterize the transmission time of the set of acoustic signals. For example, the transmission information can be the transmission time corresponding to the acoustic signal, or it can be the transmission interval corresponding to the acoustic signal. This application does not specifically limit this; the following will describe the real-time distance calculation method using the above two types of transmission time information.

[0139] Based on this, the mobile phone 100 can determine the reception time of each set of sound wave signals when it arrives at the mobile phone 100. Subsequently, the mobile phone 100 calculates the distance between the mobile phone 100 and the Tag device 200 when the extermination sound wave signal is received based on the transmission time, reception time, and sound wave velocity of each set of sound wave signals.

[0140] In some embodiments of this application, the mobile phone 100 detects (i.e. receives) a first set of sound wave signals at a first moment, and detects (i.e. receives) a second set of sound wave signals at a second moment after the first moment.

[0141] Specifically, as shown in Figure 10(a), after detecting the first set of acoustic wave signals, the mobile phone 100 determines the reception time t when the first set of acoustic wave signals is received by the mobile phone 100 based on the first set of acoustic wave signals. 21 Subsequently, the mobile phone 100 emits the first set of acoustic signals from the Tag device 200 at the time t. 11 Reception time t 21 The time offset Δ and the sound wave velocity are used to calculate t. 21 The distance d1 between mobile phone 100 and tag device 200 at any given time. At this time, mobile phone 100 will be at t 21 time or t 21 After a few hours, d1 will be displayed.

[0142] In this application, distance can be calculated using a distance calculation formula. The calculation principle of the following distance is the same as that of distance d1, and will not be repeated hereafter. For example, the distance calculation formula is d k =(t 2k -t 1k +△)v, where d k Represents the real-time distance, k represents the number of sound wave signal groups, and t represents the distance. 2k t represents the arrival time of the k-th group of sound wave signals to mobile phone 100.1k This represents the transmission time at which the k-th group of sound wave signals begins to be transmitted.

[0143] Similarly, continuing to refer to Figure 10(a), after detecting the second set of acoustic wave signals, the mobile phone 100 determines the reception time t when the second set of acoustic wave signals is received by the mobile phone 100 based on the second set of acoustic wave signals. 22 Subsequently, the mobile phone 100 emits the second set of acoustic signals from the Tag device 200 at the time t. 12 Reception time t 22 The time offset Δ and the sound wave velocity are used to calculate t. 22 The distance d2 between mobile phone 100 and tag device 200 at any given time. At this time, mobile phone 100 will be at t 22 time or t 22 After a short time, d2 will be displayed.

[0144] In some implementations of this application, as shown in Figure 10(b), the emission time t when the second set of acoustic signals is emitted from the Tag device 200 is... 12 It can also be characterized as t 11 +T u1 , among which, T u1 This represents the transmission interval between the first and second sound wave signals sent by Tag device 200. Therefore, d2 = (t 22 -(t 11 +T u1 )+△)v. And so on, d3=(t 23 -(t 11 +T u1 +T u2 )+△)v.

[0145] That is, d k =(t 2k -(t 11 +T u1 +…+T u(k-1) )+△)v, where d k t represents the real-time distance. 2k t represents the arrival time of the k-th group of sound wave signals to mobile phone 100. 11 T represents the transmission time at which the first group of sound wave signals begins to be transmitted, k represents the number of groups of sound wave signals, and T represents the transmission time at which the first group of sound wave signals begins to be transmitted. u(k-1) Δ represents the transmission interval between the (k-1)th group of sound wave signals and the kth group of sound wave signals, v represents the sound wave velocity, and Δ represents the time offset.

[0146] In some implementations of this application, as shown in Figure 10(c), the transmission interval between any two adjacent sets of acoustic signals is T. u Then d k =(t2k -(t 11 +(k-1)T u )+△)v, where d k t represents the real-time distance. 2k t represents the arrival time of the k-th group of sound wave signals to mobile phone 100. 11 T represents the transmission time at which the first group of sound wave signals begins to be transmitted, k represents the number of groups of sound wave signals, and T represents the transmission time at which the first group of sound wave signals begins to be transmitted. u Δ represents the transmission interval between two adjacent sets of sound wave signals, v represents the sound wave velocity, and Δ represents the time offset.

[0147] Step S807: The mobile phone displays the calculated real-time distance in real time.

[0148] In this application, after receiving the first set of sound wave signals, the mobile phone 100 calculates the first distance corresponding to the first set of sound wave signals and displays the first distance in real time. Similarly, after receiving the second set of sound wave signals, the mobile phone 100 calculates the second distance corresponding to the second set of sound wave signals and displays the second distance in real time. It is worth noting that in this application, the mobile phone 100 does not process the received first set of sound wave signals only after receiving the second set of sound wave signals. The two sets of sound wave signals may have an appropriate delay, but the processing steps between them do not have a sequential order.

[0149] Step S808: Mobile phone 100 determines whether the time interval since the last Bluetooth time synchronization is less than a preset time threshold. If yes, return to step S806; otherwise, return to step S804.

[0150] In this application, after each preset time threshold Tb, the mobile phone 100 and the tag device 200 restart Bluetooth time synchronization. When Bluetooth time synchronization ends, the updated time offset Δ' is obtained, and the real-time distance calculation formula is updated to d. k =(t 2k -t 1k Based on this, the periodic Bluetooth time synchronization between the mobile phone 100 and the tag device 200 can correct the time drift (i.e., time offset) between the mobile phone 100 and the tag device 200, ensuring the accuracy of the measured distance.

[0151] In some embodiments of this application, as shown in FIG10(a), when the mobile phone 100 establishes Bluetooth synchronization with the tag device 200 at a third time, it determines a first time offset Δ between the mobile phone 100 and the tag device 200 corresponding to the third time t3. Based on the first time offset Δ, a first set of acoustic signals, and first information, the mobile phone 100 determines a first distance after the third time t3, and based on the first time offset Δ, a second set of acoustic signals, and second information, the mobile phone 100 determines a second distance after the third time t3.

[0152] In other embodiments of this application, referring to FIG10(a), the mobile phone 100 synchronizes its Bluetooth time with the Tag device 200 at a fourth time after a preset duration from the third time, to determine the second time offset Δ' between the mobile phone 100 and the Tag device 200 corresponding to the fourth time t4. Based on the second time offset Δ', the first set of acoustic signals, and the first information, the mobile phone 100 determines the first distance after the fourth time t4, and the mobile phone 100 determines the second distance after the fourth time t4 based on the second time offset Δ', the second set of acoustic signals, and the second information.

[0153] In addition, the Tag device 200 is equipped with a temperature sensor. After each time synchronization, it sends the current temperature information to the mobile phone 100 via Bluetooth. The mobile phone 100 calculates the speed of sound based on the current temperature information: v = 331 + 0.607Temp, where Temp is the temperature information fed back by the Tag device 200, in °C.

[0154] In addition, in some embodiments of this application, when the mobile phone 100 displays at least two distances, when the mobile phone 100 determines a third distance, the recommended direction of movement of the mobile phone 100 can be determined based on the three distances and the coordinates corresponding to the three distances determined by the mobile phone 100.

[0155] Figure 11 Some embodiments of this application are shown corresponding to Figure 8 The corresponding interaction diagram of the ranging method. The following will combine... Figure 8 and Figure 11 This application provides a detailed description of the distance measurement scheme. For example... Figure 11 As shown, the mobile phone 100 includes a Bluetooth module 101a, a microphone 102a, a processor 103, and a display module 105, while the tag device 200 includes a Bluetooth module 201a and a speaker 202a. Specifically, the ranging method provided in this application includes the following steps:

[0156] Step S1101: Bluetooth module 101a and Bluetooth module 201a establish a Bluetooth connection.

[0157] In this application, the Bluetooth module 101a in the mobile phone 100 and the Bluetooth module 201a in the Tag device 200 establish a wireless communication connection. However, it is understood that this application does not specifically limit the communication connection method between the mobile phone 100 and the Tag device 200. Besides Bluetooth pairing, other communication connection methods are also possible in this application, and this application does not specifically limit them.

[0158] Step S1102: Bluetooth module 101a receives Bluetooth signals emitted by Bluetooth module 201a.

[0159] In this application, Bluetooth signal refers to a broadcast packet emitted by Bluetooth module 201a carrying parameters such as the identification information of tag device 200 and signal strength. Bluetooth module 101a in mobile phone 100 can determine the identification information of tag device 200 and the signal strength of the Bluetooth signal based on the received Bluetooth signal.

[0160] In some embodiments of this application, Bluetooth module 101a receives periodic Bluetooth signals emitted by Bluetooth module 201a. A periodic Bluetooth signal refers to a Bluetooth signal transmitted by Bluetooth module 201a according to a predetermined period. In some implementations of this application, Bluetooth module 101a receives a predetermined number of Bluetooth signals emitted by Bluetooth module 201a. This application does not specifically limit this.

[0161] It is worth noting that this application does not specifically limit the transmission scheme of the periodic Bluetooth signals received by the Bluetooth module 101a of the mobile phone 100; this application only needs to limit the Bluetooth signals received by the Bluetooth module 201a of the Tag device 200. Specifically, in some implementations of this application, the Bluetooth module 201a of the Tag device 200 continuously transmits periodic Bluetooth signals. After the Bluetooth module 101a and the Bluetooth module 201a establish a communication connection, the Bluetooth module 101a begins to receive the periodic Bluetooth signals transmitted by the Bluetooth module 201a. In other alternative implementations of this application, after the mobile phone 100 and the Tag device 200 establish a communication connection through the Bluetooth module 101a and the Bluetooth module 201a, the Bluetooth module 201a of the Tag device 200 begins to transmit periodic Bluetooth signals.

[0162] Step S1103: Bluetooth module 101a calculates the RSSI based on the received Bluetooth signal and determines whether the calculated RSSI is greater than a preset strength threshold. If yes, proceed to step S1104; otherwise, return to step S1102. This is the same as steps S802 and S803, and will not be described again here.

[0163] Step S1104: Bluetooth module 101a and Bluetooth module 201a perform Bluetooth time synchronization to determine the time offset Δ between mobile phone 100 and Tag device 200.

[0164] The time offset Δ between mobile phone 100 and tag device 200 represents the difference between the clock displays of mobile phone 100 and tag device 200, and is unrelated to the actual time. For example, if the clock on mobile phone 100 is 10:01.02 seconds and the clock on tag device 200 is 10:01.03 seconds, then the time offset Δ between mobile phone 100 and tag device 200 is 0.01 seconds. As another example, if the clock on mobile phone 100 is 10:01.03 seconds and the clock on tag device 200 is 10:01.02 seconds, then the time offset Δ between mobile phone 100 and tag device 200 is -0.01 seconds.

[0165] Step S1105a: Bluetooth module 101a sends a data acquisition command to microphone 102a.

[0166] The acquisition command is generated by the mobile phone 100 when the Bluetooth module 101 determines that the RSSI is greater than the preset intensity threshold. It is used to instruct the microphone 102a to start acquiring sound wave signals.

[0167] It is worth noting that the technical solution of switching from step S1104 to step S1106 is only one example of the technical solution in this application, and this application does not specifically limit it. For example, this application can proceed to step S1107 after executing step S1104, and then proceed to step S1106. As another example, this application can also proceed to steps S1106 and S1107 simultaneously after executing step S1104.

[0168] Step S1105b: Bluetooth module 101a sends a start sound command to Bluetooth module 201a.

[0169] Step S1106: Microphone 102a responds to the sound command and begins to collect sound wave signals.

[0170] Step S1107: Speaker 202a responds to the start sound command and begins to play sound wave signals.

[0171] In this application, after the mobile phone 100 establishes a communication connection with the tag device 200, the Bluetooth module 101a sends a start sound command to the Bluetooth module 201a, and the speaker 202a in the tag device 200 begins to send several sets of sound wave signals. The speaker 220 in the tag device 200 can periodically send several sets of sound wave signals.

[0172] In some other embodiments of the application, after the mobile phone 100 determines that a communication connection has been established between the mobile phone 100 and the tag device 200, the Bluetooth module 101a sends a start sound command to the Bluetooth module 201a. The start sound command carries a preset transmission time, and the speaker 202a in the tag device 200 begins to transmit several sets of sound wave signals according to the preset transmission time. The speaker 220 in the tag device 200 can periodically transmit several sets of sound wave signals. In some implementations of this application, the number of sound wave signal sets is a predetermined value.

[0173] In some other embodiments of this application, after determining that the mobile phone 100 and the tag device 200 have established a communication connection, the Bluetooth module 101a sends a start sound command to the Bluetooth module 201a. The start sound command carries a preset frequency band of the sound wave signal, and the speaker 202a in the tag device 200 sends the sound wave signal of the preset frequency band according to the start sound command.

[0174] Step S1108: Microphone 102a collects the sound wave signal emitted by speaker 202a.

[0175] In this application, the Tag device 200 transmits several sets of sound wave signals, and the microphone 102a in the mobile phone 100 can receive these multiple sets of sound wave signals emitted by the speaker 202a in the Tag device 200. The sound wave signals can be ultrasonic signals with frequencies higher than 20kHz, or sound wave signals in other frequency bands; this application does not specifically limit their use. Multiple sets of sound wave signals refer to multiple segments of sound wave signals transmitted at intervals according to a certain transmission method.

[0176] In some implementations of this application, the frequency range of the acoustic signal is 20Hz to 2*10. 4 Hz. In some other alternative implementations of this application, the frequency range of the acoustic signal is 2*10 Hz. 4 Hz~1*10 12 Hz. In some other alternative implementations of this application, the frequency range of the acoustic signal is 20Hz to 1*10 Hz. 12 Hz. For example, the frequency range of a sound wave signal is 1.8*10 Hz. 4 Hz~2.2*10 4 Hz.

[0177] Step 1109: Bluetooth module 101a receives the timing information of the acoustic signal from Bluetooth module 201a.

[0178] In this application, time information refers to the transmission time information of the sound wave signals emitted by the loudspeaker 201a. Time information may include the transmission moment or the transmission interval. The transmission moment t1 of each group of sound wave signals can be directly characterized by the start transmission moment of each group of sound wave signals, or it can be represented by the transmission moment t1 of the first group of sound wave signals and the transmission interval T between two adjacent groups of sound wave signals. u The transmission interval is characterized by the time difference between the transmission times of two adjacent sets of acoustic signals, which is not specifically limited in this application. In some implementations, the transmission interval between multiple sets of acoustic signals can be fixed or dynamically changed. For example, the transmission interval can be gradually shortened or gradually lengthened.

[0179] In this application, the transmission time of each set of acoustic signals is fed back through Bluetooth module 101a and Bluetooth module 201a, which can reduce transmission delay and bit error rate, thereby improving the accuracy of distance measurement.

[0180] Secondly, in some implementations, the Tag device 200 determines the transmission interval between two adjacent sets of sound wave signals and transmits the sound wave signals according to the determined transmission interval. Simultaneously, the Tag device 200 also sends the determined transmission interval to the mobile phone 100, enabling the mobile phone 100 to calculate the transmission time of each subsequent set of sound wave signals based on the transmission time and interval of the first set of sound wave signals. Alternatively, the Tag device 200 calculates the transmission time of each set of sound wave signals based on the determined transmission interval and the first set of sound wave signals, and then sends the calculated transmission time of each set of sound wave signals to the mobile phone 100. Furthermore, when the transmission interval between two adjacent sets of sound wave signals changes according to a preset pattern, the Tag device 200 can send the pattern to the mobile phone 100, or the Tag device 200 can calculate the transmission time of each set of sound wave signals according to the pattern, and then send the transmission time of each set of sound wave signals to the mobile phone 100.

[0181] Specifically, in some implementations, the Tag device 200 determines the transmission time of each set of sound wave signals and simultaneously sends the transmission time of each set of sound wave signals to the mobile phone 100. In other implementations, the mobile phone 100 determines the transmission time of each set of sound wave signals and generates a start transmission command for each set of sound wave signals based on the transmission time of each set of sound wave signals. After receiving the start transmission command, the Tag device 200 transmits the sound wave signals outward according to the command.

[0182] In addition to the above, there are various ways to implement the receiving of multiple sets of sound wave signals from the Tag device 200 by the mobile phone 100. Several implementation schemes are briefly described below. Specifically, in some implementations, the audio module 102 in the mobile phone 100 is always active. After the mobile phone 100 and the Tag device 200 establish a communication connection, the audio module 202 in the Tag device 200 sends out multiple sets of sound wave signals, enabling the audio module 102 to receive these signals. In other implementations, the Tag device 200 continuously sends out multiple sets of sound wave signals. After the communication module 101 in the mobile phone 100 and the communication module 201 in the Tag device 200 establish a communication connection, the audio module 102 in the mobile phone 100 is activated to receive the multiple sets of sound wave signals sent out by the Tag device 200. In some other implementations, after the mobile phone 100 and the Tag device 200 establish a communication connection, the audio module 102 in the mobile phone 100 is activated, and the audio module 202 in the Tag device 200 sends out multiple sets of sound wave signals so that the audio module 102 can receive the multiple sets of sound wave signals emitted by the audio module 202.

[0183] Step S1110: In response to the microphone 102a, the processor 103 performs correlation calculation on the sound wave signal to obtain the arrival time of the sound wave signal, and then calculates the real-time distance between the mobile phone 100 and the tag device 200 based on the corresponding arrival time, time information, and sound wave speed. The time information may include the transmission time and transmission interval, and may also include the transmission time of each group. The arrival time is the reception time when the sound wave signal is received by the mobile phone 100.

[0184] In some embodiments of this application, the processor 103 in the mobile phone 100 performs correlation calculations on the received multiple sets of acoustic signals, determines the starting positions of the multiple sets of acoustic signals based on the correlation between the multiple sets of acoustic signals and the template acoustic signal, and then determines the arrival time t2 of each set of acoustic signals. Subsequently, the processor 103 in the mobile phone 100 obtains the transmission time t1 of each set of acoustic signals through the Bluetooth module 101a. Then, the processor 103 calculates the real-time distance d between the mobile phone 100 and the Tag device 200 according to the formula based on the transmission time t1, the arrival time t2, and the acoustic wave velocity v. k .

[0185] Step S1111: The display module 105 receives the real-time distance from the processor 103, and then proceeds to step S1112.

[0186] Step S1112: The display module 105 displays the real-time distance on the display interface.

[0187] In some embodiments of this application, when the real-time distance is within a preset range, the display module 105 in the mobile phone 100 displays the real-time distance; when the real-time distance is greater than the preset range, the mobile phone 100 is far from the Tag device, and the display module 105 in the mobile phone 100 does not display the distance; when the real-time distance is less than the preset range, it indicates that the Tag device 200 is nearby. For example, the preset range is 1 meter to 20 meters, or the preset range is 1 meter to 10 meters.

[0188] Step S1113: The processor 130 determines whether a stop sound command has been received. This stop sound command can be generated based on the user's touch operation and is used to indicate whether the search should be stopped. If yes, proceed to steps S1114a and S1114b. Otherwise, return to step S1108.

[0189] Step S1114a: Microphone 102a stops collecting sound wave signals.

[0190] Step S1114b: Bluetooth module 101a sends a stop sound command to Bluetooth module 201a, and then proceeds to step S1115.

[0191] Step S1115: The speaker 202a responds to the stop sound transmission command received by the Bluetooth module 201a and stops transmitting sound wave signals.

[0192] Step S1116: Bluetooth module 101a and Bluetooth module 201a disconnect from Bluetooth.

[0193] This application also provides some other embodiments, Figure 12 A flowchart of a ranging method in some embodiments of this application is shown. The following will be combined with… Figure 12 This application describes the distance measurement method provided. Specifically, such as... Figure 12 As shown, the ranging method provided in this application includes the following steps:

[0194] Step S1201: The mobile phone 100 and the Tag device 200 establish a Bluetooth connection, and the mobile phone 100 receives the ranging command. Step S1201 is the same as step S801, and will not be described again here.

[0195] Step S1202: Mobile phone 100 calculates the RSSI of tag device 200. Step S1202 is the same as step S802, and will not be described again here.

[0196] Step S1203: Mobile phone 100 determines whether the RSSI is greater than the preset intensity threshold. If yes, proceed to step S1204; otherwise, return to step S1202. Step S1203 is the same as step S803 and will not be described again here.

[0197] Step S1204: The mobile phone 100 and the tag device 200 synchronize their Bluetooth time to obtain the time offset between the mobile phone 100 and the tag device 200. Step S1204 is the same as step S804, and will not be described again here.

[0198] Step S1205: Mobile phone 100 notifies Tag device 200 to send several sets of sound wave signals at a specified time, and receives multiple sets of sound wave signals sent by Tag device 200.

[0199] Step S1206: Mobile phone 100 calculates the real-time distance between mobile phone 100 and Tag device 200 based on the detected sound wave signal, the corresponding time information of the sound wave signal, and the time offset. The time information can be a specified moment. Step S1206 is the same as step S806 and will not be described again here.

[0200] Step S1207: The mobile phone 100 displays the calculated real-time distance. Step S1207 is the same as step S807, and will not be described again here.

[0201] Step S1208: Mobile phone 100 determines whether the time interval since the last Bluetooth time synchronization is less than a preset time threshold. If yes, return to step S1206; otherwise, return to step S1204. Step S1208 is the same as step S808, and will not be described again here.

[0202] In the above ranging method, the mobile phone 100 no longer needs to feed back the transmission time information of each group of sound wave signals via Bluetooth, reducing the interaction between the mobile phone 100 and the Tag device 200 and improving the timeliness and accuracy of the ranging method. Furthermore, the mobile phone 100 can also reasonably adjust the corresponding transmission time information of subsequent groups of sound wave signals based on the distance already determined between the mobile phone 100 and the Tag device 200.

[0203] In some embodiments of this application, when the first distance value confirmed by the mobile phone 100 is small, it indicates that the mobile phone 100 and the Tag device 200 are close and the user is about to find the Tag device 200. At this time, the distance display accuracy between the mobile phone 100 and the Tag device 200 can be improved by shortening the transmission time interval between the first set of sound wave signals and the second set of sound wave signals, that is, reducing the difference between the first time and the second time. This allows the mobile phone 100 to accurately capture the difference in distance between the mobile phone 100 and the Tag device 200 even with slight movements.

[0204] In some other embodiments of this application, when the first distance value confirmed by the mobile phone 100 is small, it indicates that the mobile phone 100 and the Tag device 200 are close and the user is about to find the Tag device 200. At this time, the display accuracy of the distance between the mobile phone 100 and the Tag device 200 can be improved by slowing down the relative movement speed between the mobile phone 100 and the Tag device 200, so that even with slight movement, the mobile phone 100 can accurately capture the difference in distance between the mobile phone 100 and the Tag device 200.

[0205] In addition, in some embodiments of this application, in this ranging method, the first information corresponding to the first set of acoustic signals is determined by the mobile phone 100, and the second information corresponding to the second set of acoustic signals is determined by the tag device 200. The mobile phone 100 sends the first information to the tag device 200, and the tag device 200 sends the second information to the mobile phone 100. Alternatively, the second information is determined by the mobile phone 100, the first information is determined by the tag device 200, the mobile phone 100 sends the second information to the tag device 200, and the tag device 200 sends the first information to the mobile phone 100.

[0206] In addition, in one possible implementation of the first aspect mentioned above, the ranging method involves determining the first information and the second information by a third electronic device, with the first information and the second information being acquired by the mobile phone 100 and the tag device 200.

[0207] It is understood that any combination of the above-mentioned implementation methods is within the scope of protection of this application, and this application does not make any specific limitations on it.

[0208] Figure 13 Some embodiments of this application are shown corresponding to Figure 12 An interactive diagram of the ranging method in [the diagram]. The following will combine [the diagram with the following text]. Figure 13 This application provides a detailed description of the distance measurement method. Specifically, such as... Figure 13 As shown, the ranging method provided in this application includes the following steps:

[0209] Steps S1301 to S1305a, S1306 and S1308 are the same as steps S1101 to S1105a, S1106 and S1108, and will not be described again here.

[0210] Step S1305b: Start sound command, wherein the sound command carries a preset sending time.

[0211] Step S1308: Microphone 102a collects the sound wave signal emitted by speaker 202a at a preset transmission time.

[0212] Steps S1310 to S1316 are basically the same as steps S1110 to S1116, and will not be described in detail here.

[0213] In summary, step 1305b differs from step S1105b. On the other hand, it eliminates the step of Bluetooth module 101a receiving the transmission time of each set of sound wave signals from Bluetooth module 201a, reducing the interaction between mobile phone 100 and Tag device 200, improving calculation efficiency, and avoiding mistransmission, thereby improving the accuracy of real-time distance.

[0214] This application also provides some other embodiments, Figure 14 A flowchart of a ranging method in some embodiments of this application is shown. The following will be combined with… Figure 14 This application describes the distance measurement method provided. Specifically, such as... Figure 14 As shown, the ranging method provided in this application includes the following steps:

[0215] Step S1401: The mobile phone 100 and the Tag device 200 establish a Bluetooth connection, and the mobile phone 100 receives the ranging command. Step S1401 is the same as step S801, and will not be described again here.

[0216] Step S1402: Mobile phone 100 calculates the RSSI of tag device 200. Step S1402 is the same as step S802, and will not be described again here.

[0217] Step S1403: Mobile phone 100 determines whether the RSSI is greater than the preset intensity threshold. If yes, proceed to step S1404; otherwise, return to step S1402. Step S1403 is the same as step S803 and will not be described again here.

[0218] Step S1404: Mobile phone 100 and Tag device 200 synchronize their Bluetooth time. Step S1404 is the same as step S804, and will not be described again here.

[0219] Step S1405: Mobile phone 100 notifies Tag device 200 to send several sets of sound wave signals, and after receiving confirmation character information, receives multiple sets of sound wave signals sent by Tag device 200 and the transmission time of each set of sound waves sent via Bluetooth.

[0220] After Bluetooth time synchronization is completed, the mobile phone 100 needs to notify the Tag device 200 to send an acoustic signal each time. After receiving the notification, the Tag device 200 will send an acknowledgment (ACK) message to the mobile phone 100 via Bluetooth, and then send an acoustic signal, and notify the mobile phone 100 of the time when it sent the acoustic signal via Bluetooth.

[0221] Step S1406: Mobile phone 100 calculates the real-time distance between mobile phone 100 and Tag device 200 based on the received sound wave signal. Mobile phone 100 determines the real-time distance between mobile phone 100 and Tag device 200 based on the received sound wave signal, time information, and sound wave speed. Step S1406 is basically the same as step S806, and will not be described in detail here.

[0222] Step S1407: The mobile phone 100 displays the calculated real-time distance. Step S1407 is the same as step S807, and will not be described again here.

[0223] Step S1408: Mobile phone 100 determines whether the time interval since the last Bluetooth time synchronization is less than a time threshold. If yes, return to step S1406; otherwise, return to step S1404. Step S1408 is the same as step S808, and will not be described again here.

[0224] In the above ranging method, after the mobile phone 100 synchronizes its time via Bluetooth, it directly notifies the Tag device 200 of the start time of sending ultrasonic signals. In this way, the Tag device 200 does not need to provide feedback on its sending time via Bluetooth, reducing the interaction between the mobile phone 100 and the Tag device 200.

[0225] Figure 15 Some embodiments of this application are shown corresponding to Figure 14 An interactive diagram of the ranging method in [the diagram]. The following will combine [the diagram with the following text]. Figure 15 This application describes the distance measurement method provided, such as... Figure 15 As shown, the ranging method in this application includes the following steps:

[0226] Steps S1501 to S1506 are the same as steps S1101 to S1106, and will not be described again here.

[0227] Step S1507: Bluetooth module 201a sends an ACK to Bluetooth module 101a.

[0228] Steps S1508 to S1517 are basically the same as steps S1107 to S1116, and will not be described in detail here.

[0229] In summary, the embodiments of this application include a new step S1507. This allows the mobile phone 100 to periodically trigger the Tag device 200 to send multiple sets of acoustic signals after a time synchronization, for distance measurement by the mobile phone 100. The mobile phone 100 can calculate and display the distance to the Tag device 200 in real time, thus achieving reasonable control of the measurement system.

[0230] Furthermore, in some embodiments of this application, Bluetooth interaction information (such as time synchronization information, transmission time information, temperature information, etc.) between the mobile phone 100 and the Tag device 200 is stored in the log. The sound wave signal is stored in the microphone's recording module.

[0231] Figure 16 According to an embodiment of this application, a schematic diagram of the hardware structure of a mobile phone 100 is shown.

[0232] like Figure 16 As shown, taking mobile phone 100 as an example, mobile phone 100 may include processor 110 (i.e., processor 103 mentioned above), external memory interface 120, internal memory 121, universal serial bus (USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160 (i.e., communication module 101), audio module 170 (i.e., audio module 102 mentioned above), speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194 (i.e., display module 105 mentioned above), and subscriber identification module (SIM) card interface 195, EDL mode protection circuit 100, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0233] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.

[0234] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system. In some embodiments, the processor 110 can call and execute instructions of the terminal device access control method provided in the various embodiments of this application stored in the memory to implement the terminal device access control method provided in the embodiments of this application. In other embodiments, the memory in the processor 110 may also be used to store the aforementioned first image file, instructions corresponding to the preset signature method, the device identifier of the mobile phone 100, etc.

[0235] In some embodiments, the processor 110 may include one or more interfaces. These interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc. In other embodiments, after the mobile phone 100 enters EDL mode, the host device can establish a communication connection with the mobile phone 100 via the USB interface to access data in the mobile phone 100.

[0236] The charging management module 140 receives charging input from the charger. While charging the battery 142, the charging management module 140 can also supply power to the mobile phone 100 through the power management module 141.

[0237] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, internal memory 121, display 194, camera 193, and wireless communication module 160, etc.

[0238] The wireless communication function of mobile phone 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.

[0239] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.

[0240] The mobile communication module 150 can provide solutions for wireless communication applications including 2G / 3G / 4G / 5G on the mobile phone 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low-noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.

[0241] The wireless communication module 160 can provide solutions for wireless communication applications on the mobile phone 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0242] The mobile phone 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0243] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Mini-LED, a Micro-LED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the mobile phone 100 may include one or N displays 194, where N is a positive integer greater than 1.

[0244] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, mobile phone 100 may include one or N cameras 193, where N is a positive integer greater than 1.

[0245] The external storage interface 120 can be used to connect an external storage card, such as a Micro SD card, to expand the storage capacity of the mobile phone 100. The external storage card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external storage card.

[0246] Internal memory 121 can be used to store computer executable program code, including instructions. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application required for a function (such as an application that implements the functions related to the aforementioned Synergy service 12), etc. The data storage area may store data created during the use of mobile phone 100, such as storing tar format files obtained by packaging migration data (etc.). In addition, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. The processor 110 executes various functional applications of mobile phone 100 by running instructions stored in internal memory 121 and / or instructions stored in memory located in processor 110.

[0247] The mobile phone 100 can achieve audio functions such as music playback and recording through the audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.

[0248] Audio module 170 is used to convert digital audio information into analog audio signal output, and also to convert analog audio input into digital audio signal. Audio module 170 can also be used for encoding and decoding audio signals.

[0249] The loudspeaker 170A, also known as a "loudspeaker", is used to convert audio electrical signals into sound signals.

[0250] The receiver 170B, also known as the "earpiece", is used to convert audio electrical signals into sound signals.

[0251] The microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals.

[0252] The 170D headphone jack is used to connect wired headphones.

[0253] For example, the mobile phone 100 may also include one or more of the following: a button 190, a motor 191, an indicator 192, a SIM card interface 195 (or an eSIM card).

[0254] EDL short-circuit protection circuit 100 is coupled to at least one pin of processor 110, and EDL short-circuit protection circuit 100 includes at least one connection terminal. When the EDL mode protection circuit is active, for example, when the circuit enables at least one pin of the processor, the mobile phone 100 can enter EDL mode.

[0255] In some embodiments, the mobile phone 100 may further include buttons (not shown), such as a volume up button, a volume down button, and a power button. Users can enter EDL mode by combining operations of the buttons on the mobile phone 100. For example, when the mobile phone 100 is off, if multiple buttons among the volume up button, volume down button, and power button are pressed simultaneously, it enters EDL mode; or, for example, when the mobile phone 100 is off, if multiple buttons among the volume up button, volume down button, and power button are pressed simultaneously, and the EDL mode protection circuit in the mobile phone 100 is active, it enters EDL mode.

[0256] It is understood that the structure of the mobile phone 100 shown in the embodiments of this application does not constitute a specific limitation on the mobile phone 100. In other embodiments of this application, the mobile phone 100 may include more or fewer components than shown, or combine some components, or split some components, or have different component arrangements. The components shown may be implemented in hardware, software, or a combination of software and hardware.

[0257] further, Figure 17 According to some embodiments of this application, a schematic diagram of the structure of another electronic device is shown. In some embodiments of this application, the electronic device may be a laptop computer 400. Figure 17 As shown, the notebook computer 400 includes one or more processors 401, system memory 402, non-volatile memory (NVM) 403, communication interface 404, input / output (I / O) devices 405, and system control logic 406 for coupling the processor 401, system memory 402, non-volatile memory 403, communication interface 404, and input / output (I / O) devices 405. Wherein:

[0258] Processor 401 may include one or more processing units, such as a central processing unit (CPU), graphics processing unit (GPU), digital signal processor (DSP), microprocessor (MCU), AI (Artificial Intelligence) processor, or a processing module or circuit of a programmable gate array (FPGA), which may include one or more single-core or multi-core processors. Processor 401 can be used to execute instructions to implement the access control method provided in the embodiments of this application.

[0259] System memory 402 is volatile memory, such as random-access memory (RAM) or double data rate synchronous dynamic random-access memory (DDR SDRAM). System memory is used for temporary storage of data and / or instructions. For example, in some embodiments, system memory 402 can be used to store the aforementioned key identifier, signature information, device identifier of mobile phone 100, etc., and can also be used to store instructions for a preset signature method corresponding to the key identifier.

[0260] The non-volatile memory 403 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. In some embodiments, the non-volatile memory 403 may include any suitable non-volatile memory such as flash memory and / or any suitable non-volatile storage device, such as a hard disk drive (HDD), a compact disc (CD), a digital versatile disc (DVD), a solid-state drive (SSD), etc. In some embodiments, the non-volatile memory 403 may also be a removable storage medium, such as a secure digital (SD) memory card. In other embodiments, the non-volatile memory 403 may be used to store the aforementioned key identifier, signature information, device identifier of the mobile phone 100, etc., and may also be used to store instructions for a preset signature method corresponding to the key identifier.

[0261] Specifically, system memory 402 and non-volatile memory 403 may each include a temporary copy and a permanent copy of instruction 407. Instruction 407 may include, when executed by processor 401, causing laptop computer 400 to implement the access control methods provided in the embodiments of this application.

[0262] The communication interface 404 may include a transceiver for providing a wired or wireless communication interface for the laptop 400, thereby enabling communication with any other suitable device via one or more networks. In some embodiments, the communication interface 404 may be integrated into other components of the laptop 400, for example, the communication interface 404 may be integrated into the processor 401. In some embodiments, the laptop 400 may communicate with other devices through the communication interface 404. For example, the laptop 400 may obtain the device identifier and key identifier of the mobile phone 100 from the mobile phone 100 through the communication interface 404, and may also send signature information and instructions to the mobile phone 100.

[0263] Input / output (I / O) device 405 may include input devices such as keyboard and mouse, and output devices such as monitor. Users can interact with laptop 400 through input / output (I / O) device 405, for example, by inputting commands to a first application running on laptop 400 to obtain fuse bit file, device identification file, etc. of mobile phone 100.

[0264] System control logic 206 may include any suitable interface controller to provide any suitable interface to other modules of the laptop 400. For example, in some embodiments, system control logic 406 may include one or more memory controllers to provide an interface to system memory 402 and non-volatile memory 403.

[0265] In some embodiments, at least one of the processors 401 may be packaged together with the logic of one or more controllers for system control logic 406 to form a system in package (SiP). In other embodiments, at least one of the processors 401 may also be integrated on the same chip with the logic of one or more controllers for system control logic 406 to form a system-on-chip (SoC).

[0266] It is understood that the structure of the laptop computer 400 shown in the embodiments of this application does not constitute a specific limitation on the electronic device 200. In other embodiments of this application, the laptop computer 400 may include more or fewer components than shown, or combine some components, or split some components, or have different component arrangements. The components shown may be implemented in hardware, software, or a combination of software and hardware.

[0267] The various embodiments of the mechanisms disclosed in this application can be implemented in hardware, software, firmware, or a combination of these implementation methods. Embodiments of this application can be implemented as computer programs or program code executable on a programmable system, the programmable system including at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.

[0268] Program code can be applied to input instructions to execute the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, the processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application-specific integrated circuit (ASIC), or a microprocessor.

[0269] The program code can be implemented using a high-level procedural language or an object-oriented programming language to communicate with the processing system. Assembly language or machine language can also be used when needed. In fact, the mechanisms described in this application are not limited to any particular programming language. In either case, the language can be a compiled language or an interpreted language.

[0270] Figure 18 An architecture diagram of a mobile phone 100 is shown according to some embodiments of this application. For example... Figure 18 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.

[0271] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.

[0272] Content providers store and retrieve data, making that data accessible to applications. This data can include videos, images, audio, phone calls made and received, browsing history and bookmarks, phone books, and more.

[0273] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.

[0274] The phone manager is used to provide communication functions for the mobile phone 100. For example, it manages call status (including connection, hang-up, etc.).

[0275] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.

[0276] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of download completion or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.

[0277] The Android Runtime consists of core libraries and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.

[0278] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.

[0279] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0280] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.

[0281] System libraries can include multiple functional modules. For example: surface manager (SM), media libraries (ML), 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.

[0282] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.

[0283] The various embodiments of the mechanisms disclosed in this application can be implemented in hardware, software, firmware, or a combination of these implementation methods. Embodiments of this application can be implemented as computer programs or program code executable on a programmable system, the programmable system including at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.

[0284] Program code can be applied to input instructions to execute the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, the processing system includes any system having a processor such as, for example, a Digital Signal Processor (DSP), a microcontroller, an Application Specific Integrated Circuit (ASIC), or a microprocessor.

[0285] The program code can be implemented using a high-level procedural language or an object-oriented programming language to communicate with the processing system. Assembly language or machine language can also be used when needed. In fact, the mechanisms described in this application are not limited to any particular programming language. In either case, the language can be a compiled language or an interpreted language.

[0286] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored thereon on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed via a network or through other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a machine-readable (e.g., computer-readable) form, including but not limited to floppy disks, optical disks, CD-ROMs, magneto-optical disks, read-only memory (ROM), random access memory (RAM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic cards or optical cards, flash memory, or tangible machine-readable storage for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in the form of electrical, optical, acoustic, or other forms of propagated signals. Therefore, machine-readable media include any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a machine-readable (e.g., computer-readable) form.

[0287] In the accompanying drawings, some structural or methodological features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be necessary. Rather, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. Furthermore, the inclusion of structural or methodological features in a particular figure does not imply that such features are required in all embodiments, and in some embodiments, these features may be omitted or may be combined with other features.

[0288] It should be noted that all units / modules mentioned in the device embodiments of this application are logical units / modules. Physically, a logical unit / module can be a physical unit / module, a part of a physical unit / module, or a combination of multiple physical units / modules. The physical implementation of these logical units / modules themselves is not the most important factor; the combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed in this application. Furthermore, to highlight the innovative aspects of this application, the above-described device embodiments of this application have not introduced units / modules that are not closely related to solving the technical problems proposed in this application. This does not mean that the above-described device embodiments do not contain other units / modules.

[0289] It should be noted that in the examples and description of this patent, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.

[0290] Although this application has been illustrated and described with reference to certain preferred embodiments thereof, those skilled in the art should understand that various changes in form and detail may be made thereto without departing from the spirit and scope of this application.

Claims

1. A distance measurement method, characterized in that, include: The first electronic device establishes a Bluetooth connection with the second electronic device; In response to a ranging command, when the first electronic device and the second electronic device perform Bluetooth pairing, a first time offset between the first electronic device and the second electronic device is determined. The first electronic device detects the first set of sound wave signals emitted by the second electronic device at a first moment, and determines the first distance between the first electronic device and the second electronic device at the first moment based on the first moment, the first time offset and the first information corresponding to the first set of sound wave signals. The first information includes the first transmission time information of the second electronic device transmitting the first set of sound wave signals. The first electronic device displays the first distance; The first electronic device detects the second set of sound wave signals emitted by the second electronic device at a second time after the first time, and determines the second distance between the first electronic device and the second electronic device at the second time based on the second time, the first time offset and the second information corresponding to the second set of sound wave signals. The second information includes the second transmission time information of the second electronic device transmitting the second set of sound wave signals. The first electronic device displays the second distance.

2. The ranging method according to claim 1, characterized in that, The first electronic device receives the first information and the second information from the second electronic device.

3. The ranging method according to claim 1, characterized in that, The first electronic device sends the first transmission time information and the second transmission time information to the second electronic device, so that the second electronic device sends the first set of sound wave signals according to the first transmission time information, and sends the second set of sound wave signals according to the second transmission time information.

4. The ranging method according to any one of claims 1 to 3, characterized in that, Also includes: The first electronic device detects the third set of sound wave signals emitted by the second electronic device at a fifth moment, wherein the fifth moment is located between the first moment and the second moment; The first electronic device determines the first distance between the first electronic device and the second electronic device at the first moment based on the first set of acoustic signals, the third set of acoustic signals, the first information, and the third information corresponding to the third set of acoustic signals. The first electronic device determines the second distance between the first electronic device and the second electronic device at the second time based on the second set of acoustic signals, the third set of acoustic signals, the second information, and the third information.

5. The ranging method according to claim 1, characterized in that, Also includes: In response to the ranging command, the first electronic device sends a sound command to the second electronic device, the sound command instructing the second electronic device to send a sound wave signal, the sound wave signal including the first set of sound wave signals and the second set of sound wave signals.

6. The ranging method according to claim 5, characterized in that, The frequency range of the acoustic signal is a preset frequency range.

7. The ranging method according to claim 1, characterized in that, Also includes: If the received signal strength of the Bluetooth signal emitted by the second electronic device received by the first electronic device is higher than a preset strength threshold, the first electronic device begins to detect the sound wave signal emitted by the second electronic device. or When the received signal strength of the Bluetooth signal emitted by the second electronic device received by the first electronic device is higher than a preset strength threshold, the first electronic device and the second electronic device shall perform Bluetooth pairing.

8. The ranging method according to any one of claims 1 to 3, 5 to 7, characterized in that, Also includes: The first electronic device and the second electronic device periodically perform Bluetooth time pairing.

9. The ranging method according to any one of claims 1 to 3, 5 to 7, characterized in that, Also includes: The first electronic device detects the ranging command when it detects a ranging operation by the user on both the first and second electronic devices and / or a search operation by the user on the second electronic device.

10. The ranging method according to any one of claims 1 to 3, 5 to 7, characterized in that, The frequency range of the acoustic signal is 20Hz~2*10. 4 Hz; or The frequency range of the acoustic signal is 2*10. 4 Hz~1*10 12 Hz; or The frequency range of the acoustic signal is 20Hz~1*10. 12 Hz.

11. An electronic device, characterized in that, include: Memory, used to store instructions, and One or more processors, when the instructions are executed by the one or more processors, the electronic device performs the ranging method as described in any one of claims 1 to 10.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on an electronic device, cause the electronic device to perform the ranging method as described in any one of claims 1 to 10.

13. A computer program product, characterized in that, The computer program product includes instructions that, when executed by one or more processors, implement the ranging method as described in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Distance measurement system, distance measurement method, information processing device, program, and recording medium

    EP1758308A1

  • Apparatus and method for measuring distance and location

    US20160291141A1