Distance measurement method, readable medium, and electronic device
The method allows for real-time distance measurement between electronic devices by receiving and processing sound signals, addressing inefficiencies in existing methods and enhancing user experience and search accuracy.
Patent Information
- Application Number
- JP2024550686
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2022-02-28
- Filing Date
- 2023-02-10
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2043-02-10
AI Technical Summary
Existing distance measurement methods are cumbersome and lack real-time updating capabilities, leading to poor user experience and inefficient search processes when determining the distance between electronic devices.
A method involving a first electronic device establishing a connection with a second device, receiving multiple groups of sound signals, calculating reception times, and continuously refreshing the distance based on sound wave properties and user operations, allowing for real-time distance updates.
Enables easy operation, enhances user experience, and ensures accurate, real-time distance updates even with minor movements, improving search efficiency and accuracy.
Smart Images

Figure 0007775498000006 
Figure 0007775498000007 
Figure 0007775498000008
Abstract
Description
[Technical Field]
[0001] Book The invention relates to the field of communication technology, and in particular to a distance measurement method, a readable medium, and an electronic device. [Background technology]
[0002] Distance is an important parameter that needs to be detected in various scenarios and control situations. For example, when an electronic device searches for another electronic device, the distance and angle between the two electronic devices can be accurately measured using wireless carrier (Ultra-Wideband, UWB) technology, and the user can be notified of the searched electronic device at a specific distance and in a specific direction, thereby achieving accurate search for the other electronic device. In another example, when an electronic device performs multi-screen collaboration with another electronic device, for security reasons, the electronic device can only perform multi-screen collaboration with other electronic devices within a short distance range. In this case, the distance between the electronic device and the other electronic device can be measured to determine when to perform multi-screen collaboration between the electronic device and the other electronic device and when to terminate the multi-screen collaboration between the electronic device and the other electronic device. Summary of the Invention
[0003] This application provides a distance measurement method, a readable medium, and an electronic device. The distance measurement method includes a first electronic device establishing a communication connection with a second electronic device. The first electronic device generates a distance measurement command based on a user's associated operation. The first electronic device receives multiple groups of sound signals transmitted by a speaker of the second electronic device and determines the start band of each of the multiple received sound signals through correlation calculation to determine the reception time at which each of the groups of sound signals was received by the first electronic device. The first electronic device then determines the real-time distance between the first electronic device and the second electronic device when each of the groups of sound signals was received by the first electronic device based on the reception time, transmission time, and sound velocity of each of the groups of sound signals. Finally, the first electronic device continuously refreshes and displays the real-time distance between the first electronic device and the second electronic device obtained through calculation.
[0004] In the distance measurement method described above, a user performs a related operation on a first electronic device. A second electronic device continuously transmits multiple groups of sound signals. The first electronic device can determine the arrival time corresponding to each group of sound signals based on the received multiple groups of sound signals. The first electronic device can calculate the real-time distance between the first electronic device and the second electronic device when each group of sound signals arrives at the first electronic device based on the arrival time corresponding to each group of sound signals, the transmission time corresponding to each group of sound signals, and the sound wave speed. Based on this, the first electronic device can continuously refresh the real-time distance between the first electronic device and the second electronic device. The distance measurement method described above is easy for users to operate and improves the user experience. In addition, because the sound waves have a high frequency, the transmission interval between two adjacent groups of sound signals can be flexibly adjusted. Therefore, the frequency at which the real-time distance is refreshed by the first electronic device can be guaranteed. Even if a user carries the first electronic device and moves slightly, the first electronic device can accurately display the change in the distance between the first electronic device and the second electronic device in real time.
[0005] A first aspect of this application provides a distance measurement method. The method includes a first electronic device establishing a communication connection to a second electronic device. The first electronic device detects a distance measurement command. The first electronic device detects a first group of sound wave signals transmitted by the second electronic device at a first time point and determines a first distance corresponding to the first time point between the first electronic device and the second electronic device based on the first group of sound wave signals and first information corresponding to the first group of sound wave signals, the first information including first transmission time information of the transmission of the first group of sound wave signals by the second electronic device. After determining the first distance, the first electronic device displays the first distance. The first electronic device detects a second group of sound wave signals transmitted by the second electronic device at a second time point after the first time point and determines a second distance corresponding to the second time point between the first electronic device and the second electronic device based on the second group of sound wave signals and second information corresponding to the transmission of the second group of sound wave signals, the second information including second transmission time information of the transmission of the second group of sound wave signals by the second electronic device. After determining the second distance, the first electronic device displays the second distance. The first transmission time information includes transmission time points at which the second electronic device transmits the first group of sonic signals. The second transmission time information includes transmission time points at which the second electronic device transmits the second group of sonic signals. Alternatively, the second transmission time information includes transmission time points at which the second electronic device transmits the first group of sonic signals and a transmission interval between the first group of sonic signals and the second group of sonic signals transmitted by the second electronic device. This is not particularly limited in this application.
[0006] There are various ways for the first electronic device to establish a communication connection with the second electronic device, which is not particularly limited in this application. For example, the first electronic device and the second electronic device may be connected via Bluetooth®. The distance measurement command refers to instruction information generated by the first electronic device based on a user operation, instructing the first electronic device to interact with the second electronic device to obtain a real-time distance between the first electronic device and the second electronic device. It may be understood that in some implementations, the distance measurement command may further carry identification information of the second electronic device so that an interaction with the second electronic device can be accurately established when multiple associated electronic devices are present around the first electronic device.
[0007] The first group of sound signals refers to a segment of sound signals received by the first electronic device from a plurality of groups of sound signals transmitted by the second electronic device. In other words, the second electronic device transmits a plurality of segments of sound signals, and the first electronic device receives the first group of sound signals at a first time point. The second group of sound signals refers to another segment of sound signals received by the first electronic device from a plurality of groups of sound signals transmitted by the second electronic device. In other words, the second electronic device transmits a plurality of segments of sound signals, and the first electronic device receives the second group of sound signals at a second time point. It may be understood that in some implementations of this application, after the first electronic device receives the first group of sound signals, another segment of the sound signals subsequently received is the second group of sound signals. In some other alternative implementations of this application, after receiving the first group of sound signals, the first electronic device receives another segment of sound signals, and yet another segment of the sound signals subsequently received is the second group of sound signals. In other words, the first electronic device further receives another group of sonic signals between the first group of sonic signals and the second group of sonic signals, for example, the first electronic device receives the first group of sonic signals, the third group of sonic signals, and the second group of sonic signals in sequence.
[0008] Furthermore, the first distance between the first electronic device and the second electronic device corresponding to the first time point is not necessarily determined at the first time point or is not the distance between the first electronic device and the second electronic device displayed at the first time point. The first distance between the first electronic device and the second electronic device corresponding to the first time point refers to the distance between the first electronic device and the second electronic device corresponding to the first time point. The first distance may be determined after a short delay relative to the first time point, or the first distance may be the distance displayed on the first electronic device after a short delay relative to the first time point. The first distance represents the distance between the first electronic device and the second electronic device when the first group of sound wave signals arrive at the first electronic device. Similarly, it can be understood that the principle of determining the second distance between the first electronic device and the second electronic device is similar to the principle of determining the first distance, and therefore will not be described in detail in this application.
[0009] It should also be noted that the above implementation only describes how the first and second electronic devices determine the first and second distances. However, in an actual distance measurement method, the second distance is a set of data. In other words, after the first electronic device determines 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, and therefore the first electronic device continuously displays the distance between the first and second electronic devices.
[0010] In the above-described distance measurement method, the first electronic device can continuously refresh the real-time distance between the first electronic device and the second electronic device. The above-described distance measurement method is easy for users to operate and improves the user experience. In addition, because the frequency of the sound waves is high, the transmission interval between two adjacent groups of sound wave signals can be flexibly adjusted. Therefore, the frequency at which the real-time distance is refreshed by the first electronic device can be guaranteed. Even if the user carries the first electronic device and moves slightly, the first electronic device can accurately display the change in the distance between the first electronic device and the second electronic device in real time.
[0011] In one possible implementation of the first aspect, in the distance measurement method, the first electronic device receives the first information and the second information from the second electronic device, i.e., the first electronic device receives the first transmission time information and the second transmission time information from the second electronic device.
[0012] In other words, in this possible implementation of the present application, the first information and the second information are determined by the second electronic device. The second electronic device can transmit a first group of sound wave signals based on the first information determined by the second electronic device, and can transmit a second group of sound wave signals based on the second information determined by the second electronic device. The second electronic device then transmits the first information and the second information to the first electronic device, so that the first electronic device can determine a first distance between the first electronic device and the second electronic device when the first group of sound wave signals arrive at the first electronic device based on the received first group of sound wave signals and the first information, and simultaneously determine a second distance between the first electronic device and the second electronic device when the second group of sound wave signals arrive at the first electronic device based on the received second group of sound wave signals and the second information.
[0013] In the distance measurement method described above, the second electronic device does not need to receive the first information and the second information from the first electronic device or another electronic device before transmitting the first and second acoustic signals, which effectively shortens the response time before the second electronic device transmits the first and second acoustic signals, properly arranges the response periodicity of the first and second electronic devices, and further improves the user experience.
[0014] In one possible implementation of the first aspect, in the distance measurement method, the first electronic device transmits first transmission time information and second transmission time information to the second electronic device, such that the second electronic device transmits a first group of sound wave signals based on the first transmission time information and the second electronic device transmits a second group of sound wave signals based on the second transmission time information, where the first information includes the first transmission time information and the second information includes the second transmission time information.
[0015] In other words, in this possible implementation of the present application, the first information and the second information are determined by the first electronic device, and after determining the first information and the second information, the first electronic device transmits the first information and the second information to the second electronic device.
[0016] The second electronic device then transmits a first group of sound signals based on the first information and a second group of sound signals based on the second information, and the first electronic device determines a first distance between the first electronic device and the second electronic device when the first group of sound signals arrive at the first electronic device based on the received first group of sound signals and the first information, and simultaneously determines a second distance between the first electronic device and the second electronic device when the second group of sound signals arrive at the first electronic device based on the received second group of sound signals and the second information.
[0017] In the above-mentioned distance measuring method, the first electronic device does not need to receive the first information of the first group of acoustic signals and the second information of the second group of acoustic signals from the second electronic device, thereby reducing the interaction between the first information and the second information between the first electronic device and the second electronic device, and improving the timeliness and accuracy of the distance measuring method. In addition, the first electronic device can further appropriately adjust the transmission time information corresponding to the subsequent group of acoustic signals based on the distance between the first electronic device and the second electronic device determined by the first electronic device.
[0018] For example, when the first distance value determined by the first electronic device is small, it indicates that the first electronic device is close to the second electronic device and the user is about to find the second electronic device. In this case, in order to improve the accuracy of displaying the distance between the first electronic device and the second electronic device, the transmission time interval between the first group of sound wave signals and the second group of sound wave signals may be shortened, in other words, the difference between the first time and the second time may be reduced, so that the first electronic device can accurately capture the distance difference between the first electronic device and the second electronic device when the first electronic device moves a little.
[0019] In another example, when the first distance value determined by the first electronic device is small, it indicates that the first electronic device is close to the second electronic device and the user is about to find the second electronic device. In this case, when the first electronic device moves a small amount, the relative movement speed between the first electronic device and the second electronic device may be slowed down to improve the accuracy of displaying the distance between the first electronic device and the second electronic device so that the first electronic device can also accurately capture the distance difference between the first electronic device and the second electronic device.
[0020] In one possible implementation of the first aspect, in the distance measurement method, the first information is determined by the first electronic device, the second information is determined by the second electronic device, the first electronic device transmits the first information to the second electronic device, and the second electronic device transmits 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 transmits the second information to the second electronic device, and the second electronic device transmits the first information to the first electronic device.
[0021] Also, in one possible implementation of the first aspect, in the distance measurement method, the first information and the second information are determined by the third electronic device, and the first electronic device and the second electronic device acquire the first information and the second information.
[0022] It can be understood that any combination of the above implementations falls within the protection scope of this application, which is not particularly limited in this application.
[0023] In one possible implementation of the first aspect, the distance measuring method further includes the first electronic device detecting a third group of acoustic signals transmitted by the second electronic device at a fifth time point. The fifth time point is between the first time point and the second time point. The first electronic device further determines a first distance corresponding to the first time point between the first electronic device and the second electronic device based on the first group of acoustic signals, the third group of acoustic signals, the first information, and third information corresponding to the third group of acoustic signals. The first electronic device determines a second distance corresponding to the second time point between the first electronic device and the second electronic device based on the second group of acoustic signals, the third group of acoustic signals, the second information, and the third information.
[0024] In other words, in this possible implementation of the present application, the first electronic device receives the first group of acoustic signals and the third group of acoustic signals at a first time point, and determines a first distance between the first electronic device and the second electronic device corresponding to the first time point based on the first group of acoustic signals, the third group of acoustic signals, first information corresponding to the first acoustic signals, and third information corresponding to the third group of acoustic signals. The third information includes third transmission time information for transmitting the third group of acoustic signals by the second electronic device. For example, the third information includes transmission times at which the second electronic device transmits the third group of acoustic signals. In another example, the third information includes transmission times at which the second electronic device transmits the third group of acoustic signals and a transmission interval between the third group of acoustic signals and the first acoustic signals. This is not particularly limited in this application.
[0025] In the above-described distance measuring method, when receiving multiple groups of sound wave signals transmitted by the second electronic device, the first electronic device can determine and display the distance between the first electronic device and the second electronic device based on a preset display frequency. Thus, the first electronic device can appropriately adjust the display method of the distance between the first electronic device and the second electronic device based on actual display requirements. This implements an effective display between the first electronic device and the second electronic device and improves the user experience.
[0026] In one possible implementation of the first aspect, the distance measurement method further includes the first electronic device sending a sound emission command to the second electronic device, the sound emission command instructing the second electronic device to transmit sound wave signals, the sound wave signals including a first group of sound wave signals and a second group of sound wave signals.
[0027] The sound emission command refers to command information sent by the first electronic device to the second electronic device to instruct the second electronic device to start transmitting a sound wave signal. It can be understood that the sound emission command may further include parameters of the sound wave signal transmitted by the second electronic device, such as a transmission time, a transmission interval, or a sound wave wavelength (i.e., a sound wave frequency band), which is not particularly limited in this application.
[0028] In other words, in this possible implementation of the present application, after establishing a communication connection to the second electronic device, the first electronic device can send a sound emission command to the second electronic device so that the second electronic device starts transmitting a sound wave signal in response to the sound emission command. In this distance measurement method, the first electronic device can control when the second electronic device emits a sound to avoid the second electronic device from continuously emitting a sound when distance measurement is not required. This improves energy utilization efficiency.
[0029] In one possible implementation of the first aspect, in the distance measurement method, the sound emission command instructs the second electronic device to transmit a sound wave signal, and the frequency range of the sound wave signal is a preset frequency range.
[0030] In other words, in this possible implementation of the present application, the first electronic device is configured to instruct the second electronic device to transmit a sound wave signal within a preset frequency range, which makes it easier for the first electronic device to distinguish the sound wave signal of the second electronic device and avoid confusion with the sound wave signal transmitted by another electronic device, which also narrows the frequency range of the sound wave signal, reduces the difficulty of processing the sound wave signal by the first electronic device, and improves the efficiency of processing the sound wave signal by the first electronic device.
[0031] In one possible implementation of the first aspect, the distance measurement method further includes the first electronic device establishing a Bluetooth connection to the second electronic device, and when a received signal strength of a Bluetooth signal transmitted by the second electronic device and received by the first electronic device is higher than a preset strength threshold, the first electronic device starting to detect an acoustic signal transmitted by the second electronic device, the acoustic signal including a first acoustic signal and a second acoustic signal.
[0032] The received signal strength of a Bluetooth signal represents the strength of the Bluetooth signal transmitted by the second electronic device and received by the first electronic device, and can also be understood as the current state of the relationship between the first electronic device and the second electronic device. For example, a higher received signal strength value indicates that the first electronic device is closer to the second electronic device, i.e., the stronger the relationship between the second electronic device and the first electronic device, the more stable the Bluetooth connection between the first electronic device and the second electronic device, and the easier it is for a user to use the first electronic device to search for the second electronic device. A lower received signal strength value indicates that the first electronic device is farther away from the second electronic device, i.e., the weaker the relationship between the second electronic device and the first electronic device, and the more likely it is that a user will not be able to search for the second electronic device using the first electronic device. The preset strength threshold is an approximate value of the received signal strength indication determined based on the relationship strength between the first electronic device and the second electronic device. The preset strength threshold is used to determine whether the first electronic device is close to the second electronic device.
[0033] In other words, in this possible implementation of the present application, when a first electronic device is connected to a second electronic device via Bluetooth, the first electronic device roughly determines the degree of distance between the first electronic device and the second electronic device by using the received signal strength of a Bluetooth signal received by the first electronic device from the second electronic device, and when the first electronic device is near the second electronic device, the first electronic device begins to detect an acoustic signal transmitted by the second electronic device, and the acoustic signal includes a first acoustic signal and a second acoustic signal.
[0034] In the distance measurement method described above, the time when the first electronic device begins to detect the sound wave signal transmitted by the second electronic device can be determined based on the received signal strength of the Bluetooth signal received by the first electronic device from the second electronic device, which improves the effectiveness of the first electronic device in determining the distance between the first electronic device and the second electronic device and avoids the first electronic device from invalidly measuring the distance between the first electronic device and the second electronic device when the Bluetooth connection strength between the first electronic device and the second electronic device is weak.
[0035] In one possible implementation of the first aspect, the distance measurement method further includes the first electronic device performing Bluetooth time synchronization with the second electronic device at a third time point to determine a first time offset between the first electronic device and the second electronic device corresponding to the third time point, the first electronic device determining a first distance after the third time point based on the first time offset, the first group of acoustic signals, and the first information, and the first electronic device determining a second distance after the third time point based on the first time offset, the second group of acoustic signals, and the second information.
[0036] Bluetooth time synchronization refers to determining a time offset between a first electronic device and a second electronic device by using a Bluetooth module in a first electronic device and a Bluetooth module in a second electronic device. The time offset refers to the difference in time displayed on the first electronic device and the second electronic device. The first time offset refers to the difference in time displayed on the first electronic device and the second electronic device after a third time point.
[0037] It is easy to understand that the first electronic device and the second electronic device each have their own clocks, and therefore, the time corresponding to the first electronic device and the time corresponding to the second electronic device can be separately obtained through statistics. However, in some cases, due to setting errors or structural errors, the time corresponding to the first electronic device may not match the time corresponding to the second electronic device, and this mismatch can be reduced through Bluetooth time synchronization. A specific implementation of obtaining a time offset between the first electronic device and the second electronic device during Bluetooth time synchronization will be described in detail below and will not be described again in detail here. Also, the third time point is only used to distinguish between the first time point and the second time point and does not represent an order relationship. In some implementations, the third time point is before the first time point. In another alternative implementation, the third time point is after the first time point. For example, the third time point is between the first time point and the second time point. This is not particularly limited in this application.
[0038] In the above-mentioned distance measurement method, the time offset between the first electronic device and the second electronic device is comprehensively taken into consideration, thereby reducing the measurement result error caused in the distance measurement calculation due to the inconsistent display times of the first electronic device and the second electronic device, and improving the accuracy of the measured distance between the first electronic device and the second electronic device.
[0039] In one possible implementation of the first aspect, the distance measurement method further includes the first electronic device performing Bluetooth time synchronization with the second electronic device at a fourth time point that is a preset time after the third time point to determine a second time offset between the first electronic device and the second electronic device corresponding to the fourth time point, the first electronic device determining a first distance after the fourth time point based on the second time offset, the first group of acoustic signals, and the first information, and the first electronic device determining a second distance after the fourth time point based on the second time offset, the second group of acoustic signals, and the second information.
[0040] The second time offset refers to a time difference displayed on the first electronic device and the second electronic device after the fourth time point. The fourth time point is after the third time point. Furthermore, the fourth time point is used merely to distinguish between the first, second, and third time points, and does not represent an order relationship between the fourth time point and the first time point, or an order relationship between the fourth time point and the second time point. In some implementations, the fourth time point is after the first and second time points. In another alternative implementation, the fourth time point is after the second time point. This is not particularly limited in this application.
[0041] In one possible implementation of the first aspect, the time interval between the third and fourth time points is a fixed value. For example, the time interval between the third and fourth time points is a preset time threshold. In other words, the first electronic device and the second electronic device perform Bluetooth time synchronization every time the preset time threshold is reached.
[0042] In the distance measurement method described above, when the first and second electronic devices start Bluetooth time synchronization again at the fourth time point, an updated time offset is obtained after the Bluetooth time synchronization ends, and the real-time distance calculation formula is updated. Based on this, the first and second electronic devices periodically perform Bluetooth time synchronization, so that the time drift (i.e., time offset) between the first and second electronic devices can be corrected, which ensures the accuracy of the distance measurement result.
[0043] In one possible implementation of the first aspect, the distance measurement method further includes the first electronic device detecting a distance measurement command when detecting a distance measurement operation performed by a user on the first electronic device and the second electronic device, and / or a search operation performed by a user on the second electronic device.
[0044] In one possible implementation of the first aspect, in the distance measurement method, the frequency range of the sound wave signal is from 20 Hz to 2*10 4 Hz. Alternatively, the frequency range of the sound signal is 2*10 4 Hz to 10 12 Hz. Alternatively, the frequency range of the sound signal is 20 Hz to 10 12 Hz. For example, the frequency range of a sound signal is 1.8*10 4 Hz to 2.2*10 4 Hz.
[0045] A second aspect of the present application provides an electronic device, the electronic device including a memory configured to store instructions and one or more processors, which, when executed by the one or more processors, cause the processors to perform a distance measurement method according to the first aspect or any one of the possible implementations of the first aspect.
[0046] A third aspect of the application provides a computer-readable storage medium having stored thereon instructions that, when executed on an electronic device, enable the electronic device to perform a distance measurement method according to the first aspect or any one of the possible implementations of the first aspect.
[0047] A fourth aspect of the present application provides a computer program product, the computer program product including instructions that, when executed by one or more processors, are used to perform a distance measurement method according to the first aspect or any one of the possible implementations of the first aspect. [Brief explanation of the drawings]
[0048] [Figure 1(a)] 1 illustrates some application scenarios in which the distance measurement method according to this application can be applied. [Figure 1(b)] 10 illustrates some other application scenarios in which the distance measurement method according to this application can be applied. [Figure 2] 1 illustrates a search scenario in which the distance measurement method according to this application can be applied. [Figure 3(a)] 1 illustrates a home screen of a mobile phone 100 applicable to a distance measurement method according to some embodiments of the present application. [Figure 3(b)] 1 illustrates an operation interface of a mobile phone 100 applicable to a distance measurement method according to some embodiments of the present application. [Figure 4] 2 is a diagram of distance measurement between a mobile phone 100 and a Tag device 200 according to some embodiments of the present application. [Figure 5(a)] 1 shows the distance d1 between the mobile phone 100 and the Tag device 200 at time t31. [Figure 5(b)] The distance d2 between the mobile phone 100 and the Tag device 200 at time t32 is shown. [Figure 5(c)] The distance d3 between the mobile phone 100 and the Tag device 200 at time t33 is shown. [Figure 6] 1 is a diagram of a configuration of a mobile phone 100 and a Tag device 200 according to some embodiments of the present application. [Figure 7] 1 is a diagram of a specific configuration of a mobile phone 100 and a Tag device 200 according to some embodiments of the present application. [Figure 8] 1 is a flowchart of a distance measurement method according to some embodiments of the present application. [Figure 9] FIG. 2 is a diagram of Bluetooth time synchronization in a distance measurement method according to some embodiments of the present application. [Figure 10(a)] 1 is a diagram of a distance measurement method according to some embodiments of the present application, where the first information includes transmission times of acoustic signals and the second information includes transmission times of a second group of acoustic signals. [Figure 10(b)] 1 is a diagram of a distance measurement method according to some embodiments of the present application, in which first information includes a transmission time point of an acoustic signal, and second information includes a transmission interval between a second group of acoustic signals and a first group of acoustic signals. [Figure 10(c)] FIG. 1 is a diagram of a distance measurement method according to some embodiments of the present application, in which first information includes a transmission time point of an acoustic signal, and second information includes a transmission interval between a second group of acoustic signals and a first group of acoustic signals, and the transmission interval is a fixed value. [Figure 11A] 11A and 11B are interaction diagrams corresponding to the distance measurement method of FIG. 8, according to some embodiments of the present application. [Figure 11B] 11A and 11B are interaction diagrams corresponding to the distance measurement method of FIG. 8, according to some embodiments of the present application. [Figure 12] 1 is a flowchart of a distance measurement method according to some embodiments of the present application. [Figure 13A] 13A and 13B are interaction diagrams corresponding to the distance measurement method of FIG. 12, according to some embodiments of the present application. [Figure 13B] 13A and 13B are interaction diagrams corresponding to the distance measurement method of FIG. 12, according to some embodiments of the present application. [Figure 14] 1 is a flowchart of a distance measurement method according to some embodiments of the present application. [Figure 15A] 15A and 15B are interaction diagrams corresponding to the distance measurement method of FIG. 14, according to some embodiments of the present application. [Figure 15B] 15A and 15B are interaction diagrams corresponding to the distance measurement method of FIG. 14, according to some embodiments of the present application. [Figure 16] 1 is a diagram of the hardware configuration of a mobile phone 100 according to this application. [Figure 17] 4 is a diagram of a notebook computer 400 according to the present application. [Figure 18]1 is an architecture diagram of a mobile phone 100 according to some embodiments of the present application.
[0049] Reference sign: 100 - mobile phone, 101 - communication module, 101a - bluetooth module, 102 - audio module, 102a - microphone, 103 - processor, 104 - memory, 105 - display module, 200 - tag device, 201 - communication module, 201a - bluetooth module, 202 - audio module, 202a - speaker, 203 - processor, 204 - memory, 205 - display module. DETAILED DESCRIPTION OF THE INVENTION
[0050] Exemplary embodiments of this application include, but are not limited to, distance measurement methods, apparatus, readable media, and electronic devices.
[0051] To make the objectives, technical solutions and advantages of this application clearer, the following further describes the implementation of this application in detail with reference to the accompanying drawings.
[0052] A measurement system applicable to the distance measurement method in this application includes a first electronic device (e.g., a mobile phone 100 in FIG. 1(a) or FIG. 1(b)) and a second electronic device (e.g., an electronic tag device 200 in FIG. 1(a) or a wristwatch 300 in FIG. 1(b)), and the distance measurement solution can be applied to multiple scenarios.
[0053] In some application scenarios, for example, as shown in FIG. 1( a), the distance measurement method provided in this application can be applied to an application scenario in which a user searches for a tag device 200 by using a mobile phone 100 to find an item, such as a backpack, a bicycle, or a key. The tag device 200 is an electronic tag device that indicates an item and generally includes a Bluetooth module and a speaker. Specifically, to facilitate the search of an item, such as a backpack, a bicycle, or a key, which cannot be directly identified by an electronic device, the tag device 200 is generally attached to this type of item. When a user wants to know the specific location of the backpack, the bicycle, or the key, the user operates the mobile phone 100 to connect to the tag device 200 via Bluetooth and receives sound waves transmitted by the speaker of the tag device 200, thereby determining the distance between the mobile phone 100 and the tag device 200, which provides a reference for the user to find the item, such as a backpack, a bicycle, or a key, and reduces the difficulty of the user's search.
[0054] In some other application scenarios, as another example, as shown in FIG. 1(b), the distance measurement method provided in this application may instead be applied to an application scenario in which the mobile phone 100 and the wristwatch 300 are paired and interact with each other. For example, in multi-screen collaboration, for security reasons, the multi-screen collaboration can be performed only when the distance between the mobile phone 100 and the wristwatch 300 is within a certain range. When a user wants to perform multi-screen collaboration between the mobile phone 100 and the wristwatch 300, the user can measure the distance between the mobile phone 100 and the wristwatch 300 to determine when to perform the multi-screen collaboration between the mobile phone 100 and the wristwatch 300 and when to terminate the multi-screen collaboration between the mobile phone 100 and the wristwatch 300, thereby accurately determining the multi-screen collaboration conditions and improving multi-screen collaboration security.
[0055] In order to better understand the technical solution of the embodiment of this application, the following describes the technical solution of this application in detail by using an application scenario in which a user uses a mobile phone 100 to search for a Tag device 200 as an example.
[0056] As shown in FIG. 2, when a user wants to search for the Tag device 200 using the mobile phone 100, the user performs a first search operation for the Tag device 200 on the mobile phone 100 (e.g., taps / clicks the search button corresponding to the Tag device 200), and at time t 01 The first distance d1 between the mobile phone 100 and the Tag device 200 at time t can be obtained, and the first distance d1 can be presented to the user, so that the user can adjust the position of the mobile phone 100 based on the first distance d1. Thereafter, the user performs a second search operation for the Tag device 200 on the mobile phone 100 (e.g., taps / clicks the search button corresponding to the Tag device 200 for a second time) to search for the Tag device 200 at time t 02 It is necessary to obtain the second distance d2 between the mobile phone 100 and the Tag device 200 at and present 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, for example, until the user finds the Tag device 200.
[0057] It can be seen that in the application scenario shown in FIG. 2 , if the mobile phone 100 displays the real-time distance between the mobile phone 100 and the tag device 200, it would be easier to find the tag device 200 using the mobile phone 100. However, the current distance measurement method can only measure the distance between the mobile phone 100 and the tag device 200 after the user performs a search operation each time. 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. This requires complicated operations and a poor user experience. In addition, the current distance measurement method cannot timely refresh the distance between the mobile phone 100 and the tag device 200 when the mobile phone 100 moves relative to the tag device 200, in other words, it cannot provide the user with a timely reference. As a result, it is difficult for the user to find the tag device 200 using the mobile phone 100, and the search efficiency is low.
[0058] Therefore, one embodiment of this application provides a method for measuring distance between electronic devices. As shown in Figures 3(a) to 5(c), after the mobile phone 100 establishes a wireless communication connection to the Tag device 200, the user performs a search operation for the Tag device 200 on the mobile phone 100. For example, the search operation may include a start operation for starting a search program in Figure 3(a) and a search confirmation operation for the Tag device 200 in Figure 3(b). Then, the mobile phone 100 receives multiple groups of sound signals transmitted by the speaker of the Tag device 200, and determines the start band of each group of the received sound signals through correlation calculation, and calculates the reception time (e.g., t in Figure 4) at which the sound signals of each group are received by the mobile phone 100. 21 , t 22 , t 23 , and t 2k Then, the mobile phone 100 determines the reception time of the sound wave signal of each group (for example, t 21 , t 22 , t 23 , and t 2k) and the time point at which the acoustic signal of each group is transmitted (e.g., t in Figure 4). 11 , t 12 , t 13 , and t 1k ) and the acoustic wave speed (e.g., v in FIG. 4), the real-time distance (e.g., d1, d2, d3, and d4 in FIG. 4) between the mobile phone 100 and the Tag device 200 when the acoustic wave signals of each group are received by the mobile phone 100 is calculated. k Finally, the mobile phone 100 continuously refreshes and displays the real-time distance between the mobile phone 100 and the Tag device 200 obtained through the calculation. For example, as shown in FIG. 5(a), the mobile phone 100 determines the distance t 01 In another example, as shown in FIG. 5(b), the mobile phone 100 displays "You are 5.3 m away from the Tag device" at time t 02 In another example, as shown in FIG. 5(c), the mobile phone 100 displays "You are 5.7 m away from the Tag device" at time t 03 It displays "You are 4.9m away from the Tag device."
[0059] In the distance measurement method described above, a user performs a search operation on the mobile phone 100, and the tag device 200 continuously transmits multiple groups of sound signals. The mobile phone 100 determines the arrival time corresponding to each group of sound signals based on the received multiple groups of sound signals. The mobile phone 100 calculates the real-time distance between the mobile phone 100 and the second electronic device when each group of sound signals arrives at the mobile phone 100 based on the arrival time corresponding to each group of sound signals, the transmission time corresponding to each group of sound signals, and the sound wave speed. Based on this, the mobile phone 100 can continuously refresh the real-time distance between the mobile phone 100 and the tag device 200. This distance measurement method is easy for users to operate and improves the user experience. In addition, because the sound waves have a high frequency, the transmission interval between two adjacent groups of sound signals can be flexibly adjusted. Therefore, the frequency at which the mobile phone 100 refreshes the real-time distance can be guaranteed. Even if the user moves a little while carrying the mobile phone 100, the mobile phone 100 can accurately display the change in the distance between the mobile phone 100 and the Tag device 200 in real time, so that the user can timely adjust the solution for searching for the Tag device 200. This reduces the difficulty for the user when searching for the Tag device 200.
[0060] It may be understood that in addition to the mobile phone 100, the first electronic device mentioned above in this application may be any portable and mobile electronic device, such as a wristwatch, tablet computer, notebook computer, Tag device, laptop computer, wearable device, head-mounted display, portable game console, portable music player, or reader device. In addition to the Tag device 200, the second electronic device may also be any portable and mobile electronic device, such as a mobile phone, wristwatch, tablet computer, notebook computer, laptop computer, wearable device, head-mounted display, portable game console, portable music player, or reader device. Furthermore, example embodiments of the first electronic device and the second electronic device include, but are not limited to, various electronic devices running the Linux® operating system, the operating system developed by Microsoft (Windows®), the mobile operating system developed by Apple (iOS®), the Android® open source operating system, the Harmony® operating system (HUAWEI Harmony OS), or other operating systems. This is not a particular limitation of this application.
[0061] For ease of explanation, the following continues to describe in detail the distance measurement method in this application with reference to Figures 3 and 4 by using an example in which the first electronic device is a mobile phone 100 and the second electronic device is a Tag device 200.
[0062] FIG. 6 is a diagram of the configuration of a mobile phone 100 and a Tag device 200 according to some embodiments of the present application. As shown in FIG. 6, in some embodiments of the present 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 the communication module 201 and the audio module 202. The communication module 101, the audio module 102, the processor 103, and the display module 105 are connected via a bus to perform data exchange. The communication module 201 establishes a signal connection with the audio module 202 to perform data exchange. The communication module 101 and the communication module 201 are configured to establish a communication connection between the mobile phone 100 and the Tag device 200. For example, the communication module 101 and the communication module 201 may be Bluetooth modules. The audio module 102 and the audio module 202 are configured to transmit and / or receive sound wave signals. For example, the audio module 102 can be a microphone, and the audio module 202 can be a speaker. The processor 103 can call related instructions to control the audio modules 101 and 202 to perform the distance measurement method of this application, and can obtain the real-time distance between the mobile phone 100 and the Tag device 200 based on the execution results of the audio modules 101 and 202. For example, the processor 103 can be a processing chip integrated into the mobile phone 100. The memory 104 is configured to store distance measurement-related instructions and data, such as multiple groups of received acoustic signals. The display module 105 is configured to display the real-time distance obtained by the processor 103. For example, the display module 105 can be a display or a speaker. The manner of displaying the real-time distance is not particularly limited in this application.
[0063] In some 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. The Tag device 200 includes a communication module 201, an audio module 202, a processor 203, and a memory 204. The communication module 101, the audio module 102, the processor 103, the memory 104, the display module 105, the communication module 201, and the audio module 202 are the same as those in the previous embodiments, and the details will not be described again here. The processor 203 is configured to obtain the transmission time points corresponding to the sound wave signals of each group through processing based on related instructions, and the memory 204 is configured to store distance measurement-related instructions and the transmission time points corresponding to the sound wave signals of each group. For example, the processor 203 may be a processing chip integrated into the Tag device 200.
[0064] In some other embodiments of this application, the mobile phone 100 includes a communication module 101, an audio module 102, and a display module 105. The Tag device 200 includes a communication module 201, an audio module 202, a processor 203, and a memory 204. The communication module 101, the audio module 102, the display module 105, the communication module 201, and the audio module 202 are the same as those in the previous embodiments, and the details will not be described again here. The processor 203 is configured not only to obtain the transmission time points corresponding to the sound wave signals of each group through processing based on related instructions, but also to obtain the real-time distance between the mobile phone 100 and the Tag device 200 through processing based on related instructions. The memory 204 is configured to store instructions related to distance measurement, the transmission time points corresponding to the sound wave signals of each group, and the real-time distance between the mobile phone 100 and the Tag device 200.
[0065] FIG. 7 is a diagram of one specific configuration of a mobile phone 100 and a Tag device 200 according to some embodiments of the present application.
[0066] 7, 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 establishes a communication connection to the Tag device 200 by using the Bluetooth module 101a and the Bluetooth module 201a to transmit data and instructions between the mobile phone 100 and the Tag device 200. The Tag device 200 transmits sound wave signals via the speaker 202a, and the mobile phone 100 receives and collects the sound wave signals via the microphone 102a.
[0067] It can be understood that the acoustic signal transmitted by the speaker 202a and the acoustic signal received by the microphone 102a are not particularly limited in this application, as long as the frequency band of the acoustic signal transmitted by the speaker 202a is guaranteed to be within the frequency band range that can be received by the microphone 210a. For example, in some implementations of this application, the tag device 200 may transmit an ultrasonic signal through the speaker 202a, and the mobile phone 100 can receive and collect the ultrasonic signal through the microphone 102a. In this measurement method, the mobile phone, tablet computer, and notebook computer all have microphones and speakers, and the tag device also has a speaker. For example, the distance between any one of the items such as the mobile phone, tablet computer, and notebook computer and the tag device, as well as the distance between any two of the mobile phone, tablet computer, and notebook computer, can be measured using ultrasound. In this case, the scope of application of this application is expanded, hardware costs are reduced, and economic benefits are improved.
[0068] The measurement solution of the measurement system provided in this application will be described in detail below with reference to specific embodiments.
[0069] 8 is a flowchart of a distance measurement method according to some embodiments of the present application. The distance measurement method provided in the present application will be described below with reference to FIG. 8. Specifically, as shown in FIG. 8, the distance measurement method provided in the present application includes the following steps:
[0070] Step S801: The mobile phone 100 establishes a Bluetooth connection to the Tag device 200, and the mobile phone 100 receives a distance measurement command.
[0071] In this application, when a user wants to find the Tag device 200 by using the mobile phone 100, the user may perform a search operation for the Tag device 200 on the mobile phone 100 (e.g., the above-mentioned related description of the user operation in Figures 3(a) and 3(b)). The mobile phone 100 receives a distance measurement command generated based on the search operation. The distance measurement command refers to instruction information generated by the mobile phone 100 based on a user operation, which instructs the mobile phone 100 to interact with the Tag device 200 to obtain the real-time distance between the mobile phone 100 and the Tag device 200. In some implementations, the distance measurement command further carries identification information of the Tag device 200 so that interaction with the Tag device 200 can be accurately established when there are multiple associated electronic devices around the mobile phone 100.
[0072] Furthermore, the mobile phone 100 establishes a Bluetooth connection to the Tag device 200 based on the distance measurement command. It is certainly easy to understand that the mobile phone 100 may implement the communication connection between the mobile phone 100 and the Tag device 200 in other ways, such as by using a near-field module or near-field communication (NFC). However, it should be noted that since the user (i.e., the mobile phone 100) does not know the specific location of the Tag device 200, only a wireless communication connection can be established between the mobile phone 100 and the Tag device 200. Based on this, any way capable of implementing a wireless communication connection between the mobile phone 100 and the Tag device 200 falls within the scope of protection of this application. This is not particularly limited in this application.
[0073] In some implementations of this application, the mobile phone 100 establishes a communication connection to the Tag device 200, and then the mobile phone 100 generates a distance measurement command based on a user's touch operation. In some other alternative implementations of this application, the mobile phone 100 generates a distance measurement command based on a user's touch operation, and the first electronic device establishes a communication connection to a second electronic device. In some other alternative implementations of this application, the first electronic device establishes a communication connection to the second electronic device, and the mobile phone 100 simultaneously generates a distance measurement command based on a user's touch operation. In other words, in this application, the order in which the first electronic device establishes a communication connection to the second electronic device and the mobile phone 100 receives the distance measurement command is not particularly limited.
[0074] Step S802: The mobile phone 100 calculates the RSSI of the Tag device 200.
[0075] 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 200a in the Tag device 201. RSSI refers to a Received Signal Strength Indication (RSSI) obtained based on the received Bluetooth signal. RSSI represents the strength of the Bluetooth signal transmitted by the Tag device 200 and received by the mobile phone 100, and can also be understood as the association between the mobile phone 100 and the Tag device 200 in the current state.
[0076] For example, a larger RSSI value indicates that the mobile phone 100 is closer to the Tag device 200; in other words, the association between the Tag device 200 and the mobile phone 100 is stronger, the stability of the Bluetooth connection between the mobile phone 100 and the Tag device 200 is higher, and it is easier for the user to find the Tag device 200 by using the mobile phone 100. A smaller RSSI value indicates that the mobile phone 100 is farther away from the Tag device 200; in other words, the association between the Tag device 200 and the mobile phone 100 is weaker, and it is more likely that the user will not be able to find the Tag device 200 by using the mobile phone 100.
[0077] Step S803: The mobile phone 100 determines whether the RSSI of the Tag device 200 is greater than a preset intensity threshold.
[0078] If the RSSI of the Tag device 200 is greater than the preset intensity threshold, it indicates that the intensity of the Bluetooth signal received by the Bluetooth module 101a is strong, in other words, the Bluetooth module 101a is close to the Bluetooth module 201a, which means that the mobile phone 100 is close to the Tag device 200. Therefore, the distance between the mobile phone 100 and the Tag device 200 needs to be further determined, and step S804 is executed. If the RSSI of the Tag device 200 is not greater than the preset intensity threshold, it indicates that the intensity of the Bluetooth signal received by the Bluetooth module 101a is weak, in other words, the Bluetooth module 101a is far away from the Bluetooth module 201a, which may even cause inaccurate distance measurement. In this case, return to step S802.
[0079] In this application, after obtaining the RSSI, the mobile phone 100 determines whether the RSSI is greater than a preset strength threshold, which is an approximation of the received signal strength indication determined based on the strength of the association between the mobile phone 100 and the Tag device 200. The preset strength threshold is used to determine whether the mobile phone 100 is near the Tag device 200.
[0080] Step S804: The mobile phone 100 performs Bluetooth time synchronization with the Tag device 200 to obtain the time offset between the mobile phone 100 and the Tag device 200.
[0081] Bluetooth time synchronization refers to determining the time offset between the mobile phone 100 and the Tag device 200 by using the Bluetooth module 101a in the mobile phone 100 and the Bluetooth module 201a in the Tag device 200. The time offset refers to the difference in the time displayed on the mobile phone 100 and the Tag device 200. As is easy to understand, the mobile phone 100 and the Tag device 200 each have their own clocks, so the time corresponding to the mobile phone 100 and the time corresponding to the Tag device 200 can be obtained separately through statistics. However, in some cases, due to setting errors or structural errors, the time corresponding to the mobile phone 100 may not match the time corresponding to the Tag device 200. To reduce distance errors in distance measurement calculations caused by such discrepancies, in some embodiments of this application, the time offset between the mobile phone 100 and the Tag device 200 needs to be further measured.
[0082] In some embodiments of this application, the time offset is Δ=T T -T P where Δ represents the time offset between the mobile phone 100 and the Tag device 200, with a positive value representing that the time corresponding to the Tag device 200 is earlier than the time corresponding to the mobile phone 100, and a negative value representing that the time corresponding to the Tag device 200 is later than the time corresponding to the mobile phone 100; and T T represents the time corresponding to the Tag device 200 at a given time, and T P represents the time corresponding to the mobile phone 100 at a given point in time.
[0083] The transmission speed of electromagnetic waves is approximately 3 x 10 8m / s, when the mobile phone 100 is close to the Tag device 200, the transmission time is approximately 0. Based on this, when a group of electromagnetic waves is transmitted between the mobile phone 100 and the Tag device 200 at one time, the transmission time and arrival time of the electromagnetic waves approximately represent 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, and T P1 represents the departure time when the electromagnetic wave leaves the mobile phone 100 or the arrival time when the electromagnetic wave arrives at the mobile phone 100, and T T1 represents the departure time when the electromagnetic wave leaves the Tag device 200, or the arrival time when the electromagnetic wave arrives at the Tag device 200. Similarly, T Pi ≒T Ti -Δ i where the value of i ranges from 1 to k, which is not particularly limited in this application, and Δ i is the time offset corresponding to the i-th group, and T Pi represents the departure time when the electromagnetic wave leaves the mobile phone 100 or the arrival time when the electromagnetic wave arrives at the mobile phone 100, and T Ti represents the departure time when the electromagnetic wave leaves the Tag device 200 or the arrival time when the electromagnetic wave arrives at the Tag device 200.
[0084] The Bluetooth time synchronization method in this application will be described in detail below with reference to Fig. 9. It can be understood that the time offset Δ of each transmission cycle is affected by system scheduling, so that in order to reduce the error, a method of performing time synchronization multiple times and obtaining an average value can be used to suppress the influence of system scheduling on the time offset Δ. In some embodiments of this application, first, the mobile phone 100 performs time synchronization at time T P1 The Bluetooth time synchronization signal SEQ1 is transmitted to the Tag device 200 at time T T1 Receive the Bluetooth time synchronization signal SEQ1 at T P1is the time recorded by the local clock of the mobile phone 100, and T T1 is the time recorded by the local clock of the Tag device 200, i.e., Δ≈T T1 -T P1 where Δ1 is the time offset obtained in the first measurement. After receiving the Bluetooth time synchronization signal SEQ1, the Tag device 200 T2に At time T P2 Receive the Bluetooth time synchronization signal SEQ2 at T P2 is the time recorded by the local clock of the mobile phone 100, and T T2 is the time recorded by the local clock of the Tag device 200, i.e., Δ≈T T2 -T P2 By analogy, T P2n is the time recorded by the local clock of the mobile phone 100, and T T2n is the time recorded by the local clock of the Tag device 200, i.e., Δ 2n ≒T T2n -T P2n is.
[0085] Based on this, after 2n iterations, the average value of the time offset is
number
[0086] It is not difficult to find Δ1, Δ2, Δ3, ..., Δ 2n-1 , Δ 2n After each expansion, the following equation (1) is obtained:
number
[0087] After transformation, the following equation (2) is obtained:
number
[0088] After transformation, the following equation (3) is obtained:
number
[0089] In some implementations, each time the SEQ signal is transmitted, the Tag device 200 receives the SEQ signal at the time of reception T T(2i-1) and the reception time is T T(2i-1) The transmission time T corresponding to the Bluetooth time synchronization signal is T(2i) and may be fed back to the mobile phone 100. After receiving the data, the mobile phone 100 obtains the time offset Δ through calculation based on equation (3).
[0090] In some other implementations, since the left part of equation (3) (i.e., equation (4)) only relates to the receiving and transmitting times of the Tag device 200, the average values of the receiving and transmitting times may be first calculated by using equation (4), and then the average values are fed back to the mobile phone 100 at once via Bluetooth.
number
[0091] Step S805: The mobile phone 100 notifies the Tag device 200 to transmit multiple groups of sound wave signals, and detects the multiple groups of sound wave signals transmitted by the Tag device 200.
[0092] In this application, the mobile phone 100 generates a sound emission command informing the Tag device 200 to start transmitting a sound wave signal, and sends the sound emission command to the Tag device 200. In response to the sound emission command, the Tag device 200 continuously transmits multiple groups of sound wave signals. The mobile phone 100 can continuously receive the multiple groups of sound wave signals. The sound emission command refers to instruction information sent by the mobile phone 100 to the Tag device 200 to instruct the Tag device 200 to start transmitting a sound wave signal. It can be understood that the sound emission command can further include parameters of the sound wave signal transmitted by the Tag device 200, such as a transmission time point, a transmission interval, or a sound wavelength (i.e., a sound frequency band), which will be described in detail below, and the concept of a sound emission command will not be described in detail below.
[0093] In some application scenarios, the Tag device 200 transmits an acoustic signal when in use, but does not transmit an acoustic signal in its natural state. In some embodiments of this application, before the mobile phone 100 establishes a communication connection to the Tag device 200 and receives a distance measurement command, the Tag device 200 must also be bound to an associated application of the mobile phone 100. Based on this, after the mobile phone 100 establishes a communication connection to the Tag device 200 and receives a distance measurement command, the mobile phone 100 can send an acoustic signal transmission request to the Tag device 200, so that the Tag device 200 transmits an acoustic signal and devices other than the Tag device 200 do not transmit acoustic signals. Based on this, the method can prevent the mobile phone 100 from receiving acoustic signals transmitted by 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, and improve the response speed of the mobile phone 100, further improving the user experience.
[0094] In some other application scenarios, the Tag device 200 transmits a sonic signal when in use, and also transmits a sonic signal in a natural state. Specifically, in some other embodiments, the Tag device 200 always transmits a sonic signal, and the mobile phone 100 determines whether it needs to receive the sonic signal transmitted by the Tag device 200 based on the RSSI. If the mobile phone 100 determines that it needs to receive the sonic signal transmitted by the Tag device 200, the mobile phone 100 starts receiving the sonic signal transmitted by the Tag device 200. If the mobile phone 100 determines that it does not need to receive the sonic signal transmitted by the Tag device 200, the mobile phone 100 does not receive the sonic signal transmitted by the Tag device 200.
[0095] However, in these application scenarios, in addition to the Tag device 200, other electronic devices may be distributed around the mobile phone 100 and may also transmit acoustic signals. In this case, the mobile phone 100 cannot identify the acoustic signal transmitted by the Tag device 200 from the received acoustic signals. Based on this, in some implementations of this application, the acoustic signal transmitted by the Tag device 200 further carries the device identifier of the Tag device 200. The mobile phone 100 identifies which acoustic signal is the acoustic signal transmitted by the Tag device 200 by using the device identifier of the Tag device 200. Also, in some other implementations of this application, when the Tag device 200 transmits time information to the mobile phone 100, the time information further carries the device identifier of the Tag device 200.
[0096] In some embodiments of this application, the mobile phone 100 detects (i.e., receives) a first group of sound wave signals at a first time point and detects (i.e., receives) a second group of sound wave signals at a second time point after the first time point. The first group of sound wave signals is a segment of a sound wave signal, and the second group of sound wave signals is another segment of a sound wave signal. The mobile phone 100 can continuously detect the first group of sound wave signals and the second group of sound wave signals, and determine the starting bands of the first group of sound wave signals and the second group of sound wave signals through correlation calculations to separate the first group of sound wave signals from the second group of sound wave signals.
[0097] In some other alternative embodiments of this application, the mobile phone 100 detects (i.e., receives) a first group of acoustic signals at a first time point, detects (i.e., receives) a third group of acoustic signals at a fifth time point, and detects (i.e., receives) a second group of acoustic signals at a second time point after the first time point. The fifth time point is between the first and second time points. Specifically, the mobile phone 100 determines a first distance corresponding to the first time point between the mobile phone 100 and the Tag device 200 based on the first group of acoustic signals, the third group of acoustic signals, the first information, and third information corresponding to the third group of acoustic signals. The first electronic device determines a second distance corresponding to the second time point between the mobile phone 100 and the Tag device 200 based on the second group of acoustic signals, the third group of acoustic signals, the second information, and the third information. For example, the mobile phone 100 receives six groups of sound signals transmitted by the Tag device 200 in quick succession, namely, sound signal 1, sound signal 2, sound signal 3, sound signal 4, sound signal 5, and sound signal 6. Based on the moving speed of the mobile phone 100 and the distance between the mobile phone 100 and the Tag device 200, it is determined that the distance between the mobile phone 100 and the Tag device 200 when sound signal 1, sound signal 4, and sound signal 6 arrive at the mobile phone 100 needs to be displayed on the mobile phone 100. Based on this, the mobile phone 100 can determine the distance between the mobile phone 100 and the Tag device 200 when sound signal 1 arrives at the mobile phone 100 based on sound signal 1 (or further including sound signal 2, or further including sound signal 2 and sound signal 3). Based on sound wave signal 2, sound wave signal 3, and sound wave signal 4, mobile phone 100 can determine the distance between mobile phone 100 and Tag device 200 when sound wave signal 4 arrives at mobile phone 100. Similarly, based on sound wave signal 5 and sound wave signal 6, 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. The above are merely a few examples, and this is not particularly limiting in this application.
[0098] It can be understood that the above two types of embodiments are just some examples of the acoustic signals received by the mobile phone 100. In this application, the mobile phone 100 can receive the acoustic signals transmitted by any group of Tag devices 200 at any time, which falls within the protection scope of this application and is not particularly limited in this application.
[0099] 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 acoustic signal, the information corresponding to the acoustic signal, and the time offset.
[0100] In this application, the information corresponding to the acoustic signals includes transmission time information of when the Tag device 200 transmits the acoustic signals of the group when transmitting the group of acoustic signals. The transmission time information is information that can represent the transmission time points of the acoustic signals of the group. For example, the transmission time information may be the transmission time points corresponding to the acoustic signals, or the transmission intervals corresponding to the acoustic signals. This is not particularly limited in this application. Below, a real-time distance calculation method using the above two types of transmission time information will be described.
[0101] Based on this, the mobile phone 100 can determine, based on the detected sonic signals, the reception time at which each of the plurality of groups of sonic signals is received, when the sonic signals of that group arrive at the mobile phone 100. Then, based on the transmission time of each group of sonic signals, the reception time of each group of sonic signals, and the sonic wave speed, the mobile phone 100 calculates the distance between the mobile phone 100 and the Tag device 200 when the sonic signals of each group are received.
[0102] In some embodiments of this application, the mobile phone 100 detects (i.e., receives) a first group of sound wave signals at a first time point and detects (i.e., receives) a second group of sound wave signals at a second time point after the first time point.
[0103] Specifically, as shown in Fig. 10(a), after detecting the first group of sound wave signals, the mobile phone 100 determines the reception time t when the first group of sound wave signals are received by the mobile phone 100 based on the first group of sound wave signals. 21 Then, the mobile phone 100 determines the transmission time t when the first group of sound wave signals was transmitted from the Tag device 200. 11 and reception time t 21 , the time offset Δ, and the sound wave velocity, 21 In this case, the mobile phone 100 calculates the distance d1 between the mobile phone 100 and the Tag device 200 at time t 21 At time t 21 After a short time, d1 is displayed.
[0104] In this application, the distance can be calculated based on a distance calculation formula. The principle of calculating the following distances is the same as the principle of calculating the distance d1, and the details will not be described below. 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 groups of sound signals, and t 2k represents the arrival time when the sound wave signal of the kth group arrives at the mobile phone 100, and t 1k represents the transmission time point at which the k-th group of acoustic signals starts to be transmitted.
[0105] Similarly, please refer to Fig. 10(a). After detecting the second group of sound wave signals, the mobile phone 100 determines the reception time t when the second group of sound wave signals is received by the mobile phone 100 based on the second group of sound wave signals. 22 Then, the mobile phone 100 determines the transmission time t when the second group of sound wave signals is transmitted from the Tag device 200. 12 and reception time t 22 , the time offset Δ, and the sound wave velocity, 22 In this case, the mobile phone 100 calculates the distance d2 between the mobile phone 100 and the Tag device 200 at time t22 At time t 22 After a short time, d2 is displayed.
[0106] In some implementations of this application, as shown in FIG. 10(b), the second group of acoustic signals is transmitted from the Tag device 200 at a transmission time t 12 Instead of t 11 +T u1 where T u1 represents the transmission interval between transmitting the second group of acoustic signals by the Tag device 200 and transmitting the first acoustic signal by the Tag device 200. In this case, d2=(t 22 -(t 11 +T u1 )+Δ)v. By analogy, d3=(t 23 -(t 11 +T u1 +T u2 )+Δ)v.
[0107] That is, d k =(t 2k -(t 11 +T u1 +…+T u(k-1) )+Δ)v, where d k represents the real-time distance, and t 2k represents the arrival time when the sound wave signal of the kth group arrives at the mobile phone 100, and t 11 represents the time when the first group of acoustic signals starts to be transmitted, k represents the number of groups of acoustic signals, and T u(k-1) represents the transmission interval between the acoustic signal of the (k-1)th group and the acoustic signal of the kth group, v represents the acoustic velocity, and Δ represents the time offset.
[0108] In some implementations of this application, the transmission interval between two adjacent groups of acoustic signals is Tu, as shown in Figure 10(c). In this case, d k =(t 2k -(t 11 +(k-1)T u )+Δ)v, where d k represents the real-time distance, and t2k represents the arrival time when the sound wave signal of the kth group arrives at the mobile phone 100, and t 11 represents the time when the first group of acoustic signals starts to be transmitted, k represents the number of groups of acoustic signals, and T u represents the transmission interval between two adjacent groups of acoustic signals, v represents the acoustic velocity, and Δ represents the time offset.
[0109] Step S807: The mobile phone 100 displays the real-time distance obtained through calculation in real time.
[0110] In this application, after receiving a first group of sound wave signals, the mobile phone 100 calculates a first distance corresponding to the first group of sound wave signals and displays the first distance in real time after calculating the first distance. Similarly, after receiving a second group of sound wave signals, the mobile phone 100 calculates a second distance corresponding to the second group of sound wave signals and displays the second distance in real time after calculating the second distance. Note that in this application, the mobile phone 100 processes the received first group of sound wave signals only after the mobile phone 100 receives the second group of sound wave signals. These two groups of sound wave signals may have an appropriate delay relationship, but there is no sequence of transfer steps between these two groups of sound wave signals.
[0111] Step S808: The mobile phone 100 determines whether the time interval since the last Bluetooth time synchronization is less than the preset time threshold. If the time interval since the last Bluetooth time synchronization is less than the preset time threshold, return to step S806. If the time interval since the last Bluetooth time synchronization is not less than the preset time threshold, return to step S804.
[0112] In this application, every time the preset time threshold Tb is reached, the mobile phone 100 and the Tag device 200 will restart the Bluetooth time synchronization. After the Bluetooth time synchronization is finished, an updated time offset Δ′ is obtained, and the real-time distance calculation formula is changed to dk=(t 2k -t1k +Δ′)v. Based on this, the mobile phone 100 and the Tag device 200 periodically perform Bluetooth time synchronization so that the time drift (i.e., time offset) between the mobile phone 100 and the Tag device 200 can be corrected. This ensures the accuracy of the distance measurement.
[0113] 10(a), the mobile phone 100 performs Bluetooth time synchronization with the Tag device 200 at a third time point to determine a first time offset Δ between the mobile phone 100 and the Tag device 200 corresponding to the third time point t3. The mobile phone 100 determines a first distance after the third time point t3 based on the first time offset Δ, the first group of acoustic signals, and the first information. The mobile phone 100 determines a second distance after the third time point t3 based on the first time offset Δ, the second group of acoustic signals, and the second information.
[0114] In some other embodiments of this application, still refer to Figure 10(a). The mobile phone 100 performs Bluetooth time synchronization with the Tag device 200 at a fourth time point that is a preset time after the third time point, to determine a second time offset Δ' between the mobile phone 100 and the Tag device 200, corresponding to the fourth time point t4. The mobile phone 100 determines a first distance after the fourth time point t4 based on the second time offset Δ', the first group of acoustic signals, and the first information. The mobile phone 100 determines a second distance after the fourth time point t4 based on the second time offset Δ', the second group of acoustic signals, and the second information.
[0115] The Tag device 200 also includes a temperature sensor. After each time synchronization, the current temperature information is sent to the mobile phone 100 via Bluetooth. The mobile phone 100 calculates the speed of sound: v=331+0.607Temp based on the current temperature information, where Temp is the temperature information fed back by the Tag device 200, and its unit is °C.
[0116] Also, in some embodiments of this application, when the mobile phone 100 displays at least two distances and determines a third distance, the mobile phone 100 may determine a recommended direction of movement for the mobile phone 100 based on those three distances and the coordinates corresponding to those three distances determined by the mobile phone 100.
[0117] 11A and 11B are interaction diagrams corresponding to the distance measurement method of FIG. 8 according to some embodiments of this application. Hereinafter, the distance measurement solution provided in this application will be described in detail with reference to FIG. 8 and FIGS. 11A and 11B. As shown in FIGS. 11A and 11B, a mobile phone 100 includes a Bluetooth module 101a, a microphone 102a, a processor 103, and a display module 105. A tag device 200 includes a Bluetooth module 201a and a speaker 202a. Specifically, the distance measurement method provided in this application includes the following steps:
[0118] Step S1101: The Bluetooth module 101a establishes a Bluetooth connection to the Bluetooth module 201a.
[0119] In this application, the Bluetooth module 101a in the mobile phone 100 establishes a wireless communication connection to the Bluetooth module 201a in the Tag device 200. However, it can be understood that the communication connection method between the mobile phone 100 and the Tag device 200 is not particularly limited in this application. In addition to the Bluetooth pairing connection, the communication connection method in this application may be another communication connection method, which is not particularly limited in this application.
[0120] Step S1102: The Bluetooth module 101a receives the Bluetooth signal transmitted by the Bluetooth module 201a.
[0121] In this application, a Bluetooth signal refers to a broadcast packet transmitted by the Bluetooth module 201a and carrying parameters such as the identification information and signal strength of the Tag device 200. The Bluetooth module 101a in the mobile phone 100 can determine the identification information of the Tag device 200 and the signal strength of the Bluetooth signal based on the received Bluetooth signal.
[0122] In some embodiments of this application, the Bluetooth module 101a receives a periodic Bluetooth signal transmitted by the Bluetooth module 201a. The periodic Bluetooth signal is a Bluetooth signal transmitted by the Bluetooth module 201a based on a predetermined period. In some implementations of this application, the Bluetooth module 101a receives a predetermined number of Bluetooth signals transmitted by the Bluetooth module 201a. This is not particularly limited in this application.
[0123]
[0023] Note that in this application, the solution for transmitting the periodic Bluetooth signal to be received by the Bluetooth module 101a in the mobile phone 100 is not particularly limited in this application, and only the Bluetooth signal received by the Bluetooth module 201a in the Tag device 200 needs to be limited in this application. Specifically, in some implementations of this application, the Bluetooth module 201a in the Tag device 200 always transmits a periodic Bluetooth signal to the outside. After the Bluetooth module 101a establishes a communication connection to the Bluetooth module 201a, the Bluetooth module 101a starts to receive the periodic Bluetooth signal transmitted by the Bluetooth module 201a. In some alternative implementations of this application, after the mobile phone 100 establishes a communication connection to the Tag device 200 using the Bluetooth module 101a and the Bluetooth module 201a, the Bluetooth module 201a in the Tag device 200 starts to transmit a periodic Bluetooth signal to the outside.
[0124] Step S1103: The Bluetooth module 101a calculates RSSI based on the received Bluetooth signal, and determines whether the RSSI obtained through calculation is greater than the preset intensity threshold. If the RSSI obtained through calculation is greater than the preset intensity threshold, proceed to step S1104. If the RSSI obtained through calculation is not greater than the preset intensity threshold, return to step S1102. These steps are the same as steps S802 and S803, and the details will not be described again here.
[0125] Step S1104: The Bluetooth module 101a performs Bluetooth time synchronization with the Bluetooth module 201a to determine the time offset Δ between the mobile phone 100 and the Tag device 200.
[0126] The time offset Δ between the mobile phone 100 and the Tag device 200 represents the difference between the clock display of the mobile phone 100 and the clock display of the Tag device 200, and is unrelated to the actual time. For example, if the clock of the mobile phone 100 shows 10:01:02 and the clock of the Tag device 200 shows 10:01:03, the time offset Δ between the mobile phone 100 and the Tag device 200 is 0.01 s. In another example, if the clock of the mobile phone 100 shows 10:01:03 and the clock of the Tag device 200 shows 10:01:02, the time offset Δ between the mobile phone 100 and the Tag device 200 is −0.01 s.
[0127] Step S1105a: The Bluetooth module 101a sends a collection command to the microphone 102a.
[0128] The collection command is generated by the mobile phone 100 when the Bluetooth module 101a determines that the RSSI is greater than a preset intensity threshold, and is instruction information that instructs the microphone 102a to start collecting sound wave signals.
[0129] Note that the technical solution of switching from step S1104 to step S1106 is an example of a technical solution in this application. This is not particularly limited in this application. For example, in this application, step S1104 may be executed, followed by step S1107, and then step S1106. In another example, in this application, step S1104 may be executed, followed by steps S1106 and S1107 simultaneously.
[0130] Step S1105b: The Bluetooth module 101a sends a sound emission start command to the Bluetooth module 201a.
[0131] Step S1106: collection In response to the command, microphone 102a begins collecting sound wave signals.
[0132] Step S1107: The speaker 202a starts transmitting a sound wave signal in response to the sound emission start command.
[0133] In this application, after the mobile phone 100 determines that the mobile phone 100 has established a communication connection to the Tag device 200, the Bluetooth module 101a sends a sound emission start command to the Bluetooth module 201a, and the speaker 202a of the Tag device 200 starts transmitting multiple groups of sound wave signals. The speaker 220 of the Tag device 200 can periodically transmit multiple groups of sound wave signals.
[0134] In some other embodiments of this application, after the mobile phone 100 determines that the mobile phone 100 has established a communication connection to the Tag device 200, the Bluetooth module 101a sends a sound emission start command carrying a preset transmission time to the Bluetooth module 201a, and the speaker 202a of the Tag device 200 starts transmitting multiple groups of sound wave signals based on the preset transmission time. The speaker 220 of the Tag device 200 may periodically transmit multiple groups of sound wave signals. In some implementations of this application, the number of groups of sound wave signals is a predetermined value.
[0135] In some other embodiments of this application, after the mobile phone 100 determines that the mobile phone 100 has established a communication connection to the Tag device 200, the Bluetooth module 101a sends a sound emission start command to the Bluetooth module 201a, carrying a preset frequency band of sound wave signals, and the speaker 202a of the Tag device 200 transmits sound wave signals in the preset frequency band based on the sound emission start command.
[0136] Step S1108: The microphone 102a collects the sound wave signal transmitted by the speaker 202a.
[0137] In this application, the sound wave signals transmitted by the Tag device 200 are multiple groups of sound wave signals, and the microphone 102a of the mobile phone 100 can receive the multiple groups of sound wave signals transmitted by the speaker 202a of the Tag device 200. The sound wave signals may be ultrasonic signals whose frequencies are higher than 20 kHz, or may be sound wave signals within another frequency band. This is not particularly limited in this application. The multiple groups of sound wave signals refer to multiple segments of sound wave signals that are each transmitted at intervals based on a specific transmission method.
[0138] In some implementations of this application, the frequency range of the sound wave signal is from 20 Hz to 2*10 4 Hz. In some other alternative implementations of this application, the frequency range of the sound signal is 2*10 4 Hz to 1*10 12 Hz. In some other alternative implementations of this application, the frequency range of the sound wave signal is from 20 Hz to 1*10 12 Hz. For example, the frequency range of a sound wave signal is 1.8*10 4 Hz to 2.2*10 4 Hz.
[0139] Step S1109: The Bluetooth module 101a receives the time information of the sound wave signal from the Bluetooth module 201a.
[0140] In this application, the time information is the transmission time information of the sound wave signals transmitted by the speaker 201a. The time information may include a transmission time point or a transmission interval. The transmission time point t1 of each group of sound wave signals may be directly represented by the transmission start time point of each group of sound wave signals, or may be represented by the transmission time point t1 of the first group of sound wave signals and the transmission interval T between the sound wave signals of two adjacent groups. uThe time difference between the transmission times of the acoustic signals of two adjacent groups is the transmission interval. This is not particularly limited in this application. In some implementations, the transmission intervals between the acoustic signals of multiple groups may be fixed or may be variable. For example, the transmission intervals may be gradually shortened or gradually lengthened.
[0141] In this application, the transmission time of each group of sound wave signals is fed back by using the Bluetooth module 101a and the Bluetooth module 201a so that the transmission delay and bit error rate can be reduced, which improves the accuracy of distance measurement.
[0142] Then, in some implementations, the Tag device 200 determines the transmission interval between the sound wave signals of two adjacent groups and transmits the sound wave signals based on the determined transmission interval. In addition, the Tag device 200 further transmits the determined transmission interval to the mobile phone 100, so that the mobile phone 100 can calculate the transmission time of each subsequent group of sound wave signals based on the transmission time and transmission interval of the sound wave signals of the first group. Alternatively, the Tag device 200 may transmit the determined transmission interval and the sound wave signals of the first group. At the time of sending and calculates the transmission time points of the sonic signals of each group based on the time points, and transmits the calculated transmission time points of the sonic signals of each group to the mobile phone 100. Alternatively, when the transmission interval between the transmission time points of the sonic signals of two adjacent groups changes according to a preset variation rule, the Tag device 200 can transmit the variation rule to the mobile phone 100, or the Tag device 200 calculates the transmission time points of the sonic signals of each group according to the variation rule, and transmits the transmission time points of the sonic signals of each group to the mobile phone 100.
[0143] Specifically, in some implementations, the Tag device 200 determines the transmission time of each group's sonic signal and simultaneously transmits the transmission time of each group's sonic signal to the mobile phone 100. In some other implementations, the mobile phone 100 determines the transmission time of each group's sonic signal and generates a transmission start command for each group's sonic signal based on the transmission time of each group's sonic signal. After receiving the transmission start command, the Tag device 200 transmits the sonic signal to the outside based on the command.
[0144] There are also various implementations for the mobile phone 100 to receive multiple groups of sound wave signals transmitted by the Tag device 200. Some implementation solutions are briefly described below. Specifically, in some implementations, the audio module 102 in the mobile phone 100 is always enabled. After the mobile phone 100 establishes a communication connection to the Tag device 200, the audio module 202 in the Tag device 200 transmits multiple groups of sound wave signals to the outside, so that the audio module 102 can receive the multiple groups of sound wave signals transmitted by the audio module 202. In some other implementations, the Tag device 200 always transmits multiple groups of sound wave signals to the outside. After the communication module 101 in the mobile phone 100 establishes a communication connection to the communication module 201 in the Tag device 200, the audio module 102 in the mobile phone 100 is activated to receive the multiple groups of sound wave signals transmitted by the Tag device 200 to the outside. In some other implementations, after the mobile phone 100 establishes a communication connection to the Tag device 200, the audio module 102 in the mobile phone 100 is started, and the audio module 202 in the Tag device 200 transmits multiple groups of sound wave signals to the outside, so that the audio module 102 can receive the multiple groups of sound wave signals transmitted by the audio module 202.
[0145] Step S1110: In response to the microphone 102a, the processor 103 performs correlation calculations on the acoustic signals to obtain the arrival times of the acoustic signals, and then calculates the real-time distance between the mobile phone 100 and the Tag device 200 based on the corresponding arrival times, the time information, and the acoustic speed. The time information may include the transmission time and the transmission interval, and the time information may further include the acoustic signal transmission time of each group, and the arrival time is the reception time when the acoustic signal is received by the mobile phone 100.
[0146] In some embodiments of this application, the processor 103 in the mobile phone 100 performs correlation calculations on the received sound signals of the groups, and determines the starting positions of the sound signals of the groups based on the correlation between the sound signals of the groups and the template sound signal, and further determines the arrival time t2 of each of the sound signals of the groups. Then, the processor 103 in the mobile phone 100 acquires the transmission time t1 of each group of sound signals acquired by the Bluetooth module 101a via the bus. Then, the processor 103 calculates the real-time distance d between the mobile phone 100 and the Tag device 200 based on the transmission time t1, the arrival time t2, and the sound wave speed v based on the formula: k Calculate.
[0147] Step S1111: The display module 105 receives the real-time distance from the processor 103, and then step S1112 is executed.
[0148] Step S1112: The display module 105 displays the real-time distance on the display interface.
[0149] In some embodiments of this application, when the real-time distance is within a preset range, the display module 105 of 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 away from the tag device, and the display module 105 of the mobile phone 100 does not display the distance. When the real-time distance is less than the preset range, a prompt is displayed indicating that the Tag device 200 is nearby. For example, the preset range is 1 m to 20 m, or the preset range is 1 m to 10 m.
[0150] Step S1113: The processor 130 determines whether a sound stop command has been received. The sound stop command may be an operation command generated based on a user's touch operation to instruct the search to be stopped. If a sound stop command has been received, the process proceeds to steps S1114a and S1114b. If a sound stop command has not been received, the process returns to step S1108.
[0151] Step S1114a: The microphone 102a stops collecting sound wave signals.
[0152] Step S1114b: The Bluetooth module 101a sends a sound emission stop command to the Bluetooth module 201a, and then step S1115 is executed.
[0153] Step S1115: The speaker 202a stops transmitting the sound wave signal in response to the sound stop command being received by the Bluetooth module 201a.
[0154] Step S1116: The Bluetooth module 101a disconnects the Bluetooth connection to the Bluetooth module 201a.
[0155] This application also provides some other embodiments. Figure 12 is a flowchart of a distance measurement method according to some embodiments of this application. The distance measurement method provided in this application will be described below with reference to Figure 12. Specifically, as shown in Figure 12, the distance measurement method provided in this application includes the following steps:
[0156] Step S1201: The mobile phone 100 establishes a Bluetooth connection to the Tag device 200, and the mobile phone 100 receives a distance measurement command. Step S1201 is the same as step S801, and the details will not be described again here.
[0157] Step S1202: The mobile phone 100 calculates the RSSI of the Tag device 200. Step S1202 is the same as step S802, and the details will not be described again here.
[0158] Step S1203: The mobile phone 100 determines whether the RSSI is greater than the preset intensity threshold. If the RSSI is greater than the preset intensity threshold, proceed to step S1204. If the RSSI is not greater than the preset intensity threshold, return to step S1202. Step S1203 is the same as step S803, and the details will not be described again here.
[0159] Step S1204: The mobile phone 100 performs Bluetooth time synchronization with the Tag device 200 to obtain the time offset between the mobile phone 100 and the Tag device 200. Step S1204 is the same as step S804, and the details will not be described again here.
[0160] Step S1205: The mobile phone 100 notifies the Tag device 200 to transmit multiple groups of sound wave signals at a specified time point, and receives the multiple groups of sound wave signals transmitted by the Tag device 200.
[0161] Step S1206: 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 time information corresponding to the sound wave signal, and the time offset. The time information may be a specified point in time. Step S1206 is the same as step S806, and the details will not be described again here.
[0162] Step S1207: The mobile phone 100 displays the real-time distance obtained through calculation in real time. Step S1207 is the same as step S807, and the details will not be described again here.
[0163] Step S1208: The mobile phone 100 determines whether the time interval since the last Bluetooth time synchronization is less than the preset time threshold. If the time interval since the last Bluetooth time synchronization is less than the preset time threshold, return to step S1206. If the time interval since the last Bluetooth time synchronization is not less than the preset time threshold, return to step S1204. Step S1208 is the same as step S808, and the details will not be described again here.
[0164] In the above-mentioned distance measurement method, the mobile phone 100 does not need to feed back the transmission time information of each group of acoustic signals via Bluetooth, thereby reducing the interaction between the mobile phone 100 and the Tag device 200 and improving the timeliness and accuracy of the distance measurement method. In addition, the mobile phone 100 can further appropriately adjust the transmission time information corresponding to the subsequent group of acoustic signals based on the distance between the mobile phone 100 and the Tag device 200 determined by the mobile phone 100.
[0165] In some embodiments of this application, when the value of the first distance determined by the mobile phone 100 is small, it indicates that the mobile phone 100 is close to the Tag device 200 and the user is about to find the Tag device 200. In this case, in order to improve the accuracy of displaying the distance between the mobile phone 100 and the Tag device 200 when the mobile phone 100 moves a little, the transmission time interval between the first group of sound wave signals and the second group of sound wave signals may be shortened, in other words, the difference between the first time and the second time may be made smaller, so that the mobile phone 100 can also accurately capture the distance difference between the mobile phone 100 and the Tag device 200 when the mobile phone 100 moves a little.
[0166] In some other embodiments of this application, when the value of the first distance determined by the mobile phone 100 is small, it indicates that the mobile phone 100 is close to the Tag device 200 and the user is about to find the Tag device 200. In this case, when the mobile phone 100 moves a little, the relative movement speed between the mobile phone 100 and the Tag device 200 may be slowed down to improve the accuracy of displaying the distance between the mobile phone 100 and the Tag device 200 so that the mobile phone 100 can also accurately capture the distance difference between the mobile phone 100 and the Tag device 200.
[0167] Also, in some embodiments of this application, in the distance measurement method, first information corresponding to the first group of acoustic signals is determined by the mobile phone 100, and second information corresponding to the second group of acoustic signals is determined by the Tag device 200. The mobile phone 100 transmits the first information to the Tag device 200, and the Tag device 200 transmits the second information to the mobile phone 100. Alternatively, the second information is determined by the mobile phone 100, and the first information is determined by the Tag device 200. The mobile phone 100 transmits the second information to the Tag device 200, and the Tag device 200 transmits the first information to the mobile phone 100.
[0168] Also, in one possible implementation, in the distance measurement method, the first information and the second information are determined by a third electronic device, and the mobile phone 100 and the Tag device 200 acquire the first information and the second information.
[0169] It can be understood that any combination of the above implementations falls within the protection scope of this application, which is not particularly limited in this application.
[0170] 13A and 13B are interaction diagrams corresponding to the distance measurement method in FIG. 12 according to some embodiments of the present application. Hereinafter, the distance measurement method provided in this application will be described in detail with reference to FIG. 13A and 13B. Specifically, as shown in FIG. 13A and 13B, the distance measurement method provided in this application includes the following steps:
[0171] Steps S1301 to S1305a, S1306, and S1308 are the same as steps S1101 to S1105a, S1106, and S1108, and the details will not be described again here.
[0172] Step S1305b: A sound transmission start command carrying a preset transmission time.
[0173] Step S1308: The microphone 102a collects the sound wave signal transmitted by the speaker 202a at the preset transmission time point.
[0174] Steps S1310 to S1316 are essentially the same as steps S1110 to S1116, and the details will not be described again here.
[0175] In conclusion, step S1305b is different from step S1105b. Furthermore, the step of the Bluetooth module 101a receiving the transmission time points of each group of sound wave signals from the Bluetooth module 201a is deleted. This reduces the interaction between the mobile phone 100 and the Tag device 200, improves calculation efficiency, and can also avoid erroneous transmission, thereby improving the accuracy of real-time distance.
[0176] This application also provides some other embodiments. Figure 14 is a flowchart of a distance measurement method according to some embodiments of this application. The distance measurement method provided in this application will be described below with reference to Figure 14. Specifically, as shown in Figure 14, the distance measurement method provided in this application includes the following steps:
[0177] Step S1401: The mobile phone 100 establishes a Bluetooth connection to the Tag device 200, and the mobile phone 100 receives a distance measurement command. Step S1401 is the same as step S801, and the details will not be described again here.
[0178] Step S1402: The mobile phone 100 calculates the RSSI of the Tag device 200. Step S1402 is the same as step S802, and the details will not be described again here.
[0179] Step S1403: The mobile phone 100 determines whether the RSSI is greater than the preset intensity threshold. If the RSSI is greater than the preset intensity threshold, proceed to step S1404. If the RSSI is not greater than the preset intensity threshold, return to step S1402. Step S1403 is the same as step S803, and the details will not be described again here.
[0180] Step S1404: The mobile phone 100 performs Bluetooth time synchronization with the Tag device 200. Step S1404 is the same as step S804, and the details will not be described again here.
[0181] Step S1405: After the mobile phone 100 notifies the Tag device 200 to send multiple groups of sound wave signals and receives the acknowledgement character information, the mobile phone 100 receives the multiple groups of sound wave signals sent by the Tag device 200 and the transmission time points of each group of sound wave signals sent via Bluetooth.
[0182] After the Bluetooth time synchronization is completed, the mobile phone 100 needs to notify the Tag device 200 to send a sound signal each time. After receiving the notification, the Tag device 200 sends an acknowledgement (ACK) text message to the mobile phone 100 via Bluetooth, and then sends a sound signal to notify the mobile phone 100 via Bluetooth of the time when the Tag device 200 will send the sound signal.
[0183] Step S1406: The mobile phone 100 calculates the real-time distance between the mobile phone 100 and the Tag device 200 based on the received acoustic signal. The mobile phone 100 determines the real-time distance between the mobile phone 100 and the Tag device 200 based on the received acoustic signal, time information, and acoustic speed. Step S1406 is basically the same as step S806, and the details will not be described again here.
[0184] Step S1407: The mobile phone 100 displays the real-time distance obtained through calculation in real time. Step S1407 is the same as step S807, and the details will not be described again here.
[0185] Step S1408: The mobile phone 100 determines whether the time interval since the last Bluetooth time synchronization is less than the preset time threshold. If the time interval since the last Bluetooth time synchronization is less than the preset time threshold, return to step S1406. If the time interval since the last Bluetooth time synchronization is not less than the preset time threshold, return to step S1404. Step S1408 is the same as step S808, and the details will not be described again here.
[0186] In the distance measurement method described above, after Bluetooth time synchronization, the mobile phone 100 directly notifies the Tag device 200 of the start time when the mobile phone 100 starts transmitting ultrasonic signals. Thus, the Tag device 200 does not need to feed back the transmission time of the Tag device 200 via Bluetooth. This reduces the interaction between the mobile phone 100 and the Tag device 200.
[0187] 15A and 15B are interaction diagrams corresponding to the distance measurement method in FIG. 14 according to some embodiments of the present application. Hereinafter, the distance measurement method provided in this application will be described with reference to FIG. 15A and 15B. As shown in FIG. 15A and 15B, the distance measurement method in this application includes the following steps:
[0188] Steps S1501 to S1506 are the same as steps S1101 to S1106, and the details will not be described again here.
[0189] Step S1507: The Bluetooth module 201a sends an ACK to the Bluetooth module 101a.
[0190] Steps S1508 to S1517 are essentially the same as steps S1107 to S1116, and the details will not be described again here.
[0191] In conclusion, step S1507 is added in this embodiment of this application. Thus, after performing time synchronization once, the mobile phone 100 periodically triggers the Tag device 200 to transmit multiple groups of sound wave signals for the mobile phone 100 to perform distance measurement. The mobile phone 100 can calculate and display the distance to the Tag device 200 in real time. This realizes appropriate control of the measurement system.
[0192] Also, in some embodiments of this application, Bluetooth interaction information (e.g., time synchronization information, transmission time information, and temperature information) between the mobile phone 100 and the Tag device 200 is stored in a log. The sound wave signal is stored in a recording module of the microphone.
[0193] FIG. 16 is a diagram of the hardware configuration of a mobile phone 100 according to one embodiment of the present application.
[0194] As shown in FIG. 16, using a mobile phone 100 as an example, the mobile phone 100 may include a processor 110 (i.e., the above-mentioned processor 103), an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160 (i.e., the communication module 101), an audio module 170 (i.e., the above-mentioned audio module 102), a speaker 170A, a receiver 170B, a microphone 170C, a headset jack 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display 194 (i.e., the above-mentioned display module 105), a subscriber identity module (SIM) card interface 195, an EDL mode protection circuit, and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, an optical 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, and the like.
[0195] Processor 110 may include one or more processing units. For example, processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, a neural-network processing unit (NPU), and / or the like. Different processing units may be separate components or may be integrated into one or more processors.
[0196] A memory may also be located within the processor 110 and configured to store instructions and data. In some embodiments, the memory within the processor 110 is a cache. The memory may store instructions or data recently or periodically used by the processor 110. When the processor 110 needs to use those instructions or data again, the processor 110 can directly call up those instructions or data from the memory. This avoids repeated accesses, reduces the latency of the processor 110, and improves system efficiency. In some embodiments, the processor 110 may implement the distance measurement method provided in the embodiments of this application by calling and executing instructions of the distance measurement method stored in the memory. In some other embodiments, the memory within the processor 110 may further be configured to store the above-mentioned first image file, instructions corresponding to the preset signature method, a device identifier of the mobile phone 100, and the like.
[0197] In some embodiments, processor 110 may include one or more interfaces. The 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, a universal serial bus (USB) interface, and / or the like. In some other embodiments, after mobile phone 100 enters EDL mode, a host device may establish a communication connection to mobile phone 100 via the USB interface to access data in mobile phone 100.
[0198] The charging management module 140 is configured to receive a charging input from a charger. The charging management module 140 provides power to the mobile phone 100 by using a power management module 141 while charging the battery 142.
[0199] The power management module 141 is configured to connect to 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 and provides power to the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, etc.
[0200] The wireless communication function of the mobile phone 100 may be implemented through an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, a modem processor, a baseband processor, and the like.
[0201] Antenna 1 and Antenna 2 are configured to transmit and receive electromagnetic wave signals.
[0202] Mobile communication module 150 may provide wireless communication solutions applicable to mobile phone 100, including 2G / 3G / 4G / 5G, etc. Mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), and the like. Mobile communication module 150 may receive electromagnetic waves via antenna 1, perform processing, such as filtering or amplification, on the received electromagnetic waves, and send the electromagnetic waves to a modem processor for demodulation. Mobile communication module 150 may also amplify signals modulated by the modem processor and convert the signals into electromagnetic waves for emission via antenna 1. In some embodiments, at least some functional modules in mobile communication module 150 may be located within processor 110. In some embodiments, at least some functional modules of mobile communication module 150 and at least some modules of processor 110 may be located within the same component.
[0203] The wireless communication module 160 may provide wireless communication solutions for the mobile phone 100, including wireless local area networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite systems (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR), among others. The wireless communication module 160 may be one or more components integrating at least one communication processor module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering on the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 may further receive signals to be transmitted from the processor 110, perform frequency modulation and amplification on the signals, and convert the signals into electromagnetic waves for emission via the antenna 2.
[0204] The mobile phone 100 implements display functionality by using a GPU, a display 194, an application processor, and the like. The GPU is a microprocessor for image processing and is connected to the display 194 and the application processor. The GPU is configured to perform mathematical and geometric calculations and render images. The processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.
[0205] The display 194 is configured to display images, videos, and the like. The display 194 includes a display panel. The display panel may 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), or the like. In some embodiments, the mobile phone 100 may include one or N displays 194, where N is a positive integer greater than 1.
[0206] The camera 193 is configured to capture still or video images. An optical image of an object is generated through a lens and projected onto a photosensitive element. The photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) photoelectric transistor. The photosensitive element converts the optical signal into an electrical signal and sends the electrical signal to an ISP, which converts the electrical signal 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 an image signal in a standard format, such as RGB or YUV. In some embodiments, the mobile phone 100 can include one or N cameras 193, where N is a positive integer greater than 1.
[0207] The external memory interface 120 can be used to connect an external storage card, such as a microSD card, to expand the storage capabilities of the mobile phone 100. The external memory card communicates with the processor 110 through the external memory interface 120 to perform data storage functions. For example, files such as music and videos are stored on the external storage card.
[0208] The internal memory 121 may be configured to store computer-executable program code. The executable program code includes instructions. The internal memory 121 may include a program storage area and a data storage area. The program storage area may store an operating system, applications required by at least one function (e.g., application functions corresponding to functions related to Synergy services 12), and the like. The data storage area may store data created in the course of using the mobile phone 100, such as files in a file format obtained after migrated data is packaged. The internal memory 121 may also include high-speed random access memory and may further include non-volatile memory, such as at least one magnetic disk storage component, flash storage component, or universal flash storage (UFS). The processor 110 executes various functional applications of the mobile phone 100 by executing instructions stored in the internal memory 121 and / or instructions stored in memory located within the processor 110.
[0209] The mobile phone 100 may implement audio functions, such as music playback and recording, by using an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headset jack 170D, and an application processor.
[0210] Audio module 170 is configured to convert digital audio information to analog audio signals for output, and to convert analog audio input to digital audio signals. Audio module 170 may also be configured to encode and decode audio signals.
[0211] Speaker 170A, also referred to as a "loudspeaker," is configured to convert an audio electrical signal into a sound signal.
[0212] Receiver 170B, also referred to as an "earphone," is configured to convert an audio electrical signal into a sound signal.
[0213] The microphone 170C, also referred to as a "mike" or "mic," is configured to convert a sound signal into an electrical signal.
[0214] Headset jack 170D is configured to connect to a wired headset.
[0215] For example, the mobile phone 100 may further include one or more of a button 190, a motor 191, an indicator 192, a SIM card interface 195 (or an eSIM card), and the like.
[0216] The EDL short-circuit protection circuit is coupled to at least one pin of the processor 110, and the EDL short-circuit protection circuit includes at least one connection terminal. When the EDL mode protection circuit is enabled, for example, when the circuit enables the at least one pin of the processor, the mobile phone 100 can enter the EDL mode.
[0217] In some embodiments, the mobile phone 100 may further include buttons (not shown), such as a volume up button, a volume down button, or a power button. A user may enable the mobile phone 100 to enter the EDL mode by performing a combination operation on the buttons of the mobile phone 100. For example, when the mobile phone 100 is in an off state, if it is detected that multiple buttons among the volume up button, the volume down button, and the power button are pressed simultaneously, the mobile phone 100 enters the EDL mode. In another example, when the mobile phone 100 is in an off state, if multiple buttons among the volume up button, the volume down button, and the power button are pressed simultaneously and an EDL mode protection circuit in the mobile phone 100 is enabled, the mobile phone 100 enters the EDL mode.
[0218] It can be understood that the configuration of the mobile phone 100 shown in this embodiment of the present application does not constitute a specific limitation on the mobile phone 100. In some other embodiments of the present application, the mobile phone 100 can include more or fewer components than those shown in the figures, or some components can be combined, some components can be separated, or the components can be arranged differently. The components shown in the figures can be implemented by hardware, software, or a combination of software and hardware.
[0219] 17 is a diagram of another electronic device configuration according to some embodiments of the present application. In some embodiments of the present application, the electronic device may be a notebook computer 400. As shown in FIG. 17, the notebook computer 400 includes one or more processors 401, a system memory 402, a non-volatile memory (NVM) 403, a communication interface 404, input / output (I / O) devices 405, and system control logic 406 configured to couple the processor 401, the system memory 402, the non-volatile memory 403, the communication interface 404, and the input / output (I / O) devices 405.
[0220] The processor 401 may include one or more processing units, such as a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), a micro-programmed control unit (MCU), an artificial intelligence (AI) processor, or a programmable logic device (FPGA) processing module or circuit, or may include one or more single-core or multi-core processors. The processor 401 may be configured to execute instructions for implementing the access control method provided in the embodiments of this application.
[0221] The system memory 402 is a volatile memory, such as a random access memory (RAM) or a double data rate synchronous dynamic random access memory (DDR SDRAM). The system memory is configured to temporarily store data and / or instructions. For example, in some embodiments, the system memory 402 may be configured to store key identifiers, signature information, a device identifier for the mobile phone 100, and the like, or may be configured to store instructions for a pre-configured signature method that corresponds to a key identifier.
[0222] Non-volatile memory 403 may include one or more tangible, non-transitory computer-readable media configured to store data and / or instructions. In some embodiments, non-volatile memory 403 may include any suitable non-volatile memory, such as, for example, flash memory, and / or any suitable non-volatile storage device, such as, for example, a hard disk drive (HDD), a compact disc (CD), a digital versatile disc (DVD), or a solid-state drive (SSD). In some embodiments, non-volatile memory 403 may instead be a removable storage medium, such as, for example, a Secure Digital (SD) storage card. In some other embodiments, non-volatile memory 403 may be configured to store key identifiers, signature information, a device identifier for mobile phone 100, and the like, or may be configured to store instructions for a pre-configured signature method corresponding to a key identifier.
[0223] In particular, the system memory 402 and the non-volatile memory 403 may respectively include a temporary copy and a permanent copy of instructions 407. The instructions 407, when executed by the processor 401, may include instructions that enable the notebook computer 400 to implement the access control method provided in the embodiments of this application.
[0224] The communication interface 404 may include a transceiver configured to provide a wired or wireless communication interface for the notebook computer 400 to communicate with any other suitable device by using one or more networks. In some embodiments, the communication interface 404 may be integrated into another component of the notebook computer 400. For example, the communication interface 404 may be integrated into the processor 401. In some embodiments, the notebook computer 400 may communicate with another device via the communication interface 404. For example, the notebook computer 400 may obtain a device identifier and a key identifier of the mobile phone 100 from the mobile phone 100 or send signature information and instructions to the mobile phone 100 via the communication interface 404.
[0225] The input / output (I / O) device 405 may include input devices such as a keyboard or a mouse, and output devices such as a monitor. A user can use the input / output (I / O) device 405 to interact with the notebook computer 400, for example, to input instructions to a first application running on the notebook computer 400, to retrieve the fuse bit file, device identifier file, and the like, of the mobile phone 100.
[0226] System control logic 206 may include any suitable interface controller for providing any suitable interface with other modules of notebook computer 400. For example, in some embodiments, system control logic 406 may include one or more memory controllers for providing interfaces connected to system memory 402 and non-volatile memory 403.
[0227] In some embodiments, at least one of the processors 401 may be packaged with one or more controller logic used in the system control logic 406 to form a system-in-package (SiP). In some other embodiments, at least one of the processors 401 may also be integrated on the same chip with one or more controller logic used in the system control logic 406 to form a system-on-a-chip (SoC).
[0228] It can be understood that the configuration of the notebook computer 400 shown in this embodiment of the present application does not constitute a specific limitation on the electronic device. In some other embodiments of the present application, the notebook computer 400 can include more or fewer components than those shown in the figure, or some components can be combined, some components can be separated, or the components can be arranged differently. The components shown in the figure can be implemented by hardware, software, or a combination of software and hardware.
[0229] The embodiments of the mechanisms disclosed in this application may be implemented in hardware, software, firmware, or a combination of these implementation methods. The embodiments of this application may be implemented as a computer program or program code executed on a programmable system. The programmable system includes at least one processor, a storage system (including volatile memory, non-volatile memory, and / or storage elements), at least one input device, and at least one output device.
[0230] Program code may be used to input instructions for performing the functions described herein and to generate output information that may be delivered to one or more output devices, in known fashion. For purposes of this application, a processing system includes any system that has a processor, such as a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.
[0231] The program code may be implemented in a high-level or object-oriented programming language to communicate with a processing system. The program code may also be implemented in assembly or machine language, if desired. The mechanisms described in this application are not limited in scope to any particular programming language. In any case, the language may be a compiled or interpreted language.
[0232] 18 is an architecture diagram of a mobile phone 100 according to some embodiments of the present application. As shown in FIG. 18, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0233] A window manager is configured to manage window programs. The window manager may get the size of the display, determine if there is a status bar, lock the screen, take screenshots, etc.
[0234] Content providers are configured to store and retrieve data and make it accessible by applications. Data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, and the like.
[0235] A view system includes visual controls, such as controls for displaying text and controls for displaying images. The view system can be used to build applications. A display interface can include one or more views. For example, a display interface that includes an SMS message notification icon can include a text display view and an image display view.
[0236] The phone manager is configured to provide communication functions for the mobile phone 100, such as managing call status (including answering, rejecting, or the like).
[0237] The resource manager provides various resources to the application, such as localized strings, icons, images, layout files, and video files.
[0238] A notification manager may be configured to allow applications to display notification information in the status bar and to communicate notification messages. The notification manager may automatically disappear after a short period of silence without user interaction. For example, a notification manager may be configured to notify of download completion, provide message notifications, etc. A notification manager may alternatively be a notification that appears in the system's top status bar in the form of a graph or scrollbar text, such as a notification for an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, text information may be displayed in the status bar, an alert sound may be played, an electronic device may vibrate, or an indicator light may flash.
[0239] Android includes a kernel library and a virtual machine. The Android runtime is responsible for scheduling and managing the Android system.
[0240] The kernel library contains two parts: the functions that need to be called in the Java language and the Android kernel library.
[0241] The application layer and the application framework layer are executed on a virtual machine. The virtual machine executes java files in the application layer and the application framework layer as binary files. The virtual machine is configured to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0242] The kernel layer is a layer between the hardware and the software, and includes at least a display driver, a camera driver, an audio driver, and a sensor driver.
[0243] The system library may include multiple functional modules, such as a surface manager (SM), a media library (ML), a 3D graphics processing library (e.g., OpenGL ES), and a 2D graphics engine (e.g., SGL).
[0244] The media library supports playback and recording in multiple commonly used audio and video formats, still image files, and the like. The media library may support multiple audio and video encoding formats, such as MPEG-4, H.264, MP3, AAC, AMR, JPG, and PNG.
[0245] The embodiments of the mechanisms disclosed in this application may be implemented in hardware, software, firmware, or a combination of these implementation methods. The embodiments of this application may be implemented as a computer program or program code executed on a programmable system. The programmable system includes at least one processor, a storage system (including volatile memory, non-volatile memory, and / or storage elements), at least one input device, and at least one output device.
[0246] Program code may be used to input instructions for performing the functions described herein and to generate output information that may be delivered to one or more output devices, in known fashion. For purposes of this application, a processing system includes any system that has a processor, such as a Digital Signal Processor (DSP), a microcontroller, an Application-Specific Integrated Circuit (ASIC), or a microprocessor.
[0247] The program code may be implemented in a high-level or object-oriented programming language to communicate with a processing system. The program code may also be implemented in assembly or machine language, if desired. The mechanisms described in this application are not limited in scope to any particular programming language. In any case, the language may be a compiled or interpreted language.
[0248] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may alternatively be implemented as instructions carried or stored on one or more transitory or non-transitory 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 using a network or other computer-readable medium. Thus, a machine-readable medium may include any mechanism for storing or transmitting information in a machine- (e.g., computer-) readable form. Machine-readable media include, but are not limited to, floppy disks, compact disks, optical disks, compact disk read-only memories (CD-ROMs), magneto-optical disks, read-only memories (ROMs), random access memories (RAMs), erasable programmable read-only memories (EPROMs), electrically erasable programmable read-only memories (EEPROMs), magnetic or optical cards, flash memory, or tangible machine-readable memory configured to transmit information (e.g., carrier waves, infrared signals, or digital signals) using electrical, optical, acoustic, or other forms of propagated signals over the Internet. Thus, machine-readable media includes any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a machine- (e.g., computer-) readable form.
[0249] In the accompanying drawings, some structural or methodological features may be shown in a particular arrangement and / or order. However, it should be understood that such a particular arrangement and / or order may not be required. In some embodiments, the features may be arranged in a different manner and / or order than that shown in the accompanying illustrative drawings. Also, the inclusion of structural or methodological features in a particular figure does not imply that such features are required in all embodiments. In some embodiments, the features may not be included or may be combined with other distinct features.
[0250] It should be noted that all units / modules mentioned in the device embodiments of this application are logical units / modules. Physically, one logical unit / module may be one physical unit / module, may be part of one physical unit / module, or may be implemented by using a combination of multiple physical units / modules. The physical implementation of these logical units / modules is not very important; the combination of functions implemented by these logical units / modules is the key to solving the technical problem provided by this application. In addition, in order to emphasize the innovative aspects of this application, units / modules that are not closely related to solving the technical problem provided by this application are not introduced into the above-mentioned device embodiments of this application. This does not mean that other units / modules do not exist in the above-mentioned device embodiments.
[0251] It should be noted that in the examples and specification 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 actual relationship or ordering between those entities or operations. Furthermore, the terms "comprise," "have," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or device that includes a list of elements not only includes those elements, but also other elements not expressly listed, or further elements inherent in such process, method, article, or device. An element preceded by "comprise" or "contain" does not, without further constraints, exclude the presence of additional identical elements within a process, method, article, or device that includes that element.
[0252] Although this application has been shown and described with reference to certain example embodiments thereof, those skilled in the art will understand that various changes in form and detail may be made therein without departing from the scope of this application.
Claims
1. Detecting a distance measurement command by the first electronic device; Detecting a first group of sonic signals transmitted by a second electronic device at a first time point by the first electronic device, and determining a first distance corresponding to the first time point between the first electronic device and the second electronic device based on the first group of sonic signals and first information corresponding to the first group of sonic signals, wherein the first information includes first transmission time information of the transmission of the first group of sonic signals by the second electronic device; The first electronic device displays the first distance; Detecting, by the first electronic device, a second group of sonic signals transmitted by the second electronic device at a second time point after the first time point, and determining a second distance between the first electronic device and the second electronic device corresponding to the second time point based on the second group of sonic signals and second information corresponding to the second group of sonic signals, wherein the second information includes second transmission time information of the transmission of the second group of sonic signals by the second electronic device; The first electronic device displays the second distance. Having that, the first electronic device transmits the first transmission time information and the second transmission time information to the second electronic device, such that the second electronic device transmits the first group of sound wave signals based on the first transmission time information and the second electronic device transmits the second group of sound wave signals based on the second transmission time information; The first electronic device adjusts the second transmission time information based on the determined first distance. Distance measurement method.
2. detecting, by the first electronic device, a third group of acoustic signals transmitted by the second electronic device at a fifth time point, the fifth time point being between the first time point and the second time point; determining, by the first electronic device, the first distance corresponding to the first time point between the first electronic device and the second electronic device based on the first group of sonic signals, the third group of sonic signals, the first information, and third information corresponding to the third group of sonic signals; and determining, by the first electronic device, the second distance corresponding to the second time point between the first electronic device and the second electronic device based on the second group of sound wave signals, the third group of sound wave signals, the second information, and the third information. The distance measurement method according to claim 1 , further comprising:
3. sending a sound emission command to the second electronic device by the first electronic device, the sound emission command instructing the second electronic device to emit sound wave signals, the sound wave signals including the first group of sound wave signals and the second group of sound wave signals; The distance measurement method according to claim 1 , further comprising:
4. The distance measuring method according to claim 3 , wherein the frequency range of the sound wave signal is a preset frequency range.
5. A distance measuring method as described in claim 3, wherein the sound emission command includes an acoustic wavelength or acoustic frequency band of the acoustic signal to be transmitted by the second electronic device.
6. establishing a Bluetooth connection to the second electronic device by the first electronic device, and starting, by the first electronic device, detection of the acoustic signal transmitted by the second electronic device when a received signal strength of a Bluetooth signal transmitted by the second electronic device and received by the first electronic device is higher than a preset strength threshold; The distance measurement method according to claim 1 , further comprising:
7. performing, by the first electronic device, a Bluetooth time synchronization with the second electronic device at a third time point to determine a first time offset between the first electronic device and the second electronic device corresponding to the third time point; determining, by the first electronics, a first distance after the third time point based on the first time offset, the first group of sonic signals, and the first information; and determining, by the first electronics, a second distance after the third time point based on the first time offset, the second group of sonic signals, and the second information.
7. The distance measurement method according to claim 6, further comprising:
8. performing, by the first electronic device, a Bluetooth time synchronization with the second electronic device at a fourth time point that is a preset time after the third time point, to determine a second time offset between the first electronic device and the second electronic device corresponding to the fourth time point; determining, by the first electronics, a first distance after the fourth time point based on the second time offset, the first group of sonic signals, and the first information; and determining, by the first electronics, a second distance after the fourth time point based on the second time offset, the second group of sonic signals, and the second information.
8. The distance measurement method according to claim 7, further comprising:
9. detecting, by the first electronic device, the distance measurement command when detecting a distance measurement operation performed by a user on the first electronic device and the second electronic device, and / or a search operation performed by the user on the second electronic device; The distance measurement method according to claim 1 , further comprising:
10. The frequency range of the sound wave signal is from 20 Hz to 2*10 4 Hz, or The frequency range of the sound wave signal is 2*10 4 Hz to 1*10 12 Hz, or The frequency range of the sound wave signal is from 20 Hz to 1*10 12 Hz, The distance measurement method according to claim 1 .
11. 1. An electronic device having a memory, a processor, and a transceiver, the memory is configured to store computer instructions; the transceiver is configured to receive and transmit information; The processor is coupled to the memory and configured to execute the method of any one of claims 1 to 10 by calling the computer instructions in the memory and using the transceiver. electronic equipment.
12. A non-transitory computer readable storage medium having stored thereon instructions which, when executed on an electronic device, enable the electronic device to perform the distance measurement method according to any one of claims 1 to 10.
13. A computer program product comprising instructions, which when executed by one or more processors, are used to implement the distance measurement method of any one of claims 1 to 10.
Citation Information
Patent Citations
Portable terminal device, response communications device, and display system and method of retrieved object
JP2006308493A
Diver-use information transmission device, and distance calculating method and distance monitoring method in diver-use information transmission device
JP2010014570A
Radio communication method and system, and radio communication device of the same
JP2011199381A
Opposing direction estimation method, searching-side terminal and searched-side terminal
JP2012042244A
Apparatus and methods for determining range and bearing using time-stamped messaging
US20050219950A1
Cited By
Distance measurement method, readable medium, and electronic device
US20240411003A1