Method for determining distance between wearable device and terminal

By calculating the transmission rate and latency between the wearable device and the terminal, and combining this with connection parameters to correct for distance, the problem of accuracy in determining wearable device loss has been solved, achieving higher accuracy and a better user experience.

CN121634067APending Publication Date: 2026-03-10ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing technologies have low accuracy in determining whether wearable devices are lost and are easily affected by external factors.

Method used

By determining the transmission rate of the wearable device and the transmission delay between the terminal and the wearable device, and by combining the connection parameters to correct the distance, a more accurate target distance can be calculated.

Benefits of technology

This improves the accuracy of determining whether a wearable device is lost, enhancing user experience and satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121634067A_ABST
    Figure CN121634067A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a method for determining the distance between wearable equipment and a terminal. The method comprises the following steps: determining a transmission rate of wearable equipment and a transmission delay between a terminal and the wearable equipment, and determining a first distance according to the transmission rate and the transmission delay; and correcting the first distance according to the connection parameter of the wearable device, and determining the corrected first distance as a target distance between the wearable device and the terminal. Through the embodiment of the invention, the problem that the accuracy of judging whether the wearable equipment is lost or not in the related technology is low can be solved, and the effect of improving the accuracy of determining the distance between the wearable equipment and the terminal is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of communication, and in particular, to a method for determining the distance between a wearable device and a terminal. BACKGROUND

[0002] In the related art, whether a wearable device is lost is usually determined by communication quality: the greater the communication distance, the worse the communication quality, and then the terminal connected with the wearable device determines that the wearable device is lost. In addition, in the related art, there is also a scheme for confirming whether the wearable device is lost based on wireless signal transmission power. However, the determination methods of these schemes all need to be based on communication quality, and the determination of communication quality is easily disturbed by various external factors, and thus the accuracy of determining whether the wearable device is lost is low. SUMMARY

[0003] Embodiments of the present application provide a method for determining the distance between a wearable device and a terminal, to at least solve the problem of low accuracy in determining whether the wearable device is lost in the related art.

[0004] According to an embodiment of the present application, a method for determining the distance between a wearable device and a terminal is provided, comprising: determining the transmission rate of the wearable device and the transmission delay between the terminal and the wearable device, and determining a first distance according to the transmission rate and the transmission delay; correcting the first distance according to the connection parameters of the wearable device, and determining the corrected first distance as the target distance between the wearable device and the terminal.

[0005] According to another embodiment of the present application, an electronic device is also provided, comprising a memory and a processor, the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in the above method embodiments.

[0006] According to another embodiment of the present application, a computer program product is also provided, comprising a computer program, which, when executed by a processor, implements the steps in the above method embodiments.

[0007] Through the above embodiments of the present application, the first distance between the terminal and the wearable device is determined according to the transmission rate of the wearable device and the transmission delay between the terminal and the wearable device, and the first distance is corrected by the connection parameters of the wearable device to obtain a more accurate target distance. Therefore, the problem of low accuracy in determining whether the wearable device is lost in the related art can be solved, and the effect of improving the accuracy of determining the distance between the wearable device and the terminal is achieved. Attached Figure Description

[0008] Figure 1 This is a schematic diagram of the hardware structure of a mobile terminal for determining the target distance according to an embodiment of the present invention;

[0009] Figure 2 This is a flowchart illustrating a method for determining the distance between a wearable device and a terminal according to an embodiment of the present invention;

[0010] Figure 3 This is a flowchart illustrating a Bluetooth headset loss warning method according to an embodiment of the present invention;

[0011] Figure 4 This is a flowchart illustrating a headphone loss warning method according to another embodiment of the present invention;

[0012] Figure 5 This is a schematic structural block diagram of a device for determining the distance between a wearable device and a terminal according to an embodiment of the present invention. Detailed Implementation

[0013] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings and examples.

