A vehicle-mounted digital key positioning method and system

CN122952272APending Publication Date: 2026-10-20FORYOU MULTIMEDIA ELECTRONICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610839571.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-11
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

然而,该方案存在一个固有缺陷:单个UWB锚点仅能提供距离信息,无法确定终端在以锚点为圆心的圆上的具体方位,导致定位存在严重的角度歧义,无法区分终端位于车辆的左侧还是右侧、前方还是后方

Benefits of technology

[0017]与现有技术相比,本发明的有益效果是:通过融合蓝牙RSSI方位判定与UWB测距信息,显著提升了车载数字钥匙定位的精度、鲁棒性与实时性。采用对角线分解与递进式比较的快速方位判定方法,在不依赖复杂天线阵列或高成本硬件的前提下,实现了对角方位与边方位的准确识别;结合双窗口滑动平均滤波与快速靠近事件检测,既保证了方位判定的稳定性,又能在用户快速接近车辆时即时响应。利用RSSI预处理过程中生成的移动终端运动趋势状态,对UWB异常测距值进行智能补偿,有效抑制了多径、遮挡等干扰,同时通过基于恒速运动模型的卡尔曼滤波器对距离进行平滑与预测,进一步提升了距离输出的连续性与可信度在融合阶段,将带方位标签的距离信息与预设的多级区域边界阈值相结合,实现了迎宾区、闭锁区、解锁区及车内区的精细判定。本发明在不增加硬件成本的前提下,实现了高可靠的近场定位,能够有效支撑无钥匙进入、一键启动等车载数字化功能,提升了用户体验与系统的抗干扰能力。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This invention relates to a vehicle-mounted digital key positioning method and system, wherein the method includes the following steps: Step S1, in each algorithm cycle, the main module acquires raw UWB ranging values, and simultaneously acquires multiple raw RSSI values ​​from the module antennas via multiple BLEs; Step S2, the raw RSSI values ​​are preprocessed, and based on the preprocessed multi-channel RSSI signals, the discrete orientation information of the mobile terminal is determined by diagonal decomposition and progressive comparison, and the motion trend state of the mobile terminal is determined; Step S3, the raw UWB ranging values ​​are subjected to anomaly detection and compensation processing, and smoothed and motion predicted by Kalman filtering to obtain smoothed distance information; Step S4, the discrete orientation information and smoothed distance information are fused to generate distance information with orientation tags, and the functional area where the mobile terminal is located is determined according to preset multi-level area boundary thresholds. This invention can achieve reliable near-field positioning, improve user experience and the system's anti-interference capability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of vehicle digital key technology, and more specifically, to a vehicle digital key positioning method and system. Background Technology

[0002] In the field of intelligent connected vehicles, digital key systems based on mobile terminals are gradually replacing traditional physical keys, enabling functions such as keyless entry, start-up, and personalized cabin adjustments. Accurate and low-latency positioning of the mobile terminal is the core technological foundation for achieving these functions.

[0003] Currently, the mainstream vehicle digital key positioning technologies are mainly divided into two major technical routes: the ultra-wideband (UWB) ranging solution and the Bluetooth Received Signal Strength Indicator (RSSI) solution.

[0004] UWB-based solutions leverage their high temporal resolution to achieve centimeter-level ranging accuracy. For example, distance to a mobile terminal can be measured using a single UWB anchor point, and the location of the terminal can be determined by combining this distance with a distance threshold. However, this approach has an inherent limitation: a single UWB anchor point only provides distance information and cannot determine the terminal's specific orientation on a circle centered at the anchor point. This leads to significant angular ambiguity in positioning, making it impossible to distinguish whether the terminal is on the left or right side of the vehicle, or in front or behind it. While adding multiple UWB anchor points for triangulation can solve this problem, it significantly increases the system's hardware cost and deployment complexity.

[0005] RSSI-based solutions utilize the signal strength attenuation with distance to locate the vehicle by deploying one or more Bluetooth modules. Simple single-antenna solutions can only roughly determine the distance between the terminal and the vehicle, providing no orientation information. More advanced multi-antenna solutions can determine the approximate location of the terminal by comparing the differences in RSSI signal strength received by different antennas. However, RSSI signals are susceptible to environmental factors such as human body obstruction and multipath effects, resulting in significant fluctuations and unstable orientation determination results based on fixed thresholds, easily leading to false triggers. Secondly, traditional moving average filtering introduces significant response delays while suppressing noise, causing the system to fail to unlock promptly when the user rapidly approaches the vehicle. Furthermore, existing technologies often rely on simple threshold comparisons or single-point differentials to detect orientation and distance trends, which are prone to misjudgment in complex scenarios such as signal fluctuations or users walking around the vehicle, leading to system logic confusion and unlocking or locking failures. Finally, the directivity differences of each antenna result in inconsistent signal strength baselines at different locations; using a uniform threshold further degrades the determination performance. Summary of the Invention

