CN115884080A - Distance measuring method based on Bluetooth, terminal device and storage medium - Google Patents

Distance measuring method based on Bluetooth, terminal device and storage medium Download PDF

Info

Publication number
CN115884080A
CN115884080A CN202211521382.3A CN202211521382A CN115884080A CN 115884080 A CN115884080 A CN 115884080A CN 202211521382 A CN202211521382 A CN 202211521382A CN 115884080 A CN115884080 A CN 115884080A
Authority
CN
China
Prior art keywords
bluetooth
terminal device
terminal equipment
bluetooth signal
scanning frequency
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211521382.3A
Other languages
Chinese (zh)
Inventor
唐礼伟
周玮
赵洋阳
易青青
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Kaihong Digital Industry Development Co Ltd
Original Assignee
Shenzhen Kaihong Digital Industry Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Kaihong Digital Industry Development Co Ltd filed Critical Shenzhen Kaihong Digital Industry Development Co Ltd
Priority to CN202211521382.3A priority Critical patent/CN115884080A/en
Publication of CN115884080A publication Critical patent/CN115884080A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Radar Systems Or Details Thereof (AREA)

Abstract

The application relates to the field of intelligent equipment, and provides a distance measuring method, a distance measuring device, distance measuring equipment and a computer storage medium based on Bluetooth, wherein the method comprises the following steps of: acquiring a Bluetooth signal sent by second terminal equipment, and determining motion information of the second terminal equipment according to the Bluetooth signal; adjusting the scanning frequency for scanning the Bluetooth signal according to the motion information of the second terminal device, and scanning the Bluetooth signal sent by the second terminal device based on the adjusted scanning frequency; based on a preset distance measurement model, the distance between the second terminal device and the first terminal device is determined according to the signal intensity of the scanned Bluetooth signal, and the precision of distance measurement based on the Bluetooth signal can be improved.

Description