[0014] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0015] The methods and embodiments provided in this invention can be executed on a mobile terminal, a computer terminal, or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a schematic diagram of the hardware structure of a mobile terminal for determining the target distance according to an embodiment of the present invention. The target distance is the distance between the wearable device and the terminal. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0016] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the target distance determination method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0017] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0018] In practice, users often forget or lose their wearable devices when they are connected to a terminal but not worn. This invention provides a method for alerting users when their wearable devices are out of reach. This method accurately alerts users of the risk of loss without requiring additional hardware support. Specifically, the method accurately determines the distance between the wearable device and the terminal based on the device's transmission rate and latency. It then adjusts the distance based on various factors such as the device's signal-to-noise ratio, operating mode, protocol version, channel bandwidth, modulation method, and encoding method. This more accurate distance-based alerts provide users with more precise risk warnings of device loss.

[0019] Figure 2 This is a flowchart illustrating a method for determining the distance between a wearable device and a terminal according to an embodiment of the present invention. Figure 2 As shown, the process may include the following steps:

[0020] Step S202: Determine the transmission rate of the wearable device and the transmission delay between the terminal and the wearable device, and determine the first distance based on the transmission rate and the transmission delay.

[0021] In step S202 of this embodiment, determining the transmission rate of the wearable device and the transmission delay between the terminal and the wearable device includes: receiving the wearing status of the wearable device, wherein the wearing status can be determined by a sensor; and determining the transmission rate of the wearable device and the transmission delay between the terminal and the wearable device when the wearing status of the wearable device is not worn.

[0022] In one embodiment, the wearable device determines its current wearing status using sensors, and then sends the obtained wearing status to a terminal. These sensors include, but are not limited to, light sensors, proximity sensors, accelerometers, and motion sensors. In some embodiments, the wearing status can also be confirmed using any other applicable method.

[0023] In step S202 of this embodiment, determining the transmission rate of the wearable device and the transmission delay between the terminal and the wearable device may include: receiving data packets sent by the wearable device and determining the number of data packets and the width of the data packets; determining the transmission rate based on the number of data packets and the width of the data packets, as well as the number of carriers of the terminal and the signal indirect wiring cost.

[0024] In one embodiment, the wearable device is a Bluetooth headset, and the terminal is a smartphone.

[0025] In one exemplary embodiment, when the Bluetooth headset determines through its own sensors that it is currently in an unworn state, it sends the "unworn state" to the smartphone. After receiving the "unworn state" sent by the Bluetooth headset, the smartphone begins to calculate the real-time Bluetooth transmission rate and the transmission delay between the Bluetooth headset and the smartphone.

[0026] The real-time Bluetooth transmission rate is determined by the following formula (1):

[0027] BDR = (C + log2 (1 + (M / I))) × T (Formula 1)

[0028] Wherein, BDR represents the transmission rate of the wearable device, in kbit / s, C represents the number of data packets received from the wearable device, M represents the number of carriers of the terminal, I represents the signal indirect wiring cost, and T represents the data packet width of the wearable device, usually in bits.

[0029] In step S202 of this embodiment, determining the transmission delay between the terminal and the wearable device includes: determining the first moment when the wearable device sends a data packet and the second moment when the data packet is received, and determining the transmission delay based on the first moment and the second moment.

[0030] In one exemplary embodiment, the Bluetooth headset sends a data packet to the smartphone. The smartphone determines the first time T1 when the Bluetooth headset sends the data packet based on the received data packet, and then determines the transmission delay t between the Bluetooth headset and the smartphone by combining the second time T2 when the smartphone receives the data packet. d ,Right now:

[0031] t d = T2- T1 formula (2)

[0032] In one embodiment, determining the first distance based on the transmission rate and transmission delay includes: determining the basic distance (i.e., the first distance) between the wearable device and the terminal based on the determined transmission rate and transmission delay using the following formula (3).

[0033] DIS = BDR×TDE formula (3)

[0034] Wherein, DIS represents the first distance between the wearable device and the terminal, in meters; BDR represents the transmission rate of the wearable device, in kbit / s; and TDE represents the transmission delay between the terminal and the wearable device, in seconds.

[0035] Step S204: Correct the first distance according to the connection parameters of the wearable device, and determine the corrected first distance as the target distance between the wearable device and the terminal;

[0036] In one embodiment, correcting the first distance based on the connectivity parameters of the wearable device includes:

[0037] The first distance is corrected in real time based on the connection parameters of the wearable device; or, the first distance is corrected periodically based on the connection parameters of the wearable device and a preset correction cycle; or the first distance is corrected when the correction conditions are met based on the connection parameters of the wearable device and preset correction conditions, for example, when it is necessary to obtain the distance between the wearable device and the terminal, the obtained first distance is corrected.

[0038] In this embodiment, the connection parameters of the wearable device include, but are not limited to, at least one of the following: channel bandwidth, modulation method, coding method, transmission signal-to-noise ratio, operating mode, communication protocol version, and transmission loss. These connection parameters can be obtained through the physical layer (PHY) to which the wearable device connects, and can also be recorded by reporting parameters through the Bluetooth protocol stack.

[0039] In step S204 of this embodiment, the first distance is corrected according to the connection parameters of the wearable device, including: correcting the number of carriers of the terminal, the signal indirect wiring cost, and the data packet collection range of the wearable device according to the connection parameters, and determining the transmission distance influence factor according to the connection parameters; updating the transmission rate according to the corrected number of carriers, the corrected signal indirect wiring cost, and the corrected data packet collection range; and correcting the first distance according to the updated transmission rate and the transmission distance influence factor.

[0040] In one embodiment, correcting the number of carriers of the terminal based on connection parameters includes: correcting the number of carriers of the terminal based on the real-time channel bandwidth, modulation method, and coding method of the communication between the terminal and the wearable device.

[0041] As shown in formula (4), the number of carriers M N The number of carriers is determined by formula (4), that is, by the following connection parameters: channel bandwidth, modulation method, and coding method.

[0042] M N =B real-time ×M real-time ×C real-time Formula (4)

[0043] Among them, M N B is the number of carriers. real-time M is the channel bandwidth. real-time For modulation method, C real-time This refers to the encoding method.

[0044] In one exemplary embodiment, the smartphone performs carrier number correction based on the acquired real-time channel bandwidth, modulation scheme, and coding scheme.

[0045] In one embodiment, correcting the signal indirect wiring cost of the terminal based on connection parameters includes: correcting the signal indirect wiring cost based on the number of data packet retransmissions between the terminal and the wearable device, the real-time transmission distance between the wearable device and the terminal, and the channel quality factor, wherein the channel quality is determined by the transmission signal-to-noise ratio or bit error rate.

[0046] As shown in formula (5), the signal indirect line cost I L It is determined by formula (5), that is, the signal indirect line cost is determined by the number of data packet retransmissions between the terminal and the wearable device, the real-time transmission distance between the wearable device and the terminal, and the channel quality factor.

[0047] I L =R t ×DIS real-time ×Q formula (5)

[0048] Among them, I LR is the cost factor for signal indirection. t DIS represents the number of data packet retransmissions detected in real time. real-time Q represents the real-time transmission distance between the wearable device and the terminal, and Q is the channel quality factor, which is represented by the signal-to-noise ratio (SNR) or bit error rate (BER).

[0049] In one exemplary embodiment, the mobile phone can perform signal indirect wiring cost correction based on the acquired real-time data packet retransmission count, the real-time transmission distance between the wearable device and the terminal, and the channel quality factor.

[0050] In one embodiment, correcting the data packet acquisition range of the wearable device based on connection parameters includes: correcting the data packet acquisition range of the wearable device based on the transmission signal-to-noise ratio of the communication between the terminal and the wearable device.

[0051] In this embodiment, the data packet collection range of the wearable device includes: collecting data packets from the classic Bluetooth channel and the LE channel; or collecting only data packets from the classic Bluetooth channel; or collecting only data packets from the LE channel.

[0052] In one embodiment, adjusting the data packet acquisition range of the wearable device according to connection parameters includes: when the transmission signal-to-noise ratio (SNR) environment in which the wearable device is located is greater than a first SNR threshold, adjusting the data packet acquisition range to acquire data packets from the classic channel and the low-power single channel; when the transmission SNR environment in which the wearable device is located is less than a second SNR threshold, adjusting the data packet acquisition range to acquire data packets from the transmission channel used by the wearable device, wherein the transmission channel used by the wearable device includes: a classic channel or a low-power single channel; and the first SNR threshold is greater than the second SNR threshold.

