Digital key positioning method, device and equipment and storage medium
The Kalman filter algorithm is used to fuse multiple sensor data, which solves the problem of complex signal attenuation relationships in digital key positioning in complex environments, and achieves high-precision positioning of digital keys.
Patent Information
- Application Number
- CN202410789683.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-18
- Publication Date
- 2024-10-11
AI Technical Summary
The existing digital key positioning technology has complex signal attenuation relationships in complex environments, resulting in reduced accuracy of distance estimation based on RSSI values, making it difficult to achieve high-precision positioning.
The Kalman filter algorithm is used to fuse sensor data such as Bluetooth signal strength, speed, acceleration, and geomagnetic field strength. State transition equations and observation formulas are used for state update and noise processing. The relative position information of the digital key and the positioning terminal is calculated. Combined The positioning terminal position coordinates calculate the absolute position of the digital key.
It improves the accuracy and stability of digital key positioning, effectively handles noise and mutations, and achieves high-precision estimation and correction of the digital key position.
Smart Images

Figure CN118764816A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of measurement and positioning technology, and in particular to a digital key positioning method, device, equipment and storage medium. Background Art
[0002] Digital keys are smart devices that use wireless communication technology to achieve keyless entry and start, and are widely used in scenarios such as cars, smart homes, and office buildings. Unlike traditional physical keys, digital keys are usually managed and operated through smartphones or dedicated electronic devices, providing greater convenience and security.
[0003] Currently, most physical digital keys are Bluetooth low energy (BLE) keys. When the position of the digital key needs to be located, it is mainly located through the Bluetooth signal strength (RSSI, Received Signal Strength Indicator). That is, the positioning terminal estimates the received RSSI through gain amplification and analog-to-digital converter sampling, and estimates the distance between the digital key and the positioning terminal based on the RSSI value.
[0004] Normally, RSSI signal strength decays with increasing distance. However, due to the cost and design limitations of BLE digital keys, signal mutations often occur during RSSI measurement. Especially in complex environments, BLE signals are affected by diffraction and reflection, causing changes in the signal path. The received signal strength and actual distance no longer show a simple attenuation relationship. Instead, the farther the receiving end is from the transmitting end, the larger the RSSI value may be. This reduces the accuracy of RSSI-based distance estimation. Summary of the invention
[0005] Based on the above problems, the embodiments of the present application provide a digital key positioning method, device, equipment and storage medium, which are used to achieve high-precision estimation and correction of the digital key position without increasing the existing hardware cost of the vehicle.
[0006] In a first aspect, an embodiment of the present application provides a digital key positioning method, including:
[0007] Get the sensor data carried in the digital key broadcast information, including Bluetooth signal strength RSSI information, speed, acceleration, and geomagnetic field strength;
[0008] According to the Kalman filter algorithm, the sensor data is fused and processed to obtain the relative position information of the digital key and the positioning terminal;
[0009] Obtain the location coordinates of the positioning terminal;
[0010] The location coordinates of the digital key are calculated by combining the relative position information and the location coordinates of the positioning terminal.
[0011] In one embodiment, obtaining sensor data carried by digital key broadcast information includes:
[0012] The digital key broadcast information is decrypted using a pre-stored decryption key to obtain the sensor data carried in the digital key broadcast information.
[0013] In one embodiment, the positioning terminal is a vehicle terminal, which includes a main anchor point and multiple sub-anchor points; the multiple sub-anchor points are used to obtain sensor data carried by the digital key broadcast information, and the main anchor point is used to fuse the sensor data according to the Kalman filter algorithm to obtain the relative position information of the digital key and the positioning terminal.
[0014] In one embodiment, the sensor data is fused and processed according to the Kalman filter algorithm to obtain the relative position information of the digital key and the positioning terminal, including:
[0015] The state vector is updated using the state transfer equation; the state vector consists of position, velocity, and acceleration; the state transfer equation is:
[0016] x k =Ax k-1 +Bu k +w k
[0017] Among them, x k is the state vector at time k, x k-1 is the state vector at time k-1, A is the state transfer matrix, B is the control input matrix, u k is the external control input constant at time k, w k is the process noise;
[0018] Input the state vector into the observation formula to calculate the observation vector; the observation formula is:
[0019] Z k =Hx k +v k
[0020] Among them, Z K is the observation vector at time k, H is the observation matrix, v k is the observation noise;
[0021] Perform Kalman filter prediction, which includes using the state transfer equation to calculate the state vector at the next moment and updating the covariance matrix:
[0022] The state transfer equation is:
[0023]
[0024] The formula for updating the covariance matrix is:
[0025] P k|k-1 =AP k-1|k-1 *A T +Q
[0026] in, is the state prediction value at time k, is the estimated value of the state at time k-1, P k|k-1 is the state prediction covariance matrix at time k, P k-1|k-1 is the state estimation covariance matrix at time k-1, A T is the transposed matrix of the state transfer matrix A, Q is the process noise covariance matrix;
[0027] Perform a Kalman filter update, which includes comparing the observation vector with the state vector and calculating the Kalman gain to fuse the observation vector and the state vector:
[0028] The formula for calculating the Kalman gain is:
[0029] K k =P k|k-1 *H T *(H*P k|k-1 *H T +R) -1
[0030] Among them, K k is the Kalman gain at time k, R is the observation noise matrix, H T is the transposed matrix of the state transfer matrix H;
[0031] The formula for fusing the observation vector and the state vector is:
[0032]
[0033] in, is the state prediction value at time k, The relative position information of the digital key and the positioning terminal;
[0034] Perform a covariance update:
[0035] P k|k =(IK k H)P k|k-1
[0036] Among them, P k|k for The corresponding error covariance matrix, I is the identity matrix.
[0037] In one embodiment, the state transition matrix A is The control input matrix B is The observation matrix H is [1 0 0], and the process noise covariance matrix Q is The observation noise matrix is [0 1], and the identity matrix I is The time step dt is 0.1.
[0038] In one embodiment, the positioning terminal includes a first positioning terminal and a second positioning terminal. Before acquiring the sensor data carried by the digital key broadcast information, the method further includes:
[0039] After the first positioning terminal initiates a key search request, the first positioning terminal and the second positioning terminal obtain a key search command and a decryption key issued by the server; the key search command instructs the positioning terminal to monitor the broadcast information of the digital key;
[0040] Determine the positioning terminal that receives the digital key broadcast information so that the positioning terminal that receives the digital key broadcast information executes the digital key positioning method and transmits the calculated digital key position coordinates and error covariance matrix to the server side, and the first positioning terminal obtains and displays the position coordinates of the server side.
[0041] In one embodiment, obtaining and displaying the location coordinates of the server side includes:
[0042] If both the first positioning terminal and the second positioning terminal receive the digital key broadcast information, the positioning terminal corresponding to the error covariance matrix with the smallest value is determined as the target positioning terminal;
[0043] The position coordinates calculated by the target positioning terminal are displayed on the first positioning terminal.
[0044] In a second aspect, the embodiment of the present application further provides a digital key positioning device, including:
[0045] An acquisition unit, used to acquire sensor data carried in the digital key broadcast information, the sensor data including Bluetooth signal strength RSSI information, speed, acceleration, and geomagnetic field strength;
[0046] A processing unit, used to perform fusion processing on the sensor data according to the Kalman filter algorithm to obtain the relative position information of the digital key and the positioning terminal;
[0047] The acquisition unit is also used to acquire the position coordinates of the positioning terminal;
[0048] The processing unit is also used to calculate the location coordinates of the digital key by combining the relative position information and the location coordinates of the positioning terminal.
[0049] In a third aspect, an embodiment of the present application further provides a positioning terminal, including:
[0050] Central processing unit, memory, input and output interface, display unit;
[0051] The memory is either transient storage memory or persistent storage memory;
[0052] The central processing unit is configured to communicate with the memory and execute the instruction operations in the memory to perform the steps of any one of the above-mentioned digital key positioning methods.
[0053] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. When the computer program runs on a computer, the computer executes the steps of any one of the above-mentioned digital key positioning methods.
[0054] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages: by fusing sensor data such as Bluetooth signal strength RSSI, speed, acceleration and geomagnetic field strength using the Kalman filter algorithm, the relative position between the digital key and the positioning terminal can be estimated more accurately. At the same time, the Kalman filter algorithm can effectively process noise and mutations in sensor data and improve positioning accuracy. Combining the relative position information and the position coordinates of the positioning terminal, the position coordinates of the digital key can be accurately determined, and finally high-precision positioning of the digital key can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0056] Figure 1 A schematic diagram of a radio frequency signal processing circuit provided by the prior art;
[0057] Figure 2 A schematic diagram of the relationship between the intensity and distance of a reflected signal provided in an embodiment of the present application;
[0058] Figure 3 A schematic diagram of the relationship between RSSI value and distance provided in an embodiment of the present application;
[0059] Figure 4 A schematic diagram of the architecture of a vehicle-mounted positioning system provided in an embodiment of the present application;
[0060] Figure 5 A schematic diagram of a digital key positioning method flow chart provided in an embodiment of the present application;
[0061] Figure 6 A schematic diagram of a Kalman filter algorithm flow chart provided in an embodiment of the present application;
[0062] Figure 7 A schematic diagram of the effect of a digital key positioning method provided in an embodiment of the present application;
[0063] Figure 8 A schematic diagram of another vehicle positioning system architecture provided in an embodiment of the present application;
[0064] Fig. 9 A schematic diagram of the structure of a digital key positioning device provided in an embodiment of the present application;
[0065] Fig.10 A schematic diagram of the structure of a positioning terminal provided in an embodiment of the present application. DETAILED DESCRIPTION
[0066] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0067] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims and drawings of the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0068] In the following description, similar expressions such as "a specific implementation" or "a specific example" are involved, which describe a subset of all possible embodiments, but it is understood that "a specific implementation" or "a specific example" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict. In the following description, the term multiple refers to at least two. The numerical value of the embodiment of the present application reaches a threshold value (if any), and in some specific examples, the former may be greater than the latter.
[0069] To facilitate understanding and explanation, before further detailed description of the present application, the nouns and terms involved in the embodiments of the present application will be explained, and the nouns and terms involved in the embodiments of the present application are subject to the following explanations.
[0070] A digital key is a smart device that uses wireless communication technology to achieve keyless entry and start. It is widely used in scenarios such as cars, smart homes, and office buildings. Unlike traditional physical keys, digital keys are usually managed and operated through smartphones or dedicated electronic devices, providing greater convenience and security. Currently, most physical digital keys are BLE keys. When locating a digital key, for example, see Figure 1 , Figure 1 A radio frequency signal processing circuit provided by the prior art, the radio frequency signal passes through a mixer, the mixer mixes the radio frequency signal with the signal of a local oscillator to generate an intermediate frequency signal; the mixed signal passes through an intermediate frequency filter to filter out unnecessary frequency components to retain the required intermediate frequency signal; after passing through the intermediate frequency filter, the signal enters an automatic gain device to adjust the gain of the signal to maintain an appropriate signal strength level in the entire system; the analog signal is sampled through an analog-to-digital converter (ADC) to convert the analog signal into a digital signal to estimate the signal strength RSSI value of the radio frequency signal. The distance between the digital key and the positioning terminal is estimated based on the RSSI value.
[0071] See also Figure 2 , Figure 2 shows the relationship between the strength of the reflected signal and the distance, Figure 2 Medium R =P0-10γlog(d), is a formula used to describe the relationship between signal strength and distance, which can also be understood as a signal attenuation formula. γ represents the path loss factor (or path loss index, dielectric coefficient), which depends on the propagation environment. For example, in free space, the value of γ is usually 2, while in an urban environment, the value of γ may vary between 2 and 4. d represents the distance between the transmitter and the receiver. P0 is the received signal strength RSSI measured at a reference distance (usually 1 meter). It is a known constant. P R Indicates the received signal strength RSSI. Generally, in open areas with fewer obstacles and less atmospheric influence, such as outdoors or in open spaces without obstacles, the signal strength is usually negatively correlated with the distance, so the signal attenuation formula can be used directly for calculation.
[0072] However, when the signal is reflected multiple times or passes through obstacles, multiple paths may be formed at certain locations due to reflection and diffraction. The signal strength on some paths may be enhanced, resulting in the received signal strength being higher than expected for the straight-line distance. In other words, the farther the transmitter is from the receiver, the larger the RSSI value of the received signal is, and the received signal strength no longer presents a simple attenuation relationship with the actual distance. For details, see Figure 3 It shows how RSSI changes with distance. There are five different curves in the figure, each curve represents a different RSSI (rssi1 to rssi5), and each curve has a corresponding mark. Distances-rssi1 to distances-rssi5 can be understood as the distances measured corresponding to different RSSIs. It can be observed that different RSSI measurements change inconsistently at different distances. Some RSSI values measured at longer distances are higher, while RSSI values measured at shorter distances are lower. This causes a large positioning error, which cannot be directly calculated using the signal attenuation formula.
[0073] Based on this, in each embodiment of the present application, the Kalman filter algorithm is used to fuse multiple sensor data to improve the accuracy and stability of positioning; by combining the position coordinates calculated by multiple positioning terminals, more accurate and reliable digital key location information can be provided.
[0074] See also Figure 4 . Figure 4 A schematic diagram of the vehicle positioning system architecture provided for an embodiment of the present application, the system architecture is mainly used for positioning and communication between a digital key and a vehicle terminal, the system architecture may include a digital key and a vehicle terminal, and the digital key may include: a low-power Bluetooth module (also known as a "BLE" module, a Bluetooth module), an inertial navigation sensor, and a geomagnetic sensor. The vehicle terminal may include: a plurality of different low-power Bluetooth anchor points and a low-power Bluetooth master station. The BLE module in the digital key periodically sends a broadcast signal containing a unique identifier of the digital key and sensor data, such as RSSI, acceleration, etc. Exemplarily, the four low-power Bluetooth anchor points in the vehicle terminal receive the BLE broadcast signal from the digital key. Each anchor point records the strength and sensor data of the received signal, and the low-power Bluetooth master station collects and analyzes the data from the four anchor points, and calculates the position of the digital key relative to the vehicle terminal. Finally, the calculated digital key location information is transmitted to the application or display screen of the vehicle terminal for display, so that the owner or user can understand the location of the digital key in real time.
[0075] For ease of understanding, various embodiments of the present application are described in further detail below with reference to the accompanying drawings.
[0076] The present application embodiment provides a digital key positioning method, such as Figure 5 As shown, the method includes steps S501-S504.
[0077] S501: Acquire sensor data carried in the digital key broadcast information, where the sensor data includes Bluetooth signal strength RSSI information, speed, acceleration, and geomagnetic field strength;
[0078] In an embodiment of the present application, the RSSI information comes from the Bluetooth inside the digital key. When the digital key broadcasts, its Bluetooth module will send information containing relevant signal strength. The receiving device (such as a positioning terminal) can determine the distance from the digital key by the received signal strength. In addition, the digital key has a built-in accelerometer and gyroscope. The accelerometer can measure the acceleration of the object's speed, while the gyroscope can measure the angular velocity of the object. The movement trajectory of the key can be calculated by the acceleration and rotation of the key. The geomagnetic field strength can be obtained by the geomagnetic sensor, and the geomagnetic field strength can help identify the direction and position characteristics of the key to a certain extent. In addition, the speed calculation value can be obtained by combining the estimation of the inertial navigation sensor data such as the accelerometer and gyroscope, performing data fusion. Alternatively, the RSSI value of the digital key is measured by the BLE anchor point, and the position change is estimated by combining the multi-point positioning algorithm (such as triangulation method, centroid method), and then the speed is calculated. Alternatively, the sensor data obtained by an inertial navigation sensor such as an accelerometer and a gyroscope may be combined with the geomagnetic field strength data obtained by a geomagnetic sensor to calculate the speed and acceleration, so that more accurate sensor data may be obtained.
[0079] Through the comprehensive use of these sensor data, the position of the digital key can be calculated by combining multi-dimensional information, which helps to improve the positioning accuracy of the digital key.
[0080] S502: Perform fusion processing on the sensor data according to the Kalman filter algorithm to obtain the relative position information of the digital key and the positioning terminal;
[0081] In order to improve the positioning accuracy and reliability of the physical key, the Kalman filter algorithm can be used to integrate BLE, inertial navigation and geomagnetic positioning technology for ranging and positioning.
[0082] Specifically, sensor data can be used as a component of the state vector, and the state transfer equation of the linear dynamic system can be used to update the state vector. The observation model is used to map the state vector to the observation space, thereby calculating the observation vector. The state transfer equation is used to predict the state prediction value of the next state, and the covariance matrix is updated to reflect the uncertainty information of the state estimation. It can be understood that if the value of the covariance matrix is small, it means that the estimation result is more reliable; conversely, if the value of the covariance matrix is large, it means that there is a large uncertainty in the estimation result. Combined with the observed data and the predicted state, the Kalman gain is calculated to fuse the observed value and the predicted value to obtain a more accurate state estimate and update the covariance matrix.
[0083] Through the above steps, the Kalman filter algorithm is used to combine the predicted data and the observed data to continuously correct the state estimation, thereby improving the accuracy and reliability of the digital key position estimation.
[0084] S503: Acquire the location coordinates of the positioning terminal;
[0085] S504: Calculate the location coordinates of the digital key by combining the relative location information and the location coordinates of the positioning terminal.
[0086] The positioning terminal can be a device with positioning capabilities, such as a smart phone and a vehicle-mounted system. The positioning terminal is usually equipped with a GPS module, which can obtain a precise geographic location. In actual applications, if it is detected that the distance between the location coordinates of the positioning terminal, that is, the GPS information and the actual location coordinates exceeds a preset threshold, you can try to re-acquire the location coordinates of the positioning terminal again, and the number of times you try the location coordinates again is not limited. Using the relative position information and the location coordinates of the positioning terminal, it can be understood as obtaining the absolute position of the positioning terminal. The absolute position can be understood as the actual position on the map, which provides a reference point for determining the absolute position of the key. Using the absolute coordinates and relative position information of the positioning terminal, the absolute position of the digital key is finally calculated, providing a complete position estimate of the digital key and obtaining more accurate location data.
[0087] In the embodiment of the present application, by fusing sensor data such as Bluetooth signal strength RSSI, speed, acceleration and geomagnetic field strength using the Kalman filter algorithm, the relative position between the digital key and the positioning terminal can be estimated more accurately. At the same time, the Kalman filter algorithm can effectively process noise and mutations in sensor data and improve positioning accuracy. Combining the relative position information and the position coordinates of the positioning terminal, the position coordinates of the digital key can be accurately determined, and finally high-precision positioning of the digital key can be achieved.
[0088] To enhance the security of data transmission, in one embodiment, obtaining sensor data carried in the digital key broadcast information includes: decrypting the digital key broadcast information using a pre-stored decryption key to obtain the sensor data carried in the digital key broadcast information.
[0089] In actual applications, before broadcasting information, the key end will determine whether the key positioning function is activated, so as to ensure that the positioning function is only turned on when needed, saving power and protecting privacy. In addition, it will also determine whether the locally pre-stored decryption key is valid. By verifying the validity of the pre-stored decryption key, it is ensured that the sensor data can be decrypted in time when receiving the broadcast information, and the reliability of the decryption of the broadcast information is guaranteed. After the above judgment on whether the key positioning function is activated and the judgment on whether the locally stored broadcast key is valid confirm that the broadcast can be carried out, the digital key will initiate the broadcast carrying sensor information.
[0090] The digital key broadcast uses a random sending address and broadcasts at a preset time period (such as 1 second, 1 minute, etc.). This ensures the privacy and security of the broadcast and reduces the risk of malicious tracking.
[0091] In order to efficiently and accurately transmit the required information within a limited data space, the data broadcast by the digital key removes auxiliary information such as the protocol header, protocol tail, metadata, etc., and the actual useful information part, namely the payload, is as follows:
[0092]
[0093] In actual applications, if it is detected that the user has turned on the key search function on the key search application, the Bluetooth module of the positioning terminal will enter the background scanning mode and continuously monitor whether there is a broadcast signal carrying key information. In this way, the key location information can be obtained in real time, improving the convenience and reliability of the user experience.
[0094] In order to ensure the security and integrity of data transmission, key management is also crucial. It can be understood that the key at the sending end, that is, the digital key side, is an encryption key, which is used to encrypt the broadcast information of Bluetooth broadcast. The key at the receiving end is a decryption key, which is used to decrypt the digital key broadcast information and obtain sensor data.
[0095] Specifically, the key contains an 8-byte UTC timestamp and a 16-byte public key. The timestamp is accumulated on a daily basis, and the positioning terminal (such as a mobile phone, etc.) or the server sends a 30-day public key at a time to the physical digital key for storage. Furthermore, if the public key is sent by the positioning terminal, the above 30-day public key can also be saved to the server at the same time, so that the decryption key, i.e. the public key, can be synchronized from the server to other positioning terminals, so that other positioning terminals can parse the Bluetooth positioning broadcast data.
[0096] When the key is close to expiration, the server can remind the user to connect the key to the application on the positioning terminal via Bluetooth to update the key through applications, text messages, emails, etc. If the key expires, the key location cannot be queried and needs to be updated again. Through strict key management, the security and integrity of broadcast data during transmission are ensured to prevent data from being stolen or tampered with.
[0097] In one embodiment, the positioning terminal is a vehicle terminal, which includes a main anchor point and multiple sub-anchor points; the multiple sub-anchor points are used to obtain sensor data carried by the digital key broadcast information, and the main anchor point is used to fuse the sensor data according to the Kalman filter algorithm to obtain the relative position information of the digital key and the positioning terminal.
[0098] If it is detected that the user turns on the key search function on the vehicle terminal to initiate a location search, the positioning of the digital key on the vehicle terminal can be completed using the main anchor point and multiple sub-anchor points on the vehicle terminal. Among them, multiple sub-anchor points are responsible for obtaining the sensor data carried by the digital key broadcast information, and the main anchor point can use the Kalman filter algorithm to fuse these sensor data.
[0099] In fact, after obtaining sensor data from multiple sub-anchor points, you can select the set of sensor data with a larger RSSI value from the multiple sets of sensor data for fusion processing. However, the aforementioned specification mentioned that RSSI values are easily affected by environmental factors (such as walls, metal objects, electromagnetic interference, etc.) and may fluctuate greatly. Relying on a single RSSI value may cause the selected data to be unstable. Therefore, the sensor data obtained from each sub-anchor point can be fused separately, and then combined with the location coordinates of the positioning terminal, and a more accurate one can be selected from the location coordinates of multiple digital keys.
[0100] By acquiring sensor data through multiple sub-anchors and transmitting this data to the main anchor for fusion processing, the positioning accuracy can be significantly improved. Furthermore, multiple sub-anchors provide multiple data sources. Even if a sub-anchor fails or has poor signal, the system can continue to work through other sub-anchors, improving the fault tolerance and stability of the system. The main anchor centrally processes data, which can reduce the computational burden of the sub-anchors and improve the overall efficiency and response speed of the system.
[0101] In order to improve the accuracy and reliability of the digital key position calculation, in one embodiment, the sensor data is fused and processed according to the Kalman filter algorithm to obtain the relative position information of the digital key and the positioning terminal, including:
[0102] Please refer to Figure 6 , Figure 6 The figure is a flow chart of using Kalman filter algorithm to fuse sensor data. The state vector is updated by using state transfer equation; the state vector is composed of position, velocity, and acceleration; the state transfer equation is:
[0103] x k =Ax k-1 +Bu k +w k
[0104] Among them, x k is the state vector at time k, x k-1 is the state vector at time k-1, A is the state transfer matrix, B is the control input matrix, u k is the external control input constant at time k, w k is the process noise;
[0105] Input the state vector into the observation formula to calculate the observation vector; the observation formula is:
[0106] Z k =Hx k +v k
[0107] Among them, Z K is the observation vector at time k, H is the observation matrix, v k is the observation noise;
[0108] Perform Kalman filter prediction, which includes using the state transfer equation to calculate the state vector at the next moment and updating the covariance matrix:
[0109] The state transfer equation is:
[0110]
[0111] The formula for updating the covariance matrix is:
[0112]
[0113] in, is the state prediction value at time k, is the estimated value of the state at time k-1, P k|k-1 is the state prediction covariance matrix at time k, P k-1|k-1 is the state estimation covariance matrix at time k-1, A T is the transposed matrix of the state transfer matrix A, and Q is the process noise covariance matrix. k-1|k-1 It can be understood as the initial covariance matrix, It can be understood as the initial state estimate.
[0114] Perform a Kalman filter update, which includes comparing the observation vector with the state vector and calculating the Kalman gain to fuse the observation vector and the state vector:
[0115] The formula for calculating the Kalman gain is:
[0116] K k =P k|k-1 *H T *(H*P k|k-1 *H T +R) -1
[0117] Among them, K k is the Kalman gain at time k, R is the observation noise matrix, H T is the transposed matrix of the state transfer matrix H;
[0118] The formula for fusing the observation vector and the state vector is:
[0119]
[0120] in, is the state prediction value at time k, Relative position information of the digital key and the positioning terminal;
[0121] Perform a covariance update:
[0122] P k|k =(IK k H)P k|k-1
[0123] Among them, P k|k for The corresponding error covariance matrix, I is the identity matrix.
[0124] Specifically, the three formulas for Kalman filter update can be simplified as follows:
[0125] K k =P k *H T *(H*P k *H T +R) -1
[0126] x k =x k +K k *(Z k -H*x k )
[0127] P k =P k -K k *H*P k
[0128] It should be noted that the above simplified three formulas only simplify the representation to make them easier to read and operate, but the core content and calculation steps are the same.
[0129] In one embodiment, the state transition matrix A is The control input matrix B is The observation matrix H is [1 0 0], and the process noise covariance matrix Q is The observation noise matrix is [0 1], and the identity matrix I is The time step dt is 0.1. The state vector x k for The external control input u k is 0, process noise w k is 0, the observation noise v k is 0.
[0130] Through the above steps, the Kalman filter algorithm can be used to fuse the sensor data of the BLE module, inertial navigation sensor and geomagnetic sensor, so as to achieve high-precision estimation and correction of the digital key position. The positioning effect can be specifically referred to Figure 7 , relative to Figure 3 The distance is estimated only by the RSSI value obtained by ADC sampling. The position of the digital key obtained by fusing multi-sensor data using the Kalman filter algorithm can significantly improve the positioning accuracy.
[0131] In actual applications, multiple positioning terminals can also be used to simultaneously search for keys and calculate the location of digital keys. Figure 8 As shown, the first positioning terminal and the plurality of second positioning terminals all include a key search application (ie Figure 8 Car app, mobile app), Bluetooth module, positioning module (i.e. Figure 8Here, the positioning terminal may include a vehicle terminal and a user terminal; the user terminal may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a PDA, a mobile Internet device (MID), a wearable device (such as a smart watch, a smart bracelet, etc.), a smart computer, a smart vehicle-mounted smart terminal, etc. The second positioning terminal is a positioning terminal other than the first positioning terminal.
[0132] The digital key can include a key finder application. Bluetooth module, inertial measurement unit (IMU) and E2PROM module (in Figure 8 Inertial navigation sensor Figure 8 Also called IMU sensor.
[0133] like Figure 8 As shown, each positioning terminal can communicate bidirectionally with the car manufacturer's cloud server. The car manufacturer's cloud server can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a server that provides basic cloud computing services such as cloud databases, cloud services, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (CDN, Content Delivery Network) and big data and artificial intelligence platforms.
[0134] In order to further improve the positioning accuracy, in one embodiment, the positioning terminal includes a first positioning terminal and a second positioning terminal. Before obtaining the sensor data carried by the digital key broadcast information, the method also includes: after the first positioning terminal initiates a key search request, the first positioning terminal and the second positioning terminal obtain the key search command and decryption key issued by the server; the key search command instructs the positioning terminal to listen to the broadcast information of the digital key; the positioning terminal that receives the digital key broadcast information is determined, so that the positioning terminal that receives the digital key broadcast information executes the digital key positioning method and transmits the calculated digital key position coordinates and error covariance matrix to the server, and the first positioning terminal obtains and displays the position coordinates of the server.
[0135] Exemplarily, the first positioning terminal can be a vehicle terminal, and the second terminal can be a car owner's mobile terminal and a friend's mobile terminal. If it is detected that the user initiates a key search request at the vehicle terminal, the car owner's mobile terminal and the friend's mobile terminal will also receive the key search command and decryption key issued by the server, so as to perform key search at the same time. Furthermore, it is also necessary to detect which positioning terminals can receive the data key broadcast signal, so that the digital key positioning method can be executed using the positioning terminal that can receive the digital key broadcast information, and the calculated digital key position coordinates and error covariance matrix are transmitted to the server. The vehicle terminal will then obtain and display the server-side position coordinates, where the server-side position coordinates can be calculated and uploaded by the car owner's mobile terminal or the friend's mobile terminal, or calculated and uploaded by the vehicle terminal. The specific selection can be based on the time sequence or accuracy of the position coordinates calculated by the positioning terminal.
[0136] Distributed positioning processing can be achieved by simultaneously monitoring the broadcast information of the digital key by the first positioning terminal and the second positioning terminal. This method can increase the positioning coverage and positioning accuracy. And once the first positioning terminal initiates a key search request, the two positioning terminals start monitoring and processing the broadcast information of the digital key almost at the same time. This can effectively shorten the positioning response time, improve user experience and positioning service efficiency. If one of the positioning terminals has a problem or the signal is not good, the other positioning terminal can still continue to perform the positioning task to ensure the stability and continuity of the system.
[0137] In one embodiment, obtaining and displaying the location coordinates of the server side includes: if both the first positioning terminal and the second positioning terminal receive the digital key broadcast information, determining that the positioning terminal corresponding to the error covariance matrix with the smallest value is the target positioning terminal; and displaying the location coordinates calculated by the target positioning terminal on the first positioning terminal.
[0138] As mentioned in the above description, when the sensor data is fused using the Kalman filter algorithm, the covariance matrix is also calculated and updated. A smaller error covariance matrix usually indicates that the positioning result is more reliable. Therefore, by comparing the error covariance matrices calculated by the two positioning terminals, the positioning result with the smaller error is selected as the position coordinate of the target positioning terminal. This ensures that the location information displayed to the user is more accurate and reliable.
[0139] In other feasible embodiments, after the location coordinates of the digital key are calculated, the next time the user initiates a key search request in the application interface of the positioning terminal, the location information in the local database of the positioning terminal can be obtained first. After obtaining the location information of the local database, it can be determined whether the location information of the key is valid. For example, it can be determined whether the distance between the location coordinates of the digital key currently obtained from the local database and the positioning terminal that initiates the key search request is greater than a preset threshold. If not, the location coordinates in the local database are returned to the application interface and displayed. If so, after waiting for completion within a preset time interval, the location information of the digital key in the local database can be tried again. The number of attempts to obtain the location coordinates in the local database can be set according to actual needs. If the distance between the location coordinates of the digital key re-obtained from the local database these times and the positioning terminal that initiates the key search request is greater than the preset threshold, the digital key broadcast function is turned on to broadcast the sensor data, and the positioning terminal executes any one of the steps of the above-mentioned digital key positioning method. If there is a positioning terminal that calculates the location coordinates of the digital key, the digital key position is returned to the positioning terminal application interface and displayed. If the location coordinates of the digital key cannot be obtained, a prompt message indicating that the key position has not been found is displayed on the application interface.
[0140] In order to implement the digital key positioning method of the embodiment of the present application, the embodiment of the present application also provides a digital key positioning device, such as Fig. 9 As shown, the device comprises:
[0141] The acquisition unit 901 is used to acquire sensor data carried in the digital key broadcast information, where the sensor data includes Bluetooth signal strength RSSI information, speed, acceleration, and geomagnetic field strength;
[0142] The processing unit 902 is used to perform fusion processing on the sensor data according to the Kalman filter algorithm to obtain the relative position information of the digital key and the positioning terminal;
[0143] The acquisition unit 901 is also used to acquire the position coordinates of the positioning terminal;
[0144] The processing unit 902 is further used to calculate the location coordinates of the digital key by combining the relative location information and the location coordinates of the positioning terminal.
[0145] In one embodiment, the determination unit is configured to decrypt the digital key broadcast information using a pre-stored decryption key to obtain the sensor data carried in the digital key broadcast information.
[0146] In one embodiment, the positioning terminal is a vehicle terminal, which includes a main anchor point and multiple sub-anchor points; the multiple sub-anchor points are used to obtain sensor data carried by the digital key broadcast information, and the main anchor point is used to fuse the sensor data according to the Kalman filter algorithm to obtain the relative position information of the digital key and the positioning terminal.
[0147] In one embodiment, the processing unit 902 is further used to update the state vector using a state transfer equation; the state vector is composed of position, velocity, and acceleration; the state transfer equation is:
[0148] x k =Ax k-1 +Bu k +w k
[0149] Among them, x k is the state vector at time k, x k-1 is the state vector at time k-1, A is the state transfer matrix, B is the control input matrix, u k is the external control input constant at time k, w k is the process noise;
[0150] Input the state vector into the observation formula to calculate the observation vector; the observation formula is:
[0151] Z k =Hx k +v k
[0152] Among them, Z K is the observation vector at time k, H is the observation matrix, v k is the observation noise;
[0153] Perform Kalman filter prediction, which includes using the state transfer equation to calculate the state vector at the next moment and updating the covariance matrix:
[0154] The state transfer equation is:
[0155]
[0156] The formula for updating the covariance matrix is:
[0157] P k|k-1 =AP k-1|k-1 *A T +Q
[0158] in, is the state prediction value at time k, is the estimated value of the state at time k-1, u k is the external control input at time k, Pk|k-1 is the state prediction covariance matrix at time k, P k-1|k-1 is the state estimation covariance matrix at time k-1, A T is the transposed matrix of the state transfer matrix A, Q is the process noise covariance matrix;
[0159] Perform a Kalman filter update, which includes comparing the observation vector with the state vector and calculating the Kalman gain to fuse the observation vector and the state vector:
[0160] The formula for calculating the Kalman gain is:
[0161] K k =P k|k-1 *H T *(H*P k|k-1 *H T +R) -1
[0162] Among them, K k is the Kalman gain at time k, R is the observation noise matrix, H T is the transposed matrix of the state transfer matrix H;
[0163] The formula for fusing the observation vector and the state vector is:
[0164]
[0165] in, is the state prediction value at time k, The relative position information of the digital key and the positioning terminal;
[0166] Perform a covariance update:
[0167] P k|k =(IK k H)P k|k-1
[0168] Among them, P k|k for The corresponding error covariance matrix, I is the identity matrix.
[0169] In one embodiment, the state transition matrix A is The control input matrix B is The observation matrix H is [1 0 0], and the process noise covariance matrix Q is The observation noise matrix is [0 1], and the identity matrix I is The time step dt is 0.1.
[0170] In one embodiment, the positioning terminal includes a first positioning terminal and a second positioning terminal. After the first positioning terminal initiates a key search request, the first positioning terminal and the second positioning terminal obtain a key search command and a decryption key issued by the server. The key search command instructs the positioning terminal to monitor broadcast information of the digital key.
[0171] The determination unit is used to determine the positioning terminal that receives the digital key broadcast information, so that the positioning terminal that receives the digital key broadcast information executes the digital key positioning method and transmits the calculated digital key position coordinates and error covariance matrix to the server side, and the first positioning terminal obtains and displays the position coordinates of the server side.
[0172] In one embodiment, the determination unit is configured to determine that the positioning terminal corresponding to the error covariance matrix with the smallest value is the target positioning terminal if both the first positioning terminal and the second positioning terminal receive the digital key broadcast information;
[0173] The display unit is used to display the position coordinates calculated by the target positioning terminal on the first positioning terminal.
[0174] In actual application, the processing unit 902 can be implemented by a processor in the positioning terminal in combination with a communication interface, and the acquisition unit 901, the determination unit, etc. can be implemented by a communication interface in the digital key positioning method device.
[0175] It should be noted that: the above embodiment provides a digital key positioning method device. When performing the digital key positioning method, only the division of the above program modules is used as an example. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device is divided into different program modules to complete all or part of the processing described above. In addition, the digital key positioning method device provided in the above embodiment and the digital key positioning method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0176] Based on the hardware implementation of the above program modules, and in order to implement a digital key positioning method provided in an embodiment of the present application, an embodiment of the present application also provides a positioning terminal, such as Fig.10 As shown, the positioning terminal 1000 includes:
[0177] CPU 1001, memory 1002, input / output interface 1003, display unit 1004;
[0178] The memory 1002 is a temporary storage memory or a permanent storage memory;
[0179] The central processing unit 1001 is configured to communicate with the memory 1002 and execute the instruction operations in the memory 1002 to perform any step of the above-mentioned digital key positioning method.
[0180] Of course, in actual application, the various components in the positioning terminal 1000 are coupled together through the bus system 1005. It can be understood that the bus system 1005 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 1005 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, Fig.10 Various buses are labeled as bus system 1005 .
[0181] The memory 1002 in the embodiment of the present application is used to store various types of data to support the operation of the positioning terminal 1000. Examples of such data include: any computer program used to operate on the positioning terminal 1000.
[0182] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed on a computer, the computer executes any one of the steps of the above-mentioned digital key locating method.
[0183] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0184] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0185] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0186] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0187] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
Claims
1. A digital key positioning method, It is characterized in that include: Get the sensor data carried in the digital key broadcast information, including Bluetooth signal strength RSSI information, speed, acceleration, and geomagnetic field strength; According to the Kalman filter algorithm, the sensor data is fused and processed to obtain the relative position information of the digital key and the positioning terminal; Obtain the location coordinates of the positioning terminal; The location coordinates of the digital key are calculated by combining the relative position information and the location coordinates of the positioning terminal.
2. The digital key positioning method according to claim 1, It is characterized in that Get the sensor data carried by the digital key broadcast information, including: The digital key broadcast information is decrypted using a pre-stored decryption key to obtain the sensor data carried in the digital key broadcast information.
3. The digital key positioning method according to claim 1, It is characterized in that The positioning terminal is a vehicle terminal, which includes a main anchor point and multiple sub-anchor points; Multiple sub-anchor points are used to obtain sensor data carried by the digital key broadcast information, and the main anchor point is used to fuse the sensor data according to the Kalman filter algorithm to obtain the relative position information of the digital key and the positioning terminal.
4. The digital key positioning method according to claim 1, It is characterized in that According to the Kalman filter algorithm, the sensor data is fused and processed to obtain the relative position information of the digital key and the positioning terminal, including: The state vector is updated using the state transfer equation; the state vector consists of position, velocity, and acceleration; the state transfer equation is: x k =Ax k-1 +Bu k +w k Among them, x k is the state vector at time k, x k-1 is the state vector at time k-1, A is the state transfer matrix, B is the control input matrix, u k is the external control input constant at time k, w k is the process noise; Input the state vector into the observation formula to calculate the observation vector; the observation formula is: Z k =Hx k +v k Among them, Z K is the observation vector at time k, H is the observation matrix, v k is the observation noise; Perform Kalman filter prediction, which includes using the state transfer equation to calculate the state vector at the next moment and updating the covariance matrix: The state transfer equation is: The formula for updating the covariance matrix is: P k|k-1 =AP k-1|k-1 *A T +Q in, is the state prediction value at time k, is the estimated value of the state at time k-1, u k is the external control input at time k, P k|k-1 is the state prediction covariance matrix at time k, P k-1|k-1 is the state estimation covariance matrix at time k-1, A T is the transposed matrix of the state transfer matrix A, Q is the process noise covariance matrix; Perform a Kalman filter update, which includes comparing the observation vector with the state vector and calculating the Kalman gain to fuse the observation vector and the state vector: The formula for calculating the Kalman gain is: K k =P k|k-1 *H T *(H*P k|k-1 *H T +R) -1 Among them, K k is the Kalman gain at time k, R is the observation noise matrix, H T is the transposed matrix of the state transfer matrix H; The formula for fusing the observation vector and the state vector is: in, is the state prediction value at time k, Relative position information of the digital key and the positioning terminal; Perform a covariance update: P k|k =(I-K k H)P k|k-1 Among them, P k|k for The corresponding error covariance matrix, I is the identity matrix.
5. The digital key positioning method according to claim 4, It is characterized in that The state transfer matrix A is The control input matrix B is The observation matrix H is [1 0 0], and the process noise covariance matrix Q is The observation noise matrix is [0 1], and the identity matrix I is The time step dt is 0.
1.
6. The digital key positioning method according to claim 4, It is characterized in that The positioning terminal includes a first positioning terminal and a second positioning terminal. Before acquiring the sensor data carried by the digital key broadcast information, the method further includes: After the first positioning terminal initiates a key search request, the first positioning terminal and the second positioning terminal obtain a key search command and a decryption key issued by the server; the key search command instructs the positioning terminal to monitor the broadcast information of the digital key; Determine the positioning terminal that receives the digital key broadcast information so that the positioning terminal that receives the digital key broadcast information executes the digital key positioning method and transmits the calculated digital key position coordinates and error covariance matrix to the server side, and the first positioning terminal obtains and displays the position coordinates of the server side.
7. The digital key positioning method according to claim 6, It is characterized in that Get and display the server-side location coordinates, including: If both the first positioning terminal and the second positioning terminal receive the digital key broadcast information, the positioning terminal corresponding to the error covariance matrix with the smallest value is determined as the target positioning terminal; The position coordinates calculated by the target positioning terminal are displayed on the first positioning terminal.
8. A digital key positioning device, It is characterized in that include: An acquisition unit, used to acquire sensor data carried in the digital key broadcast information, the sensor data including Bluetooth signal strength RSSI information, speed, acceleration, and geomagnetic field strength; A processing unit, used to perform fusion processing on the sensor data according to the Kalman filter algorithm to obtain the relative position information of the digital key and the positioning terminal; The acquisition unit is also used to acquire the position coordinates of the positioning terminal; The processing unit is also used to calculate the location coordinates of the digital key by combining the relative position information and the location coordinates of the positioning terminal.
9. A positioning terminal, It is characterized in that include: CPU, memory and input / output interface; The memory is either transient storage memory or persistent storage memory; The central processing unit is configured to communicate with the memory and execute instructions in the memory to perform the method of any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is run on a computer, the method of any one of claims 1 to 7 is executed.
Citation Information
Cited By
Digital key positioning method, device and equipment and storage medium
CN119395630A
Control method and system for intelligent anti-lost equipment
CN120544352A
A control method and system for intelligent anti-lost device
CN120544352B
Distance measurement method and device based on bidirectional signal, equipment and storage medium
CN120769221A
A ranging method and device based on bidirectional signals, equipment and storage medium
CN120769221B