[0006] The purpose of this invention is to provide a vehicle digital key positioning method and system that can achieve reliable near-field positioning, improve user experience and system anti-interference capability.

[0007] A method for locating a vehicle digital key includes the following steps: Step S1: In each algorithm cycle, the raw UWB ranging value is collected by the main module with integrated UWB module, and multiple raw RSSI values ​​are collected from the module antenna by multiple distributed BLEs deployed on the vehicle. Step S2: Preprocess the raw RSSI values, and based on the preprocessed multi-channel RSSI signals, determine the discrete orientation information of the mobile terminal and the motion trend state of the mobile terminal by diagonal decomposition and progressive comparison. Step S3: Perform anomaly detection and compensation processing on the raw UWB ranging value, and perform smoothing and motion prediction through Kalman filtering to obtain smoothed distance information; Step S4: The discrete orientation information and the smoothed distance information are fused to generate distance information with orientation labels, and the functional area where the mobile terminal is located is determined according to the preset multi-level area boundary threshold.

[0008] Furthermore, in step S2, the diagonal decomposition and progressive comparison include: Based on the deployment location of each BLE slave module antenna, the RSSI signal difference is decomposed into the main diagonal dimension and the sub-diagonal dimension; Execute Level 1 Judgment: When the difference between the signal strength of the strongest antenna and the signal strength of the second strongest antenna is greater than or equal to the first preset threshold, it is directly determined as the corresponding angular azimuth. If the first-level judgment is not satisfied, the second-level judgment is executed: the side azimuth is synthesized based on the directional components of the diagonal where the strongest antenna is located and the other diagonal.

[0009] Furthermore, in step S3, the anomaly detection and compensation processing of the raw UWB ranging value specifically includes: The raw UWB ranging value is compared with the previous valid output value. If the deviation exceeds the preset threshold, it is judged as an abnormal value. Obtain the motion trend status of the mobile terminal generated during the preprocessing process in step S2, and perform trend compensation output on the outlier based on the motion trend status.

[0010] Furthermore, in step S3, the smoothing and motion prediction using Kalman filtering includes: Construct a one-dimensional Kalman filter containing two state vectors: distance and velocity. A constant velocity motion model is used for state prediction, and the state is updated by combining the observed values. The output is a smoothed filtered distance.

[0011] Furthermore, the preprocessing of the raw RSSI value in step S2 includes: A dual-window moving average filter is applied to each RSSI signal to obtain a short-window smoothed value for fast response and a long-window azimuth average value for azimuth determination. It detects real-time rapid approach events, and when the triggering conditions are met, it skips the moving average filter and directly uses the real-time signal for region determination.

[0012] Furthermore, in step S2, determining the motion trend state of the mobile terminal includes: For the preprocessed RSSI time series, linear regression fitting was performed using two time scales: short window and long window, and the slope was calculated for each. Based on the slope and a preset dual-scale threshold, the motion trend of the mobile terminal relative to the vehicle is determined, and a trend state machine is used for anti-shake processing.

[0013] Furthermore, in step S4, the functional areas, from the distance from the vehicle center to the distance from the vehicle center, include a welcoming area, a locking area, an unlocking area, and an interior area. When it is determined that the mobile terminal is in the interior area, the RSSI orientation determination result is used directly.

[0014] Furthermore, when it is determined that the mobile terminal is in a locked or unlocked area, the fused positioning and region determination further includes: Based on the comparison between the smoothed distance information and a preset distance threshold, the distance range of the mobile terminal relative to the vehicle is initially determined; Based on the discrete orientation information, the specific orientation of the mobile terminal relative to the vehicle is determined; Based on the distance range and the specific location, the functional area where the mobile terminal is located is jointly determined, and corresponding vehicle control commands are generated.

[0015] A vehicle-mounted digital key positioning system based on Bluetooth RSSI and UWB fusion, used to implement the above method, includes: Hardware acquisition layer: includes a main module that integrates a UWB ranging module and a Bluetooth communication module, as well as multiple distributed BLE slave module antennas deployed at the four corners of the vehicle, for parallel acquisition of UWB ranging signals and multiple RSSI signals; RSSI orientation processing module: used to preprocess the multi-channel RSSI signals, determine the orientation by diagonal decomposition and detect the trend, and output the discrete orientation information and motion trend of the mobile terminal. UWB distance processing module: used to perform anomaly compensation, Kalman filtering smoothing and motion prediction on the UWB ranging signal, and output smooth distance information; Fusion Decision Module: Used to receive the discrete orientation information and the smoothed distance information, perform fusion positioning, and determine the functional area where the mobile terminal is located based on preset multi-level regional thresholds.