[0053] In one exemplary embodiment, in a high signal-to-noise ratio (SNR) environment, i.e., when the SNR of the wearable device is greater than a first SNR threshold, data packets from both the Classic Bluetooth and LE Bluetooth channels are collected simultaneously to obtain more comprehensive information. In a low SNR environment, i.e., when the SNR of the wearable device is less than a second SNR threshold, if the Bluetooth headset uses the Classic Bluetooth channel for audio or data transmission, only Classic Bluetooth channel data packets are collected to ensure data reliability. If the Bluetooth headset uses the Low Energy Audio (LE Audio) Bluetooth channel for LE AUDIO audio transmission, only LE Bluetooth channel data packets are collected.

[0054] In one embodiment, determining the transmission distance impact factor based on connection parameters includes: determining the transmission distance impact factor based on the channel bandwidth, coding method, and transmission loss of the communication between the terminal and the wearable device.

[0055] As shown in formula (6), the transmission distance influence factor α can be determined by formula (6), that is, the transmission distance influence factor α is determined by the channel bandwidth, modulation method, coding method and transmission loss of the communication between the terminal and the wearable device:

[0056]

[0057] Where α is the transmission distance influencing factor;

[0058] B represents the channel bandwidth. At the same transmission rate, a wider channel bandwidth leads to faster signal attenuation. Therefore, the transmission distance influencing factor is inversely proportional to the channel bandwidth; that is, the wider the channel bandwidth, the shorter the transmission distance.

[0059] M represents the modulation method. Higher modulation efficiency will increase the transmission distance, which is directly proportional to the transmission distance influencing factor.

[0060] C represents the encoding method. A more efficient encoding method will reduce the loss in transmission distance, thus increasing the transmission distance, which is directly proportional to the transmission distance influencing factor.

[0061] L represents transmission loss. The relationship between transmission loss and transmission distance is expressed by the square root, meaning that lower transmission loss can significantly increase transmission distance.

[0062] In different usage scenarios, the degree of influence of each parameter in the transmission distance influencing factor on the transmission distance varies. For example:

[0063] When the terminal is in an audio playback / voice call scenario, sufficient channel bandwidth (B) is required to support high-quality audio transmission or real-time data transmission. Therefore, channel bandwidth (B) is the main influencing parameter in this scenario.

[0064] When the terminal is in a low-power connection scenario, the channel bandwidth (B) requirement is usually small, but the connection needs to be maintained over long distances. Therefore, the magnitude of transmission loss (L) directly affects the connection maintenance and system stability in this scenario, so transmission loss (L) is the main influencing factor in this scenario.

[0065] When the terminal is in a high-speed mobile scenario, complex modulation (M) and efficient coding (C) can improve the stability and anti-interference ability of data transmission, enabling the terminal to maintain a stable connection. Therefore, in this scenario, modulation (M) and coding (C) are the main influencing factors.

[0066] In an exemplary embodiment, the smartphone redetermines and updates the real-time Bluetooth headset transmission rate based on the corrected number of carriers, the corrected signal indirect wiring cost, and the corrected data packet acquisition range. Then, based on the updated first distance according to the updated Bluetooth headset transmission rate, a second distance (DIS) is obtained. Subsequently, based on the second distance (DIS) and the transmission distance influence factor, the target distance DIS1 is determined by formula (7).

[0067] DIS1 = DIS×α Formula (7)

[0068] Wherein, DIS1 represents the target distance between the wearable device and the terminal, DIS represents the first distance between the wearable device and the terminal, and α represents the transmission distance influence factor.

[0069] Through the above correction process, the accuracy of the distance calculation between wearable devices and terminals can be significantly improved, thereby enhancing the user experience and satisfaction.

[0070] After step S204 in this embodiment, the method may further include: when the target distance is greater than or equal to a first preset distance threshold, enabling a prompt that the wearable device is at risk of being lost or is moving away from the wearable device; and disabling the prompt that the target distance is less than a second preset distance threshold, wherein the first preset threshold is greater than or equal to the second preset threshold.