Distance measuring method based on Bluetooth, terminal device and storage medium
Technical Field
The present application relates to the field of smart devices, and in particular, to a distance measuring method based on bluetooth, a terminal device, and a storage medium.
Background
With the continuous development of bluetooth technology, bluetooth devices are used more and more frequently in life. The method for measuring the distance between the sender and the receiver of the Bluetooth signal through the signal intensity of the Bluetooth has the advantages of low power consumption, small error and the like, and is widely applied. However, the method of ranging based on bluetooth signal in the prior art has a large error when measuring the distance to the moving object.
Disclosure of Invention
The present application is directed to a distance measuring method based on bluetooth, a terminal device and a computer storage medium, and aims to improve the accuracy of distance measurement based on bluetooth signals.
In a first aspect, the present application provides a bluetooth-based distance measurement method applied to a first terminal device, including the steps of:
the method comprises the steps of obtaining a Bluetooth signal sent by second terminal equipment, and determining motion information of the second terminal equipment according to the Bluetooth signal;
adjusting the scanning frequency for scanning the Bluetooth signal according to the motion information of the second terminal device, and scanning the Bluetooth signal sent by the second terminal device based on the adjusted scanning frequency;
and determining the distance between the second terminal equipment and the first terminal equipment according to the signal intensity of the scanned Bluetooth signal based on a preset ranging model.
In a second aspect, the present application provides a bluetooth-based distance measurement method, comprising the steps of:
and broadcasting and sending the Bluetooth signal so that the first terminal equipment adjusts the scanning frequency according to the motion information in the Bluetooth signal, and determining the distance to the second terminal equipment based on the adjusted scanning frequency.
In a third aspect, the present application further provides a terminal device comprising a processor, a memory, and a computer program stored on the memory and executable by the processor, wherein the computer program, when executed by the processor, implements the steps of the bluetooth-based distance measurement method as described in any one of the above.
In a fourth aspect, the present application further provides a computer readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the bluetooth based distance measurement method as described in any one of the above.
The application provides a distance measuring method based on Bluetooth, a terminal device and a computer storage medium, wherein the method comprises the steps of obtaining a Bluetooth signal sent by a second terminal device, and determining motion information of the second terminal device according to the Bluetooth signal; adjusting the scanning frequency for scanning the Bluetooth signal according to the motion information of the second terminal device, and scanning the Bluetooth signal sent by the second terminal device based on the adjusted scanning frequency; and determining the distance between the second terminal equipment and the first terminal equipment according to the signal intensity of the scanned Bluetooth signal based on a preset ranging model. Because the first terminal equipment can adjust the scanning frequency according to the motion information of the second terminal equipment, the accuracy of distance measurement based on the Bluetooth signal is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a bluetooth-based distance measurement method according to an embodiment of the present application;
fig. 2 is a usage scenario diagram of a bluetooth-based distance measurement method according to an embodiment of the present application;
FIG. 3 is a flow chart illustrating sub-steps of a method for determining distance based on Bluetooth according to an embodiment of the present application;
FIG. 4 is a flow chart illustrating sub-steps of a Bluetooth-based distance measurement method according to an embodiment of the present application;
fig. 5 is a block diagram illustrating a structure of a terminal device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
The flowcharts shown in the figures are illustrative only and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
The embodiment of the application provides a distance measuring method based on Bluetooth, terminal equipment and a storage medium.
Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The embodiments and features of the embodiments described below can be combined with each other without conflict.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating a bluetooth-based distance measurement method according to an embodiment of the present disclosure. The distance measuring method based on the Bluetooth can be used in the terminal equipment to measure the distance between the first terminal equipment and the second terminal equipment through the first terminal equipment. The terminal can be an electronic device with a Bluetooth function, such as a mobile phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant and a wearable device.
Referring to fig. 2, fig. 2 is a usage scenario diagram according to an embodiment of the present application. As shown in fig. 2, the second terminal device broadcasts and sends a bluetooth signal, the bluetooth signal of the second terminal device carries motion information, the first terminal device adjusts the scanning frequency according to the motion information of the second terminal device carried in the received bluetooth signal, scans the bluetooth signal according to the adjusted scanning frequency, and determines the distance between the bluetooth signal and the second terminal device.
As shown in fig. 1, the bluetooth-based distance measurement method includes steps S101 to S103.
Step S101, obtaining a Bluetooth signal sent by second terminal equipment, and determining motion information of the second terminal equipment according to the Bluetooth signal.
For example, the first terminal device may be a ranging device for ranging the second terminal device, and the second terminal device may be a target device in a moving state.
Illustratively, the first terminal device and the second terminal device each include a bluetooth module, for example, the first terminal device includes a module for receiving bluetooth signals, and the second terminal device includes a module for broadcasting bluetooth signals.
For example, when a first terminal device measures a distance of a moving second terminal device through a bluetooth signal, if a scanning frequency of the bluetooth signal by the first terminal device is a constant value, the first terminal device will scan a bluetooth signal stronger than that in a stationary state at the same distance when the second terminal device moves close to the first terminal device; similarly, if the scanning frequency of the bluetooth signal by the first terminal device is a constant value, the first terminal device will scan a bluetooth signal weaker than that in the same distance stationary state when the second terminal device moves away from the first terminal device. Therefore, it is necessary to acquire the motion information in the bluetooth signal sent by the second terminal device, so as to adjust the scanning frequency of the bluetooth signal by the first terminal device according to the motion information, thereby improving the flexibility and accuracy of distance measurement based on the bluetooth signal.
In some embodiments, the obtaining a bluetooth signal sent by a second terminal device, and determining motion information of the second terminal device according to the bluetooth signal includes: and acquiring the Bluetooth signal sent by the second terminal equipment, and determining the motion information of the second terminal equipment according to the data packet carried by the Bluetooth signal.
For example, the second terminal device may obtain its own motion information through a preset motion sensor, and then carry a data packet including the motion information in a bluetooth signal for broadcast transmission. In this way, the first terminal device can determine the motion information of the second terminal device by parsing the data packet in the bluetooth signal of the second terminal device.
For example, the first terminal device may also obtain the motion information of the second terminal device in other manners, for example, by comparing signal strengths of bluetooth signals obtained at adjacent times. For example, if the signal strength of the bluetooth signal acquired at the adjacent time is enhanced, it is indicated that the second terminal device moves close to the first terminal device; conversely, if the signal strength of the bluetooth signal acquired at the adjacent time is weakened, it is indicated that the second terminal device moves away from the first terminal device.
Certainly, the motion information of the second terminal device may also be obtained by other ways, which is not limited herein.
Step S102, according to the motion information of the second terminal device, adjusting the scanning frequency for scanning the Bluetooth signal, and based on the adjusted scanning frequency, scanning the Bluetooth signal sent by the second terminal device.
For example, in order to adapt the scanned bluetooth signal to the motion situation of the second terminal device and improve the flexibility and accuracy of distance measurement based on the bluetooth signal, the scanning frequency of the first terminal device needs to be adjusted according to the motion information of the second terminal device.
Referring to fig. 3, fig. 3 is a flowchart illustrating sub-steps of a bluetooth-based distance measurement method according to an embodiment of the present application.
As shown in fig. 3, the step S102 of adjusting the scanning frequency for scanning the bluetooth signal according to the motion information of the second terminal device includes: step S1021, determining the relative movement direction of the second terminal device relative to the first terminal device according to the movement direction of the second terminal device; step S1022, adjusting a scanning frequency for scanning the bluetooth signal according to the relative movement direction.
Illustratively, the motion information includes a motion direction of the second terminal device. Specifically, the second terminal device can acquire its own movement direction through a preset sensor, for example, a preset MEMS gyroscope.
For example, if the first terminal device is in a stationary state, the relative movement direction of the second terminal device with respect to the first terminal device may be determined according to the movement direction of the second terminal device and the position of the first terminal device.
For example, if the first terminal device is also in a moving state, the relative moving direction of the second terminal device with respect to the first terminal device may be determined according to the speed direction and the speed magnitude of the first terminal device and the speed direction and the speed magnitude of the second terminal device. The method for determining the relative movement direction is not described herein.
In some embodiments, said adjusting a scanning frequency of scanning for said bluetooth signal according to said relative motion direction comprises: if the relative movement direction is close to the first terminal equipment, reducing the scanning frequency; and if the relative movement direction is the direction far away from the first terminal equipment, increasing the scanning frequency.
Illustratively, in order to prevent the distance measured by the first terminal device from the second terminal device from being larger than the actual distance when the second terminal device moves close to the first terminal device; or under the condition that the second terminal device moves away from the first terminal device, the distance between the first terminal device and the second terminal device measured by the first terminal device is smaller than the actual distance, and when the relative movement direction of the second terminal device is close to the first terminal device, the scanning frequency is reduced; and increasing the scanning frequency when the relative movement direction of the second terminal equipment is a direction far away from the first terminal equipment.
In some embodiments, said adjusting a scanning frequency of scanning for said bluetooth signal according to said relative motion direction comprises: if the moving direction of the second terminal equipment is close to the first terminal equipment, reducing the scanning frequency according to the speed of the second terminal equipment; wherein the sweep frequency and the velocity magnitude are inversely related; if the moving direction of the second terminal equipment is a direction far away from the first terminal equipment, increasing the scanning frequency according to the speed of the second terminal equipment; wherein the scanning frequency and the velocity magnitude are positively correlated.
Illustratively, the scanning frequency can also be adjusted according to the speed of the second terminal device approaching or departing from the second terminal device. Specifically, a gradient mapping relationship between the speed and the scanning frequency in different relative movement directions is preset, and the scanning frequency corresponding to the movement condition of the second terminal device is determined according to the movement direction and the speed in the movement information of the second terminal device.
Illustratively, when the second terminal device moves close to the first terminal device, the larger the speed of the second terminal device, the smaller the scanning frequency of the first terminal device; conversely, when the second terminal device moves closer to the first terminal device, the greater the velocity magnitude of the second terminal device, the greater the scanning frequency of the first terminal device.
Step S103, based on a preset ranging model, determining the distance between the second terminal device and the first terminal device according to the signal intensity of the scanned Bluetooth signal.
For example, the distance between the second terminal device and the first terminal device may be determined according to the signal strength of the scanned bluetooth signal based on the following relationship between the signal strength and the distance:
Figure BDA0003973941610000061
wherein, a is the signal intensity at a preset distance, and the preset distance may be, for example, 1 meter; n is the environmental attenuation factor corresponding to the current environment, and can be adjusted according to factors such as the environmental temperature and the propagation medium. Under the condition that a and n are determined, the distance d between the first terminal device and the second terminal device may be determined according to the received strength RSSI (d) of the bluetooth signal, which is not described herein again.
For example, in a practical situation, the intensity of the bluetooth signal scanned by the first terminal device may fluctuate due to the influence in the environment, and the intensity of the bluetooth signal received by the first terminal device obeys a gaussian distribution within a preset time period. Therefore, the size of the bluetooth signal within the preset time period can be filtered through the gaussian filtering algorithm.
Referring to fig. 4, fig. 4 is a flow chart illustrating sub-steps of a bluetooth-based distance measurement method according to an embodiment of the present application.
As shown in fig. 4, in some embodiments, the step S103 of determining a distance between the second terminal device and the first terminal device according to the signal strength of the scanned bluetooth signal based on a preset ranging model includes: step S1031, if the number of the Bluetooth signals scanned within the preset time is within a preset range, based on a preset weighted average algorithm, carrying out weighted average on the signal intensity of the Bluetooth signals scanned within the preset time to obtain a target signal intensity; step S1032, based on the ranging model, determining the distance of the second terminal device according to the target signal strength.
For example, for a second terminal with a higher moving speed, the distance from the first terminal may also vary greatly, and the distance determined by the bluetooth signal strength may have a larger error. Therefore, if the number of the scanned bluetooth signals in the preset time is within the preset range, which indicates that the moving speed of the second terminal is within the preset speed range, the error of the distance determined by the strength of the bluetooth signals is also within an acceptable range.
Specifically, the preset time and the preset range may be determined according to actual requirements, for example, if the number of the scanned bluetooth signals in 1 second is in a range of 3 to 8, the target signal strength is determined according to a preset weighted average algorithm, which is certainly not limited thereto, and the preset time and the preset range may also be other values, which is not limited herein.
For example, for a second terminal in motion, since the distance between the second terminal and the first terminal may change in motion, the signal strength of the newly scanned bluetooth signal among the plurality of bluetooth signals scanned within the preset time is more reflective of the distance between the second terminal and the first terminal than the originally scanned bluetooth signal. Therefore, based on a preset weighted average algorithm, the signal intensity of the scanned Bluetooth signal within the preset time is weighted and averaged to obtain the target signal intensity.
Specifically, the weights corresponding to the signal strengths of the plurality of bluetooth signals are incremented over time. For example, if 3 bluetooth signals are scanned within 1 second, the weights corresponding to the signal strengths of the 3 bluetooth signals may be 0.1, 0.2, and 0.7, respectively, but are not limited thereto, and the above numerical values are only used for illustrating the embodiments of the present application, and are not limited thereto.
Exemplarily, the distance between the second terminal and the first terminal is determined based on the ranging model according to the target signal strength obtained by weighted averaging, so that the characteristics of a moving object are better met, and the reasonability and the accuracy of Bluetooth ranging are improved.
Illustratively, for the second terminal device, the method comprises: and broadcasting and sending the Bluetooth signal so that the first terminal equipment adjusts the scanning frequency according to the motion information in the Bluetooth signal, and determining the distance to the second terminal equipment based on the adjusted scanning frequency.
Illustratively, the second terminal device sends the bluetooth signal carrying the motion information to the surrounding environment by broadcasting, so that the first terminal device receiving the bluetooth signal can adjust the scanning frequency according to the motion information in the bluetooth signal, scan the bluetooth signal broadcasted by the second terminal device based on the adjusted scanning frequency, and determine the distance between the second terminal device and the first terminal device.
In some embodiments, the broadcasting transmits a bluetooth signal so that the first terminal device adjusts a scanning frequency according to motion information in the bluetooth signal, including: acquiring the motion information based on a preset motion sensor, wherein the motion information comprises the motion direction of the second terminal device; and broadcasting and sending a Bluetooth data packet based on a low-power Bluetooth protocol, wherein the Bluetooth data packet at least comprises the motion information.
For example, the second terminal device can acquire the motion direction of the second terminal device through a preset MEMS gyroscope, and then carry the detected motion information in a bluetooth signal in the form of a bluetooth data packet for broadcast transmission.
Exemplarily, the bluetooth data packet is broadcast and transmitted based on the bluetooth low energy protocol, so that the power consumption of the second terminal device for broadcasting and transmitting the bluetooth signal is reduced, and the user experience is improved.
According to the distance measuring method based on the Bluetooth, the movement information of the second terminal equipment is determined according to the Bluetooth signal by acquiring the Bluetooth signal sent by the second terminal equipment; adjusting the scanning frequency for scanning the Bluetooth signal according to the motion information of the second terminal device, and scanning the Bluetooth signal sent by the second terminal device based on the adjusted scanning frequency; based on a preset ranging model, the distance between the second terminal device and the first terminal device is determined according to the signal intensity of the scanned Bluetooth signal, and the distance measurement precision of the second terminal device in a motion state based on the Bluetooth signal is improved.
As shown in fig. 5, the terminal device includes a processor, a memory and a network interface connected by a system bus, wherein the memory may include a storage medium and an internal memory.
The storage medium may store an operating system and a computer program. The computer program includes program instructions that, when executed, cause a processor to perform any one of the wireless communication function testing methods.
The processor is used to provide computing and control capabilities to support the operation of the entire computer device.
The internal memory provides an environment for the execution of a computer program on a storage medium, which, when executed by the processor, causes the processor to perform any one of the wireless communication function testing methods.
The network interface is used for network communication, such as sending assigned tasks. It will be appreciated by those skilled in the art that the configuration shown in fig. 5 is a block diagram of only a portion of the configuration associated with the present application, and is not intended to limit the computing device to which the present application may be applied, and that a particular computing device may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
It should be understood that the Processor may be a Central Processing Unit (CPU), and the Processor may be other general purpose processors, digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, etc. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Wherein, in one embodiment, the processor is configured to execute the computer program stored in the memory to perform the steps of:
the method comprises the steps of obtaining a Bluetooth signal sent by second terminal equipment, and determining motion information of the second terminal equipment according to the Bluetooth signal;
adjusting the scanning frequency for scanning the Bluetooth signal according to the motion information of the second terminal device, and scanning the Bluetooth signal sent by the second terminal device based on the adjusted scanning frequency;
and determining the distance between the second terminal equipment and the first terminal equipment according to the signal intensity of the scanned Bluetooth signal based on a preset ranging model.
In one embodiment, when the processor is configured to adjust the scanning frequency for scanning the bluetooth signal according to the motion information of the second terminal device, the processor is configured to implement:
determining the relative movement direction of the second terminal equipment relative to the first terminal equipment according to the movement direction of the second terminal equipment;
and adjusting the scanning frequency for scanning the Bluetooth signal according to the relative movement direction.
In one embodiment, the processor, when implementing the adjusting of the scanning frequency for scanning the bluetooth signal according to the relative movement direction, is configured to implement:
if the relative movement direction is close to the first terminal equipment, reducing the scanning frequency;
and if the relative movement direction is the direction far away from the first terminal equipment, increasing the scanning frequency.
In one embodiment, the processor, when implementing the adjusting the scanning frequency for scanning the bluetooth signal according to the relative movement direction, is configured to implement:
if the moving direction of the second terminal equipment is close to the first terminal equipment, reducing the scanning frequency according to the speed of the second terminal equipment; wherein the sweep frequency and the velocity magnitude are inversely related;
if the moving direction of the second terminal equipment is the direction far away from the first terminal equipment, increasing the scanning frequency according to the speed of the second terminal equipment; wherein the scanning frequency and the velocity magnitude are positively correlated.
In one embodiment, when the obtaining of the bluetooth signal sent by the second terminal device and the determining of the motion information of the second terminal device according to the bluetooth signal are implemented, the processor is configured to implement:
and acquiring a Bluetooth signal sent by the second terminal equipment, and determining the motion information of the second terminal equipment according to a data packet carried by the Bluetooth signal.
In one embodiment, when implementing the preset-based ranging model to determine the distance between the second terminal device and the first terminal device according to the signal strength of the scanned bluetooth signal, the processor is configured to implement:
if the number of the scanned Bluetooth signals in the preset time is within the preset range, carrying out weighted average on the signal intensity of the scanned Bluetooth signals in the preset time based on a preset weighted average algorithm to obtain target signal intensity;
and determining the distance of the second terminal equipment according to the target signal strength based on the ranging model.
In one embodiment, the processor is configured to execute a computer program stored in the memory to perform the steps of:
and broadcasting and sending the Bluetooth signal so that the first terminal equipment adjusts the scanning frequency according to the motion information in the Bluetooth signal, and determining the distance between the first terminal equipment and the second terminal equipment based on the adjusted scanning frequency.
In one embodiment, the processor, when implementing the broadcast transmission of the bluetooth signal, is configured to implement, when the first terminal device adjusts the scanning frequency according to the motion information in the bluetooth signal:
acquiring the motion information based on a preset motion sensor, wherein the motion information comprises the motion direction of the second terminal equipment;
and broadcasting and sending a Bluetooth data packet based on a low-power Bluetooth protocol, wherein the Bluetooth data packet at least comprises the motion information.
It should be noted that, as will be clearly understood by those skilled in the art, for convenience and simplicity of description, the specific working process of the terminal device may refer to the corresponding process in the foregoing embodiment of the distance measuring method based on bluetooth, and details are not described herein again.
Embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, where the computer program includes program instructions, and when the program instructions are executed, the method that is implemented may refer to the various embodiments of the bluetooth-based distance measurement method in the present application. The computer program, loaded by a processor for example, may perform the following steps:
the method comprises the steps of obtaining a Bluetooth signal sent by second terminal equipment, and determining motion information of the second terminal equipment according to the Bluetooth signal;
adjusting the scanning frequency for scanning the Bluetooth signal according to the motion information of the second terminal device, and scanning the Bluetooth signal sent by the second terminal device based on the adjusted scanning frequency;
and determining the distance between the second terminal equipment and the first terminal equipment according to the signal intensity of the scanned Bluetooth signal based on a preset ranging model.
The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, for example, a hard disk or a memory of the computer device. The computer readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the computer device.
It is to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items and includes such combinations. It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments. While the invention has been described with reference to specific embodiments, the scope of the invention is not limited thereto, and those skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the invention. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A distance measuring method based on Bluetooth is characterized in that the method is applied to a first terminal device and comprises the following steps:
acquiring a Bluetooth signal sent by second terminal equipment, and determining motion information of the second terminal equipment according to the Bluetooth signal;
adjusting the scanning frequency for scanning the Bluetooth signal according to the motion information of the second terminal device, and scanning the Bluetooth signal sent by the second terminal device based on the adjusted scanning frequency;
and determining the distance between the second terminal equipment and the first terminal equipment according to the signal intensity of the scanned Bluetooth signal based on a preset ranging model.
2. The bluetooth-based distance measuring method according to claim 1, wherein the motion information includes a motion direction of the second terminal device; the adjusting the scanning frequency for scanning the bluetooth signal according to the motion information of the second terminal device includes:
determining the relative movement direction of the second terminal equipment relative to the first terminal equipment according to the movement direction of the second terminal equipment;
and adjusting the scanning frequency for scanning the Bluetooth signal according to the relative movement direction.
3. The bluetooth based distance measuring method according to claim 2, wherein the adjusting the scanning frequency for scanning the bluetooth signal according to the relative movement direction comprises:
if the relative movement direction is close to the first terminal device, reducing the scanning frequency;
and if the relative movement direction is the direction far away from the first terminal equipment, increasing the scanning frequency.
4. The bluetooth-based distance measurement method according to claim 2, wherein the motion information further comprises: the speed of the second terminal device; the adjusting the scanning frequency for scanning the bluetooth signal according to the relative movement direction includes:
if the motion direction of the second terminal equipment is close to the first terminal equipment, reducing the scanning frequency according to the speed of the second terminal equipment; wherein the sweep frequency and the velocity magnitude are inversely related;
if the moving direction of the second terminal equipment is a direction far away from the first terminal equipment, increasing the scanning frequency according to the speed of the second terminal equipment; wherein the scanning frequency and the velocity magnitude are positively correlated.
5. The method according to any of claims 1-4, wherein the obtaining a Bluetooth signal sent by a second terminal device and determining motion information of the second terminal device according to the Bluetooth signal comprises:
and acquiring the Bluetooth signal sent by the second terminal equipment, and determining the motion information of the second terminal equipment according to the data packet carried by the Bluetooth signal.
6. The method according to any of claims 1-4, wherein the determining the distance between the second terminal device and the first terminal device according to the signal strength of the scanned Bluetooth signal based on the preset ranging model comprises:
if the number of the scanned Bluetooth signals in the preset time is within the preset range, carrying out weighted average on the signal intensity of the scanned Bluetooth signals in the preset time based on a preset weighted average algorithm to obtain target signal intensity;
and determining the distance of the second terminal equipment according to the target signal strength based on the ranging model.
7. A bluetooth-based distance measurement method, applied to a second terminal device, the method comprising:
and broadcasting and sending the Bluetooth signal so that the first terminal equipment adjusts the scanning frequency according to the motion information in the Bluetooth signal, and determining the distance between the first terminal equipment and the second terminal equipment based on the adjusted scanning frequency.
8. The bluetooth-based distance measuring method according to claim 7, wherein said broadcasting a bluetooth signal for the first terminal device to adjust the scanning frequency according to the motion information in the bluetooth signal comprises:
acquiring the motion information based on a preset motion sensor, wherein the motion information comprises the motion direction of the second terminal device;
and broadcasting and sending a Bluetooth data packet based on a low-power Bluetooth protocol, wherein the Bluetooth data packet at least comprises the motion information.
9. A terminal device, characterized in that the terminal device comprises a processor, a memory, and a computer program stored on the memory and executable by the processor, wherein the computer program, when executed by the processor, realizes:
the steps of the bluetooth-based distance measuring method according to any one of claims 1 to 6; and/or
The steps of the bluetooth-based distance measuring method according to any one of claims 7 to 8.
10. A computer-readable storage medium, having a computer program stored thereon, wherein the computer program, when executed by a processor, implements:
the steps of the bluetooth-based distance measuring method according to any one of claims 1 to 6; and/or
The steps of the bluetooth-based distance measurement method according to any one of claims 7 to 8.
CN202211521382.3A 2022-11-30 2022-11-30 Distance measuring method based on Bluetooth, terminal device and storage medium Pending CN115884080A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211521382.3A CN115884080A (en) 2022-11-30 2022-11-30 Distance measuring method based on Bluetooth, terminal device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211521382.3A CN115884080A (en) 2022-11-30 2022-11-30 Distance measuring method based on Bluetooth, terminal device and storage medium

