Bluetooth ranging method and device and first terminal equipment
By combining Bluetooth connection and other high-precision ranging methods, the Bluetooth ranging parameters are dynamically updated, which solves the accuracy problems of Bluetooth ranging under the changes in distance between devices and device differences, and realizes high-precision distance measurement in different scenarios.
Patent Information
- Application Number
- CN202310707271.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-14
- Publication Date
- 2024-12-17
AI Technical Summary
The existing Bluetooth ranging schemes have problems with ranging deviation and ranging accuracy caused by the difference in the gain direction of Bluetooth antennas. Especially in the case of changes in distance between devices and differences in device, it is difficult to achieve high-precision ranging.
By establishing a Bluetooth connection between devices, combined with other high-precision ranging methods (such as ultrasonic or infrared ranging), dynamically update Bluetooth ranging parameters, use the received signal strength to indicate the distance between computing devices, reduce ranging deviations and improve accuracy.
In different orientations and scenarios, reduce Bluetooth ranging deviation, improve Bluetooth ranging accuracy, reduce the demand for additional ranging equipment, and reduce power consumption.
Smart Images

Figure CN119155624A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of smart terminal technology, and in particular to a Bluetooth ranging method, apparatus and first terminal device. Background Art
[0002] With the gradual development of distributed operating systems, multi-device collaboration has gradually become a very important part of improving user experience. If the distance between collaborative devices can be perceived in time, it will be more conducive to judging the user's attention to the collaborative devices, allowing developers to design more personalized software programs. In addition, because low-power Bluetooth is widely used in various terminal devices, in most scenarios, if collaboration between devices is required, the communication function of low-power Bluetooth must be used. If the approximate distance between devices can be calculated only by analyzing some inherent parameters of the Bluetooth module, there will be no need to add other ranging devices, thereby minimizing the additional power consumption caused by ranging.
[0003] However, the Bluetooth ranging solutions provided in the existing related technologies have problems of Bluetooth ranging deviation caused by the directional differences in Bluetooth antenna gain, and ranging accuracy caused by changes in the Bluetooth ranging sensitive area and / or differences in Bluetooth devices. Summary of the invention
[0004] The embodiments of the present application provide a Bluetooth ranging method, an apparatus and a first terminal device. The embodiments of the present application also provide a computer-readable storage medium to reduce the Bluetooth ranging deviation and improve the Bluetooth ranging accuracy in different orientations and / or different scenarios.
[0005] In a first aspect, an embodiment of the present application provides a Bluetooth ranging method, including: a first terminal device discovers a second terminal device via Bluetooth, and establishes a Bluetooth connection with the second terminal device; measuring and obtaining the distance between the first terminal device and the second terminal device via other ranging methods; wherein the other ranging methods include other ranging methods other than Bluetooth ranging; receiving a received signal strength indication sent by the second terminal device via the Bluetooth connection; obtaining a current Bluetooth ranging parameter based on the distance between the first terminal device and the second terminal device, and the received signal strength indication; and measuring the distance between the first terminal device and the second terminal device based on the current Bluetooth ranging parameters.
[0006] In one possible implementation, the measuring and obtaining the distance between the first terminal device and the second terminal device by other ranging methods includes: after detecting that the distance between the first terminal device and the second terminal device is greater than or equal to a predetermined threshold, measuring and obtaining the distance between the first terminal device and the second terminal device by other ranging methods.
[0007] In one possible implementation, measuring the distance between the first terminal device and the second terminal device by other ranging methods includes: monitoring whether the other ranging method is executed in the first terminal device; if the other ranging method is executed in the first terminal device, obtaining the distance between the first terminal device and the second terminal device measured by the other ranging method.
[0008] In one possible implementation, measuring the distance between the first terminal device and the second terminal device based on the current Bluetooth ranging parameters includes: broadcasting a ranging instruction; receiving a received signal strength indication sent by the second terminal device via a Bluetooth connection; wherein the received signal strength indication is sent to the first terminal device after the second terminal device scans and receives the ranging instruction; and measuring the distance between the first terminal device and the second terminal device based on the current Bluetooth ranging parameters and the received signal strength indication.
[0009] In a second aspect, an embodiment of the present application provides a first terminal device, which has the function of implementing the first terminal device behavior in the first aspect and the possible implementation of the first aspect. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above functions. For example, an establishment module, a measurement module, a receiving module, and an acquisition module.
[0010] In a third aspect, an embodiment of the present application provides a first terminal device, comprising: one or more processors; a memory; multiple applications; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the first terminal device, enable the first terminal device to perform the following steps: discover a second terminal device via Bluetooth and establish a Bluetooth connection with the second terminal device; measure and obtain the distance between the first terminal device and the second terminal device via other ranging methods; wherein the other ranging methods include other ranging methods other than Bluetooth ranging; receive a received signal strength indication sent by the second terminal device via the Bluetooth connection; obtain current Bluetooth ranging parameters based on the distance between the first terminal device and the second terminal device, and the received signal strength indication; and measure the distance between the first terminal device and the second terminal device based on the current Bluetooth ranging parameters.
[0011] In one possible implementation manner, when the instruction is executed by the first terminal device, the first terminal device executes the step of measuring the distance between the first terminal device and the second terminal device by other ranging methods, including: after detecting that the distance between the first terminal device and the second terminal device is greater than or equal to a predetermined threshold, measuring the distance between the first terminal device and the second terminal device by other ranging methods.
[0012] In one possible implementation manner, when the instruction is executed by the first terminal device, the first terminal device executes the step of measuring the distance between the first terminal device and the second terminal device by using other ranging methods, including: monitoring whether the other ranging method is executed in the first terminal device; if the other ranging method is executed in the first terminal device, obtaining the distance between the first terminal device and the second terminal device measured by the other ranging method.
[0013] In one possible implementation, when the instruction is executed by the first terminal device, the first terminal device executes the step of measuring the distance between the first terminal device and the second terminal device according to the current Bluetooth ranging parameters, including: broadcasting a ranging instruction; receiving a received signal strength indication sent by the second terminal device via a Bluetooth connection; wherein the received signal strength indication is sent to the first terminal device after the second terminal device scans and receives the ranging instruction; and measuring the distance between the first terminal device and the second terminal device according to the current Bluetooth ranging parameters and the received signal strength indication.
[0014] It should be understood that the second and third aspects of the embodiments of the present application are consistent with the technical solutions of the first aspect of the embodiments of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here.
[0015] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer executes the method provided in the first aspect.
[0016] In a fifth aspect, an embodiment of the present application provides a computer program, which, when executed by a computer, is used to execute the method provided in the first aspect.
[0017] In one possible design, the program in the fifth aspect may be stored in whole or in part on a storage medium packaged together with the processor, or may be stored in whole or in part on a memory not packaged together with the processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A schematic diagram of the structure of a terminal device provided in one embodiment of the present application;
[0019] Figure 2 A schematic diagram of the overall process of a Bluetooth ranging method provided by an embodiment of the present application;
[0020] Figure 3(a) to Figure 3(b) A schematic diagram of an application scenario provided for an embodiment of the present application;
[0021] Figure 4 A schematic diagram of a system architecture provided for an embodiment of the present application;
[0022] Figure 5 A flowchart of a Bluetooth distance measurement method provided by an embodiment of the present application;
[0023] Figure 6 A schematic diagram of the structure of a terminal device provided in another embodiment of the present application;
[0024] Figure 7 A schematic diagram of the structure of a terminal device provided in yet another embodiment of the present application. DETAILED DESCRIPTION
[0025] The terms used in the implementation section of this application are only used to explain the specific embodiments of this application and are not intended to limit this application.
[0026] The Bluetooth ranging solutions provided by the existing related technologies may include the following two types, which are introduced below respectively.
[0027] Solution 1:
[0028] A method and system for Bluetooth ranging, the scheme takes into account the fact that Bluetooth signals are affected by multipath, reflection and / or non-line-of-sight during indoor propagation, resulting in fluctuations in Bluetooth signal values, singular values and other problems. The scheme proposes a piecewise fitting ranging model using the least squares method according to the actual environment, and obtains ranging information based on the fitted ranging model and the processed received signal strength indicator (RSSI) value.
[0029] However, this solution is an indoor Bluetooth ranging scenario, where a Bluetooth transmitting node can be set at a certain location direction, so this solution does not consider the Bluetooth ranging deviation caused by the directional difference of Bluetooth antenna transmission. In addition, because this solution is an indoor Bluetooth ranging scenario, the Bluetooth device transmitting source in this solution is in a stationary state, and does not consider the scenario where the transmitting source can be moved.
[0030] Option 2:
[0031] A Bluetooth distance measurement method and system, wherein a Bluetooth device A collects the signal strength value of a Bluetooth device B, and obtains the distance according to a model of the signal strength value and the distance between the Bluetooth device A and the Bluetooth device B, and adds the obtained distance to the actual distance obtained by the step length, thereby realizing distance measurement between the Bluetooth devices; the scheme uses the step length to correct the signal value fluctuation caused by various interferences, thereby realizing more accurate distance measurement.
[0032] However, the ranging algorithm of this solution is in the form of parameter presets, but the Bluetooth antenna gain has a certain directionality, and the distances obtained by inverting the same RSSI in different directions are different, which results in a certain ranging deviation. In addition, the ranging algorithm of this solution is in the form of parameter presets, which is usually more sensitive only to specific areas of interest, and the ranging accuracy for other areas farther or closer will be reduced. Moreover, the ranging algorithm of this solution is in the form of parameter presets, and changes in devices (device differences in transmitting and receiving Bluetooth devices) will affect the difference in transmission and reception, which will have a significant impact on the existing ranging accuracy, and more field tests are needed for differentiated configuration.
[0033] Based on the above problems, the embodiment of the present application provides a Bluetooth ranging method, which can achieve ranging by adding a Bluetooth received signal strength parameter when the device is performing Bluetooth communication, without the need to add additional ranging equipment, thereby improving the Bluetooth ranging accuracy, solving the Bluetooth ranging deviation problem caused by the directional difference of Bluetooth antenna gain in the terminal device, and solving the ranging accuracy problem caused by the change of Bluetooth ranging sensitive area in the terminal device. It can also solve the ranging accuracy problem caused by the difference in transmitting and receiving Bluetooth devices in the terminal device.
[0034] The Bluetooth ranging method provided in the embodiment of the present application can be applied to a terminal device, wherein the terminal device can be a smart phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA) and the like; the embodiment of the present application does not impose any restrictions on the specific type of the terminal device.
[0035] For example, Figure 1 A schematic diagram of the structure of a terminal device provided in one embodiment of the present application is shown in FIG. Figure 1As shown, the terminal device 100 may include a processor 110, 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, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, a space perception sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0036] It is understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0037] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0038] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0039] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0040] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0041] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (DCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the terminal device 100.
[0042] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.
[0043] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0044] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
[0045] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the terminal device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the terminal device 100.
[0046] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0047] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the terminal device 100, and can also be used to transmit data between the terminal device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.
[0048] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0049] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the terminal device 100. While the charging management module 140 is charging the battery 142, it may also power the terminal device 100 through the power management module 141.
[0050] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0051] The wireless communication function of the terminal device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0052] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0053] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the terminal device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0054] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0055] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the terminal device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0056] In some embodiments, the antenna 1 of the terminal device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the terminal device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-CDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0057] The terminal device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
[0058] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode or an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the terminal device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0059] The terminal device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0060] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
[0061] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the terminal device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0062] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the terminal device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0063] Video codecs are used to compress or decompress digital videos. The terminal device 100 may support one or more video codecs. Thus, the terminal device 100 may play or record videos in various coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0064] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of the terminal device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0065] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0066] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the terminal device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the terminal device 100 by running instructions stored in the internal memory 121, and / or instructions stored in a memory provided in the processor.
[0067] The terminal device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0068] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
[0069] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The terminal device 100 can listen to music or listen to a hands-free call through the speaker 170A.
[0070] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals. When the terminal device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the ear.
[0071] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 170C to input the sound signal into the microphone 170C. The terminal device 100 can be provided with at least one microphone 170C. In other embodiments, the terminal device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the terminal device 100 can also be provided with three, four or more microphones 170C to realize the collection of sound signals, noise reduction, identification of sound sources, realization of directional recording function, etc.
[0072] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0073] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The terminal device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the terminal device 100 detects the touch operation intensity according to the pressure sensor 180A. The terminal device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
[0074] The gyroscope sensor 180B can be used to determine the motion posture of the terminal device 100. In some embodiments, the angular velocity of the terminal device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the terminal device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the terminal device 100 through reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenes.
[0075] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the terminal device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
[0076] The magnetic sensor 180D includes a Hall sensor. The terminal device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the terminal device 100 is a flip phone, the terminal device 100 can detect the opening and closing of the flip cover according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover automatic unlocking and other features are set.
[0077] The space perception sensor 180E is used for space perception to realize the positioning of the terminal device 100.
[0078] The distance sensor 180F is used to measure the distance. The terminal device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the terminal device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
[0079] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The terminal device 100 emits infrared light outward through the light emitting diode. The terminal device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the terminal device 100. When insufficient reflected light is detected, the terminal device 100 can determine that there is no object near the terminal device 100. The terminal device 100 can use the proximity light sensor 180G to detect that the user holds the terminal device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode, and pocket mode automatically unlocks and locks the screen.
[0080] The ambient light sensor 180L is used to sense the ambient light brightness. The terminal device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the terminal device 100 is in a pocket to prevent accidental touch.
[0081] The fingerprint sensor 180H is used to collect fingerprints. The terminal device 100 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.
[0082] The temperature sensor 180J is used to detect temperature. In some embodiments, the terminal device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the terminal device 100 reduces the performance of the processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the terminal device 100 heats the battery 142 to avoid abnormal shutdown of the terminal device 100 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the terminal device 100 performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
[0083] The touch sensor 180K is also called a "touch control device". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the terminal device 100, which is different from the position of the display screen 194.
[0084] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of the vocal part of the human body. The bone conduction sensor 180M can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the bone conduction sensor 180M can also be set in an earphone and combined into a bone conduction earphone. The audio module 170 can parse out a voice signal based on the vibration signal of the vibrating bone block of the vocal part obtained by the bone conduction sensor 180M to realize a voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M to realize a heart rate detection function.
[0085] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The terminal device 100 may receive key input and generate key signal input related to user settings and function control of the terminal device 100.
[0086] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0087] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0088] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the terminal device 100 by inserting the SIM card interface 195 or pulling it out from the SIM card interface 195. The terminal device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The terminal device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the terminal device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the terminal device 100 and cannot be separated from the terminal device 100.
[0089] For ease of understanding, the following embodiments of the present application will be described in detail with Figure 1 Taking the terminal device of the shown structure as an example, the Bluetooth ranging method provided in the embodiment of the present application is specifically explained in combination with the accompanying drawings and application scenarios.
[0090] Figure 2 The overall flow diagram of the Bluetooth ranging method provided by one embodiment of the present application is as follows: Figure 2 As shown, the Bluetooth ranging method provided in the embodiment of the present application mainly consists of three parts: Bluetooth ranging main process, active parameter update and passive parameter update.
[0091] See also Figure 2 The main process of Bluetooth distance measurement is used to preset the initial state parameters, perform result calculation, and output the final distance measurement result. At the same time, it is affected by the active parameter update module and the passive parameter update module to dynamically update the Bluetooth distance measurement parameters to improve the final Bluetooth distance measurement accuracy.
[0092] Active parameter update: when the terminal device moves a long distance, it actively triggers other ranging methods (such as ultrasonic ranging or other high-precision ranging methods) to perform parameter calibration to update the current Bluetooth ranging parameters and improve ranging accuracy.
[0093] Passive parameter update: when other ranging methods are found to be executed in the terminal device, the current Bluetooth ranging parameters are updated to improve the Bluetooth ranging accuracy.
[0094] In the embodiment of the present application, other ranging methods may be ranging methods other than Bluetooth ranging, such as ultrasonic ranging and / or infrared ranging, etc. The ranging accuracy of the above other ranging methods is generally higher than that of Bluetooth ranging.
[0095] The Bluetooth ranging method provided in the embodiment of the present application can be applied in the application scenario of spatial multi-device collaboration. While Bluetooth is communicating normally, additional ranging capabilities are provided to identify the approximate distance between devices. At the same time, parameters can be dynamically updated according to changes in orientation and scene, so as to better analyze the device collaboration status.
[0096] Figure 3(a) to Figure 3(b) A schematic diagram of an application scenario provided by an embodiment of the present application. As shown in FIG3(a), the Bluetooth distance measurement method provided by the embodiment of the present application can be applied between a tablet computer, a smart watch and a smart phone to analyze the distance between any two of them. For example, a tablet computer can execute the Bluetooth distance measurement method provided by the embodiment of the present application to analyze the distance between the tablet computer and the smart watch, and between the tablet computer and the smart phone.
[0097] As shown in Figure 3(b), the Bluetooth ranging method provided in the embodiment of the present application can also be applied to scenarios where the distance between a tablet computer and a smart phone changes. When the tablet computer and the smart phone move closer or farther away, the tablet computer and / or the smart phone can use the Bluetooth ranging method provided in the embodiment of the present application to determine the distance between the tablet computer and the smart phone.
[0098] Of course, the above are only two examples of application scenarios of the embodiments of the present application. The application scenarios of the embodiments of the present application are not limited to these. Any scenario using Bluetooth for ranging can use the Bluetooth ranging method provided by the embodiments of the present application.
[0099] Figure 4 A schematic diagram of a system architecture provided for an embodiment of the present application, Figure 4 The system architecture shown includes a first terminal device and a second terminal device. The first terminal device and the second terminal device can be Figure 1 The terminal device of the structure shown in the figure is Figure 1 As can be seen from the structure shown, the first terminal device and the second terminal device have built-in sensor devices (for example, space perception sensor 180E) and low-power Bluetooth devices. The low-power Bluetooth devices include a Bluetooth interface and a Bluetooth chip, which can be set in Figure 1 In the wireless communication module 160 shown.
[0100] See also Figure 4 In summary, the Bluetooth distance measurement method provided in the embodiment of the present application may include:
[0101] Step 1: The first terminal device performs Bluetooth discovery through a Bluetooth chip to discover the second terminal device.
[0102] Step 2: The space perception sensor in the first terminal device broadcasts the ranging instruction through the Bluetooth interface, and the Bluetooth chip in the second terminal device scans and receives the broadcast ranging instruction, and transmits the broadcast ranging instruction to the space perception sensor in the second terminal device through the Bluetooth interface.
[0103] Step 3: The space perception sensors in the first terminal device and the second terminal device cooperate to perform ranging through the soft bus. During the ranging process, the space perception sensor in the first terminal device can update the currently used Bluetooth ranging parameters through active parameter updates and / or passive parameter updates, thereby improving the Bluetooth ranging accuracy.
[0104] The Bluetooth distance measurement method provided in the embodiment of the present application is described in detail below.
[0105] Figure 5 A flowchart of a Bluetooth distance measurement method provided by an embodiment of the present application is shown in FIG. Figure 5 As shown, the above Bluetooth distance measurement method may include:
[0106] Step 501: A first terminal device discovers a second terminal device via Bluetooth and establishes a Bluetooth connection with the second terminal device.
[0107] Specifically, when the Bluetooth switches in the first terminal device and the second terminal device are both turned on, the first terminal device can discover the second terminal device via Bluetooth, and then establish a Bluetooth connection with the second terminal device.
[0108] Step 502: Measure and obtain the distance between the first terminal device and the second terminal device by other distance measurement methods.
[0109] Among them, the above-mentioned other ranging methods may include other ranging methods besides Bluetooth ranging, such as ultrasonic ranging or infrared ranging, etc. In this embodiment, the ranging accuracy of the above-mentioned other ranging methods is higher than the accuracy of Bluetooth ranging.
[0110] In one implementation, the distance between the first terminal device and the second terminal device is measured by other ranging methods as follows: after detecting that the distance between the first terminal device and the second terminal device is greater than or equal to a predetermined threshold, the distance between the first terminal device and the second terminal device is measured by other ranging methods. The predetermined threshold can be set by the user according to system performance and / or implementation requirements during specific implementation, and the present embodiment does not limit the size of the predetermined threshold. That is, when the first terminal device finds that itself or the second terminal device has moved a long distance, so that the distance between the first terminal device and the second terminal device is greater than or equal to the predetermined threshold, other ranging methods (for example, ultrasonic ranging) can be actively triggered to measure the distance between the first terminal device and the second terminal device.
[0111] In another implementation, measuring the distance between the first terminal device and the second terminal device through other ranging methods can be: monitoring whether other ranging methods are executed in the first terminal device; if other ranging methods are executed in the first terminal device, obtaining the distance between the first terminal device and the second terminal device measured by the above-mentioned other ranging methods.
[0112] Step 503: The first terminal device receives a received signal strength indication sent by the second terminal device via a Bluetooth connection.
[0113] Step 504: The first terminal device obtains current Bluetooth ranging parameters according to the distance between the first terminal device and the second terminal device and the above-mentioned received signal strength indication.
[0114] Specifically, the Bluetooth distance measurement method generally adopts the distance measurement formula shown in formula (1) to obtain the distance between terminal devices:
[0115]
[0116] In formula (1), d is the distance between the first terminal device and the second terminal device, and RSSI is the received signal strength indicator. A is a Bluetooth ranging parameter, and the RSSI value at a specific distance is generally used for experimental fitting, which is usually affected by the differences in the orientation between devices, the distance between devices, and the transceiver components, resulting in a large ranging error. In step 502 of this embodiment, the first terminal device can measure the distance between the first terminal device and the second terminal device by other ranging methods through active triggering or passive monitoring, and then in step 503, the first terminal device receives the RSSI sent by the second terminal device. In this way, in step 504, the first terminal device can use formula (1) to obtain the Bluetooth ranging parameter A as the current Bluetooth ranging parameter, and then use the current Bluetooth ranging parameter to measure the distance between the first terminal device and the second terminal device, so as to obtain a better ranging result.
[0117] Step 505: The first terminal device measures the distance between the first terminal device and the second terminal device according to the current Bluetooth ranging parameters.
[0118] Specifically, according to the current Bluetooth ranging parameters, the distance between the first terminal device and the second terminal device can be measured as follows: the first terminal device broadcasts a ranging instruction and receives a received signal strength indication sent by the second terminal device through a Bluetooth connection; wherein the received signal strength indication is sent to the first terminal device after the second terminal device scans and receives the ranging instruction. The first terminal device measures the distance between the first terminal device and the second terminal device according to the current Bluetooth ranging parameters and the received signal strength indication. Here, the first terminal device can measure the distance between the first terminal device and the second terminal device according to the current Bluetooth ranging parameters and the received signal strength indication using formula (1).
[0119] In the above-mentioned Bluetooth ranging method, the first terminal device discovers the second terminal device through Bluetooth, establishes a Bluetooth connection with the second terminal device, and then measures the distance between the first terminal device and the second terminal device through other ranging methods. Then the first terminal device receives the received signal strength indication sent by the second terminal device through the Bluetooth connection, and obtains the current Bluetooth ranging parameters according to the distance between the first terminal device and the second terminal device, as well as the above-mentioned received signal strength indication, so as to determine the current Bluetooth ranging parameters. Finally, the first terminal device measures the distance between the first terminal device and the second terminal device according to the current Bluetooth ranging parameters, so as to reduce the Bluetooth ranging deviation and improve the Bluetooth ranging accuracy in different orientations and / or different scenarios, and more accurately measure the distance between the terminal devices.
[0120] It is to be understood that some or all of the steps or operations in the above embodiments are merely examples, and the present application embodiments may also perform other operations or variations of various operations. In addition, the various steps may be performed in different orders presented in the above embodiments, and it is possible that not all of the operations in the above embodiments need to be performed.
[0121] It is understandable that, in order to implement the above functions, the terminal device includes hardware and / or software modules corresponding to the execution of each function. In combination with the algorithm steps of each example described in the embodiments disclosed in this application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to be beyond the scope of this application.
[0122] This embodiment can divide the terminal device into functional modules according to the above method embodiment. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0123] Figure 6 This is a schematic diagram of the structure of a terminal device provided in another embodiment of the present application. The terminal device in this embodiment may be a first terminal device. In the case of dividing each functional module into corresponding functional modules, Figure 6 A possible schematic diagram of the composition of the terminal device 600 involved in the above embodiment is shown. Figure 6 As shown, the terminal device 600 may include: an establishment module 601, a measurement module 602, a receiving module 603 and an acquisition module 604;
[0124] The establishing module 601 is used to discover the second terminal device via Bluetooth and establish a Bluetooth connection with the second terminal device;
[0125] The measuring module 602 is used to measure and obtain the distance between the first terminal device and the second terminal device by other distance measurement methods; wherein the other distance measurement methods include other distance measurement methods except Bluetooth distance measurement;
[0126] The receiving module 603 is used to receive a received signal strength indication sent by the second terminal device via the Bluetooth connection;
[0127] The obtaining module 604 is used to obtain the current Bluetooth ranging parameter according to the distance between the first terminal device and the second terminal device and the above-mentioned received signal strength indication;
[0128] The measuring module 602 is further configured to measure the distance between the first terminal device and the second terminal device according to the current Bluetooth ranging parameters.
[0129] It should be noted that this application Figure 5 All relevant contents of each step involved in the illustrated method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.
[0130] The terminal device 600 provided in this embodiment is used to execute the above-mentioned Bluetooth ranging method, and thus can achieve the same effect as the above-mentioned method.
[0131] Figure 7 A schematic diagram of a terminal device provided in another embodiment of the present application, Figure 6Compared with the terminal device shown in the figure, the difference is that in the terminal device 600 of this embodiment, the measurement module 602 is specifically used to measure the distance between the first terminal device and the second terminal device by other ranging methods after detecting that the distance between the first terminal device and the second terminal device is greater than or equal to a predetermined threshold.
[0132] Furthermore, the terminal device 600 may further include: a monitoring module 605;
[0133] A monitoring module 605 is used to monitor whether the other ranging method is executed in the first terminal device;
[0134] The measuring module 602 is specifically configured to obtain the distance between the first terminal device and the second terminal device measured by other ranging methods when other ranging methods are executed in the first terminal device.
[0135] Furthermore, the terminal device 600 may further include: a broadcast module 606;
[0136] A broadcast module 606, used for broadcasting a ranging instruction;
[0137] The receiving module 603 is used to receive a received signal strength indication sent by the second terminal device through the Bluetooth connection; wherein the received signal strength indication is sent to the first terminal device after the second terminal device scans and receives the ranging instruction;
[0138] The measuring module 602 is specifically configured to measure the distance between the first terminal device and the second terminal device according to the current Bluetooth ranging parameters and the above-mentioned received signal strength indication.
[0139] It should be noted that this application Figure 5 All relevant contents of each step involved in the illustrated method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.
[0140] The terminal device 600 provided in this embodiment is used to execute the above-mentioned Bluetooth ranging method, and thus can achieve the same effect as the above-mentioned method.
[0141] It should be understood that the terminal device 600 may correspond to Figure 1 The functions of the establishment module 601, the measurement module 602, the receiving module 603, the acquisition module 604, the monitoring module 605 and the broadcasting module 606 can be Figure 1 The processor 110, antenna 2 and wireless communication module 160 in the terminal device 100 are implemented.
[0142] In the case of adopting an integrated unit, the terminal device 600 may include a processing module, a storage module and a communication module.
[0143] The processing module can be used to control and manage the actions of the terminal device 600, for example, it can be used to support the terminal device 600 to execute the steps executed by the establishment module 601, the measurement module 602, the receiving module 603, the acquisition module 604, the monitoring module 605 and the broadcasting module 606. The storage module can be used to support the terminal device 600 to store program codes and data, etc. The communication module can be used to support the communication between the terminal device 600 and other devices.
[0144] Among them, the processing module can be a processor or a controller, which can implement or execute various exemplary logic boxes, modules and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and so on. The storage module can be a memory. The communication module can specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip and / or a Wi-Fi chip.
[0145] In one embodiment, when the processing module is a processor and the storage module is a memory, the terminal device 600 involved in this embodiment can be a Figure 1 Device of the structure shown.
[0146] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer executes the present application. Figure 5 The method provided by the illustrated embodiment.
[0147] The present application also provides a computer program product, which includes a computer program, which, when executed on a computer, enables the computer to execute the present application. Figure 5 The method provided by the illustrated embodiment.
[0148] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.
[0149] Those of ordinary skill in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0150] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0151] In several embodiments provided in the present application, any function can be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as an independent product. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence or in other words, the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0152] The above is only a specific implementation of the present application. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. The protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A Bluetooth distance measurement method, characterized in that: include: The first terminal device discovers the second terminal device via Bluetooth, and establishes a Bluetooth connection with the second terminal device; The distance between the first terminal device and the second terminal device is measured and obtained by other distance measurement methods; wherein the other distance measurement methods include other distance measurement methods except Bluetooth distance measurement; Receiving a received signal strength indication sent by the second terminal device via a Bluetooth connection; Obtaining current Bluetooth ranging parameters according to the distance between the first terminal device and the second terminal device and the received signal strength indication; The distance between the first terminal device and the second terminal device is measured according to the current Bluetooth ranging parameters.
2. The method according to claim 1, characterized in that The measuring and obtaining the distance between the first terminal device and the second terminal device by using another distance measurement method includes: After detecting that the distance between the first terminal device and the second terminal device is greater than or equal to a predetermined threshold, the distance between the first terminal device and the second terminal device is measured and obtained by using other ranging methods.
3. The method according to claim 1, characterized in that The measuring and obtaining the distance between the first terminal device and the second terminal device by using another distance measurement method includes: Monitoring whether the other ranging method is executed in the first terminal device; If the other ranging method is executed in the first terminal device, the distance between the first terminal device and the second terminal device measured by the other ranging method is obtained.
4. The method according to any one of claims 1 to 3, characterized in that: The measuring the distance between the first terminal device and the second terminal device according to the current Bluetooth ranging parameter includes: Broadcast ranging instructions; Receiving a received signal strength indication sent by the second terminal device through a Bluetooth connection; wherein the received signal strength indication is sent to the first terminal device after the second terminal device scans and receives the ranging instruction; The distance between the first terminal device and the second terminal device is measured according to the current Bluetooth ranging parameters and the received signal strength indication.
5. A first terminal device, characterized in that: include: An establishing module, used to discover a second terminal device via Bluetooth and establish a Bluetooth connection with the second terminal device; A measuring module, configured to measure and obtain the distance between the first terminal device and the second terminal device by other distance measurement methods; wherein the other distance measurement methods include other distance measurement methods except Bluetooth distance measurement; A receiving module, used to receive a received signal strength indication sent by the second terminal device via a Bluetooth connection; An obtaining module, configured to obtain a current Bluetooth ranging parameter according to the distance between the first terminal device and the second terminal device and the received signal strength indication; The measuring module is further used to measure the distance between the first terminal device and the second terminal device according to the current Bluetooth ranging parameters.
6. A first terminal device, characterized in that: include: one or more processors; Memory; Multiple applications; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, and when the instructions are executed by the first terminal device, the first terminal device performs the following steps: discovering a second terminal device via Bluetooth, and establishing a Bluetooth connection with the second terminal device; The distance between the first terminal device and the second terminal device is measured and obtained by other distance measurement methods; wherein the other distance measurement methods include other distance measurement methods except Bluetooth distance measurement; Receiving a received signal strength indication sent by the second terminal device via a Bluetooth connection; Obtaining current Bluetooth ranging parameters according to the distance between the first terminal device and the second terminal device and the received signal strength indication; The distance between the first terminal device and the second terminal device is measured according to the current Bluetooth ranging parameters.
7. The first terminal device according to claim 6, characterized in that: When the instruction is executed by the first terminal device, the first terminal device performs the step of measuring and obtaining the distance between the first terminal device and the second terminal device by using another distance measurement method, which includes: After detecting that the distance between the first terminal device and the second terminal device is greater than or equal to a predetermined threshold, the distance between the first terminal device and the second terminal device is measured and obtained by using other ranging methods.
8. The first terminal device according to claim 6, characterized in that: When the instruction is executed by the first terminal device, the first terminal device performs the step of measuring and obtaining the distance between the first terminal device and the second terminal device by using another distance measurement method, which includes: Monitoring whether the other ranging method is executed in the first terminal device; If the other ranging method is executed in the first terminal device, the distance between the first terminal device and the second terminal device measured by the other ranging method is obtained.
9. The first terminal device according to any one of claims 6 to 8, characterized in that: When the instruction is executed by the first terminal device, the first terminal device executes the step of measuring the distance between the first terminal device and the second terminal device according to the current Bluetooth ranging parameters, including: Broadcast ranging instructions; Receiving a received signal strength indication sent by the second terminal device through a Bluetooth connection; wherein the received signal strength indication is sent to the first terminal device after the second terminal device scans and receives the ranging instruction; The distance between the first terminal device and the second terminal device is measured according to the current Bluetooth ranging parameters and the received signal strength indication.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed on a computer, enables the computer to execute the method according to any one of claims 1 to 4.