[0071] In one embodiment, the terminal provides different levels of risk warnings based on different target distances. Specifically, a first-level risk warning is issued when the target distance is greater than a first preset distance threshold but less than a third distance threshold; a second-level risk warning is issued when the target distance is greater than the third preset distance threshold. The third preset distance threshold is greater than the first preset distance threshold. For example, if the first preset distance threshold is 2 meters and the third preset distance threshold is 6 meters, then when the smartphone detects a distance of 3 meters from the Bluetooth headset, a first-level risk warning is issued, indicating a risk of loss and prompting the user to take precautions. When the smartphone detects a distance of 7 meters from the Bluetooth headset, a second-level risk warning is issued, indicating a very high risk of loss and prompting the user to take precautions.

[0072] In this embodiment of the invention, more levels of risk warnings and prompting methods can be defined according to actual needs, including but not limited to turning on the flashlight in the terminal and voice prompts. The specific level division method can be referred to the above embodiment, and will not be repeated here.

[0073] In one embodiment, the above method can be applied to Bluetooth wearable devices to provide a loss warning when the user is away from the Bluetooth wearable device. The specific warning method can be referred to the above embodiment, and will not be repeated in this embodiment.

[0074] Through the above steps, a first distance between the terminal and the wearable device is determined based on the transmission rate of the wearable device and the transmission delay between the terminal and the wearable device. This first distance is then corrected using the connection parameters of the wearable device to determine the target distance between the wearable device and the terminal. Based on this target distance, it is possible to accurately determine whether the wearable device is lost, significantly improving the accuracy and precision of wearable device loss alerts. Therefore, this solves the problem of low accuracy in determining whether a wearable device is lost in related technologies.

[0075] Taking a Bluetooth headset as the wearable device and a mobile phone as the terminal as an example, a method for providing a Bluetooth headset loss warning is provided. The method involves the step of determining the distance between the Bluetooth headset and the mobile phone. The mobile phone has Bluetooth function, and the Bluetooth headset and the mobile phone are connected via Bluetooth.

[0076] Figure 3 This is a flowchart illustrating the headphone loss warning method according to an embodiment of the present invention, as shown below. Figure 3 As shown, the process specifically includes the following steps:

[0077] Step S301: The earphone checks whether it is connected to the mobile phone;

[0078] Specifically, the earphones connect to the mobile phone via Bluetooth.

[0079] In step S302, when the headset and the terminal are already connected, the headset sends its wearing status to the mobile phone so that the mobile phone can calculate the target distance based on the headset wearing status and issue a headset loss warning based on the target distance, wherein the target distance is the distance between the mobile phone and the headset.

[0080] Figure 4 This is a flowchart illustrating a headphone loss warning method according to another embodiment of the present invention, specifically including the following steps:

[0081] Step S401: The mobile phone receives the headphone wearing status sent by the headphone, and if the headphone wearing status is not worn, it starts the real-time transmission rate calculation of Bluetooth communication.

[0082] Specifically, when the headphones are not being worn, the phone starts calculating the real-time transmission rate of Bluetooth communication and simultaneously starts monitoring the status of Bluetooth communication to determine whether the user has moved away from the headphones and provide a loss warning.

[0083] Step S402: The mobile phone calculates the real-time transmission rate of Bluetooth communication.

[0084] Specifically, the mobile phone calculates the real-time transmission rate of Bluetooth communication based on the number of data packets received in real time, the data packet width, the number of carriers, and the signal indirect wiring cost.

[0085] Step S403: The mobile phone calculates the transmission delay between itself and the headset;

[0086] Specifically, the transmission delay is calculated based on the time interval between the time the earphone sends the data packet and the time the mobile phone receives the data packet.

[0087] Step S404: The mobile phone calculates the basic distance between the mobile phone and the earphone;

[0088] Specifically, the basic distance between the mobile phone and the headset is calculated based on the transmission rate and transmission delay, wherein the basic distance is equivalent to the first distance in the above embodiment.