[0016] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method.

[0017] Compared with existing technologies, the beneficial effects of this invention are as follows: By fusing Bluetooth RSSI orientation determination and UWB ranging information, the accuracy, robustness, and real-time performance of vehicle digital key positioning are significantly improved. A fast orientation determination method using diagonal decomposition and progressive comparison is employed, achieving accurate identification of diagonal and side orientations without relying on complex antenna arrays or high-cost hardware. Combined with dual-window moving average filtering and fast proximity event detection, the stability of orientation determination is ensured, and immediate response is possible when a user rapidly approaches the vehicle. The mobile terminal motion trend state generated during RSSI preprocessing is used to intelligently compensate for abnormal UWB ranging values, effectively suppressing interference from multipath and occlusion. Simultaneously, a Kalman filter based on a constant-velocity motion model is used to smooth and predict distances, further improving the continuity and reliability of distance output. In the fusion stage, distance information with orientation tags is combined with preset multi-level area boundary thresholds, achieving precise determination of the welcome area, locking area, unlocking area, and interior area. This invention achieves highly reliable near-field positioning without increasing hardware costs, effectively supporting in-vehicle digital functions such as keyless entry and one-button start, and improving user experience and system anti-interference capabilities. Attached Figure Description

[0018] Figure 1 This is a flowchart of the vehicle digital key positioning method according to an embodiment of the present invention.

[0019] Figure 2 This is a flowchart illustrating the vehicle-mounted digital key positioning method according to an embodiment of the present invention.

[0020] Figure 3 This is a schematic diagram of the antenna deployment for the vehicle-mounted digital key positioning method according to an embodiment of the present invention.

[0021] Figure 4 This is a schematic diagram illustrating the orientation division of the vehicle-mounted digital key positioning method according to an embodiment of the present invention. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0023] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0024] Please refer to Figures 1 to 4 The vehicle-mounted digital key positioning method of the present invention includes the following steps: Step S1: In each algorithm cycle, the raw UWB ranging value is collected by the main module with integrated UWB module, and multiple raw RSSI values ​​are collected from the module antenna by multiple distributed BLEs deployed on the vehicle. Step S2: Preprocess the raw RSSI values, and based on the preprocessed multi-channel RSSI signals, determine the discrete orientation information of the mobile terminal and the motion trend state of the mobile terminal by diagonal decomposition and progressive comparison. Step S3: Perform anomaly detection and compensation processing on the raw UWB ranging value, and perform smoothing and motion prediction through Kalman filtering to obtain smoothed distance information; Step S4: The discrete orientation information and the smoothed distance information are fused to generate distance information with orientation labels, and the functional area where the mobile terminal is located is determined according to the preset multi-level area boundary threshold.

[0025] In this embodiment, the vehicle is equipped with one main module and four BLE (Bluetooth Low Energy) slave module antennas. The main module, located on the vehicle's center console, integrates a Bluetooth communication module and a UWB ranging module, serving as the central signal processing and decision-making unit. The four BLE slave module antennas are deployed at the vehicle's front left (ANT_LF), front right (ANT_RF), rear left (ANT_LR), and rear right (ANT_RR) corners, respectively. They are connected to the main module via wired or wireless means and are responsible for receiving Bluetooth signals from the terminal and reporting RSSI. The four BLE slave module antennas distributed at the four corners of the vehicle form a spatial diversity receiving array, providing both orientation awareness and improved robustness through multi-channel signal redundancy.

[0026] Each algorithm cycle (set to 100ms in this embodiment) acquires the following two types of raw signals in parallel: acquiring the raw UWB ranging values ​​between the UWB ranging module and the mobile terminal. Obtain the raw RSSI values ​​of the 4-channel BLE slave module antennas. and the RSSI values ​​collected by the main module itself. .

[0027] In step S2, the diagonal decomposition and progressive comparison include: decomposing the RSSI signal difference of each BLE slave module antenna into a main diagonal dimension and a secondary diagonal dimension according to the deployment position of each BLE slave module antenna; performing a first-level judgment: when the difference between the signal strength of the strongest antenna and the signal strength of the second strongest antenna is greater than or equal to a first preset threshold, it is directly determined as the corresponding angular azimuth; if the first-level judgment is not satisfied, then performing a second-level judgment: synthesizing the side azimuth according to the directional components of the diagonal where the strongest antenna is located and the other diagonal.

