Commercial vehicle Bluetooth key position identification method based on category-feature attention
By deploying Bluetooth modules around commercial vehicles and combining Kalman particle filtering, wavelet decomposition, and multilayer perceptron classification, the cost and accuracy issues in digital key positioning methods for commercial vehicles are solved, achieving low-cost, high-precision location recognition.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XIAN UNIV OF TECH
- Filing Date
- 2026-03-11
- Publication Date
- 2026-04-14
AI Technical Summary
Digital key positioning methods in the commercial vehicle sector struggle to balance cost control and high-precision ranging. Existing technologies such as TOA and AOA are too expensive for commercial vehicles, while RSSI methods lack sufficient accuracy in complex environments, failing to meet the positioning needs of commercial vehicles.
A commercial vehicle Bluetooth key location recognition method based on category-feature attention is adopted. By deploying Bluetooth modules around the commercial vehicle and combining Kalman particle filtering, wavelet decomposition and multilayer perceptron classification, low-cost and high-precision location recognition is achieved.
It achieves low-cost, high-precision digital key position recognition in commercial vehicles under multiple directions and postures, meeting the actual application needs of commercial vehicles.
Smart Images

Figure CN121849080A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of wireless ranging technology for digital keys, specifically relating to a method for location recognition of commercial vehicle Bluetooth keys based on category-feature attention. Background Technology
[0002] Digital vehicle keys, with their enhanced security, convenience, and versatility, are gradually replacing traditional physical keys. Currently, the installation rate of digital keys in passenger vehicles has reached 60% and is still rapidly increasing; however, the installation rate in commercial vehicles is lower and still in the research and development stage. Research on digital key technology involves key issues such as location positioning, security verification, and access sharing, with location positioning being the primary core problem to be solved. In practical applications, the vehicle terminal needs to calculate the distance between the digital key and the vehicle in real time and perform corresponding operations based on different locations. The location of the digital key is typically divided into: unlocking zone (0m–3m), welcoming zone (3m–10m), and sensing zone (10m–30m). The vehicle performs differentiated actions based on different zones to achieve seamless entry, such as… Figure 1 As shown, this is also one of the fundamental aspects of intelligent driving.
[0003] In wireless positioning technology, commonly used ranging methods include TOA (Time of Arrival), AOA (Area of Arrival), and RSSI (Received Signal Strength Indication). TOA calculates distance by measuring the time of flight of a signal from an anchor point to a tag and multiplying it by the speed of light, and is often used in high-precision ranging scenarios. However, this method requires multiple anchor points and a precise clock, and is susceptible to interference from obstructions, making it unsuitable for in-vehicle environments. AOA typically requires a receiver with an array antenna, calculating the angle of arrival of the signal by measuring the phase difference of the incoming signal. Combining multiple AOA devices allows for cross-location to determine the signal source's location. However, cost control is a key constraint in the development of digital keys for commercial vehicles; the high cost of high-precision antenna arrays makes the AOA algorithm difficult to implement in a planned manner in the commercial vehicle field. RSSI calculates the distance relative to the signal source by receiving signal strength. It is simple to acquire signals and has low implementation costs, making it the most widely used ranging method in passenger car digital keys. It is often used in conjunction with technologies such as NFC (Near Field Communication) and UWB (Ultra-Wideband), or through multiple signal generating devices for joint positioning.
[0004] Commercial vehicles, as production and operation tools, have significantly different usage scenarios and positioning requirements compared to passenger vehicles, making it impossible to directly apply digital key positioning solutions used in passenger cars. On one hand, commercial vehicles have higher cost control requirements, and commonly used solutions in passenger vehicles, such as Bluetooth hybrid solutions (e.g., UWB, biometric verification) and AOA positioning, are difficult to apply directly due to their high cost. On the other hand, commercial vehicles have larger body sizes and limited installation space in the driver's cabin, making them more sensitive to hardware layout and installation conditions. Therefore, a digital key positioning method that balances cost and ranging accuracy has become a key technology urgently needing breakthroughs in the current commercial vehicle sector. Summary of the Invention
[0005] The purpose of this invention is to provide a method for location recognition of commercial vehicle Bluetooth keys based on category-feature attention, which has the characteristics of low cost, high accuracy, and multi-directional and multi-body posture.
[0006] The technical solution adopted in this invention is a commercial vehicle Bluetooth key location recognition method based on category-feature attention, which specifically includes the following steps:
[0007] Step 1: Collect Bluetooth signal RSSI values in a real in-vehicle environment; Step 2: Preprocess the collected RSSI values; Step 3: Perform Kalman particle filtering on the preprocessed RSSI values; Step 4: Perform wavelet decomposition on the filtered data and calculate the features of each component obtained from the decomposition. Step 5: Perform multilayer perceptron classification based on the category-feature attention mechanism.
[0008] The invention is further characterized by: Step 1 specifically involves deploying [the equipment] around the commercial vehicle. M Each Bluetooth module serves as a signal anchor point. The mobile terminal synchronously collects the RSSI values of the Bluetooth signals at each information anchor point as the digital key approaches and moves away from the commercial vehicle, or the RSSI values are directly read from the reserved interface of the vehicle Bluetooth module. The mobile device samples the Bluetooth signal RSSI value at a frequency of 20Hz. The mobile device is a mobile terminal running iOS 11 or above or Android 8.0 Oreo or above. The Bluetooth module is a low-power Bluetooth module that conforms to Bluetooth 5.0 or above.
[0009] Step 2 involves preprocessing the collected RSSI values, including weighting them with the processed RSSI values from the previous time step to reduce outliers caused by large fluctuations in RSSI measurements. The specific formula is as follows:
[0010] In the formula, , These represent the results after preprocessing. t Time and t RSSI value at time -1 Indicates in t The measured value of RSSI at time [time]. , , These are weighting coefficients; express t Time measurement and t The difference in RSSI values after preprocessing at time -1, i.e. ; , This represents the threshold parameter.
[0011] Step 3 involves applying Kalman particle filtering to the preprocessed RSSI values. This embeds Kalman filtering into the importance sampling stage of particle filtering. Using the preprocessed RSSI values as system measurement input, the prediction-update process of Kalman filtering is executed individually for each particle, achieving noise suppression and smoothing of the RSSI values. Specifically, this includes the following steps: Step 3.1, Initialization Phase: Based on the initial measurement range of RSSI values, generate an initial particle set and initialize the particle weights and Kalman filter parameters, specifically: Initial particle generation:
[0012] In the formula, The total number of particles; For the first One initial particle; The prior distribution of the initial state of the system; Initial particle weights:
[0013] In the formula, This represents the initial weight of the i-th particle, satisfying the normalization condition. This ensures that each particle has the same initial weight. Particle-level initial covariance:
[0014] In the formula, The initial error covariance of the Kalman filter. Let represent the initial covariance of the i-th example; Step 3.2, Particle-level Kalman prediction: Based on Particle state corresponding to RSSI value at time 1 Covariance Perform Kalman prediction to obtain the prior estimate and prior covariance for each particle, specifically: Particle state prediction:
[0015] In the formula, Indicates the first Individual particles The prior state estimate at time t. Represents the state transition matrix; Particle covariance prediction:
[0016] In the formula, Indicates the first The prior error covariance matrix of each particle; Represents the state transition matrix Transpose of; Represents the process noise covariance; Indicates the first Individual particles k The posterior error covariance matrix at time -1; Step 3.3, Kalman particle update: combining RSSI values collected at all times, global measurement values The prior estimates for each particle are corrected to obtain the optimal state estimate and optimal covariance of the RSSI value, specifically: Particle Kalman gain:
[0017] In the formula, For the first Kalman gain of each particle; For measurement matrix Transpose of; Represents the inverse of a matrix; To measure the noise covariance; Particle optimal state estimation:
[0018] In the formula, For the first Individual particles k The optimal state estimate at time t; To measure the residual, for k Time measurement value; Optimal covariance of particles:
[0019] In the formula, No. i The optimal error covariance matrix of each particle It is the identity matrix; Step 3.4, Particle Sampling with Kalman Optimization: Based on the optimal state of RSSI value obtained from particle-level Kalman optimal estimation, Gaussian sampling is performed to generate the predicted particles for RSSI value at time k, as shown below:
[0020] In the formula, It follows a Gaussian distribution; Step 3.5, Weight Update and Resampling: Update the particle weights based on the measured RSSI values, and eliminate low-weight particles through resampling to finally obtain the filtered RSSI values; Unnormalized weights are represented as:
[0021] In the formula, For the first i The unnormalized weights of each particle; for k -1 moment i Individual particle weights; To measure the likelihood function; Normalized weights are expressed as:
[0022] In the formula, For the first i The normalized weights of these examples satisfy... ; State estimation:
[0023] In the formula, After Kalman particle filtering k The RSSI value at time t is the system state estimate, i.e., the filtered signal.
[0024] Step 4 specifically includes the following steps: Step 4.1: Introduce wavelet decomposition to decompose the signal into low-frequency approximate components and high-frequency detail components; Step 4.2: Based on the decomposed low-frequency approximation components and high-frequency detail components, extract trend features, fluctuation energy features, and statistical fluctuation features respectively.
[0025] Step 4.1 specifically includes the following sub-steps: Step 4.1.1: Signal mean removal preprocessing to eliminate the interference of DC component on the extraction of wave energy features. The preprocessing is performed according to the following formula:
[0026] In the formula, The filtered signal The mean; The signal after removing the mean is the input signal for wavelet decomposition. Indicates the number of original signals; Step 4.1.2: Perform a 3-level iterative wavelet decomposition on the mean signal using the db2 wavelet basis. Each level of decomposition only decomposes the low-frequency components, as shown below:
[0027] In the formula, The signal after removing the mean. For the low-frequency approximation component of the j-th layer, Let be the high-frequency detail component of the j-th layer, where j=1,2,3 corresponds to layers 1 to 3. This indicates the input sequence index. The highest frequency component, For mid-to-high frequency components, It is the second highest frequency component; These are the coefficients of the db2 wavelet low-pass filter. These are the coefficients of the db2 wavelet high-pass filter; This is a two-stage decimation operation. After each decomposition, the signal length is approximately half that of the previous stage. The final result after three stages of decomposition is... and Four types of components.
[0028] Step 4.2 specifically includes the following sub-steps: Step 4.2.1, based on low-frequency components Trend features, including trend slope, trend mean, and trend stability, are extracted through linear regression and statistics, respectively. Trend slope :
[0029] In the formula, Low-frequency components Length, Low-frequency components Sequence index; Trend Mean :
[0030] Trend stability :
[0031] In the formula, Low-frequency components Standard deviation; Step 4.2.2: Based on high-frequency detail components The fluctuation energy characteristics, including component energy, total fluctuation energy, and energy ratio, are extracted through energy calculation and proportional analysis. First, analyze the highest frequency component. Threshold filtering is represented as follows:
[0032]
[0033] In the formula, The highest frequency component standard deviation Indicates the threshold coefficient. The highest frequency component sequence index, The highest frequency component after filtering ; The energy of each component is calculated and expressed as follows:
[0034] In the formula, These are the highest frequency components after filtering. Original mid-to-high frequency components Original sub-high frequency components Energy; , The highest frequency component Secondary high frequency components Sequence index; The total fluctuation energy is calculated as follows:
[0035] In the formula, The total energy of all high-frequency detail components; The energy ratio characteristic is calculated and expressed as follows:
[0036]
[0037] In the formula, The percentage of energy from the highest frequency component reflects the contribution of instantaneous interference. The proportion of high- to mid-high frequency component energy reflects the overall distribution characteristics of rapid fluctuations.
[0038] Step 4.2.3, based on mid-to-high frequency components Extracting features including kurtosis The statistical fluctuation characteristics are expressed as follows:
[0039] In the formula, The mean, standard deviation Represents mid-to-high frequency components The length.
[0040] In multi-Bluetooth device scenarios, the cosine similarity is calculated by using the wavelet decomposition energy vectors of the RSSI signals of each Bluetooth device to characterize the coupling of wave frequencies between devices. First, construct the energy vector as follows:
[0041] In the formula, Indicates the first j Energy vector of a Bluetooth device They represent the first j High-frequency detail components of a Bluetooth device signal energy; Secondly, the cosine similarity is calculated as the energy coupling coefficient, as follows:
[0042] In the formula, Indicates the calculation of the energy vector cosine similarity, ; It is the minimum value; This indicates the modulo length operation.
[0043] Step 5 involves performing multilayer perceptron classification based on a category-feature attention mechanism. This involves concatenating the filtered RSSI values of each anchor point with all features obtained in Step 4, using this as input layer data. The data is then processed through a category feature weight attention layer, a hidden layer, and an output layer to obtain the classification result. Finally, the model is optimized using the cross-entropy loss function. Specifically: Step 5.1, Input Layer: The filtered RSSI values of each signal anchor point are concatenated with the trend features, fluctuation energy features, statistical fluctuation features, and energy coupling coefficients extracted in Step 4 as input data. Specifically: The result is obtained through step 4. i An eight-dimensional fundamental feature set of each signal anchor point , First of all The eight-dimensional basic features of each signal anchor point are concatenated to obtain a multi-anchor point basic feature set. ; right Each signal anchor point is combined in pairs to calculate... Each energy coupling coefficient is used to concatenate all coupling coefficients to obtain a multi-anchor-point association feature set. ; Multi-anchor point basic feature set Feature sets associated with multiple anchor points The features are then concatenated to obtain a fused feature set. ,in For model batches, feature dimensions ; Step 5.2, Category Feature Weight Attention Layer: This layer performs non-linear encoding and weight allocation on the input data, generating sample-level attention weights and outputting them weighted. The specific steps are as follows: Lightweight non-linear encoding is applied to the input data, which is represented as follows:
[0044] In the formula, The feature matrix after dimensionality reduction. The weight matrix of the feature encoding layer; express Activation function; Class attention weights are generated based on the dimensionality-reduced feature matrix, and the weight range is constrained to 0-1.
[0045]
[0046] In the formula, Generate layer weight matrices for the weights. For the weight vector, This is a category-feature weight matrix. This is a dimensionality reduction operation; express Activation function; For the input data, calculate the probability distribution of category features:
[0047] In the formula, For temporary category probability distribution, This is a temporary weight matrix. Represents the classification function; Generate feature attention weights:
[0048]
[0049]
[0050] In the formula, For dimensional expansion operations, For dimensional compression operations, Represents the probability distribution of temporary categories The intermediate tensor after dimensional expansion This represents the intermediate weight tensor. The axis parameter represents the dimension operation. These are sample-level attention weights. Feature weighted output:
[0051] In the formula, Represents the Hadamah altar; Step 5.3: Design two hidden layers. Each layer is processed by linear transformation and activation function. The in-layer computation is represented as follows:
[0052] In the formula, This is the output after activation. , These are the current layer weights and biases, respectively. For input to the previous layer; Step 5.4: After performing a linear transformation on the hidden layer output, through... The function yields the category probability distribution, as shown below:
[0053]
[0054] In the formula, This is the output layer weight matrix. For output layer bias terms; This is a category probability matrix, representing the probability of a sample belonging to a category; The result is a linear change in the output layer. This is the final output of the hidden layer; Step 5.5: Optimize the model using a labeled smooth cross-entropy loss function, which is expressed as follows:
[0055] In the formula, This indicates the use of a labeled, smoothed cross-entropy loss function. Batch sample size Indicates the number of categories; This represents the one-hot encoding of the real label. ; This represents the label smoothing coefficient, used to mitigate overfitting; This represents the predicted probability.
[0056] The beneficial effects of this invention are: This invention presents a commercial vehicle Bluetooth key location recognition method based on category-feature attention. It transforms the localization problem into a classification problem according to actual needs. Compared to traditional passenger vehicle localization methods, the proposed method only requires a Bluetooth module, addressing the low-cost and low-space requirements of commercial vehicles. Furthermore, the proposed method achieves high accuracy in multiple environments, various postures (proximity and distance), and multiple directions, meeting the practical application needs of commercial vehicle digital keys. Attached Figure Description
[0057] Figure 1 This is a schematic diagram illustrating the implementation principle of the contactless entry function for commercial vehicles. Figure 2 This is a flowchart of the commercial vehicle Bluetooth key location recognition method based on category-feature attention according to the present invention; Figure 3 This is a flowchart illustrating the specific implementation of the neural network based on the category-feature weight attention mechanism in this invention. Figure 4 A diagram of a multilayer perceptron with a category-feature weighted attention mechanism; Figure 5 It collects the signal strength values of each Bluetooth anchor point three meters away from the driver's seat in the actual vehicle; Figure 6 This is a comparison diagram of signal strength before and after processing by the signal processing method proposed in this invention during a stationary process; Figure 7 This is a comparison diagram of signal strength before and after processing by the signal processing method proposed in this invention during movement; Figure 8 It is based on the low-frequency and high-frequency components extracted by wavelet decomposition; Figure 9 This is a heatmap of attention weights in a neural network based on a category-feature weight attention mechanism, as described in this invention. Figure 10 This is the test set confusion matrix of the present invention based on the category-feature weight attention mechanism neural network.
[0058] Figure 11 This is the training accuracy and loss curve of the neural network based on the category-feature weight attention mechanism in this invention. Detailed Implementation
[0059] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.
[0060] Example 1 This embodiment provides a method for commercial vehicle Bluetooth key location recognition based on category-feature attention, such as... Figure 2As shown, after data acquisition, preprocessing and filtering, and feature extraction, the processed data, along with the features extracted by wavelet analysis, are input into a neural network. The neural network learns the nonlinear relationships within the data, enabling it to determine the location of the digital key in real time and control vehicle actions based on the location and different states. This is implemented according to the following steps: Step 1: Collect the Bluetooth signal RSSI value in an actual vehicle environment.
[0061] Step 2: Preprocess the collected RSSI values to remove outliers.
[0062] Step 3: Perform Kalman particle filtering on the preprocessed RSSI values.
[0063] Step 4: Perform wavelet decomposition on the filtered data and calculate the features of each component obtained from the decomposition.
[0064] Step 5: Perform multilayer perceptron classification based on the category-feature attention mechanism.
[0065] Example 2 In reality, Bluetooth RSSI values fluctuate significantly, making it difficult to simulate real-world conditions through digital simulation. Therefore, using in-vehicle data collection provides better realism, and judgments based on this data are more reliable.
[0066] Step 1 specifically involves deploying [the equipment] around the commercial vehicle. M Each Bluetooth module serves as a signal anchor point. The mobile device synchronously collects the RSSI values of the Bluetooth signals at each information anchor point as the digital key approaches or moves away from the commercial vehicle; or the RSSI values can be directly read from the reserved interface of the vehicle's Bluetooth module.
[0067] The mobile device samples the Bluetooth signal RSSI value at a frequency of 20Hz. The mobile device is a mobile terminal running iOS 11 or above or Android 8.0 Oreo or above. The Bluetooth module is a Bluetooth Low Energy (BLE) module that conforms to Bluetooth 5.0 or above.
[0068] The RSSI values collected on-vehicle are preprocessed to remove obviously deviating values. The preprocessing is performed according to the following formula:
[0069] In the formula, , These represent the results after preprocessing. t Time and t RSSI value at time -1 Indicates in t The measured value of RSSI at time [time]. , , These are weighting coefficients; express t Time measurement and t The difference in RSSI values after preprocessing at time -1, i.e. ; , The threshold parameter needs to be calibrated based on the actual vehicle model.
[0070] During the measurement, RSSI values are read by a mobile device (phone) at a frequency of 20Hz. When the measured RSSI values fluctuate significantly, outliers are reduced by weighting the RSSI values with those processed at the previous time step.
[0071] Example 3 Significant error data has been removed through data preprocessing, but fluctuations caused by instability in the Bluetooth module still exist. Therefore, the processed data will fluctuate around the ideal value. To make the data closer to the ideal value, filtering is used to process the data.
[0072] The Kalman Particle Filter (KPF) used in this invention is a fusion and improvement algorithm of Kalman Filter (KF) and Particle Filter (PF). Its core logic is as follows: using particle filtering as the overall framework, and addressing the shortcomings of traditional particle filtering such as "weight degeneration and particle impoverishment," Kalman filtering is embedded into the importance sampling stage of particles—the "prediction-update" process of Kalman filtering is executed separately for each particle. Kalman optimal estimation is used to optimize the particle sampling distribution, making the particles closer to the true state of the system. This significantly improves estimation accuracy with the same number of particles, while reducing the probability of weight degeneration.
[0073] Traditional particle filtering relies solely on prior distribution for importance sampling (particles are randomly generated according to the state transition model), resulting in significant deviations between particles and the actual state, and a tendency for weight concentration (a few particles have weights close to 1, while most have weights close to 0). KPF optimizes sampling through "particle-level Kalman filtering." Specifically, step 3 includes the following sub-steps: Step 3.1, Initialization Phase: Based on the initial measurement range of RSSI values, the initial measurement range of Bluetooth RSSI values in this invention is set to [-100, -50] dBm. This range fully covers the RSSI signal strength characteristics of the entire area of the digital key sensing zone, welcome zone, and unlocking zone of the commercial vehicle, avoiding filtering deviations caused by the initial particle distribution exceeding the actual signal range. Based on the above, an initial particle set is generated, and the particle weights and Kalman filter parameters are initialized, specifically as follows: Initial particle generation:
[0074] In the formula, The total number of particles; For the first One initial particle; This is the prior distribution of the initial state of the system (such as uniform distribution or Gaussian distribution).
[0075] Initial particle weights:
[0076] In the formula, This represents the initial weight of the i-th particle, satisfying the normalization condition. This ensures that each particle has the same initial weight. Particle-level initial covariance:
[0077] In the formula, The initial error covariance of the Kalman filter. Let represent the initial covariance of the i-th example; Step 3.2, Particle-level Kalman prediction: Based on Particle state corresponding to RSSI value at time 1 Covariance Perform Kalman prediction to obtain the prior estimate and prior covariance for each particle, specifically: Particle state prediction:
[0078] In the formula, Indicates the first Individual particles The prior state estimate at time t. Represents the state transition matrix; Particle covariance prediction:
[0079] In the formula, Indicates the first The prior error covariance matrix of each particle; Represents the state transition matrix Transpose of; It represents the process noise covariance and characterizes the statistical properties of the system's dynamic disturbances; Indicates the first Individual particles k The posterior error covariance matrix at time -1; Step 3.3, Kalman particle update: combining RSSI values collected at all times, global measurement values The prior estimates for each particle are corrected to obtain the optimal state estimate and optimal covariance of the RSSI value, specifically: Particle Kalman gain:
[0080] In the formula, For the first The Kalman gain of each particle is used to balance the weights of prior estimates and measurements; For measurement matrix Transpose of; Represents the inverse of a matrix; To measure the noise covariance; Particle optimal state estimation:
[0081] In the formula, For the first Individual particles k The optimal state estimate at time t; Measuring the residuals is the core basis for correcting prior estimates, among which for k Time measurement value; Optimal covariance of particles:
[0082] In the formula, No. i The optimal error covariance matrix of each particle The identity matrix is represented by this equation, which is a simplified form for the Gaussian system, ensuring the non-negativity of the covariance matrix.
[0083] Step 3.4, Kalman-optimized particle sampling: Based on the optimal state of RSSI value obtained from particle-level Kalman optimal estimation, Gaussian sampling is performed to generate predicted particles for RSSI value at time k, replacing the prior sampling of traditional particle filtering, as shown below:
[0084] In the formula, The sampled particles are Gaussian distributed, which makes them closer to the true state of the system and improves particle effectiveness.
[0085] Step 3.5, Weight Update and Resampling: Particle weights are updated based on the measured RSSI values, and low-weight particles are eliminated through resampling, ultimately obtaining the filtered RSSI values. This process maintains particle diversity and avoids weight degradation. Specifically: Unnormalized weights are represented as:
[0086] In the formula, For the first i The unnormalized weights of each particle; for k -1 moment i Individual particle weights; To measure the likelihood function, we characterize the degree of matching between the particle state and the measured value.
[0087] Normalized weights are expressed as:
[0088] In the formula, For the first i The normalized weights of these examples satisfy... The larger the weight, the closer the particle is to the real state.
[0089] State estimation:
[0090] In the formula, After Kalman particle filtering k The RSSI value at time t is the system state estimate, i.e., the filtered signal, which is obtained by weighted averaging of all particles, with the weights reflecting the reliability of the particles.
[0091] Example 4 After data preprocessing and filtering, the data can be used as input to a neural network for classification. However, in practical applications, this data can reflect more behaviors; for example, the trend of data changes can reflect behavior, and the magnitude of data fluctuations can reflect environmental interference. Therefore, this invention introduces wavelet decomposition to further process the filtered data. Step 4 specifically involves: Step 4.1: Introduce wavelet decomposition to decompose the signal into low-frequency approximate components and high-frequency detail components.
[0092] The essence of wavelet decomposition is to project a discrete signal with finite energy onto an orthogonal multi-scale space, achieving hierarchical partitioning of the frequency domain. For discrete-time signals... (where the space is square-integrable), its orthogonal decomposition relation satisfies:
[0093] illustrate: Let J be the scale space of the J-th scale (corresponding to the low-frequency approximation component). Let be the wavelet space of the j-th scale (corresponding to the high-frequency detail component); different spaces are orthogonal to each other, ensuring that the decomposed components have no information redundancy or omission, and can accurately separate the trend and fluctuation components of the signal.
[0094] The wavelet decomposition steps include the following: Step 4.1.1: Signal mean removal preprocessing eliminates the interference of the DC component on the extraction of wave energy features, allowing the decomposition results to focus on the relative changes of the signal. The preprocessing is performed according to the following formula:
[0095] In the formula, The filtered signal The mean; The signal after removing the mean is the input signal for wavelet decomposition. Indicates the number of original signals; Step 4.1.2: Apply the db2 wavelet basis to the mean signal. Wavelet decomposition iteratively processes the signal through low-pass and high-pass filters, performing the next level of decomposition only on the low-frequency components (high-frequency components are not further subdivided, balancing efficiency and discriminability). The general iterative formula for the 3-level decomposition is as follows:
[0096] The three-level decomposition recurrence relation is represented as follows:
[0097] In the formula, The signal after removing the mean. For the low-frequency approximation component of the j-th layer, Let be the high-frequency detail component of the j-th layer, where j=1,2,3 corresponds to layers 1 to 3. This indicates the input sequence index. The highest frequency component, For mid-to-high frequency components, It is the second highest frequency component; These are the coefficients of the db2 wavelet low-pass filter. These are the coefficients of the db2 wavelet high-pass filter; This is a two-stage decimation operation. After each decomposition, the signal length is approximately half that of the previous stage. The final result after three stages of decomposition is... and Four types of components.
[0098] Step 4.2: Based on the low-frequency approximate components and high-frequency detail components obtained from the wavelet decomposition in the previous step, trend features, fluctuation energy features, and statistical fluctuation features are extracted respectively. These three types of features characterize the time-frequency properties of the signal from different dimensions. Specifically, they include: Step 4.2.1, Low-frequency components Reflecting the long-term trend of signal variation, based on low-frequency components. Trend features, including trend slope, trend mean, and trend stability, are extracted through linear regression and statistics, respectively. Trend slope :
[0099] In the formula, Low-frequency components Length, Low-frequency components The sequence index; a positive slope indicates increasing signal strength, while a negative slope indicates decreasing signal strength, depicting the direction and rate of trend change.
[0100] Trend Mean The baseline strength level characterizing the long-term trend of the signal:
[0101] Trend stability :
[0102] In the formula, Low-frequency components The standard deviation of the trend stability index characterizes the dispersion of the trend components. The larger the trend stability index value, the more stable the signal trend and the less susceptible it is to environmental interference.
[0103] Step 4.2.2: The energy of high-frequency components reflects the fluctuation intensity and frequency distribution characteristics of the RSSI signal. Based on high-frequency detail components. The fluctuation energy characteristics, including component energy, total fluctuation energy, and energy ratio, are extracted through energy calculation and proportional analysis. First, analyze the highest frequency component. Threshold filtering is represented as follows:
[0104]
[0105] In the formula, The highest frequency component standard deviation This represents the threshold coefficient (taken as 1 standard deviation, balancing noise removal and effective fluctuation retention). The highest frequency component sequence index, The highest frequency component after filtering ; The energy of each component is calculated and expressed as follows:
[0106] In the formula, These are the highest frequency components after filtering. Original mid-to-high frequency components Original sub-high frequency components The energy, the greater the energy, the stronger the fluctuation of the corresponding frequency ( (corresponding to moderate intensity fluctuations) , The highest frequency component Secondary high frequency components Sequence index.
[0107] The total fluctuation energy is calculated as follows:
[0108] In the formula, The total energy of all high-frequency detail components reflects the overall fluctuation level of the signal; the higher the energy, the more severe the signal is affected by environmental interference.
[0109] The energy ratio characteristic is calculated and expressed as follows:
[0110]
[0111] In the formula, The percentage of energy from the highest frequency component reflects the contribution of instantaneous interference. The proportion of high- to mid-high frequency component energy reflects the overall distribution characteristics of rapid fluctuations.
[0112] Step 4.2.3, based on mid-to-high frequency components Extracting features including kurtosis The statistical fluctuation characteristics, which characterize the steepness of the fluctuation signal distribution and reflect the concentration of interference, are expressed as follows:
[0113] In the formula, The mean, standard deviation Represents mid-to-high frequency components The length.
[0114] Kurtosis characteristics Characterizing distribution characteristics: The kurtosis of a normal distribution is 0. Kurtosis > 0 indicates a steeper distribution, while kurtosis < 0 indicates a flatter distribution, which can effectively characterize the concentration of interference in mid-frequency fluctuations.
[0115] In multi-Bluetooth device scenarios, the cosine similarity is calculated by using the wavelet decomposition energy vectors of the RSSI signals of each Bluetooth device to characterize the coupling of wave frequencies between devices. First, construct the energy vector as follows:
[0116] In the formula, Indicates the first j Energy vector of a Bluetooth device They represent the first j High-frequency detail components of a Bluetooth device signal energy; Secondly, the cosine similarity is calculated as the energy coupling coefficient, as follows:
[0117] In the formula, Indicates the calculation of the energy vector cosine similarity, ; It is the minimum value; This indicates the modulo length operation.
[0118] Example 5 The basic principle of neural network classification is based on simulating the connections between neurons in the human brain. It classifies data by learning the relationship between input data and labels. A neural network consists of an input layer, hidden layers, and an output layer. Each layer comprises multiple neurons (nodes). The input layer receives raw data, the output layer provides the classification result, and the hidden layers process the data and learn features. Each neuron is connected to neurons in the previous layer through connections (weights), where the weight values represent the strength of the association between neurons. The specific structure of the neural network used in this invention is as follows: Figure 4 As shown, it includes an input layer, a category feature weight attention layer, a hidden layer, and an output layer; Step 5: Concatenate the filtered RSSI values of each anchor point with all features obtained in Step 4 as input layer data. After processing through the category feature weight attention layer, hidden layer, and output layer, the classification result is obtained. The model is then optimized using the cross-entropy loss function, specifically: Step 5.1, Input Layer: The filtered RSSI values of each signal anchor point are concatenated with the trend features, fluctuation energy features, statistical fluctuation features, and energy coupling coefficients extracted in Step 4 as input data. Specifically: The result is obtained through step 4. i An eight-dimensional fundamental feature set of each signal anchor point , First of all The eight-dimensional basic features of each signal anchor point are concatenated to obtain a multi-anchor point basic feature set. ; right Each signal anchor point is combined in pairs to calculate... Each energy coupling coefficient is used to concatenate all coupling coefficients to obtain a multi-anchor-point association feature set. ; Multi-anchor point basic feature set Feature sets associated with multiple anchor points The features are then concatenated to obtain a fused feature set. ,in For model batches, feature dimensions ; Step 5.2, Category Feature Weight Attention Layer: This layer performs non-linear encoding and weight allocation on the input data, generating sample-level attention weights and outputting them weighted. The specific steps are as follows: Lightweight non-linear encoding is applied to the input data to reduce complexity, as follows:
[0119] In the formula, The feature matrix after dimensionality reduction. The weight matrix of the feature encoding layer; express Activation function; Class attention weights are generated based on the dimensionality-reduced feature matrix, and the weight range is constrained to 0-1.
[0120]
[0121] In the formula, Generate layer weight matrices for the weights. For the weight vector, This is a category-feature weight matrix. This is a dimensionality reduction operation; express Activation function; For the input data, calculate the probability distribution of category features:
[0122] In the formula, For temporary category probability distribution, This is a temporary weight matrix. Represents the classification function; Multiply the class probabilities by the class-feature weight matrix to generate feature attention weights:
[0123]
[0124]
[0125] In the formula, For dimensional expansion operations (matching calculations). This is a dimensionality compression operation (restoring feature dimensions). Represents the probability distribution of temporary categories The intermediate tensor after dimensional expansion This represents the intermediate weight tensor. The axis parameter represents the dimension operation. These are sample-level attention weights. Feature weighted output:
[0126] In the formula, Represents the Hadamah altar; Step 5.3: This invention designs two hidden layers. Each layer is processed by linear transformation and activation function. The in-layer calculation is represented as follows:
[0127] In the formula, This is the output after activation. , These are the current layer weights and biases, respectively. This serves as the input to the previous layer. This design has two hidden layers and adds standard regularization and Dropout inactivation probability to improve versatility. The specific implementation details are not elaborated here.
[0128] Step 5.4: After performing a linear transformation on the hidden layer output, through... The function yields the category probability distribution, as shown below:
[0129]
[0130] In the formula, This is the output layer weight matrix. For output layer bias terms; This is a category probability matrix, representing the probability of a sample belonging to a category; The result is a linear change in the output layer. This is the final output of the hidden layer; Step 5.5: Optimize the model using a labeled smooth cross-entropy loss function, which is expressed as follows:
[0131] In the formula, This indicates the use of a labeled, smoothed cross-entropy loss function. Batch sample size Indicates the number of categories; This represents the one-hot encoding of the real label. ; This represents the label smoothing coefficient, used to mitigate overfitting; This represents the predicted probability.
[0132] Nearly 300 measurements (totaling over 100,000 data points) were collected from different scenarios (parking lots, charging stations), different directions (left, right, rear), and different conditions (approaching, moving away, stationary). After processing in steps 2-4, this data was used as input data. Figure 4 The neural network is trained, and the output is divided into 10 categories, as shown in Table 1: Table 1 Output Categories
[0133] Obtain the trained model and follow Figure 3 Tests were conducted to improve the output accuracy of the method of this invention.
[0134] Example 6 To verify the effectiveness of the method of the present invention, four Bluetooth anchor points were set around the commercial vehicle, namely: Anchor point 1: The driver's side door side of the commercial vehicle (front left side of the vehicle body) is the core unlocking and sensing anchor point, directly facing the driver's entry and exit area, and is the main sensing direction for the digital key to approach the vehicle. Anchor point 2: The front of the commercial vehicle (grille / front bumper position), covering the front welcoming and sensing area of the vehicle, suitable for scenarios where the key approaches from the front of the vehicle; Anchor point 3: The passenger side door of a commercial vehicle, covering the entire right side of the vehicle, making up for the perception blind spot of single-sided deployment, and adapting to the usage scenarios of loading and unloading / getting on and off commercial vehicles on both sides. Anchor point 4: Inside the commercial vehicle (center console), covering the entire cockpit area and the surrounding area of the vehicle, suitable for key-operated interior location detection and external near-range auxiliary positioning scenarios.
[0135] The raw RSSI values were measured at four anchor points three meters from the driver's seat of the vehicle. Figure 5 As shown, the basic data characteristics of Bluetooth signal acquisition in a real vehicle environment are presented intuitively. The signal data of different anchor points can characterize the relative position of the digital key and the vehicle from different dimensions, making up for the information limitations of single anchor point signals. It is the hardware data foundation for subsequent multi-anchor point association feature calculation and improving the accuracy of position recognition. Figure 5 It can be seen that the original RSSI signal is not a stable fixed value, but has irregular small fluctuations. This intuitively reflects the complex environment of the vehicle and requires further processing to retain the effective signal characteristics.
[0136] Figure 6This image compares the intensity of the raw RSSI signals collected from four Bluetooth anchor points in a stationary scenario three meters from the driver of a commercial vehicle, with the signals after preprocessing and Kalman particle filtering. The RSSI signals after preprocessing and Kalman particle filtering are more stable, effectively filtering out irregular noise fluctuations while accurately preserving the baseline intensity value of the RSSI signal in a stationary state, without loss of signal characteristics due to excessive smoothing. The processed signal curves at each anchor point exhibit good stability, directly verifying the effective noise filtering capability of the signal processing method of this invention in a stationary scenario, as well as its effectiveness in preserving the basic signal characteristics. Figure 7 This is a comparison of the raw and processed RSSI signals at four Bluetooth anchor points in a scenario where the digital key approaches the vehicle from a distance of three meters. The pre-processed signal, after Kalman particle filtering, removes most random noise while fully preserving the continuous increasing trend of the RSSI signal as the key approaches. The processed signal curve is smooth and exhibits a clear trend, with the signal variation patterns at each anchor point highly matching the actual movement behavior of the digital key.
[0137] Figure 6 and Figure 7 The effectiveness of the signal processing method of this invention was verified in both static and moving scenarios. It can achieve noise reduction and signal stabilization in static scenarios, and can also achieve noise filtering and signal dynamic trend preservation in moving scenarios. It solves the problems of large fluctuations and unclear features of the original RSSI signal in the complex environment of vehicle, and provides high-quality input data for subsequent wavelet feature extraction and neural network classification.
[0138] Figure 8 This refers to the low-frequency approximation component obtained by decomposing the filtered Bluetooth RSSI signal into a 3-layer dB2 orthogonal wavelet during the process of a commercial vehicle digital key approaching the vehicle. With high-frequency detail components Low-frequency components The curve is smooth and the trend is clear, accurately reflecting the long-term increasing core trend of the RSSI signal as the digital key approaches the vehicle, with no obvious fluctuations. It is a key feature component for characterizing key movement behavior; high-frequency detail components. This results in irregular, pulse-like fluctuations with amplitudes much smaller than the low-frequency components. These fluctuations are primarily caused by factors such as electromagnetic interference from the vehicle environment, Bluetooth module noise, and signal propagation obstruction. The fluctuations are more fragmented and instantaneous. The fluctuation amplitude is relatively larger and the duration is slightly longer. This figure verifies the effectiveness of wavelet decomposition, achieving accurate separation of signal trends and noise fluctuations, and providing intuitive data source support for subsequent extraction of trend features from low-frequency components and fluctuation features from high-frequency components.
[0139] Figure 9 The quantitative demonstration shows the attention weights of different digital key location categories to each input feature in the class-feature weight attention mechanism proposed in this invention. The weight values range from 0 to 0.6, with larger values and darker colors indicating a higher contribution and stronger network attention to the feature in the corresponding category's location recognition. As shown in the figure, there are significant differences in the attention given to different location categories by the same type of feature (for example, the weight of RSSI values for each anchor point is much higher in the unlocking area (near-range category) than in the perception area (far-range category); simultaneously, the weight of RSSI at anchor point 1, which is closer to the driver's direction of the vehicle, is higher than that of other anchor points; and features such as trend slope and stability have higher weights (importance) in the moving state category than in the stationary state category). The attention given to different features within the same category exhibits a differentiated distribution (for example, the near-range category focuses on the raw RSSI value, while the far-range category focuses on fluctuating related features). This class-feature attention mechanism can accurately capture features from different locations, improving the accuracy of location classification.
[0140] When testing the model, Figure 10 The accuracy of the neural network position classification in this invention was quantitatively verified. As shown in the figure, the diagonal values are much larger than the off-diagonal values. The number of correctly classified samples for each position category accounts for more than 95% of the total number of samples in that category. The accuracy of judging inside and outside the vehicle is close to 100%. False judgments mainly occur in adjacent areas on the same side, which also meets the requirements for digital keys in commercial vehicles.
[0141] Figure 11 The convergence, generalization ability, and stability of the network model used in this invention were verified during the training / validation accuracy and loss variation process. Specifically, both training and validation accuracy increased rapidly with increasing iterations and then stabilized. The validation accuracy showed a highly consistent trend with the training accuracy, exhibiting almost no difference throughout the process, indicating no significant overfitting or underfitting. This demonstrates the model's strong generalization ability on unseen test data. Both training and validation losses decreased rapidly with increasing iterations and then converged. The validation loss decreased synchronously with the training loss, showing no significant increase throughout the process, further verifying the model's training stability and the absence of overfitting. This meets the low-latency and high-reliability requirements for real-time location recognition in commercial vehicle environments.
[0142] Combination Figure 11 The effectiveness of this invention is verified by comparing four metrics: test accuracy, test loss, average F1 score, and convergence epochs, across three models: data processing only, data processing + wavelet feature extraction, and data processing + wavelet feature extraction + category-feature attention. The results are as follows: Figure 2As shown, the addition of feature extraction and attention mechanisms improved the model accuracy from 83% to 97%, with a corresponding increase in average F1 score and a significant reduction in loss, proving that these two innovations are the core of improving classification accuracy. The convergence rounds were shortened from 183 to 97, demonstrating that the addition of attention mechanisms significantly improved model training efficiency, reduced computational complexity, and met the lightweight deployment requirements of in-vehicle systems.
[0143] Table 2 Comparison of results from different methods
Claims
1. A method for commercial vehicle Bluetooth key location recognition based on category-feature attention, characterized in that, Specifically, the steps include the following: Step 1: Collect Bluetooth signal RSSI values in a real in-vehicle environment; Step 2: Preprocess the collected RSSI values; Step 3: Perform Kalman particle filtering on the preprocessed RSSI values; Step 4: Perform wavelet decomposition on the filtered data and calculate the features of each component obtained from the decomposition. Step 5: Perform multilayer perceptron classification based on the category-feature attention mechanism.
2. The commercial vehicle Bluetooth key location recognition method based on category-feature attention according to claim 1, characterized in that, Step 1 specifically involves deploying [the equipment] around the commercial vehicle. M Each Bluetooth module serves as a signal anchor point. The mobile terminal synchronously collects the RSSI values of the Bluetooth signals at each information anchor point as the digital key approaches and moves away from the commercial vehicle, or the RSSI values are directly read from the reserved interface of the vehicle Bluetooth module. The mobile terminal samples the Bluetooth signal RSSI value at a frequency of 20Hz. The mobile terminal is a mobile terminal running iOS 11 or above or Android 8.0 Oreo or above. The Bluetooth module is a low-power Bluetooth module that conforms to Bluetooth 5.0 or above.
3. The commercial vehicle Bluetooth key location recognition method based on category-feature attention according to claim 1 or 2, characterized in that, Step 2 involves preprocessing the collected RSSI values, including weighting them with the processed RSSI values from the previous time step to reduce outliers caused by large fluctuations in RSSI measurements. The specific formula is as follows: In the formula, , These represent the results after preprocessing. t Time and t RSSI value at time -1 Indicates in t The measured value of RSSI at time [time]. , , These are weighting coefficients; express t Time measurement and t The difference in RSSI values after preprocessing at time -1, i.e. ; , This represents the threshold parameter.
4. The commercial vehicle Bluetooth key location recognition method based on category-feature attention according to claim 1, characterized in that, Step 3 involves applying Kalman particle filtering to the preprocessed RSSI values. This embeds Kalman filtering into the importance sampling stage of particle filtering. Using the preprocessed RSSI values as system measurement input, the prediction-update process of Kalman filtering is executed individually for each particle, achieving noise suppression and smoothing of the RSSI values. Specifically, this includes the following steps: Step 3.1, Initialization Phase: Based on the initial measurement range of RSSI values, generate an initial particle set and initialize the particle weights and Kalman filter parameters, specifically: Initial particle generation: In the formula, The total number of particles; For the first One initial particle; The prior distribution of the initial state of the system; Initial particle weights: In the formula, This represents the initial weight of the i-th particle, satisfying the normalization condition. This ensures that each particle has the same initial weight. Particle-level initial covariance: In the formula, The initial error covariance of the Kalman filter. Let represent the initial covariance of the i-th example; Step 3.2, Particle-level Kalman prediction: Based on Particle state corresponding to RSSI value at time 1 Covariance Perform Kalman prediction to obtain the prior estimate and prior covariance for each particle, specifically: Particle state prediction: In the formula, Indicates the first Individual particles The prior state estimate at time t. Represents the state transition matrix; Particle covariance prediction: In the formula, Indicates the first The prior error covariance matrix of each particle; Represents the state transition matrix transpose; Represents the process noise covariance; Indicates the first Individual particles k The posterior error covariance matrix at time -1; Step 3.3, Kalman particle update: combining RSSI values collected at all times, global measurement values The prior estimates for each particle are corrected to obtain the optimal state estimate and optimal covariance of the RSSI value, specifically: Particle Kalman gain: In the formula, For the first Kalman gain of each particle; For measurement matrix transpose; Represents the inverse of a matrix; To measure the noise covariance; Particle optimal state estimation: In the formula, For the first Individual particles k The optimal state estimate at time t; To measure the residual, for k Time measurement value; Optimal covariance of particles: In the formula, No. i The optimal error covariance matrix of each particle It is the identity matrix; Step 3.4, Particle Sampling with Kalman Optimization: Based on the optimal state of RSSI value obtained from particle-level Kalman optimal estimation, Gaussian sampling is performed to generate the predicted particles for RSSI value at time k, as shown below: In the formula, It follows a Gaussian distribution; Step 3.5, Weight Update and Resampling: Update the particle weights based on the measured RSSI values, and eliminate low-weight particles through resampling to finally obtain the filtered RSSI values; Unnormalized weights are represented as: In the formula, For the first i The unnormalized weights of each particle; for k -1 moment i Individual particle weights; To measure the likelihood function; Normalized weights are expressed as: In the formula, For the first i The normalized weights of these examples satisfy... ; State estimation: In the formula, After Kalman particle filtering k The RSSI value at time t is the system state estimate, i.e., the filtered signal.
5. The commercial vehicle Bluetooth key location recognition method based on category-feature attention according to claim 1, step 4 specifically includes the following steps: Step 4.1: Introduce wavelet decomposition to decompose the signal into low-frequency approximate components and high-frequency detail components; Step 4.2: Based on the decomposed low-frequency approximation components and high-frequency detail components, extract trend features, fluctuation energy features, and statistical fluctuation features respectively.
6. The commercial vehicle Bluetooth key location recognition method based on category-feature attention according to claim 5, step 4.1 specifically includes the following sub-steps: Step 4.1.1: Signal mean removal preprocessing to eliminate the interference of DC component on the extraction of wave energy features. The preprocessing is performed according to the following formula: In the formula, The filtered signal The mean; The signal after removing the mean is the input signal for wavelet decomposition. Indicates the number of original signals; Step 4.1.2: Perform a 3-level iterative wavelet decomposition on the mean signal using the db2 wavelet basis. Each level of decomposition only decomposes the low-frequency components, as shown below: In the formula, The signal after removing the mean. For the low-frequency approximation component of the j-th layer, Let j be the high-frequency detail component of the j-th layer, where... j=1,2,3 correspond to floors 1 to 3. This indicates the input sequence index. The highest frequency component, For mid-to-high frequency components, It is the second highest frequency component; These are the coefficients of the db2 wavelet low-pass filter. These are the coefficients of the db2 wavelet high-pass filter; This is a two-stage decimation operation. After each decomposition, the signal length is approximately half that of the previous stage. The final result after three stages of decomposition is... and Four types of components.
7. The commercial vehicle Bluetooth key location recognition method based on category-feature attention according to claim 6, step 4.2 specifically includes the following sub-steps: Step 4.2.1, based on low-frequency components Trend features, including trend slope, trend mean, and trend stability, are extracted through linear regression and statistics, respectively. Trend slope : In the formula, Low-frequency components Length, Low-frequency components Sequence index; Trend Mean : Trend stability : In the formula, Low-frequency components Standard deviation; Step 4.2.2: Based on high-frequency detail components The fluctuation energy characteristics, including component energy, total fluctuation energy, and energy ratio, are extracted through energy calculation and proportional analysis. First, analyze the highest frequency component. Threshold filtering is represented as follows: In the formula, The highest frequency component standard deviation Represents the threshold coefficient. The highest frequency component sequence index, The highest frequency component after filtering ; The energy of each component is calculated and expressed as follows: In the formula, These are the highest frequency components after filtering. Original mid-to-high frequency components Original sub-high frequency components Energy; , The highest frequency component Secondary high frequency components Sequence index; The total fluctuation energy is calculated as follows: In the formula, The total energy of all high-frequency detail components; The energy ratio characteristic is calculated and expressed as follows: In the formula, The percentage of energy from the highest frequency component reflects the contribution of instantaneous interference. The proportion of high- to mid-high frequency component energy reflects the overall distribution characteristics of rapid fluctuations; Step 4.2.3, based on mid-to-high frequency components Extracting features including kurtosis The statistical fluctuation characteristics are expressed as follows: In the formula, The mean, standard deviation Represents mid-to-high frequency components The length.
8. The commercial vehicle Bluetooth key location recognition method based on category-feature attention as described in claim 7, in a multi-Bluetooth device scenario, calculates cosine similarity by using the wavelet decomposition energy vector of the RSSI signals of each Bluetooth device to characterize the coupling of fluctuations between devices: First, construct the energy vector as follows: In the formula, Indicates the first j Energy vector of a Bluetooth device They represent the first j High-frequency detail components of a Bluetooth device signal energy; Secondly, the cosine similarity is calculated as the energy coupling coefficient, as follows: In the formula, Indicates the calculation of the energy vector cosine similarity, ; It is the minimum value; This indicates the modulo length operation.
9. The commercial vehicle Bluetooth key location recognition method based on category-feature attention as described in claim 8, wherein step 5, performing multilayer perceptron classification based on the category-feature attention mechanism, involves concatenating the filtered RSSI values of each anchor point and all features obtained in step 4 as input layer data. This data is then processed through a category feature weight attention layer, a hidden layer, and an output layer to obtain the classification result. The model is then optimized using the cross-entropy loss function. Specifically: Step 5.1, Input Layer: The filtered RSSI values of each signal anchor point are concatenated with the trend features, fluctuation energy features, statistical fluctuation features, and energy coupling coefficients extracted in Step 4 as input data. Specifically: The result is obtained through step 4. i An eight-dimensional fundamental feature set of each signal anchor point , First of all The eight-dimensional basic features of each signal anchor point are concatenated to obtain a multi-anchor point basic feature set. ; right Each signal anchor point is combined in pairs to calculate... Each energy coupling coefficient is used to concatenate all coupling coefficients to obtain a multi-anchor-point association feature set. ; Multi-anchor point basic feature set Feature sets associated with multiple anchor points The features are then concatenated to obtain a fused feature set. ,in For model batches, feature dimensions ; Step 5.2, Category Feature Weight Attention Layer: This layer performs non-linear encoding and weight allocation on the input data, generating sample-level attention weights and outputting them weighted. The specific steps are as follows: Lightweight non-linear encoding is applied to the input data, which is represented as follows: In the formula, The feature matrix after dimensionality reduction. The weight matrix of the feature encoding layer; express Activation function; Class attention weights are generated based on the dimensionality-reduced feature matrix, and the weight range is constrained to 0-1. In the formula, Generate layer weight matrices for the weights. For the weight vector, This is a category-feature weight matrix. This is a dimensionality reduction operation; express Activation function; For the input data, calculate the probability distribution of category features: In the formula, For temporary category probability distribution, This is a temporary weight matrix. Represents the classification function; Generate feature attention weights: In the formula, For dimensional expansion operations, For dimensional compression operations, Represents the probability distribution of temporary categories The intermediate tensor after dimensional expansion This represents the intermediate weight tensor. The axis parameter represents the dimension operation. These are sample-level attention weights. Feature weighted output: In the formula, Represents the Hadamah altar; Step 5.3: Design two hidden layers. Each layer is processed by linear transformation and activation function. The in-layer computation is represented as follows: In the formula, This is the output after activation. , These are the current layer weights and biases, respectively. For input to the previous layer; Step 5.4: After performing a linear transformation on the hidden layer output, through... The function yields the category probability distribution, as shown below: In the formula, This is the output layer weight matrix. For output layer bias terms; This is a category probability matrix, representing the probability of a sample belonging to a category; The result is a linear change in the output layer. This is the final output of the hidden layer; Step 5.5: Optimize the model using a labeled smooth cross-entropy loss function, which is expressed as follows: In the formula, This indicates the use of a labeled, smoothed cross-entropy loss function. Batch sample size Indicates the number of categories; This represents the one-hot encoding of the real label. ; This represents the label smoothing coefficient, used to mitigate overfitting; This represents the predicted probability.