[0089] Step S405: Monitor Bluetooth status changes on the mobile phone;

[0090] Specifically, the mobile phone obtains the channel bandwidth, Bluetooth modulation method, Bluetooth encoding method, and Bluetooth transmission loss of Bluetooth communication by monitoring the Bluetooth status.

[0091] Step S406: The mobile phone calculates the Bluetooth transmission distance influencing factor;

[0092] Specifically, the Bluetooth transmission distance influence factor is calculated based on the channel bandwidth, Bluetooth modulation method, Bluetooth encoding method, and Bluetooth transmission loss obtained in step six.

[0093] Step S407: The mobile phone calculates the actual distance between the mobile phone and the earphone;

[0094] Specifically, when calculating the actual distance between the mobile phone and the earphone, the connection parameters of the earphone are recorded by reporting parameters through the Bluetooth protocol stack, including but not limited to Bluetooth channel bandwidth, Bluetooth modulation method, Bluetooth encoding method, etc.

[0095] The base distance is corrected based on the connection parameters of the headphones, mainly including correcting the carrier number factor of the mobile phone, the signal indirect connection cost factor, the data packet collection range of the headphones, and the base distance is corrected based on the Bluetooth transmission distance influence factor, so as to obtain the actual distance between the mobile phone and the headphones.

[0096] Specifically, the carrier number factor is corrected based on the channel bandwidth, modulation method, and coding method of the headphone connection; the signal indirect line cost factor is corrected based on the number of data packet retransmissions, the real-time transmission distance between the headphone and the mobile phone, and the channel quality factor; and the data packet acquisition range of the headphone is corrected based on the transmission signal-to-noise ratio.

[0097] Step S408: When the actual distance reaches or exceeds the first preset distance threshold, the mobile phone issues a loss warning.

[0098] Specifically, a headphone loss reminder is added to the phone's Bluetooth settings interface. When the actual distance reaches or exceeds threshold 1 (i.e., the first preset distance threshold), the phone issues an alarm.

[0099] Step S409: If the actual distance is less than the second preset distance threshold, the phone will turn off or not enable the loss warning.

[0100] Specifically, a headphone loss reminder is added to the phone's Bluetooth settings interface. When the actual distance is less than threshold 2 (the second preset distance threshold), the phone turns off the alarm notification.

[0101] Through the above embodiments, the basic distance between the Bluetooth device and the mobile phone is determined based on the Bluetooth transmission rate. Then, by combining various factors such as Bluetooth transmission signal-to-noise ratio, Bluetooth mode, Bluetooth protocol version, Bluetooth channel bandwidth, Bluetooth modulation method, and Bluetooth encoding method, the transmission rate is dynamically adjusted to accurately determine the actual distance between the Bluetooth headset and the mobile phone. This method significantly improves the accuracy and precision of loss alerts, and does not require additional hardware support. It has the advantages of high precision and low cost, and can also improve the user experience.

[0102] In one exemplary embodiment, a headphone loss alert can be added to the Bluetooth settings interface of a mobile phone to provide a warning when the user is away from the headphone.

[0103] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.

[0104] This embodiment also provides a device for determining the distance between a wearable device and a terminal. This device is used to implement the above embodiments and preferred embodiments, and details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0105] Figure 5This is a structural block diagram of a device for determining the distance between a wearable device and a terminal according to an embodiment of the present invention, such as... Figure 5 As shown, the device includes: a determination module 510 and a correction module 520.

[0106] The determining module 510 is used to determine the transmission rate of the wearable device and the transmission delay between the terminal and the wearable device, and to determine a first distance based on the transmission rate and the transmission delay.

[0107] The correction module 520 is used to correct the first distance according to the connection parameters of the wearable device, and to determine the corrected first distance as the target distance between the wearable device and the terminal.

[0108] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.

[0109] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.

[0110] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0111] Embodiments of the present invention also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.

[0112] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0113] According to yet another embodiment of the present invention, a computer program product is also provided, comprising a computer program that, when executed by a processor, implements the steps of the methods in various embodiments of the present invention.

[0114] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.

[0115] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