[0028] For example, the RSSI diagonal decomposition azimuth determination is specifically as follows: the 800ms moving average RSSI values ​​of the 5 RSSI channels (1 main module + 4 BLE slave module antennas) are bubble sorted and arranged from weakest to strongest signal strength, while the difference between each antenna and the strongest antenna is calculated.

[0029] Select the strongest antenna after sorting. and secondary strong antenna When the main module (ANT_TYPE_CENTRAL) appears at the strongest or second strongest position, it is excluded, and the strongest and second strongest BLE antennas are selected from the remaining module antennas to ensure that the azimuth determination is based on the spatially distributed antenna signals rather than the near-field signals of the central control module.

[0030] The orientation determination uses a progressive logic, that is, it first attempts a high-precision first-level determination (corner orientation), and if the conditions are not met, it degrades to a second-level determination (edge ​​orientation), ultimately forming a progression from fine to coarse orientation accuracy: The first step is to perform a first-level determination (corner orientation): The signal differences from the four BLE modules are decomposed into two independent diagonal dimensions to determine the terminal's azimuth component in the vehicle coordinate system. Each diagonal corresponds to two angular azimuths, covering a total of four angular azimuths. Main diagonal (left front - right rear diagonal): Compare the 800ms average RSSI difference between the left front antenna and the right rear antenna to determine the directional component of the terminal on the main diagonal. ; Where Ravg,LF is the 800ms average RSSI value of the left front antenna (LF); Ravg,RR is the 800ms average RSSI value of the right rear antenna (RR); θLF is the difference threshold for determining "left front", 10dB; θRR is the difference threshold for determining "right rear", 6dB.

[0031] Sub-diagonal (Right Front - Left Rear Diagonal): Compare the 800ms average RSSI difference between the right front antenna and the left rear antenna to determine the directional component of the terminal on the sub-diagonal. ; Where Ravg,RF is the 800ms average RSSI value of the right front antenna (RF); RRavg,LR is the 800ms average RSSI value of the left rear antenna (LR); θRF is the difference threshold for determining "right front", 10dB; and θLR is the difference threshold for determining "left rear", 6dB.

[0032] The two diagonals are calculated independently and simultaneously, regardless of the order. When the strongest antenna signal significantly leads (the difference between the second strongest antenna signal and the second strongest antenna signal), the calculation proceeds. When a direction component is determined for a certain diagonal, the terminal orientation is directly determined as the angular orientation (left front / right back / right front / left back) corresponding to that diagonal direction component, and the determination ends.

