Distance measurement method and device and terminal equipment

文档序号:922980 发布日期:2021-03-02 浏览:26次 中文

阅读说明:本技术 一种测距方法、装置及终端设备 (Distance measurement method and device and terminal equipment ) 是由 张庆凯 于 2020-11-27 设计创作,主要内容包括:本申请公开了一种测距方法、装置及终端设备,该方法包括:终端设备利用第一蓝牙部件与外部设备的第二蓝牙部件的交互,获取每个外部设备各自对应的RSSI值;其中,第一蓝牙部件设置在终端设备中;根据RSSI值,确定外部设备中的目标设备;利用第一UWB部件与目标设备的第二UWB部件的交互,获取目标设备的距离信息;其中,第一UWB部件设置在终端设备中;本申请通过利用第一UWB部件与目标设备的第二UWB部件的交互,获取目标设备的距离信息,利用UWB技术的精确定位功能,检测终端设备与目标设备之间的距离,从而确定用户与附近人员的准确距离;并且利用BT RSSI功能筛选外部设备,减少了终端设备的功耗。(The application discloses a distance measuring method, a distance measuring device and terminal equipment, wherein the method comprises the following steps: the terminal equipment acquires the RSSI value corresponding to each external equipment by utilizing the interaction of the first Bluetooth part and the second Bluetooth part of the external equipment; the first Bluetooth component is arranged in the terminal equipment; determining target equipment in the external equipment according to the RSSI value; acquiring distance information of the target equipment by utilizing interaction of the first UWB component and a second UWB component of the target equipment; wherein the first UWB component is disposed in the terminal device; the distance information of the target equipment is obtained by utilizing the interaction of the first UWB component and the second UWB component of the target equipment, and the distance between the terminal equipment and the target equipment is detected by utilizing the accurate positioning function of the UWB technology, so that the accurate distance between the user and nearby personnel is determined; and the BT RSSI function is utilized to screen external equipment, so that the power consumption of the terminal equipment is reduced.)

1. A method of ranging, comprising:

the terminal equipment acquires the RSSI value corresponding to each external equipment by utilizing the interaction of the first Bluetooth part and the second Bluetooth part of the external equipment; wherein the first bluetooth component is provided in the terminal device;

determining target equipment in the external equipment according to the RSSI value;

acquiring distance information of the target device by utilizing interaction of the first UWB component and a second UWB component of the target device; wherein the first UWB module is disposed in the terminal device.

2. The ranging method of claim 1, wherein the determining a target device of the external devices according to the RSSI values comprises:

determining an RSSI (received signal strength indicator) change value corresponding to each external device according to the RSSI values; wherein, the RSSI change value is the difference between the last RSSI value and the current RSSI value;

determining the target equipment according to the RSSI change value; and the RSSI change value corresponding to the target equipment is greater than a preset ranging value.

3. The range finding method of claim 1 wherein said obtaining said range information using said interaction of said first UWB component with said second UWB component comprises:

controlling said first UWB component to transmit location request information to said second UWB component;

determining, by the first UWB component, positioning distance information between the first UWB component and the second UWB component based on feedback information returned by the second UWB component;

determining the positioning distance information as the distance information.

4. The ranging method according to claim 1, wherein after determining a target device among the external devices according to the RSSI value, the method further comprises:

and acquiring the UWB identification of the second UWB component by utilizing the interaction of the first Bluetooth component and the second Bluetooth component of the target equipment.

5. The ranging method according to claim 1, wherein after the obtaining the range information, further comprising:

judging whether the current distance information of the current target equipment is smaller than a preset reminding threshold value or not; wherein the current target device is any one of the target devices;

and if so, outputting the approach reminding information.

6. The ranging method according to any one of claims 1 to 5, further comprising:

adjusting preset distance measurement interval time according to the distance information;

correspondingly, the acquiring the distance information of the target device by using the interaction between the first UWB component and the second UWB component of the target device includes:

and acquiring the distance information by utilizing the interaction of the first UWB component and the second UWB component according to the preset distance measurement interval time interval.

7. The method of claim 6, wherein the adjusting the preset ranging interval time according to the distance information comprises:

if the difference between the previous distance information and the current distance information is greater than 0, adjusting the preset distance measurement interval time to be a first time; wherein the first time is less than the preset ranging interval time;

if the difference between the previous distance information and the current distance information is less than 0, adjusting the preset distance measurement interval time to be a second time; and the second time is greater than the preset ranging interval time.

8. The ranging method of claim 6, further comprising:

judging whether the current distance information of the current target equipment is greater than a preset safety distance or not; wherein the current target device is any one of the target devices;

and if so, stopping acquiring the next distance information of the current target equipment.

9. A ranging apparatus, comprising:

the terminal equipment comprises a Bluetooth detection module, a first Bluetooth component and a second Bluetooth component, wherein the Bluetooth detection module is used for acquiring the RSSI value corresponding to each external equipment by utilizing the interaction of the first Bluetooth component and the second Bluetooth component of the external equipment; wherein the first bluetooth component is provided in the terminal device;

the screening module is used for determining target equipment in the external equipment according to the RSSI value;

the distance measurement module is used for acquiring the distance information of the target equipment by utilizing the interaction between the first UWB component and the second UWB component of the target equipment; wherein the first UWB module is disposed in the terminal device.

10. A terminal device, comprising:

a memory for storing a computer program;

a processor for implementing the steps of the ranging method as claimed in any one of claims 1 to 8 when executing the computer program.

Technical Field

The present application relates to the field of positioning technologies, and in particular, to a distance measuring method, a distance measuring device, and a terminal device.

Background

The UWB technology belongs to an emerging technology, the UWB has the function emphasis on accurate positioning, cm-level distance measurement and angle measurement within +/-15 degrees can be realized by utilizing a dual-antenna technology, and meanwhile, simple data transmission can be carried out at the speed of 10 kbps.

With the development of the UWB (Ultra Wide Band ) technology, a user can obtain a positioning accuracy of <10cm by means of UWB components (such as UWB chips) in terminal devices such as smart phones and wearable devices; and UWB part is when realizing accurate positioning, compares in parts such as traditional Bluetooth (BT) and WIFI, and the consumption is higher, uses for a long time and can influence terminal equipment's continuation of the journey.

Therefore, how to reduce the power consumption of the UWB component and ensure the cruising ability of the terminal device on the basis of utilizing the precision positioning function of the UWB component is a problem which needs to be solved urgently nowadays

Disclosure of Invention

The application aims to provide a distance measuring method, a distance measuring device and terminal equipment, so that accurate distance measurement between the equipment is realized by utilizing the precision positioning function of a UWB component, the power consumption of the UWB component is reduced, and the cruising ability of the terminal equipment is ensured.

In order to solve the above technical problem, the present application provides a ranging method, including:

the terminal equipment acquires the RSSI value corresponding to each external equipment by utilizing the interaction of the first Bluetooth part and the second Bluetooth part of the external equipment; wherein the first bluetooth component is provided in the terminal device;

determining target equipment in the external equipment according to the RSSI value;

acquiring distance information of the target device by utilizing interaction of the first UWB component and a second UWB component of the target device; wherein the first UWB module is disposed in the terminal device.

Optionally, the determining, according to the RSSI value, a target device in the external device includes:

determining an RSSI (received signal strength indicator) change value corresponding to each external device according to the RSSI values; wherein, the RSSI change value is the difference between the last RSSI value and the current RSSI value;

determining the target equipment according to the RSSI change value; and the RSSI change value corresponding to the target equipment is greater than a preset ranging value.

Optionally, the acquiring the distance information by using the interaction between the first UWB component and the second UWB component includes:

controlling said first UWB component to transmit location request information to said second UWB component;

determining, by the first UWB component, positioning distance information between the first UWB component and the second UWB component based on feedback information returned by the second UWB component;

determining the positioning distance information as the distance information.

Optionally, after determining the target device in the external device according to the RSSI value, the method further includes:

and acquiring the UWB identification of the second UWB component by utilizing the interaction of the first Bluetooth component and the second Bluetooth component of the target equipment.

Optionally, after the obtaining the distance information, the method further includes:

judging whether the current distance information of the current target equipment is smaller than a preset reminding threshold value or not; wherein the current target device is any one of the target devices;

and if so, outputting the approach reminding information.

Optionally, the method further includes:

adjusting preset distance measurement interval time according to the distance information;

correspondingly, the acquiring the distance information of the target device by using the interaction between the first UWB component and the second UWB component of the target device includes:

and acquiring the distance information by utilizing the interaction of the first UWB component and the second UWB component according to the preset distance measurement interval time interval.

Optionally, the adjusting the preset ranging interval time according to the distance information includes:

if the difference between the previous distance information and the current distance information is greater than 0, adjusting the preset distance measurement interval time to be a first time; wherein the first time is less than the preset ranging interval time;

if the difference between the previous distance information and the current distance information is less than 0, adjusting the preset distance measurement interval time to be a second time; and the second time is greater than the preset ranging interval time.

Optionally, the method further includes:

judging whether the current distance information of the current target equipment is greater than a preset safety distance or not; wherein the current target device is any one of the target devices;

and if so, stopping acquiring the next distance information of the current target equipment.

The application also provides a range unit, includes:

the terminal equipment comprises a Bluetooth detection module, a first Bluetooth component and a second Bluetooth component, wherein the Bluetooth detection module is used for acquiring the RSSI value corresponding to each external equipment by utilizing the interaction of the first Bluetooth component and the second Bluetooth component of the external equipment; wherein the first bluetooth component is provided in the terminal device;

the screening module is used for determining target equipment in the external equipment according to the RSSI value;

the distance measurement module is used for acquiring the distance information of the target equipment by utilizing the interaction between the first UWB component and the second UWB component of the target equipment; wherein the first UWB module is disposed in the terminal device.

The present application further provides a terminal device, including:

a memory for storing a computer program;

a processor for implementing the steps of the ranging method as described above when executing the computer program.

The application provides a distance measurement method, which comprises the following steps: the terminal equipment acquires the RSSI value corresponding to each external equipment by utilizing the interaction of the first Bluetooth part and the second Bluetooth part of the external equipment; the first Bluetooth component is arranged in the terminal equipment; determining target equipment in the external equipment according to the RSSI value; acquiring distance information of the target equipment by utilizing interaction of the first UWB component and a second UWB component of the target equipment; wherein the first UWB component is disposed in the terminal device;

therefore, the distance information of the target equipment is obtained by utilizing the interaction of the first UWB component and the second UWB component of the target equipment, and the distance between the terminal equipment and the target equipment is detected by utilizing the accurate positioning function of the UWB technology, so that the accurate distance between the user and nearby personnel is determined; and the external equipment is screened by using the BT RSSI (Bluetooth received signal strength indication) function, so that the unnecessary ranging process of the external equipment is avoided, and the power consumption of the terminal equipment is reduced. In addition, this application still provides a range unit and terminal equipment, has above-mentioned beneficial effect equally.

Drawings

In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.

Fig. 1 is a flowchart of a ranging method according to an embodiment of the present disclosure;

fig. 2 is an interactive schematic diagram of another distance measuring method according to an embodiment of the present disclosure;

fig. 3 is a flowchart of another ranging method according to an embodiment of the present disclosure;

fig. 4 is a structural diagram of a distance measuring device according to an embodiment of the present application.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, 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 embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.

Referring to fig. 1, fig. 1 is a flowchart of a ranging method according to an embodiment of the present disclosure. The method can comprise the following steps:

step 101: the terminal equipment acquires the RSSI value corresponding to each external equipment by utilizing the interaction of the first Bluetooth part and the second Bluetooth part of the external equipment; wherein the first bluetooth component is arranged in the terminal device.

Specifically, the terminal device in this step may be a device provided with a bluetooth component (i.e., a first bluetooth component) and a UWB component (i.e., a first UWB component), such as a smart phone and a smart wearable device (e.g., a smart watch). The external device in this step may be a device provided with a bluetooth component (i.e., a second bluetooth component) and a UWB component (i.e., a second UWB component), such as a smart phone and a smart wearable device.

Correspondingly, the specific selection of the external device in the step can be set by a designer according to a practical scene and user requirements, and if the external device is a whole device capable of performing Bluetooth communication with the terminal device, the external device can be a Bluetooth communication device. The external device may also be a part of devices capable of performing bluetooth communication with the terminal device, that is, the processor in the terminal device may screen all devices capable of performing bluetooth communication, so as to screen the external device from all the devices, only acquire RSSI values corresponding to the external device, and not acquire RSSI values corresponding to the other devices, so as to further reduce power consumption of the terminal device; for example, the processor may screen out from the total devices the devices provided with UWB components as external devices; the processor can also screen out the devices which are not connected with the Bluetooth pairing from all the devices as external devices according to the historical Bluetooth pairing information. This embodiment does not set any limit to this.

It can be understood that the purpose of this step may be to utilize the interaction between the first bluetooth component and the second bluetooth component of the external device by the processor in the terminal device, and obtain the RSSI value, i.e. the received signal strength value, corresponding to each external device by using the BT RSSI function, so as to implement the preliminary rough detection of the distance between the terminal device and each external device. The specific manner in which the processor in this step acquires the RSSI value corresponding to each external device by using the interaction between the first bluetooth component and the second bluetooth component of the external device may be set by the designer, for example, the specific manner may be implemented by using the same or similar manner as the BT RSSI detection method in the prior art, which is not limited in this embodiment.

Specifically, in this step, the processor may obtain the RSSI value corresponding to each external device by using the interaction between the first bluetooth component and the second bluetooth components of all the external devices at a preset time interval. The processor can also acquire the RSSI value corresponding to each non-target device by utilizing the interaction of the first Bluetooth part and the second Bluetooth part of the non-target device according to a preset time interval; wherein the non-target device may be an external device that is not determined to be a target device.

Step 102: and determining the target equipment in the external equipment according to the RSSI value.

It is understood that the purpose of this step may be to select, by the processor of the terminal device, a device (i.e., a target device) that needs to perform accurate ranging using the first UWB component from all external devices by using the obtained RSSI value corresponding to each external device to determine whether each external device is the target device.

Specifically, the specific manner in which the processor determines the target device in the external devices according to the RSSI values in this step may be set by a designer according to a practical scenario and a user requirement, for example, the processor may detect whether the RSSI value corresponding to each external device is smaller than a preset ranging threshold, and determine the external device whose RSSI value is smaller than the preset ranging threshold as the target device; that is, the processor may determine an external device that is less than a certain distance (i.e., a distance corresponding to a preset ranging threshold) from the terminal device as the target device. The processor can also determine the RSSI change value corresponding to each external device according to the acquired RSSI value corresponding to each external device; determining target equipment according to the RSSI change value; if the RSSI change value may be a difference between the previous RSSI value and the current RSSI value, the processor may determine the external device having the corresponding RSSI value greater than a preset ranging value (e.g., 0) as the target device; that is, the processor may determine the external device whose RSSI value becomes small as the target device, that is, the external device close to the terminal device as the target device. This embodiment does not set any limit to this.

Step 103: acquiring distance information of the target equipment by utilizing interaction of the first UWB component and a second UWB component of the target equipment; wherein the first UWB component is provided in a terminal device.

It is understood that, in this step, the processor of the terminal device may obtain the respective distance information of each target device by using the interaction between the first UWB component and the respective second UWB component of each target device, so as to implement the detection of the distance between the terminal device and each target device.

Specifically, the distance information of the target device obtained by the processor in this step may be information of a distance between the terminal device and each target device. That is, the processor of the terminal device in this step may obtain distance information (i.e., positioning distance information) between the first UWB component and the second UWB component using interaction of the first UWB component and the second UWB component of the target device, and obtain the distance information of the target device based on the positioning distance information.

Correspondingly, for the specific process of the processor of the terminal device acquiring the distance information of the target device by utilizing the interaction between the first UWB component and the second UWB component of the target device in this step, that is, the specific interaction process between the first UWB component and the second UWB component of the target device, the specific process may be set by a designer, for example, the processor may control the first UWB component to send the positioning request information to the second UWB component of the target device; determining positioning distance information between the first UWB component and the second UWB component according to feedback information returned by the second UWB component by utilizing the first UWB component; obtaining distance information of the target device according to the positioning distance information (for example, directly determining the positioning distance information as the distance information of the corresponding target device); that is, the processor may perform the positioning of the location of the second UWB component of the target device directly using the first UWB component. The processor may also control the first UWB component to send location request information to the second UWB component; determining positioning distance information between the first UWB component and the second UWB component according to feedback information returned by the second UWB component and received by the first UWB component; acquiring distance information of the target equipment according to the positioning distance information; that is, the processor may use the feedback information returned by the second UWB component itself to perform the positioning of the location of the second UWB component of the target device. The present embodiment does not set any limit to this.

Correspondingly, for the specific interaction mode of the processor using the first UWB component and the second UWB component of the target device in this step, the designer may set the specific interaction mode by himself, for example, after the processor determines the target device in the external device, the processor may obtain the UWB identifier (e.g., unique identifier ID) of the second UWB component of the target device by using the interaction of the first bluetooth component and the second bluetooth component of the target device, so that the processor may interact with the second UWB component of the target device by using the first UWB component according to the UWB identifier of the second UWB component of the target device. The processor may also record the bluetooth identity of the second bluetooth component determined to be the target device, thereby identifying the second UWB component of the target device during one interaction with the second UWB components of all external devices using the first UWB component, e.g., the processor may control the first UWB component to send location request information to the second UWB components of all external devices; receiving feedback information returned by a second UWB component of all external equipment by utilizing the first UWB component; and determining a second UWB component of the target device (namely, the own Bluetooth identifier sent by the second UWB component of the target device is the same as the recorded Bluetooth identifier) according to the comparison between the own Bluetooth identifier corresponding to each external device in the feedback information and the recorded Bluetooth identifier, and determining the positioning distance information between the first UWB component and the second UWB component of the target device according to the information used for distance measurement in the feedback information corresponding to the target device, thereby obtaining the distance information of the target device.

It should be noted that, in this step, the processor may obtain the distance information of the target device by using the interaction between the first UWB component and the second UWB component of the target device according to the preset ranging interval time interval, that is, detect the distance between the terminal device and each target device according to the preset ranging interval time interval; for example, the processor may stop detecting the RSSI value corresponding to the target device by using the bluetooth component after the target device is screened out by using the first bluetooth component, and start continuously detecting the distance between the terminal device and the target device by using the first UWB component. The processor may also acquire distance information of the primary target device using interaction of the first UWB component with a second UWB component of the target device; for example, the processor may detect the distance between the terminal device and the target device using the first UWB component each time the target device is screened out using the first bluetooth component. This embodiment does not set any limit to this.

Correspondingly, when the processor acquires the distance information of the target device according to the preset distance measurement interval time interval, the method provided by this embodiment may further include a step of adjusting the preset distance measurement interval time by the processor according to the acquired distance information of the target device. The specific manner of adjusting the preset distance measurement interval time by the processor according to the acquired distance information of the target device may be set by a designer, for example, the preset distance measurement interval time is adjusted to be the preset interval time corresponding to the distance range in which the current distance information is located by the processor through comparison between the currently acquired distance information (i.e., the current distance information) and the distance ranges corresponding to the detection frequencies. The processor can also adjust the preset distance measurement interval time by comparing the currently acquired distance information with the last acquired distance information (namely, the last distance information); as shown in fig. 2, when the difference (Δ d) between the last distance information (d1 or d3) and the current distance information (d2 or d4) is greater than 0, the preset ranging interval time (t0) may be adjusted to a first time; wherein the first time is less than the preset ranging interval time, for example, the first time may be half of the preset ranging interval time (t0 × 1/4); when the difference between the previous distance information and the current distance information is less than 0, the preset distance measurement interval time can be adjusted to be the second time; wherein the second time is greater than the preset ranging interval time, for example, the second time may be 2 times the preset ranging interval time (t0 × 2); that is to say, as shown in fig. 2, the terminal device (device 1) may adjust t0 (i.e., a preset ranging interval time) corresponding to each target device (device 2 or device 3) according to the Δ d corresponding to each target device obtained by each calculation, so as to implement real-time adjustment of the preset ranging interval time corresponding to each target device, where, for example, after the device 1 starts to detect and acquire the distance information of the device 2 by using the UWB component (i.e., the first UWB component), the calculated Δ d corresponding to the device 2 is continuously smaller than 0 twice, and then the preset ranging interval time corresponding to the device 2 may be adjusted to 1/4 × t 0.

Correspondingly, when the number of the target devices is multiple, the processor may adjust the preset ranging interval time corresponding to each target device according to the obtained distance information of each target device, for example, when the difference between the last distance information of one target device and the current distance information of the target device is greater than 0, the preset ranging interval time corresponding to the target device may be adjusted to be half of the previous preset ranging interval time; when the difference between the previous distance information of the target device and the current distance information of the target device is less than 0, the preset ranging interval time corresponding to the target device may be twice as long as the previous preset ranging interval time, so that the processor may use the first UWB component to perform ranging according to the respective interval time corresponding to each target device. The processor may also adjust the preset ranging interval time according to the acquired distance information of the target device closest to the acquired distance information, that is, adjust the time interval for sending the positioning request information to all the second UWB components by using the distance information of the target device with the smallest distance information. The present embodiment does not set any limit to this.

Correspondingly, when the processor acquires the distance information of the target device according to the preset distance measurement interval time interval, in this embodiment, the processor may control the first UWB component to sleep after the distance information is greater than the preset safety distance, and if the number of the target devices is multiple, the processor may control the first UWB component to sleep after the minimum distance information is greater than the preset safety distance; or stopping acquiring the distance information of the target equipment by using the first UWB component after the distance information of the target equipment is greater than the preset safe distance.

Further, this embodiment may further include: judging whether distance information smaller than a preset reminding threshold exists or not; if yes, outputting approaching reminding information to remind a user of avoiding close contact of the user when target equipment with the distance to the terminal equipment smaller than a preset reminding threshold exists, namely the user of the terminal equipment is too close to other people; wherein the preset reminding threshold value is smaller than the preset safety distance.

Specifically, this embodiment may further include: recording the contact information corresponding to each target device according to the acquired distance information of the target devices so as to conveniently inquire the personnel contact information of the user of the terminal device; the contact information may include a device identifier (e.g., a device name) of the target device and distance information with a minimum value.

In the embodiment, the distance information of the target equipment is obtained by utilizing the interaction of the first UWB component and the second UWB component of the target equipment, and the distance between the terminal equipment and the target equipment is detected by utilizing the accurate positioning function of the UWB technology, so that the accurate distance between the user and nearby personnel is determined; and the BT RSSI function is utilized to screen the external equipment, so that the unnecessary ranging process of the external equipment is avoided, and the power consumption of the terminal equipment is reduced.

Referring to fig. 3, fig. 3 is a flowchart of another ranging method according to an embodiment of the present disclosure. The method can comprise the following steps:

step 201: the terminal equipment acquires the RSSI value corresponding to each external equipment by utilizing the interaction of the first Bluetooth part and the second Bluetooth part of the external equipment; wherein the first bluetooth component is arranged in the terminal device.

Specifically, in this step, the processor of the terminal device interacts with the second bluetooth component of the external device that is not determined as the target device by using the first bluetooth component according to the preset time interval by using the first bluetooth component, and acquires the RSSI value corresponding to each external device according to the preset time interval.

Step 202: and determining the RSSI change value corresponding to each external device according to the RSSI value.

It is understood that the purpose of this step may be to utilize the obtained RSSI value corresponding to each external device by the processor to determine a change (i.e. a power change) of the RSSI value corresponding to each external device, that is, a change in the distance between the user of the terminal device and the user of the external device.

Specifically, the specific manner in which the processor determines the RSSI change value corresponding to each external device according to the RSSI value in this step may be set by the designer according to the practical scenario and the user's requirements, for example, the processor may determine the RSSI change value corresponding to each external device by using two RSSI values (such as the previous RSSI value and the current RSSI value) corresponding to each external device each time; for example, the processor may calculate a difference between an RSSI change value (a previous RSSI value) obtained last time and an RSSI change value (a current RSSI value) obtained this time, which correspond to each external device, each time, so as to obtain an RSSI change value corresponding to each external device; that is, the RSSI change value may be the difference between the previous RSSI value and the current RSSI value; the processor may also determine the RSSI change value corresponding to each external device by using more RSSI change values (e.g., 3 RSSI change values continuously acquired within a preset time period) corresponding to each external device at a time, so as to ensure the accuracy of the RSSI change values. This embodiment does not set any limit to this.

Step 203: determining target equipment in the external equipment according to the RSSI change value; and the RSSI change value corresponding to the target equipment is greater than the preset ranging value.

It is understood that the purpose of this step may be to select a device (i.e., a target device) that needs to be accurately measured by using the first UWB component among the external devices by the processor determining whether each external device is the target device by using the RSSI change value corresponding to each external device.

Specifically, the specific manner in which the processor determines the target device in the external device according to the RSSI value in this step may be set by a designer according to a practical scenario and a user requirement, as shown in fig. 2, the processor may determine the external device whose corresponding RSSI change value (Δ RSSI) is greater than a preset ranging value (e.g., 0) as the target device.

Step 204: and acquiring the distance information of each target device by utilizing the interaction of the first UWB component and the second UWB component of the target device according to the preset distance measurement interval time interval.

It is understood that the purpose of this step may be that, after determining a target device in the external device, the processor acquires the distance information of each target device at preset ranging interval time intervals by using interaction between the first UWB component and the second UWB component of the target device, and detects the distance between the terminal device and the target device.

Correspondingly, this step may be preceded by the step of acquiring, by the processor, the UWB identifier of the second UWB component of the target device, so that the processor may directly use the first UWB component to interact with the second UWB component of the target device, for example, the processor may use the interaction of the first bluetooth component with the determined second bluetooth component of the target device to acquire the UWB identifier of the target device.

Specifically, the preset ranging interval time in this step may be an interval time for acquiring distance information of the target device. The specific time setting of the preset ranging interval time in this step, that is, the specific interval time setting of the processor for acquiring the distance information of the target device, may be set by the designer, and this embodiment does not limit this.

It should be noted that, the method provided in this embodiment may further include the step of adjusting, by the processor, the preset ranging interval time according to the acquired distance information of the target device. The specific manner of adjusting the preset ranging interval time by the processor according to the acquired distance information of the target device can be set by a designer, for example, the processor can adjust the preset ranging interval time corresponding to each target device according to the respective distance information of each target device, that is, the processor can acquire the distance information of each target device according to the different preset ranging interval time intervals corresponding to each target device, for example, the processor can adjust the preset ranging interval time corresponding to each target device to be the first time when the difference between the last distance information and the current distance information of any target device is greater than 0; the first time is less than the preset ranging interval time, for example, the first time may be half of the preset ranging interval time; when the difference between the last distance information and the current distance information of any target device is less than 0, the preset distance measurement interval time corresponding to the target device can be adjusted to be the second time; the second time is greater than the preset ranging interval time, for example, the second time may be 2 times the preset ranging interval time.

Step 205: judging whether the current distance information of the current target equipment is smaller than a preset reminding threshold value or not; if yes, go to step 206; if not, go to step 207.

Wherein, the current target device in this step is any one target device. In this step, the processor may respectively determine whether the current distance information of each target device is smaller than the preset reminding threshold, so that when there is a target device whose current distance information is smaller than the preset reminding threshold, the process proceeds to step 206, and the approach reminding information is output.

Step 206: and outputting the approach reminding information.

It can be understood that the purpose of this step may be to prompt the user to avoid close contact of the person by outputting the approach prompting information when the processor determines that there is a target device whose distance information is smaller than the preset prompting threshold.

Specifically, the specific manner in which the processor of the terminal device outputs the approach reminding information in this step may be set by a designer, for example, the processor may display the approach reminding information by using a display of the terminal device; the approach reminding information may also be output by a speaker and/or a vibration component of the terminal device through voice and/or vibration, which is not limited in this embodiment.

Step 207: judging whether the current distance information of the current target equipment is greater than a preset safety distance or not; if yes, go to step 208.

Wherein, the preset safe distance in this step may be greater than a preset reminding threshold. In this step, the processor determines whether the distance between the terminal device and the current target device is safe enough by judging whether the current distance information of the current target device is greater than a preset safe distance, so that when the distance between the terminal device and the current target device is safe enough, the step 208 is performed, the distance between the terminal device and the current target device is detected by using the first UWB component, and the power consumption of the terminal device is reduced.

Step 208: and stopping acquiring the next distance information of the current target equipment.

It is understood that the purpose of this step may be that when the processor determines that the current distance information of the current target device is greater than the preset safe distance, that is, the distance between the terminal device and the current target device is relatively long, the processor stops acquiring the next distance information of the current target device by using the first UWB component, that is, determines the current target device as a non-target device, so that the processor does not acquire the distance information of the current target device after the next preset ranging interval time in step 204.

Correspondingly, after this step, the processor may regard the current target device as an external device that is not determined as the target device, and in step 201, the RSSI value corresponding to the external device is obtained again by using the first bluetooth component.

In this embodiment, in the embodiment of the present application, it is determined whether the distance between the terminal device and the current target device is safe enough by determining whether the current distance information of the current target device is greater than the preset safe distance, so that the first UWB component is stopped from being utilized to obtain the next distance information of the current target device when the distance is safe enough, the service time of the first UWB component is further reduced, and the power consumption of the terminal device is reduced.

Referring to fig. 4, fig. 4 is a structural diagram of a distance measuring device according to an embodiment of the present disclosure. The apparatus may include:

the bluetooth detection module 10 is configured to acquire, by the terminal device, an RSSI value corresponding to each external device by using interaction between the first bluetooth component and a second bluetooth component of the external device; the first Bluetooth component is arranged in the terminal equipment;

the screening module 20 is configured to determine a target device in the external device according to the RSSI value;

the distance measurement module 30 is configured to acquire distance information of the target device by using interaction between the first UWB component and a second UWB component of the target device; wherein the first UWB component is provided in a terminal device.

Optionally, the screening module 20 includes:

the change detection submodule is used for determining the RSSI change value corresponding to each external device according to the RSSI value; wherein, the RSSI change value is the difference between the last RSSI value and the current RSSI value;

the screening submodule is used for determining the target equipment according to the RSSI change value; and the RSSI change value corresponding to the target equipment is greater than the preset ranging value.

Optionally, the ranging module 30 may include:

the positioning initiating submodule is used for controlling the first UWB component to send positioning request information to the second UWB component;

the feedback determining submodule is used for determining the positioning distance information between the first UWB component and the second UWB component according to the feedback information returned by the second UWB component by utilizing the first UWB component;

and the ranging determination submodule is used for determining the positioning distance information as the distance information.

Optionally, the apparatus may further include:

and the identification acquisition module is used for acquiring the UWB identification of the second UWB component by utilizing the interaction of the first Bluetooth component and the second Bluetooth component of the target equipment.

Optionally, the apparatus may further include:

the reminding module is used for judging whether the current distance information of the current target equipment is smaller than a preset reminding threshold value or not; if yes, outputting approaching reminding information; wherein the current target device is any target device.

Optionally, the apparatus may further include:

the interval time adjusting module is used for adjusting the preset distance measuring interval time according to the distance information;

correspondingly, the ranging module 30 may be specifically configured to acquire the distance information by using interaction between the first UWB component and the second UWB component at a preset ranging interval time interval.

Optionally, the interval time adjusting module may be specifically configured to adjust the preset ranging interval time to the first time if a difference between the previous distance information and the current distance information is greater than 0; if the difference between the previous distance information and the current distance information is less than 0, adjusting the preset distance measurement interval time to be a second time; the first time is less than the preset distance measurement interval time, and the second time is greater than the preset distance measurement interval time.

Optionally, the apparatus may further include:

the distance measurement control module is used for judging whether the current distance information of the current target equipment is greater than a preset safety distance; if so, stopping acquiring next distance information of the current target equipment; wherein the current target device is any target device.

In this embodiment, in the embodiment of the present application, the distance measuring module 30 obtains the distance information of the target device by using the interaction between the first UWB component and the second UWB component of the target device, and detects the distance between the terminal device and the target device by using the accurate positioning function of the UWB technology, thereby determining the accurate distance between the user and the nearby person; and the BT RSSI function is utilized to screen the external equipment, so that the unnecessary ranging process of the external equipment is avoided, and the power consumption of the terminal equipment is reduced.

An embodiment of the present application further provides a terminal device, including: a memory for storing a computer program; a processor for implementing the steps of the ranging method as provided in the above embodiments when executing a computer program.

Accordingly, the terminal device provided in this embodiment may further include a UWB component (i.e., the first UWB component in the above-described embodiment) and a bluetooth component (i.e., the first bluetooth component in the above-described embodiment).

Optionally, the terminal device provided in this embodiment may specifically be an intelligent device such as a smart phone, a smart watch, and a smart wristband.

In addition, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program can implement the steps of the ranging method provided in the foregoing embodiment when executed. The storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.

The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device, the terminal device and the computer-readable storage medium disclosed by the embodiments correspond to the method disclosed by the embodiments, so that the description is simple, and the relevant points can be referred to the description of the method part.

The distance measuring method, the distance measuring device and the terminal device provided by the present application are described in detail above. The principles and embodiments of the present application are explained herein using specific examples, which are provided only to help understand the method and the core idea of the present application. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.

16页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于人脸识别的距离测定系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!