[0116] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention can have various modifications and variations. Any modifications, equivalent substitutions, improvements, etc., made within the principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for determining the distance between a wearable device and a terminal, characterized in that, The method comprises: determining the transmission rate of the wearable device and the transmission delay between the terminal and the wearable device, and determining a first distance according to the transmission rate and the transmission delay; correcting the first distance according to the connection parameters of the wearable device, and determining a target distance between the wearable device and the terminal according to the corrected first distance.

2. The method of claim 1, wherein, The method of determining the transmission rate of the wearable device and the transmission delay between the terminal and the wearable device comprises: receiving the wearing state of the wearable device, wherein the wearing state is determined by a sensor; in the case that the wearing state of the wearable device is an unwearing state, determining the transmission rate of the wearable device and the transmission delay between the terminal and the wearable device.

3. The method of claim 1, wherein, The method of determining the transmission rate of the wearable device and the transmission delay between the terminal and the wearable device comprises: receiving a data packet sent by the wearable device, and determining the data packet quantity and data packet width corresponding to the data packet; determining the transmission rate according to the data packet quantity and the data packet width, and the carrier number and signal interconnection cost of the terminal; determining a first time at which the data packet is sent by the wearable device, and a second time at which the data packet is received, and determining the transmission delay according to the first time and the second time.

4. The method of claim 1, wherein, The method comprises: The connection parameters of the wearable device at least include one of the following: channel bandwidth, modulation mode, coding mode, transmission signal-to-noise ratio, working mode, communication protocol version, transmission loss.

5. The method of claim 4, wherein, The method of correcting the first distance according to the connection parameters of the wearable device comprises: correcting at least one of the following according to the connection parameters: the carrier number of the terminal, the signal interconnection cost, the data packet collection range of the wearable device, and determining a transmission distance influence factor according to the connection parameters; updating the transmission rate according to the corrected carrier number, the corrected signal interconnection cost and the corrected data packet collection range; correcting the first distance according to the updated transmission rate and the transmission distance influence factor.

6. The method of claim 5, wherein, The method of correcting at least one of the following according to the connection parameters: the carrier number of the terminal, the signal interconnection cost, the data packet collection range of the wearable device, and determining a transmission distance influence factor according to the connection parameters comprises: correcting the carrier number of the terminal according to the channel bandwidth, modulation mode and coding mode of the communication between the terminal and the wearable device; correcting the signal interconnection cost according to the number of retransmissions of the data packet monitored in the communication between the terminal and the wearable device, the real-time transmission distance between the wearable device and the terminal and the channel quality factor, wherein the channel quality is determined by the transmission signal-to-noise ratio or the bit error rate; correcting the data packet collection range of the wearable device according to the transmission signal-to-noise ratio in the communication between the terminal and the wearable device; determining the transmission distance influence factor according to the channel bandwidth, coding mode and transmission loss in the communication between the terminal and the wearable device.

7. The method of claim 5, wherein, The method of correcting the data packet collection range of the wearable device according to the transmission signal-to-noise ratio of the wearable device comprises: In a case that a transmission signal-to-noise ratio environment where the wearable device is located is greater than a first transmission signal-to-noise ratio threshold, the data packet collection range is corrected to collect data packets of a classic channel and a low-power single channel; or In a case that the transmission signal-to-noise ratio environment where the wearable device is located is less than a second transmission signal-to-noise ratio threshold, the data packet collection range is corrected to collect data packets in a transmission channel used by the wearable device, wherein the transmission channel used by the wearable device includes the classic channel or the low-power single channel; the first transmission signal-to-noise ratio threshold is greater than the second transmission signal-to-noise ratio threshold.

8. The method of claim 1, wherein, After the corrected first distance is determined as a target distance between the wearable device and the terminal, the method further includes: In a case that the target distance is greater than or equal to a first preset distance threshold, a prompt that the wearable device is at a loss risk or is moving away from the wearable device is turned on; or In a case that the target distance is less than a second preset distance threshold, the loss risk prompt is turned off, and the first preset distance threshold is greater than or equal to the second preset distance threshold.

9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the steps of the method in any one of claims 1 to 8.

10. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 8.