[0033] Main diagonal threshold ( ), and the secondary diagonal threshold ( The (dB) asymmetry is due to the different signal attenuation characteristics of antennas facing the terminal in different directions—the signals are stronger in the left front and right front directions, requiring stricter thresholds to avoid misjudgment; the signals are weaker in the right rear and left rear directions, requiring more lenient thresholds to ensure reliable detection.

[0034] The second step involves performing a secondary determination (side orientation): When the primary judgment condition is not met (the strongest antenna signal is not significantly leading), When the angle is not directly output, the decision level is downgraded to Level 2. Level 2 decision no longer outputs the angular azimuth directly, but instead synthesizes the side azimuth (front / back / left / right) based on the directional components of the diagonal along which the strongest antenna is located and the other diagonal.

[0035] When both diagonal directions are "directionless", if If the azimuth is still determined to be the angular azimuth corresponding to the strongest antenna (with a difference of 4~10dB, which is not enough to meet the strict standard of 10dB but has a certain tendency); otherwise, the azimuth determination is invalid and no azimuth is output.

[0036] When the strongest antenna is the main module and its average RSSI value exceeds the in-vehicle threshold, it is determined to be the in-vehicle orientation, which has the highest priority and is not subject to the progressive determination process.

[0037] The new azimuth requires confirmation for two consecutive algorithm cycles (200ms) before taking effect to prevent frequent azimuth switching caused by short-term signal fluctuations. When the azimuth switches from one side to the other (e.g., left → right, front → back), the trend detection restart mechanism is triggered to reset the start time and initial RSSI value of the downward trend, avoiding misjudgment of trend data under the old azimuth under the new azimuth.

[0038] In step S3, the anomaly detection and compensation processing of the raw UWB ranging value specifically includes: comparing the raw UWB ranging value with the previous valid output value; if the deviation exceeds a preset threshold, it is determined to be an anomaly; obtaining the motion trend state of the mobile terminal generated during the preprocessing in step S2, and performing trend compensation output on the anomaly value according to the motion trend state.

[0039] For example, the original distance measurement value Perform outlier detection and define the deviation amount. ,in The last valid output value is used. If Δd > 150cm, it is considered an outlier. If Δd > 300cm, it is considered a serious outlier.

[0040] Outliers are not used directly, but are determined based on the current state of the trend state machine in step S2. The output is compensated. The trend state machine performs fault-tolerant debouncing processing on the original trend, and its output... More stable and reliable than the original Trend, avoiding frequent switching of compensation direction due to brief signal fluctuations. Compensated distance. The calculation rules are as follows: ; Where dcomp is the distance value used after compensation; dprev is the distance of the last effective output; δleave is the compensation increment under the trend of moving away, about 40cm; δapproach is the compensation reduction under the trend of moving closer, about 50cm; δstable is the small outward compensation amount under the trend of stability; and Scurrent is the previous trend state (approaching / moving away / stable).

[0041] When ranging data is abnormal, the abnormal value is not blindly accepted. Instead, reasonable incremental compensation is applied based on the terminal's movement direction (approaching / moving away / stable), building upon the previous valid output value. When moving away, the compensation increases outward by approximately 40cm; when moving closer, it decreases inward by approximately 50cm (the compensation is greater when moving closer because the distance change is more drastic); and when moving steadily, a small outward compensation prevents the terminal from remaining stationary within the unlocking area. The maximum number of consecutive compensations is [number missing]. When the limit is exceeded, the original value is forced to be used to avoid long-term compensation causing the distance estimate to deviate significantly from the true value.

[0042] For the special case where the ranging value is 0 (frequently occurring in in-vehicle scenarios where the UWB signal is blocked by the metal body), different random compensation strategies are adopted based on the historical effective value range: ; When the historical valid value is less than 300cm (the terminal may still be near the vehicle), a random compensation of ±30cm is applied to the original value to maintain the random fluctuation of the distance output and prevent malicious use. When the historical valid value is greater than 300cm (the terminal has moved away from the vehicle), compensation is applied outward to ensure that the zero value is not mistakenly judged as the terminal being close and triggers the unlocking.

[0043] In step S3, the smoothing and motion prediction using Kalman filtering includes: establishing a one-dimensional Kalman filter containing two state vectors, namely distance and velocity; using a constant velocity motion model to predict the state, and combining the observed values ​​to update the state, and outputting the smoothed filtered distance.

[0044] For example, the smoothing and motion prediction via Kalman filtering includes a prediction step and an update step, wherein the prediction step is: ; in, This is a priori state estimate (predicted value); The previous time step represents the posterior state estimate; Δt is the sampling period, 100ms in this embodiment; Pk− is the prior estimation covariance matrix; Pk−1+ is the previous time step's posterior estimation covariance matrix; the state transition matrix is... Process noise covariance . The sampling period is 100ms. The process noise variances for distance and velocity are respectively.

[0045] The update steps are as follows: ; ; ; Where the observation matrix (Distance is observed only; velocity is hidden), R is the observation noise variance. Output filtered distance. Kalman gain Reliability of automatic balancing of predicted and observed values: When observation noise is high (large R), Reduced, more dependent on prediction; when prediction uncertainty is large ( When (large), Increased, it relies more on observation.

[0046] When data loss is detected and data is received again, the covariance matrix is ​​reset. Initial value This avoids serious bias in historical predictions after a long period of data loss. This reset mechanism ensures that the filter can quickly converge to the true distance after data recovery, rather than being dragged down by outdated predictions.

[0047] Historical smoothing is performed on the continuous UWB filtered distance, and the distance deviation is defined. : when (Excessive deviation may indicate a jump): Correction using motion trend prediction. ,in This is the velocity state estimate output by the Kalman filter in the previous cycle. Excessive deviation usually indicates an anomaly in the current ranging result (such as a sudden change in distance due to a UWB ranging jump). In this case, the current value should not be directly accepted; instead, a prediction should be made based on the velocity estimate from the Kalman filter to maintain the continuity of the distance output.

[0048] when (Reasonable bias): Weighted average smoothing is used. , Weighting coefficients It favors the current value, which retains the ability to track changes in the actual distance (70% weight to the current value) while suppressing random fluctuations through 30% historical weight.

[0049] Step S2, which involves preprocessing the raw RSSI values, includes: performing a dual-window moving average filter on each RSSI signal to obtain a short-window smoothed value for fast response and a long-window azimuth average value for azimuth determination; detecting real-time fast approach events, and when the triggering conditions are met, skipping the moving average filter and directly using the real-time signal for area determination.

[0050] For example, preprocessing the raw RSSI values ​​includes performing a two-window moving average filter on each RSSI channel, specifically setting a short window (3 sampling periods, 300ms) to output a smoothed value. Used for area determination and rapid response; long window (8 sampling periods, 800ms) outputs azimuth average value. It is used for orientation determination. Short windows offer fast response but high noise, while long windows provide good smoothness but high latency. The dual-window design balances response speed and determination stability. A real-time signal direct channel is also provided for three-way parallel processing.

[0051] When the real-time RSSI value exceeds the unlock threshold for N=3 consecutive sampling periods, it is determined to be a rapid approach event. The area determination then switches to using the average real-time signal value for threshold comparison. After the rapid approach event disappears, the smoothing filter mode is automatically restored. This allows for noise suppression using smoothing filtering during normal walking, and bypassing smoothing filtering to directly use the real-time signal when the signal is continuously and strongly exceeding the threshold during running approach, achieving millisecond-level unlock response. Simultaneously, the three consecutive confirmation conditions prevent accidental noise-triggered erroneous switching.

[0052] In step S2, determining the motion trend state of the mobile terminal includes: performing linear regression fitting on the preprocessed RSSI time series using two time scales, a short window and a long window, and calculating the slope respectively; based on the slope and a preset dual-scale threshold, determining the motion trend of the mobile terminal relative to the vehicle, and using a trend state machine for image stabilization.

[0053] For example, for RSSI time series Linear regression was performed using the least squares method, and the fitted model is as follows: ; Where W is the slope of the regression line, reflecting the rate of change of RSSI over time (positive values ​​indicate an increase / approach, negative values ​​indicate a decrease / movement); t is the time variable (sampling time); and b is the intercept of the regression line.

[0054] The formulas for calculating the slope W and the intercept b are as follows: ; ; Where N is the number of sampling points (window length) participating in the regression calculation, ti is the time of the i-th sampling point, and R(ti) is the original or smoothed RSSI value of the i-th sampling point.

[0055] The slope W reflects the trend of signal change: →Upward trend (terminal approaching). → Downward trend (terminals moving away). →The trend is stable. Compared with the traditional single-point difference method, linear regression fits the entire trend rather than just comparing the difference between two sampling points, effectively suppressing the interference of random fluctuations on trend judgment.

[0056] Use short window ( One sampling period, i.e., 400ms) and a long window ( Calculate the slope for each sampling period (i.e., 800ms). Dual-scale trend joint determination rule (short window threshold) Long window threshold ): ; Wherein, Ws is the slope obtained by linear regression of the short window (4 sampling periods, 400ms), Wl is the slope obtained by linear regression of the long window (8 sampling periods, 800ms), θs is the slope threshold of the short window, which is 1.2 in this embodiment; θl is the slope threshold of the long window, which is 0.6 in this embodiment.

[0057] The slope threshold for the short window (1.2) is greater than that for the long window (0.6). This is because the short window has less data and a larger variance in slope estimation, requiring a stricter threshold to avoid misjudgment. The long window has more data and a more stable slope estimation, allowing for a more lenient threshold to capture slow trend changes. A trend is determined to be established if either scale is satisfied; the short window ensures a fast response, while the long window ensures stable judgment.

[0058] To prevent the trend determination result from switching back and forth frequently due to short-term signal fluctuations, this embodiment provides a trend state machine that does not switch states immediately every time a trend change is detected, but requires the trend change to continue for a period of time before confirming the switch.

[0059] The trend state machine has three states: "No Trend" (at the beginning, direction not yet determined), "Approaching" (the terminal is approaching the vehicle), and "Distant" (the terminal is moving away from the vehicle). The state transition rules are as follows: When an "upward" trend is detected, switch to "closer" state; When a "downward" trend is detected, switch to "away" mode. When a "stable" trend is detected, maintain the current state. Express the state transition function using a mathematical formula: ; Wherein, Scurrent represents the current trend state (close to / far from / no trend), Sapproach represents the close state, Sleave represents the far state, and Snone represents the no-trend state (stable).

[0060] In real-world scenarios, signal fluctuations may cause the detected trend in one or two cycles to be inconsistent with the actual direction of motion (for example, a user may be approaching a vehicle, but a random sample may show "stable" due to noise). To address this, this invention incorporates a trend failure counter. When a newly detected trend is inconsistent with the current state, the state is not switched immediately, but rather... Add 1; only when Exceeding the maximum fault tolerance number Only then is the state switch confirmed.

[0061] In step S4, the functional areas, from the distance from the vehicle center to the distance from the vehicle center, include a welcome area, a locking area, an unlocking area, and an interior area. When it is determined that the mobile terminal is in the interior area, the RSSI orientation determination result is used directly.

[0062] When the mobile terminal is determined to be in a locked or unlocked zone, the fusion positioning and region determination further includes: comparing the smoothed distance information with a preset distance threshold to initially determine the distance range of the mobile terminal relative to the vehicle; combining the discrete orientation information to determine the specific orientation of the mobile terminal relative to the vehicle; and jointly determining the functional area where the mobile terminal is located based on the distance range and the specific orientation, and generating corresponding vehicle control commands.

[0063] For example, the discrete azimuth Direct output from step ③ is compared with the UWB smoothed distance. The data is merged to form a positioning result. This refers to the spatial orientation of the location information description terminal around the vehicle, and the precise distance from the location information description terminal to the main module.

[0064] Its physical meaning is as follows: UWB provides the precise distance from the terminal to the main module (the radius of the circle), and RSSI diagonal orientation determination provides the approximate orientation of the terminal on the circle (the angular direction on the circle). Combining the two correlates one-dimensional distance information with orientation information, solving the positioning ambiguity problem that a single UWB anchor point cannot distinguish orientation. Compared with the traditional scheme of "using only the position of the strongest antenna as the orientation", the diagonal decomposition orientation determination of this invention can distinguish angular orientation (left front / right front / left rear / right rear) and side orientation (front / rear / left / right), providing more refined orientation information for fusion positioning.

[0065] When the RSSI orientation is determined to be inside the vehicle, distance information is no longer output because UWB ranging values ​​are unreliable in the vehicle environment (frequently showing 0 values). Determining the RSSI orientation to be inside the vehicle is itself the most reliable positioning conclusion.

[0066] Based on the terminal smoothing distance The location of the terminal is accurately determined by comparing the Direction output in step ③ with the boundary distance threshold of each region. The final region determination result is one of four levels: Output the final localization result. — Orientation describes the spatial orientation of the terminal around the vehicle; distance describes the precise distance from the terminal to the main module; area describes the functional area where the terminal is located.

[0067] The specific definitions of the functional areas are shown in the table below:

[0068] in The threshold values ​​for the boundary distances of each region are set, and the specific values ​​are distributed online through calibration parameters. At this time, regardless of the distance value, it is directly determined to be the area inside the vehicle, because the UWB ranging value is unreliable in the vehicle scene, and the RSSI orientation determination to be inside the vehicle is the most reliable positioning conclusion.

[0069] This application also provides a vehicle digital key positioning system based on the fusion of Bluetooth RSSI and UWB, for implementing the above method, including: Hardware acquisition layer: includes a main module that integrates a UWB ranging module and a Bluetooth communication module, as well as multiple distributed BLE slave module antennas deployed at the four corners of the vehicle, for parallel acquisition of UWB ranging signals and multiple RSSI signals; RSSI orientation processing module: used to preprocess the multi-channel RSSI signals, determine the orientation by diagonal decomposition and detect the trend, and output the discrete orientation information and motion trend of the mobile terminal. UWB distance processing module: used to perform anomaly compensation, Kalman filtering smoothing and motion prediction on the UWB ranging signal, and output smooth distance information; Fusion Decision Module: Used to receive the discrete orientation information and the smoothed distance information, perform fusion positioning, and determine the functional area where the mobile terminal is located based on preset multi-level regional thresholds.

[0070] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method.

[0071] When the computer program / instructions are executed by the vehicle's central processing unit, microcontroller (MCU) or system-on-a-chip (SoC), the vehicle digital key positioning method described in any of the above embodiments is implemented.

[0072] The storage medium may include, but is not limited to: read-only memory (ROM), random access memory (RAM), flash memory, programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), hard disk drive (HDD), solid-state drive (SSD), optical disc (CD / DVD / Blu-ray), etc.

[0073] In addition, the computer program can be downloaded online and stored in the vehicle's storage medium via OTA (Over-The-Air) technology, enabling remote updates of the vehicle's digital key positioning algorithm.

[0074] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for locating a vehicle-mounted digital key, characterized in that, Includes the following steps: Step S1: In each algorithm cycle, the raw UWB ranging value is collected by the main module with integrated UWB module, and multiple raw RSSI values ​​are collected from the module antenna by multiple distributed BLEs deployed on the vehicle. Step S2: Preprocess the raw RSSI values, and based on the preprocessed multi-channel RSSI signals, determine the discrete orientation information of the mobile terminal and the motion trend state of the mobile terminal by diagonal decomposition and progressive comparison. Step S3: Perform anomaly detection and compensation processing on the raw UWB ranging value, and perform smoothing and motion prediction through Kalman filtering to obtain smoothed distance information; Step S4: The discrete orientation information and the smoothed distance information are fused to generate distance information with orientation labels, and the functional area where the mobile terminal is located is determined according to the preset multi-level area boundary threshold.

2. The vehicle-mounted digital key positioning method according to claim 1, characterized in that, In step S2, the diagonal decomposition and progressive comparison include: Based on the deployment location of each BLE slave module antenna, the RSSI signal difference is decomposed into the main diagonal dimension and the sub-diagonal dimension; Execute Level 1 Judgment: When the difference between the signal strength of the strongest antenna and the signal strength of the second strongest antenna is greater than or equal to the first preset threshold, it is directly determined as the corresponding angular azimuth. If the first-level judgment is not satisfied, the second-level judgment is executed: the side azimuth is synthesized based on the directional components of the diagonal where the strongest antenna is located and the other diagonal.

3. The vehicle-mounted digital key positioning method according to claim 1, characterized in that, Step S3, specifically the anomaly detection and compensation processing of the raw UWB ranging value, includes: The raw UWB ranging value is compared with the previous valid output value. If the deviation exceeds the preset threshold, it is judged as an abnormal value. Obtain the motion trend status of the mobile terminal generated during the preprocessing process in step S2, and perform trend compensation output on the outlier based on the motion trend status.

4. The vehicle-mounted digital key positioning method according to claim 1, characterized in that, In step S3, the smoothing and motion prediction using Kalman filtering includes: Construct a one-dimensional Kalman filter with dual state vectors including distance and velocity; A constant velocity motion model is used for state prediction, and the state is updated by combining the observed values. The output is a smoothed filtered distance.

5. The vehicle-mounted digital key positioning method according to claim 1, characterized in that, Step S2, which involves preprocessing the raw RSSI value, includes: A dual-window moving average filter is applied to each RSSI signal to obtain a short-window smoothed value for fast response and a long-window azimuth average value for azimuth determination. It detects real-time rapid approach events, and when the triggering conditions are met, it skips the moving average filter and directly uses the real-time signal for region determination.

6. The vehicle-mounted digital key positioning method according to claim 1, characterized in that, In step S2, determining the motion trend state of the mobile terminal includes: For the preprocessed RSSI time series, linear regression fitting was performed using two time scales: short window and long window, and the slope was calculated for each. Based on the slope and a preset dual-scale threshold, the motion trend of the mobile terminal relative to the vehicle is determined, and a trend state machine is used for anti-shake processing.

7. The vehicle-mounted digital key positioning method according to claim 1, characterized in that, In step S4, the functional areas, from the distance from the vehicle center to the distance from the vehicle center, include a welcome area, a locking area, an unlocking area, and an interior area. When it is determined that the mobile terminal is in the interior area, the RSSI orientation determination result is used directly.

8. The method according to claim 7, characterized in that, In step S4, when it is determined that the mobile terminal is in a locked or unlocked area, the fused positioning and region determination further includes: Based on the comparison between the smoothed distance information and a preset distance threshold, the distance range of the mobile terminal relative to the vehicle is initially determined; Based on the discrete orientation information, the specific orientation of the mobile terminal relative to the vehicle is determined; Based on the distance range and the specific location, the functional area where the mobile terminal is located is jointly determined, and corresponding vehicle control commands are generated.

9. A vehicle-mounted digital key positioning system based on the fusion of Bluetooth RSSI and UWB, used to implement the method as described in any one of claims 1 to 8, characterized in that, include: Hardware acquisition layer: includes a main module that integrates a UWB ranging module and a Bluetooth communication module, as well as multiple distributed BLE slave module antennas deployed at the four corners of the vehicle, for parallel acquisition of UWB ranging signals and multiple RSSI signals; RSSI orientation processing module: used to preprocess the multi-channel RSSI signals, determine the orientation by diagonal decomposition and detect the trend, and output the discrete orientation information and motion trend of the mobile terminal. UWB distance processing module: used to perform anomaly compensation, Kalman filtering smoothing and motion prediction on the UWB ranging signal, and output smooth distance information; Fusion Decision Module: Used to receive the discrete orientation information and the smoothed distance information, perform fusion positioning, and determine the functional area where the mobile terminal is located based on preset multi-level regional thresholds.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 8.