Publications (1)

Publication Number Publication Date
CN115884080A true CN115884080A (en) 2023-03-31

Family

ID=85764997

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211521382.3A Pending CN115884080A (en) 2022-11-30 2022-11-30 Distance measuring method based on Bluetooth, terminal device and storage medium

Country Status (1)

Country Link
CN (1) CN115884080A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118131239A (en) * 2024-04-30 2024-06-04 天津港轮驳有限公司 Anti-collision method and system for inner top towing operation of full-rotation towing wheel port

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118131239A (en) * 2024-04-30 2024-06-04 天津港轮驳有限公司 Anti-collision method and system for inner top towing operation of full-rotation towing wheel port

Similar Documents

Publication Publication Date Title
CN113382439B (en) Information reporting method, access mode determining method, terminal and network equipment
CN108279408B (en) Proximity sensor calibration method and device, mobile terminal and computer readable medium
CN110115071B (en) Method and terminal for controlling transmitting power
CN111182562B (en) Measurement processing method, parameter configuration method, terminal and network equipment
CN107306441B (en) Method and device for sending Bluetooth broadcast frame and wireless access point
US10771925B1 (en) Localization methods and system using the same
CN108199785B (en) Transmission power testing method, device and system and electronic equipment
CN108924908B (en) WiFi scanning method and device and electronic device
CN113382423B (en) Signal transmission method, information indication method and related equipment
CN115884080A (en) Distance measuring method based on Bluetooth, terminal device and storage medium
US20150092584A1 (en) Method for determining position based on network and electronic device thereof
CN108770055B (en) Transmission power adjusting method and device and electronic device
CN108768548B (en) Radio frequency calibration method, device, mobile terminal and computer readable storage medium
CN110831049A (en) Network performance testing method and device
CN108471622B (en) WiFi connection adjustment method and device, mobile terminal and storage medium
CN108832944B (en) Power compensation method, device, terminal equipment and storage medium
CN108039928B (en) Received signal strength testing method, device and system and electronic equipment
CN108123762B (en) Transmission power testing method, device and system and electronic equipment
CN116577796B (en) Verification method and device for alignment parameters, storage medium and electronic equipment
CN111465096A (en) Wireless positioning method, device and storage medium
CN111885634B (en) RRM (radio resource management) measurement method and device
CN113466841B (en) Distance measuring method, device, electronic equipment and storage medium
CN110602738A (en) Network connection method and device and electronic device
CN112367702B (en) Synchronization method, device and storage medium
CN114070502B (en) Positioning reference signal transmission method, device and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination