Bluetooth-based distance measurement method and device, storage device and electronic equipment

Through the ranging method based on Bluetooth signal, the mapping relationship between signal strength and distance sequence is learned using the LSTM model, the problem of large ranging error in the prior art is solved, and higher accuracy and stability are achieved.

CN119316824APending Publication Date: 2025-01-14ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411312370.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

When measuring the distance between a mobile phone and a vehicle, the measurement error is large and the accuracy is unstable due to environmental factors such as multipath effect.

Method used

Using the Bluetooth signal-based ranging method, the received signal intensity sequence of Bluetooth signals is received and inputted into the pre-trained ranging model. The hidden state between the signal intensity sequence and the distance sequence is learned using the long short-term memory model (LSTM). Mapping relationship, output distance sequence, and filtering methods such as mean filtering and Kalman filtering can be used to improve accuracy.

Benefits of technology

It effectively reduces the distance measurement error, improves the accuracy and robustness of the distance measurement, and can more accurately measure the distance between the mobile phone and the vehicle.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119316824A_ABST
    Figure CN119316824A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a Bluetooth-based distance measurement method, which abandons the technical idea of determining a distance according to a single RSSI (Received Signal Strength Indicator), determines a distance sequence in a period of time according to a Bluetooth RSSI sequence in the period of time, and learns a hidden state mapping relationship between the RSSI sequence and the distance sequence by utilizing a machine learning model. Distance measurement errors can be effectively reduced, and the accuracy and robustness of distance measurement are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present specification relates to the field of computer technology, and in particular to a Bluetooth-based distance measurement method, device, storage device, and electronic device. Background Art

[0002] At present, digital car keys have become an innovative technology under the transformation of automobile intelligence, allowing car owners to unlock and control their cars through smartphones or wearable devices. The following only takes the mobile phone as a digital car key as an example.

[0003] When using a mobile phone to control a vehicle, the distance between the mobile phone and the vehicle is an important parameter. For example, when the distance between the mobile phone and the vehicle is greater than a preset threshold, the vehicle can be controlled to lock automatically. Therefore, how to accurately measure the distance between the mobile phone and the vehicle is a key issue.

[0004] In the prior art, for a mobile phone and a vehicle, the distance between the two ends is often determined by using the received signal strength (RSSI) of the Bluetooth signal received by one end of the two ends. Generally, the distance corresponding to different RSSI values ​​is determined by fitting a mathematical model to different RSSI values.

[0005] However, the existing methods are often unable to effectively solve the errors caused by factors such as multipath effects in the environment, and there are problems such as large errors and unstable accuracy of distance measurement. Summary of the invention

[0006] The embodiments of this specification provide a Bluetooth-based distance measurement method, device, storage device, and electronic device to partially solve the problems existing in the above-mentioned prior art.

[0007] The embodiments of this specification adopt the following technical solutions:

[0008] This specification provides a Bluetooth-based distance measurement method, which is applied to a first end and a second end based on Bluetooth communication; the method includes:

[0009] The first end receives a Bluetooth signal sent by the second end;

[0010] According to the Bluetooth signal, determine a signal strength sequence of a received signal strength RSSI of the Bluetooth signal that changes with time;

[0011] The signal strength sequence is input into a pre-trained distance measurement model, so that the distance measurement model outputs a distance sequence in which the distance between the first end and the second end varies with time based on the signal strength sequence.

[0012] Optionally, the ranging model includes a long short-term memory model LSTM.

[0013] Optionally, before inputting the signal strength sequence into a pre-trained ranging model, the method further includes:

[0014] The signal strength sequence is filtered using a specified method, wherein the specified method includes mean filtering and Kalman filtering.

[0015] Optionally, pre-training the ranging model specifically includes:

[0016] Determine a sample signal strength sequence of the RSSI of the Bluetooth signal sent by the second sample end and received by the first sample end, which varies with time; and determine a distance sequence of the distance between the first sample end and the second sample end, which varies with time, as a labeling sequence;

[0017] Inputting the sample signal strength sequence into a distance measurement model to be trained, to obtain a distance sequence to be optimized output by the distance measurement model based on the sample signal strength;

[0018] Determining a loss value according to the distance sequence to be optimized, the annotation sequence and a preset loss function;

[0019] The model parameters of the ranging model are adjusted according to the loss value.

[0020] Optionally, both the first sample end and the second sample end have an ultra-wideband wireless communication UWB communication module;

[0021] Determining a distance sequence in which the distance between the first sample end and the second sample end changes over time specifically includes:

[0022] Determine a UWB signal sequence in which the first sample end receives a UWB signal sent by the second sample end and changes over time;

[0023] A distance sequence in which the distance between the first sample end and the second sample end varies with time is determined according to the UWB signal sequence.

[0024] Optionally, the smaller the difference between the distance sequence to be optimized and the labeled sequence, the smaller the loss value output by the loss function, and the greater the difference between the distance sequence to be optimized and the labeled sequence, the greater the loss value output by the loss function.

[0025] Optionally, the first end includes a mobile terminal; the second end includes a vehicle;

[0026] The method further comprises:

[0027] The first end sends a control instruction to the second end according to the distance sequence, where the control instruction is used to control the second end.

[0028] This specification provides a Bluetooth-based distance measuring device, the device comprising:

[0029] A receiving module, used for receiving a Bluetooth signal sent by the second end;

[0030] A strength sequence determination module, used to determine a signal strength sequence of received signal strength RSSI of the Bluetooth signal varying with time according to the Bluetooth signal;

[0031] The distance output module is used to input the signal strength sequence into a pre-trained distance measurement model, so as to output a distance sequence in which the distance between the first end and the second end varies with time based on the signal strength sequence through the distance measurement model.

[0032] This specification provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned Bluetooth-based ranging method is implemented.

[0033] The present specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned Bluetooth-based ranging method when executing the program.

[0034] At least one of the above technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects:

[0035] The embodiments of this specification disclose a Bluetooth-based ranging method. This method abandons the technical idea of ​​determining the distance based on a single RSSI, determines the distance sequence within a period of time based on the Bluetooth RSSI sequence within the period, and uses a machine learning model to learn the implicit mapping relationship between the RSSI sequence and the distance sequence, which can effectively reduce the ranging error and improve the accuracy and robustness of the ranging. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The illustrative embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation on this specification. In the drawings:

[0037] Figure 1 A schematic diagram of a Bluetooth-based ranging process provided in an embodiment of this specification;

[0038] Figure 2 A schematic diagram of the process of training the ranging model provided in the embodiments of this specification;

[0039] Figure 3 A schematic diagram of a sample signal strength sequence SR(t) and a labeling sequence LD(t) simultaneously determined in an environment provided in an embodiment of this specification;

[0040] Figure 4 A schematic diagram of the structure of a Bluetooth-based distance measuring device provided in an embodiment of this specification;

[0041] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this specification. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.

[0043] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.

[0044] Figure 1 This is a flow chart of a Bluetooth-based ranging process in this specification, which may specifically include the following steps:

[0045] S100: The first end receives a Bluetooth signal sent by the second end.

[0046] In the embodiments of this specification, the first end and the second end can communicate based on Bluetooth, the first end can be a mobile terminal (such as a smart phone, etc.), and the second end can be a vehicle. Of course, the first end can also be a vehicle and the second end can also be a mobile terminal. The following is only an example of the first end being a mobile terminal and the second end being a vehicle.

[0047] The mobile terminal establishes Bluetooth communication with the vehicle and receives Bluetooth signals continuously sent by the vehicle.

[0048] S102: Determine, according to the Bluetooth signal, a signal strength sequence of received signal strength RSSI of the Bluetooth signal that varies with time.

[0049] After establishing Bluetooth communication between the mobile terminal and the vehicle, the two need to continuously send and receive Bluetooth signals. Therefore, the mobile terminal can determine the signal strength sequence of the received signal strength RSSI of the Bluetooth signal varying with time based on the received Bluetooth signal continuously sent by the vehicle.

[0050] Specifically, the mobile terminal can periodically measure the strength of the currently received Bluetooth signal according to a preset period to obtain the RSSI of the Bluetooth signal corresponding to each period, and then arrange the RSSI corresponding to each period in chronological order to obtain a signal strength sequence of the Bluetooth signal RSSI changing with time, which is recorded as R(t).

[0051] S104: Input the signal strength sequence into a pre-trained distance measurement model, so as to output a distance sequence in which the distance between the first end and the second end varies with time based on the signal strength sequence through the distance measurement model.

[0052] After the mobile terminal obtains the signal strength sequence through the above step S102, the signal strength sequence R(t) can be input into the pre-trained distance measurement model to obtain a distance sequence between the mobile terminal and the vehicle that changes with time based on the signal strength sequence R(t) output by the distance measurement model, which is recorded as D(t). The distance measurement model is a machine learning model. Since the input and output of the distance measurement model are sequences that change with time, the machine learning model can be a recurrent neural network (RNN) or a RNN-like machine learning model.

[0053] In order to further improve the accuracy of ranging, the mobile terminal may filter the signal strength sequence using a specified method before inputting the signal strength sequence into the ranging model. The specified method includes mean filtering, Kalman filtering, and may also include other filtering methods.

[0054] Since the RSSI of Bluetooth signals is greatly affected by environmental factors, the RSSI between the mobile terminal and the vehicle will jump significantly due to various factors such as multipath and occlusion. Therefore, the method of measuring the distance based on the single-point RSSI of the Bluetooth signal in the prior art is less accurate. As can be seen from the above method, the distance measurement method provided in the embodiment of this specification no longer determines the distance based on a single RSSI, but determines the distance sequence within a period of time based on the Bluetooth RSSI sequence within the period of time, and uses a machine learning model to learn the implicit mapping relationship between the RSSI sequence and the distance sequence, which can effectively reduce the distance measurement error and improve the accuracy and robustness of the distance measurement.

[0055] Furthermore, since the input and output of the ranging model used in this specification are both sequences, and the machine learning model is required to learn the implicit mapping relationship between the RSSI sequence and the distance sequence, in the embodiments of this specification, a long short-term memory (LSTM) model can be used to implement the above-mentioned ranging model. Furthermore, an LSTM based on a conditional random field (CRF) algorithm can be used to implement the above-mentioned ranging model.

[0056] When training the above distance measurement model, Figure 2 The training is performed using the method shown.

[0057] Figure 2 The flowchart of the training distance measurement model provided in the embodiment of this specification specifically includes the following steps:

[0058] S200: Determine a sample signal strength sequence of the RSSI of the Bluetooth signal sent by the second sample end and received by the first sample end and varying with time.

[0059] S202: Determine a distance sequence in which the distance between the first sample end and the second sample end changes with time as a labeling sequence.

[0060] The first sample end and the second sample end may also be a mobile terminal and a vehicle as samples respectively. As to which sample end is the mobile terminal and which sample end is the vehicle, this specification does not impose any restriction on this.

[0061] Step S200 determines the sample signal strength sequence (denoted as SR(t)) of the RSSI of the Bluetooth signal sent by the second sample end and received by the first sample end, which varies with time, and step S202 determines the marking sequence (denoted as LD(t)) which needs to be executed simultaneously.

[0062] In order to facilitate the determination of the labeling sequence and improve the efficiency of training the ranging model, the results of the ultra-wideband wireless communication (Ultra-Wideband, UWB) ranging method are used as the labeling sequence LD(t) in this specification. This is because UWB signals are not easily affected by the environment. Compared with Bluetooth, UWB ranging is more accurate, but both ends (the first end and the second end, or the first sample end and the second sample end) need to support UWB communication, which will increase the cost of the two ends.

[0063] Specifically, the first sample end and the second sample end mentioned above both have an ultra-wideband wireless communication UWB communication module; when determining the labeling sequence, a UWB signal sequence in which the first sample end receives the UWB signal sent by the second sample end and changes with time can be determined, and based on the UWB signal sequence, a distance sequence in which the distance between the first sample end and the second sample end changes with time is determined as the labeling sequence LD(t).

[0064] It should be noted that, since the distance measurement model needs to learn the implicit mapping relationship between the RSSI sequence and the distance sequence in this specification, when executing steps S200 and S202, a variety of environments (such as an obstruction environment, a multipath environment, a strong wireless noise environment, etc.) can be set, and for each environment, steps S200 and S202 are executed multiple times and simultaneously, that is, in each environment, the sample signal strength sequence SR(t) and the labeling sequence LD(t) are determined multiple times and simultaneously, and the periods of determining the sample signal strength sequence SR(t) and the labeling sequence LD(t) are also exactly the same, for example, in a period of time During the time period, the determined SR(t)=80,84,86,88,90,90,89,90,90,90,90,89,89,89,88,86,87,85,82,80,79,78,78,78,78,77,77,78,78, which are the RSSIs of 29 sampling points in total. Then, the determined LD(t)=5,6,7,8,10,11,11,12,12,12,11,10,9,9,8,7,6,5,4,3,3,2,1,1,1,1,1,1,2, which are also the distances of these 29 sampling points. Figure 3 shown.

[0065] Figure 3 A schematic diagram of a sample signal strength sequence SR(t) and a label sequence LD(t) simultaneously determined in an environment provided by an embodiment of this specification, wherein Figure 3 It can be seen that when the label sequence obtained by UWB ranging remains unchanged, the RSSI sequence of the Bluetooth signal may have many different possibilities ( Figure 3 Only 3 are shown).

[0066] S204: Input the sample signal strength sequence into the distance measurement model to be trained, and obtain a distance sequence to be optimized output by the distance measurement model based on the sample signal strength.

[0067] S206: Determine a loss value according to the distance sequence to be optimized, the annotation sequence, and a preset loss function.

[0068] Among them, the loss function is a function with the distance sequence to be optimized and the labeled sequence as parameters. The smaller the difference between the distance sequence to be optimized and the labeled sequence, the smaller the loss value output by the loss function; the greater the difference between the distance sequence to be optimized and the labeled sequence, the greater the loss value output by the loss function.

[0069] S208: Adjust model parameters of the distance measurement model according to the loss value.

[0070] The distance measurement model is continuously iterated and trained through steps S204 to S208 until the distance measurement model converges, and the distance measurement model at this time can be used as a trained distance measurement model.

[0071] Of course, the above description is only based on the example of using the distance sequence obtained by the UWB ranging method as the labeling sequence. Those skilled in the art should understand that other distance sequences obtained by other ranging methods that are not easily affected by environmental factors can also be used as the labeling sequence.

[0072] In addition, after the first end described in the embodiments of this specification completes the distance measurement between itself and the second end using the above method, if the first end is a mobile terminal and the second end is a vehicle, a control instruction may be sent to the second end according to the measured distance sequence, and the control instruction is used to control the second end, such as controlling the vehicle to unlock or lock.

[0073] The above is a Bluetooth-based distance measurement method provided in the embodiments of this specification. Based on the same idea, this specification also provides corresponding systems, devices, storage media and electronic devices.

[0074] Figure 4 A schematic diagram of a Bluetooth-based distance measuring device provided in an embodiment of this specification, the device includes:

[0075] A receiving module 401, configured to receive a Bluetooth signal sent by the second end;

[0076] A strength sequence determination module 402 is used to determine a signal strength sequence of received signal strength RSSI of the Bluetooth signal varying with time according to the Bluetooth signal;

[0077] The distance output module 403 is used to input the signal strength sequence into a pre-trained distance measurement model, so as to output a distance sequence in which the distance between the first end and the second end varies with time based on the signal strength sequence through the distance measurement model.

[0078] Optionally, the ranging model includes a long short-term memory model LSTM.

[0079] Optionally, the strength sequence determination module 402 is further configured to filter the signal strength sequence using a specified method before inputting the signal strength sequence into a pre-trained ranging model, wherein the specified method includes mean filtering and Kalman filtering.

[0080] Optionally, the device further comprises:

[0081] The training module 404 is used to determine a sample signal strength sequence of the RSSI of the Bluetooth signal sent by the second sample end and received by the first sample end, which varies with time; and determine a distance sequence of the distance between the first sample end and the second sample end, which varies with time, as a labeling sequence; input the sample signal strength sequence into the distance measurement model to be trained to obtain a distance sequence to be optimized output by the distance measurement model based on the sample signal strength; determine a loss value according to the distance sequence to be optimized, the labeling sequence and a preset loss function; and adjust the model parameters of the distance measurement model according to the loss value.

[0082] Optionally, both the first sample end and the second sample end have an ultra-wideband wireless communication UWB communication module;

[0083] The training module 404 is specifically used to determine a UWB signal sequence of the UWB signal sent by the second sample end and received by the first sample end over time; and determine a distance sequence of the distance between the first sample end and the second sample end over time according to the UWB signal sequence.

[0084] Optionally, the smaller the difference between the distance sequence to be optimized and the labeled sequence, the smaller the loss value output by the loss function, and the greater the difference between the distance sequence to be optimized and the labeled sequence, the greater the loss value output by the loss function.

[0085] Optionally, the device includes a mobile terminal; the second end includes a vehicle;

[0086] The device also includes:

[0087] The control module 405 is used to send a control instruction to the second end according to the distance sequence, where the control instruction is used to control the second end.

[0088] This specification also provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, it can be used to perform the above Figure 1 Provides a Bluetooth-based ranging method.

[0089] based on Figure 1 Based on the Figure 1 The Bluetooth-based distance measurement method shown in the present specification also provides Figure 5The structural diagram of the electronic device shown in FIG. Figure 5 At the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 The Bluetooth-based ranging method.

[0090] Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the executor of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0091] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0092] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0093] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0094] For the convenience of description, the above device is described by dividing it into various units according to its functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0095] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0096] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0097] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0098] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0099] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0100] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0101] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0102] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0103] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0104] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0105] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0106] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.

Claims

1. A distance measurement method based on Bluetooth, the method being applied to a first end and a second end based on Bluetooth communication; the method comprising: The first end receives a Bluetooth signal sent by the second end; According to the Bluetooth signal, determine a signal strength sequence of a received signal strength RSSI of the Bluetooth signal that varies with time; The signal strength sequence is input into a pre-trained distance measurement model, so that the distance measurement model outputs a distance sequence in which the distance between the first end and the second end varies with time based on the signal strength sequence.

2. The method according to claim 1, wherein the ranging model comprises a long short-term memory model (LSTM).

3. The method according to claim 1, before inputting the signal strength sequence into a pre-trained ranging model, the method further comprises: The signal strength sequence is filtered using a specified method, wherein the specified method includes mean filtering and Kalman filtering.

4. The method according to claim 1, wherein the distance measurement model is pre-trained, specifically comprising: Determine a sample signal strength sequence of the RSSI of the Bluetooth signal sent by the second sample end and received by the first sample end and varying with time; and determining a distance sequence of the distance between the first sample end and the second sample end changing with time as a labeling sequence; Inputting the sample signal strength sequence into a distance measurement model to be trained, to obtain a distance sequence to be optimized output by the distance measurement model based on the sample signal strength; Determining a loss value according to the distance sequence to be optimized, the annotation sequence and a preset loss function; The model parameters of the ranging model are adjusted according to the loss value.

5. The method according to claim 4, wherein the first sample end and the second sample end both have an ultra-wideband wireless communication UWB communication module; Determining a distance sequence in which the distance between the first sample end and the second sample end changes over time specifically includes: Determine a UWB signal sequence in which the first sample end receives a UWB signal sent by the second sample end and changes over time; A distance sequence in which the distance between the first sample end and the second sample end varies with time is determined according to the UWB signal sequence.

6. According to the method as claimed in claim 5, the smaller the difference between the distance sequence to be optimized and the labeled sequence, the smaller the loss value output by the loss function, and the greater the difference between the distance sequence to be optimized and the labeled sequence, the greater the loss value output by the loss function.

7. The method of claim 1, wherein the first end comprises a mobile terminal; the second end comprises a vehicle; The method further comprises: The first end sends a control instruction to the second end according to the distance sequence, where the control instruction is used to control the second end.

8. A Bluetooth-based distance measuring device, comprising: A receiving module, used for receiving a Bluetooth signal sent by the second end; A strength sequence determination module, used to determine a signal strength sequence of received signal strength RSSI of the Bluetooth signal varying with time according to the Bluetooth signal; The distance output module is used to input the signal strength sequence into a pre-trained distance measurement model, so as to output a distance sequence in which the distance between the first end and the second end varies with time based on the signal strength sequence through the distance measurement model.

9. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the method according to any one of claims 1 to 7.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 7 when executing the program.

Citation Information

Cited By

  • Ranging method and device based on wireless radio frequency signal

    CN121299640A