Cross-domain temporal behavior recognition method based on fusion of global and Gaussian enhanced attention
By fusion of global and Gaussian enhanced attention, the recognition accuracy problem of cross-domain temporal behavior recognition model under long-term dependency and noise interference is solved, and efficient recognition of gait and behavior sequences is achieved.
Patent Information
- Application Number
- CN202510990488.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-18
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-07-18
AI Technical Summary
Existing temporal behavior recognition models have low recognition accuracy in cross-domain scenarios and cannot effectively capture long-term dependencies. In addition, the attention mechanism is easily affected by noise and it is difficult to take into account both macro structures and micro details.
A global and Gaussian enhanced attention fusion method is adopted to extract features of Wi-Fi CSI signals through the global temporal attention module and the Gaussian enhanced attention module. Combined with the time embedding matrix and the Gaussian distribution attention matrix, the perception of long-range dependency patterns across time steps and the response to local key features are achieved.
It significantly improves the accuracy and stability of cross-domain temporal behavior recognition, can more comprehensively capture the long-range dependency characteristics in gait and behavior sequences, and enhances the model's ability to recognize complex dynamic behaviors.
Smart Images

Figure CN120492903B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computers, and in particular relates to a cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion. Background Art
[0002] With the rapid development of smart security, telemedicine, and identity authentication technologies, contactless recognition methods have become a crucial component of intelligent perception systems. Compared to traditional recognition methods based on vision or voice, behavior perception using wireless signals is becoming a key research and application direction due to its non-invasive, robust anti-occlusion capabilities, and privacy-friendly nature.
[0003] Because Channel State Information (CSI) signals are essentially high-dimensional, time-series data with a distinct temporal structure, they can be used to characterize the motion characteristics of individual behaviors. Therefore, Wi-Fi CSI-based recognition technologies, with their advantages of requiring no specialized equipment, strong penetration, and easy deployment, have garnered widespread attention in the field of time-series behavior recognition. However, existing models extract features based solely on local windows or short-term dependencies, failing to capture the long-term dependencies of the complete behavioral process. This results in low recognition accuracy in cross-domain scenarios. Summary of the Invention
[0004] In order to solve the problem that the existing temporal behavior recognition model performs feature extraction based on local windows and has low recognition accuracy in cross-domain scenarios, the present invention provides a cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion.
[0005] In order to achieve the above object, the present invention provides the following technical solutions:
[0006] A cross-domain temporal behavior recognition method based on the fusion of global and Gaussian enhanced attention includes:
[0007] Obtain the Wi-Fi CSI signal to be identified;
[0008] The global temporal attention module is used to perform weighted feature extraction on the Wi-Fi CSI signal to be identified to obtain global features. The global temporal attention module is used to calculate the global temporal attention weight based on the time embedding matrix and the Wi-Fi CSI signal to be identified and perform time-step feature weighted feature extraction.
[0009] Perform category prediction based on global features and generate temporal behavior recognition results based on the category prediction results.
[0010] Optionally, the cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion provided by the present invention further includes:
[0011] Add a time embedding matrix to the Wi-Fi CSI signal to obtain a fused location perception result;
[0012] Perform linear mapping on the fused position perception result to obtain a linear mapping result;
[0013] Perform Softmax activation on the linear mapping result to obtain the weight of temporal attention;
[0014] The time-step features of the Wi-Fi CSI signal to be identified are weighted according to the temporal attention weight to obtain the global features.
[0015] Optionally, the cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion provided by the present invention further includes:
[0016] Perform residual connection and normalization on the global features to obtain the standardized global features;
[0017] The standardized global features are input into the classification function to generate a prediction probability vector, where the prediction probability vector is used to generate the temporal behavior recognition result.
[0018] Optionally, the cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion provided by the present invention further includes:
[0019] The Gaussian enhanced attention module is used to perform weighted feature extraction on the Wi-Fi CSI signal to obtain local features. The Gaussian enhanced attention module is used to calculate the Gaussian distribution attention matrix based on the Wi-Fi CSI signal to be identified and the Gaussian distribution time offset matrix, and perform weighted feature extraction on the Gaussian distribution features.
[0020] Perform feature fusion based on global features and local features to obtain fusion feature extraction results;
[0021] Perform category prediction on the fusion feature extraction results, and generate temporal behavior recognition results based on the category prediction results.
[0022] Optionally, the cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion provided by the present invention further includes:
[0023] Perform linear mapping on the Wi-Fi CSI signal to be identified to obtain the query vector and key vector;
[0024] The basic attention matrix is obtained by scaling the dot product of the query vector and the key vector;
[0025] The basic attention matrix and the Gaussian distribution time bias matrix are fused to obtain the Gaussian distribution attention matrix;
[0026] Based on the Gaussian distribution attention matrix, weighted feature extraction is performed on the Wi-Fi CSI signal to be identified to obtain local features.
[0027] Optionally, the cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion provided by the present invention further includes:
[0028] The global features and local features are weightedly fused using a preset fusion weight ratio to obtain the fusion feature extraction result.
[0029] Optionally, the cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion provided by the present invention further includes:
[0030] Perform probability prediction on the fusion feature extraction results to obtain the prediction probability vector;
[0031] Perform feature mapping on the predicted probability vector and generate the temporal behavior recognition result based on the feature mapping result.
[0032] Optionally, the cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion provided by the present invention further includes:
[0033] Extract features of the Wi-Fi CSI signal to be identified and construct a frequency domain amplitude feature matrix;
[0034] Normalize the frequency domain amplitude feature matrix to obtain the amplitude mapping result;
[0035] The time dimension of the amplitude mapping result is formatted to obtain the Wi-Fi CSI signal to be identified after unified timing processing.
[0036] Optionally, the present invention is applied to a convolutional neural network, which includes a feature extractor and a closed set classifier. The feature extractor is used to perform weighted feature extraction on the Wi-Fi CSI signal to be identified based on the global temporal attention module to obtain global features. The closed set classifier is used to perform category prediction based on the global features, and generate a first temporal behavior recognition result based on the category prediction result. The cross-domain temporal behavior recognition method based on the fusion of global and Gaussian enhanced attention provided by the present invention also includes:
[0037] Obtain Wi-Fi CSI signals for training;
[0038] Perform weighted feature extraction on the training Wi-Fi CSI signal using an untrained feature extractor to obtain a training global feature.
[0039] Use an untrained closed set classifier to predict the category of the training global features, and calculate the cross entropy loss function based on the category prediction results and the true labels to obtain the cross entropy loss value;
[0040] The untrained feature extractor and the untrained closed set classifier are optimized according to the cross entropy loss value to obtain a pre-trained feature extractor and a pre-trained closed set classifier.
[0041] Optionally, the cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion provided by the present invention further includes:
[0042] The untrained feature extractor and the untrained closed set classifier are jointly iteratively optimized by the back propagation algorithm and the gradient descent algorithm to obtain a pre-trained feature extractor and a pre-trained closed set classifier.
[0043] The cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion provided by the present invention has the following beneficial effects:
[0044] Since the cross-domain temporal behavior recognition method based on the fusion of global and Gaussian enhanced attention provided by the present invention extracts features based on the weighted weight of temporal attention, and the weight of temporal attention is generated according to the time embedding matrix, this method of uniformly modeling the dynamic features or each time step within the complete time series range and generating a unified attention distribution within the time range significantly enhances the model's perception of long-range dependency patterns across time steps such as gait and action, and can effectively capture the long-range dependency characteristics in gait and behavior sequences. Compared with traditional methods based on local windows or short-term memory structures that are difficult to model cross-time step behavior associations, this method can more comprehensively capture gait cycle changes, improve the integrity of temporal feature expression, and thus achieve higher accuracy and stability in complex dynamic behavior recognition tasks, thereby improving the recognition accuracy of cross-domain temporal behaviors. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] To more clearly illustrate the embodiments of the present invention and its design, the following briefly introduces the drawings required for this embodiment. The drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be derived from these drawings without inventive effort.
[0046] Figure 1 One of the schematic diagrams of the cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion provided by an embodiment of the present invention;
[0047] Figure 2 Schematic diagram of the second cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion provided by an embodiment of the present invention;
[0048] Figure 3 Schematic diagram of the cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion provided by an embodiment of the present invention;
[0049] Figure 4 Schematic diagram of the cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion provided by an embodiment of the present invention;
[0050] Figure 5 Schematic diagram of the cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion provided by an embodiment of the present invention;
[0051] Figure 6 A schematic diagram of a specific feature extractor submodule provided by the present invention;
[0052] Figure 7 Schematic diagram of the cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion provided by an embodiment of the present invention;
[0053] Figure 8 Schematic diagram of the cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion provided by an embodiment of the present invention, No. 7;
[0054] Figure 9 Schematic diagram eight of the cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion provided by an embodiment of the present invention;
[0055] Figure 10 Schematic diagram of the cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion provided by an embodiment of the present invention.
[0056] Figure 11 Schematic diagram of the cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion provided by an embodiment of the present invention;
[0057] Figure 12 This is a specific example of the overall architecture of a cross-domain temporal behavior recognition model provided by the present invention. DETAILED DESCRIPTION
[0058] In order to enable those skilled in the art to better understand the technical solution of the present invention and to be able to implement it, the present invention is described in detail below with reference to the accompanying drawings and specific embodiments. The following embodiments are only used to more clearly illustrate the technical solution of the present invention and are not intended to limit the scope of protection of the present invention.
[0059] Example 1
[0060] In the cross-domain temporal behavior recognition task based on wireless signals, the system needs to extract stable and discriminative features from complex signals affected by multipath effects, environmental noise, and behavioral state changes to support efficient behavior or identity recognition. However, existing methods still face the following core technical bottlenecks in practical applications:
[0061] First, existing behavior recognition methods lack global temporal modeling capabilities, making it difficult to capture the complete structural characteristics of behavior. Specifically, most existing behavior recognition methods rely on short-term windows or local convolutional features for modeling, lacking the ability to effectively capture long-term dependencies. This makes it difficult for the models to understand the dynamic evolution of the complete behavior process. Recognition accuracy decreases significantly, especially when the behavior lasts for a long time, is complex, or has large signal fluctuations.
[0062] Secondly, existing behavior recognition methods lack accurate perception of key time points and are susceptible to noise interference. Specifically, in real-world scenarios, Wi-Fi signals are often affected by environmental variations and multipath interference. This causes the model to focus on ineffective segments and ignore key behavior points when allocating attention. This leads to unstable attention responses, resulting in reduced recognition accuracy and robustness.
[0063] Furthermore, existing single-attention mechanisms have limited expressive power, making it difficult to balance macroscopic structure with microscopic details. Specifically, existing self-attention mechanisms either focus on global modeling or process only frame-level responses, making it difficult to simultaneously capture both overall behavioral patterns and key local features. This limits the dimensionality of feature expression and makes it difficult for the model to adapt to distributional changes across scenarios and user states.
[0064] To address the above issues, this application provides a cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion, specifically Figure 1 As shown, the following steps are included:
[0065] Step 11: Obtain the Wi-Fi CSI signal to be identified.
[0066] Step 12: Perform weighted feature extraction on the Wi-Fi CSI signal to be identified based on the global temporal attention module to obtain global features. The global temporal attention module is used to calculate global temporal attention weights based on the time embedding matrix and the Wi-Fi CSI signal to be identified and perform time step feature weighted feature extraction.
[0067] Step 13: Perform category prediction based on global features, and generate temporal behavior recognition results based on the category prediction results.
[0068] Among them, the cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion provided in this application can be applied to any mainstream neural network model with temporal modeling capabilities. Through the signal preprocessing module, feature extraction module or feature extractor, category classification module or category classifier, unified temporal processing, feature extraction and category prediction of the signal to be identified can be achieved, and the recognition result can be obtained based on the category prediction result.
[0069] Specifically, Wi-Fi devices are first used to collect cross-domain temporal behaviors to be identified, such as the actions of people in halls and corridors, to obtain Wi-Fi CSI signals to be identified. The Wi-Fi CSI signals to be identified are then annotated to determine the corresponding true labels.
[0070] Subsequently, the signal preprocessing module normalizes the original Wi-Fi channel state information of the Wi-Fi CSI signal to be identified to ensure the uniformity and stability of the input features, thereby achieving good timing availability.
[0071] The feature extraction module then performs weighted feature extraction based on the global temporal attention mechanism for the Wi-Fi CSI signal to be identified after unified temporal processing. The weights of the global temporal attention mechanism are generated by combining the Wi-Fi CSI signal to be identified and the temporal embedding matrix. For example, the temporal embedding matrix is added to the input features corresponding to the Wi-Fi CSI signal to be identified to achieve fused location awareness. The weights of the global temporal attention mechanism are then formed through linear activation and weighting. After the long-range dependency features of the Wi-Fi CSI signal to be identified are extracted, the classification module generates a prediction probability vector, resulting in a category prediction result.
[0072] Finally, the final cross-domain temporal behavior recognition result is determined based on the category prediction result of the Wi-Fi CSI signal to be identified.
[0073] It should be emphasized that in the cross-domain temporal behavior recognition method based on the fusion of global and Gaussian enhanced attention provided in this application, the global temporal attention module is improved on the basis of existing self-attention mechanisms, such as the Transformer attention mechanism or the self-attention attention mechanism. Specifically, on the basis of the existing self-attention mechanism, a temporal embedding matrix and a global context aggregation mechanism are introduced, such as the introduction of additional learnable position vectors or global average pooling channels, to make attention more perceptive in the temporal dimension.
[0074] Since the cross-domain temporal behavior recognition method based on the fusion of global and Gaussian enhanced attention provided by this application extracts features based on the weighted weighting of temporal attention, and the weight of temporal attention is generated according to the time embedding matrix, this method of uniformly modeling the dynamic features or each time step within the complete time series range and generating a unified attention distribution within the time range significantly enhances the model's perception of long-range dependency patterns across time steps such as gait and action, and can effectively capture long-range dependency characteristics in gait and behavior sequences. Compared with traditional methods based on local windows or short-term memory structures that are difficult to model cross-time step behavior associations, it can more comprehensively capture gait cycle changes, improve the integrity of temporal feature expression, and thus achieve higher accuracy and stability in complex dynamic behavior recognition tasks, thereby improving the recognition accuracy of cross-domain temporal behaviors.
[0075] On the basis of the above implementation mode, Figure 2 As shown, the cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion provided by this application, step 12 includes:
[0076] Step 121: Add a time embedding matrix to the Wi-Fi CSI signal to be identified to obtain a fused location perception result.
[0077] Step 122: Perform linear mapping on the fused position perception result to obtain a linear mapping result.
[0078] Step 123: Softmax activation is performed on the linear mapping result to obtain the weight of temporal attention.
[0079] Step 124: Weight the time-step features of the Wi-Fi CSI signal to be identified according to the temporal attention weight to obtain a global feature.
[0080] And, as Figure 3 As shown, the cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion provided by the present application further includes, after step 124:
[0081] Step 125: Perform residual connection and normalization on the global features to obtain standardized global features;
[0082] Step 126: Input the normalized global features into the classification function to generate a prediction probability vector, wherein the prediction probability vector is used to generate a temporal behavior recognition result.
[0083] Specifically, in the cross-domain temporal behavior recognition method based on the fusion of global and Gaussian enhanced attention provided in this application, global feature extraction based on the global temporal attention mechanism can be achieved in the following ways:
[0084] First, a learnable time embedding matrix is introduced into the input sequence of the Wi-Fi CSI signal to be identified. , and normalize it with the input feature matrix Add them together to get the fused position perception result, as shown in formula (1):
[0085] (1)
[0086] in, To fuse the position perception results for subsequent attention weight calculation, is the normalized input feature matrix, is the time embedding matrix.
[0087] Then, the fusion position perception results Perform multi-layer linear mapping and activation operations, such as two-layer linear mapping and activation operations, to identify the importance of each time frame in the global context, as shown in Formula (2) and Formula (3):
[0088] (2)
[0089] (3)
[0090] in, To fuse the location perception results, is a learnable parameter, is a learnable parameter, ReLU is used to enhance nonlinear expression, and Softmax is used to normalize the weight of generating temporal attention. is the weight of temporal attention.
[0091] Afterwards, each time step in the normalized input feature matrix is feature-weighted by the weight of the temporal attention, and the global temporal weighted output result is obtained as the global feature of the global temporal attention module, as shown in formula (4):
[0092] (4)
[0093] in, is the normalized input feature matrix, is the weight of temporal attention, is the global timing weighted output result, It means converting the vector A into a diagonal matrix so that each column of the feature matrix F is scaled by the corresponding attention weight in A to achieve column-by-column weighting.
[0094] In addition, the cross-domain temporal behavior recognition method based on the fusion of global and Gaussian enhanced attention provided in this application also introduces a residual structure and uses a standardized operation to obtain the final output result as the global feature of the global temporal attention module, as shown in formula (5):
[0095] (5)
[0096] in, is the normalized input feature matrix, is the global timing weighted output result, is the global feature after normalization. Refers to the introduction of layer normalization operation, which is used to normalize the feature residual term Normalization is performed on the feature dimension. This normalization process calculates the mean and variance of the feature vector at each moment, normalizes it, and then introduces trainable scaling factors and offset factors. This preserves the expressive power of the original features while improving the numerical stability and generalization ability of the model.
[0097] Because this application constructs a global temporal attention mechanism and introduces a time embedding matrix and learnable sequence importance weights, the model can capture the dependencies between distant time steps in the time dimension, make up for the shortcomings of traditional structures in modeling behavior cycles, and achieve unified modeling of the complete dynamics of behavior, thereby improving the recognition accuracy of cross-domain temporal behaviors.
[0098] Based on the above implementation, Figure 4 As shown, the cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion provided by this application, step 13 includes:
[0099] Step 131: Perform weighted feature extraction on the Wi-Fi CSI signal to be identified based on the Gaussian enhanced attention module to obtain local features. The Gaussian enhanced attention module is used to calculate a Gaussian distribution attention matrix based on the Wi-Fi CSI signal to be identified and a Gaussian distribution time offset matrix, and perform weighted feature extraction on the Gaussian distribution features.
[0100] Step 132: Perform feature fusion based on the global features and the local features to obtain a fused feature extraction result.
[0101] Step 133: perform category prediction on the fusion feature extraction result, and generate a temporal behavior recognition result based on the category prediction result.
[0102] It should be emphasized that in the cross-domain temporal behavior recognition method based on the fusion of global and Gaussian enhanced attention provided in this application, the Gaussian enhanced attention module introduces a selective weight mechanism that simulates Gaussian response on the standard self-attention structure to enhance the response ability to local key features.
[0103] Among them, such as Figure 5 As shown, the cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion provided by this application, step 132 includes:
[0104] Step 1321: Perform weighted fusion on the global features and the local features using a preset fusion weight ratio to obtain a fusion feature extraction result.
[0105] Specifically, the technical solution provided by this application can also realize the fusion of global temporal attention mechanism and Gaussian enhanced attention mechanism, such as Figure 6 As shown:
[0106] After the Wi-Fi CSI signal to be identified is normalized and time-aligned, it is input into the feature extractor, where it is extracted by the global temporal attention module and the Gaussian enhanced attention module, respectively. These modules are distinguished using positional encoding tags, and finally processed by the fully connected layer (FC). The global temporal attention module first performs one-dimensional convolution, batch normalization (BN), and rectified linear unit (ReLU) processing on the Wi-Fi CSI signal to be identified. It then uses global temporal attention (GTA) for feature extraction. This is followed by another one-dimensional convolution, BN, ReLU processing, and feature extraction using GTA. Finally, global features are obtained through global average pooling and FC. The Gaussian enhanced attention module performs linear mapping on the Wi-Fi CSI signal to be identified to obtain a query vector (Query, Q), a key vector (Key, K), and a value vector (Value, V). It then performs weighted calculation of local features through Gaussian-weighted summation and scaling (GWSS) and normalization. Finally, global average pooling and FC processing are performed to output local features.
[0107] After obtaining the global features focusing on global temporal enhancement of the full sequence behavior and the local features focusing on Gaussian enhancement of local behavior changes, the two feature extraction results are fused to obtain the fused feature extraction result, as shown in formula (6):
[0108] (6)
[0109] in, is the fusion feature extraction result after fusion, is the global feature extracted by the global temporal attention module, is the local feature extracted by the Gaussian enhanced attention module, is a parameter that controls the fusion weight ratio. Subsequently, based on the fusion feature extraction results, the highly discriminative gait features output by the feature extraction module are mapped to specific category labels through category classification to obtain the second category prediction results. The final second temporal behavior recognition results are determined based on the second category prediction results.
[0110] Because this application uses the fused feature extraction results for subsequent category prediction and loss function calculation, the fused feature extraction results have both global and local discrimination capabilities, enhancing the comprehensiveness and robustness of time series modeling. Specifically, this application synergistically integrates global modeling capabilities and local focusing capabilities at the structural level to form a dual-path attention extraction channel, enabling the model to simultaneously grasp macro-behavioral trends and local action details, improving the ability to identify and discriminate complex dynamic behaviors.
[0111] Based on the above implementation, Figure 7 As shown, in the cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion provided by this application, step 131 includes:
[0112] Step 1311: Perform linear mapping on the Wi-Fi CSI signal to be identified to obtain a query vector and a key vector.
[0113] Step 1312: Scale the dot product of the query vector and the key vector to obtain the basic attention matrix.
[0114] Step 1313: Fuse the basic attention matrix and the Gaussian distribution time bias matrix to obtain the Gaussian distribution attention matrix.
[0115] Step 1314: Perform weighted feature extraction on the Wi-Fi CSI signal to be identified based on the Gaussian distribution attention matrix to obtain local features.
[0116] Specifically, the cross-domain temporal behavior recognition method based on the fusion of global and Gaussian enhanced attention provided by this application not only uses the global temporal attention mechanism to capture the long-range dependency characteristics of cross-domain behaviors in the temporal dimension, but also uses the Gaussian attention weight distribution to enhance the perception of key local behavior changes. After the Wi-Fi CSI signal to be identified is collected, it is first normalized and time-series processed uniformly. Then, the input features are linearly mapped to obtain the query vector, key vector, and value vector. The query vector is shown in formula (7):
[0117] (7)
[0118] The key vector is shown in formula (8):
[0119] (8)
[0120] The value vector is shown in formula (9):
[0121] (9)
[0122] in, For input features, such as the Wi-Fi CSI signal to be identified after normalization and unified time sequence processing, 、 、 , is a learnable linear mapping matrix, d is the latent space dimension, is the query vector, is the key vector, is a value vector.
[0123] The query-key-value mapping result is then calculated by scaling the dot product to obtain the basic attention matrix, as shown in formula (10) and formula (11):
[0124] (10)
[0125] (11)
[0126] in, is the query vector, is the key vector, d is the latent space dimension, is the basic attention matrix, for Activation function.
[0127] Then, a time bias matrix based on the Gaussian distribution of frame distance is introduced to adjust the attention intensity between time frames and improve the modeling ability of temporal local structure, as shown in formula (12):
[0128] (12)
[0129] Among them, i and j are time indexes, is the offset center, is the distribution width parameter, represents the biased attention of adjacent frames to the target frame, Represents the natural exponential function, that is, the exponential operation with the natural constant e as the base, which is used to simulate the attenuation effect of the inter-frame distance on the attention intensity.
[0130] Afterwards, the basic attention matrix and the Gaussian distribution bias attention are fused to obtain the Gaussian distribution attention matrix, as shown in formula (13):
[0131] (13)
[0132] in, is the learnable fusion factor, is the biased attention of adjacent frames to the target frame, is the basic attention matrix, is the Gaussian distribution attention matrix, Indicates that the fusion matrix is normalized. The cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion provided in this application adopts Softmax normalization to ensure the normalization and numerical stability of attention distribution.
[0133] Finally, the Gaussian distribution attention matrix is used to calculate the local enhanced features of the input features, such as the Wi-Fi CSI signal to be identified after normalization and unified time sequence processing, as shown in formula (14), to obtain the local features for the local time frame:
[0134] (14)
[0135] in, is a value vector, is the Gaussian distribution attention matrix, It is a local feature.
[0136] Since this application introduces an attention adjustment module that can learn Gaussian weight distribution, without changing the original attention calculation logic, it strengthens the model's response to key time steps, reduces false attention to redundant fragments, and improves the ability to extract limited behavioral information and noise resistance. Specifically, based on the standard attention calculation, a time-position-sensitive bias modeling strategy is introduced, which can effectively guide the model to focus on key time steps in the behavior sequence, while actively suppressing irrelevant disturbances caused by environmental noise, multipath interference, human occlusion, clothing changes and other factors. For example, in low-light conditions, occluded scenes, and different clothing states, the model can maintain a high level of recognition accuracy, and its environmental adaptability is significantly enhanced compared to existing standard attention calculation methods.
[0137] On the basis of the above implementation mode, Figure 8 As shown, in the cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion provided by this application, step 133 includes:
[0138] Step 1331: Perform probability prediction on the fusion feature extraction result to obtain a prediction probability vector.
[0139] Step 1332: Perform feature mapping on the predicted probability vector, and generate a temporal behavior recognition result based on the feature mapping result.
[0140] Specifically, after the feature extraction module completes the feature extraction of the Wi-Fi CSI signal to be identified based on the global temporal attention mechanism, the global features are input into the classification function for probability prediction to obtain the predicted probability vector, as shown in formula (15):
[0141] (15)
[0142] in, is the classification function, which represents the category mapping function composed of the fully connected layer, activation function and normalization. is the parameter set of the feature extractor, is the set of trainable parameters of the classifier, is the feature extraction result, such as the fusion feature extracted by the global temporal attention mechanism and the Gaussian enhanced attention mechanism. is the predicted probability vector. Subsequently, it is transformed once through multiple fully connected layers, and the features are mapped to the predicted probability distribution of each category in the category space through a normalization function, such as a Softmax function, to obtain a first category prediction result, and the first temporal behavior recognition result is determined based on the first category prediction result. Among them, the category classification module can classify and predict categories for features extracted only based on the global temporal attention mechanism, and can also classify and predict categories for fused features obtained after feature extraction and fusion based on both the global temporal attention mechanism and the Gaussian enhanced attention mechanism. This application does not impose any restrictions.
[0143] Because in the cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion provided by this application, the category classification module can map highly discriminative gait features into specific category labels, and the normalization function Softmax maps the features into the predicted probability distribution of each category in the category space, ensuring the distinguishability and normalization of the prediction, thereby ensuring the recognition effect of the cross-domain temporal behavior of this application.
[0144] Based on the above implementation, Figure 9 As shown, the cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion provided by this application also includes:
[0145] Step 19: Extract features of the Wi-Fi CSI signal to be identified and construct a frequency domain amplitude feature matrix.
[0146] Step 20: normalize the frequency domain amplitude feature matrix to obtain an amplitude mapping result;
[0147] Step 21: Format the time dimension of the amplitude mapping result to obtain the Wi-Fi CSI signal to be identified after unified time sequence processing.
[0148] Specifically, before feature extraction, the cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion provided in this application can also normalize and unify the temporal processing of the collected raw data, such as Wi-Fi CSI signals.
[0149] First, the frequency domain amplitude features of the Wi-Fi CSI signal are extracted and a two-dimensional matrix is constructed. , where K is the number of subcarriers and T is the time frame length of the sample. Then, each column of the two-dimensional matrix corresponding to each time step is normalized to map the amplitude to the interval Finally, the time dimension T of all samples is formatted by zero padding or truncation to obtain a unified input format, generating a Wi-Fi CSI signal after unified timing processing. The Wi-Fi CSI signal mentioned in this application can be a training set or validation set in the model training process, or a Wi-Fi CSI signal to be identified, and this application does not limit it.
[0150] Since this application can also normalize and unify the timing processing of Wi-Fi CSI signals, the input information received by the model during training or inference is stable and unified, ensuring the cross-domain timing behavior recognition effect and efficiency.
[0151] In addition, the cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion provided in this application can be used in any mainstream neural network framework with temporal modeling capabilities, and maintain stable performance in different physical spaces, channel environments, and user behavior states, such as non-cooperative recognition, edge computing deployment, smart security and other actual engineering scenarios.
[0152] On the basis of the above implementation mode, Figure 10 As shown, the present application can be applied to a convolutional neural network, which includes a feature extractor and a closed set classifier. The feature extractor is used to perform weighted feature extraction on the Wi-Fi CSI signal to be identified based on the global temporal attention module to obtain a global feature. The closed set classifier is used to perform category prediction based on the global feature, and generate a first temporal behavior recognition result based on the category prediction result. In the cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion provided in the present application, before step 12, the following is also included:
[0153] Step 22: Obtain the Wi-Fi CSI signal for training.
[0154] Step 23: Perform weighted feature extraction on the training Wi-Fi CSI signal using an untrained feature extractor to obtain a training global feature.
[0155] Step 24: Use an untrained closed set classifier to predict the category of the training global features, and calculate the cross entropy loss function based on the category prediction result and the true label to obtain the cross entropy loss value.
[0156] Step 25: Optimize the untrained feature extractor and the untrained closed set classifier according to the cross entropy loss value to obtain a pre-trained feature extractor and a pre-trained closed set classifier.
[0157] Specifically, in the cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion provided in this application, the cross-entropy loss function can be used as a supervisory signal to measure the difference between the model predicted label and the true label, thereby realizing the recognition function of cross-domain temporal behavior. The cross-entropy loss function is shown in formula (16):
[0158] (16)
[0159] Among them, N is the total number of samples, C is the total number of categories, is the true label of the i-th sample in category C, such as 0 or 1, is the category probability predicted by the model, The loss value calculated by the cross entropy loss function.
[0160] Since this application uses the cross-entropy loss function to calculate the difference between the predicted label and the true label, it encourages the model to assign a higher confidence probability to the true category, improves the classification accuracy while suppressing the response value of the wrong category, and can guide the model to converge to a better discrimination ability, further ensuring the accuracy of cross-domain temporal behavior recognition.
[0161] Based on the above implementation, Figure 11 As shown, in the cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion provided by this application, step 25 includes:
[0162] Step 251 : performing joint iterative optimization on the untrained feature extractor and the untrained closed set classifier by using a back propagation algorithm and a gradient descent algorithm to obtain a pre-trained feature extractor and a pre-trained closed set classifier.
[0163] Specifically, during neural network training, the parameters of the classifier and feature extractor are updated together, and joint optimization is performed by minimizing the loss function. The overall optimization goal is shown in formula (17):
[0164] (17)
[0165] in, , are the parameters that need to be updated during the training of the classifier and feature extractor. represents the parameter value when minimizing the objective function, represents the expected loss or average loss under the distribution of training samples. The optimization process is completed through backpropagation and gradient descent to obtain the joint optimal solution.
[0166] During the training process, back propagation and gradient descent algorithms are used to adjust the parameters. , , performing joint iterative updates to ensure the coordinated evolution of feature extraction and classification decisions under the same optimization objective. This module, combined with the feature extraction mechanism, forms a complete recognition process for closed-set tasks. Through supervised training and loss-driven learning, the model can efficiently complete recognition tasks for known classes and demonstrates stable generalization capabilities.
[0167] Existing behavior recognition methods struggle with modeling long-range behavioral dependencies and are limited in their ability to express features. Specifically, human behaviors, such as gait and movement, exhibit distinct temporal characteristics. However, existing models often extract features based on local windows or short-term dependencies, failing to capture the long-term dependencies within the entire behavioral process. This limited modeling capability limits the recognition system's ability to express complex behavioral structures, making recognition unstable, particularly in scenarios involving cross-environmental or drastic state changes, i.e., cross-domain scenarios.
[0168] Furthermore, existing behavior recognition methods suffer from unstable attention mechanism responses, making it easy to overlook critical timing information. Specifically, under the influence of multipath and environmental noise, features in CSI signals often experience perturbations and drift. Traditional attention mechanisms often calculate responses without prior guidance, resulting in large fluctuations in the distribution of attention weights. This prevents accurate recognition of key behavior segments, thus affecting overall classification performance.
[0169] To address the above problems, this application provides a cross-domain temporal behavior recognition method based on the fusion of global and Gaussian enhanced attention. It integrates the global temporal attention mechanism and the Gaussian enhanced attention mechanism, combines modeling and distribution guidance ideas, and constructs a fusion mechanism feature extraction framework in the feature extraction stage, significantly improving the stability and expression ability of the model in complex environments.
[0170] First, this application provides a cross-domain temporal behavior recognition method based on the fusion of global and Gaussian enhanced attention, constructs a global temporal attention mechanism, and introduces temporal position information modeling strategies, such as learnable position weights and sequence perception structures, to capture the long-range dependencies between different time steps in the behavior within the entire sequence, enhance the modeling ability of complete behavior patterns, and achieve global perception of complete behavior semantics.
[0171] Secondly, the cross-domain temporal behavior recognition method based on the fusion of global and Gaussian enhanced attention provided in this application uses a learnable Gaussian distribution as an attention weight guidance template, introduces a Gaussian prior structure to constrain the attention weight distribution, and guides the model to focus on key frame segments within a local time window, strengthens the focus response to key time steps, improves feature stability, and effectively suppresses invalid interference and enhances the discriminability of behavioral features.
[0172] Moreover, through the module fusion strategy, the above two attention mechanisms are collaboratively modeled at the structural layer, taking into account the long-range pattern modeling and key node focusing in behavior recognition, constructing a multi-scale and multi-granularity feature expression structure, realizing the joint expression of the two attention sub-modules, and establishing effective collaboration between the global and local, long-range and short-range, coarse-grained and fine-grained, thereby significantly improving the discriminability of feature extraction and the generalization ability of the recognition system under multiple environmental conditions.
[0173] In summary, without relying on multi-scene annotated data, and relying solely on CSI signals collected by Wi-Fi, the technical solution provided in this application can improve the stability and recognition accuracy of the wireless signal-based temporal behavior recognition system under cross-environment and cross-state conditions, and provide a feature extraction mechanism with high expressiveness and strong robustness for non-contact intelligent perception systems.
[0174] Specifically, the technical solution provided in this application structurally integrates for the first time a global temporal perception mechanism based on position encoding and a Gaussian attention guidance mechanism based on probability distribution constraints, and connects the dual needs of "global modeling" and "local attention" in behavior recognition at the mechanism design level, constructing a more expressive attention framework.
[0175] Moreover, unlike existing methods that only use a single attention strategy or static attention allocation method, this application adopts a dynamic response mechanism and parameterized Gaussian bias to jointly guide attention weight learning, and makes improvements in model structure and feature modeling strategy.
[0176] Furthermore, the technical solution provided in this application does not rely on specialized hardware and can be directly embedded in mainstream wireless communication devices, demonstrating excellent platform adaptability and scalability. In field tests across multiple scenarios, this solution maintained stable recognition performance despite complex conditions such as varying lighting, varying wear, and non-line-of-sight. It is suitable for a variety of engineering scenarios, including intelligent monitoring, edge sensing, and non-cooperative authentication. It provides an effective feature modeling solution for sequential behavior recognition tasks in complex wireless sensing environments.
[0177] Example 2
[0178] Based on Example 1, this application also provides a cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion:
[0179] Time-series behavior recognition methods based on wireless signals are widely used in fields such as contactless identity recognition, security monitoring, and intelligent assistance. However, practical systems are affected by factors such as environmental complexity, signal interference, and the diversity of behavioral dynamics, resulting in low recognition accuracy.
[0180] First, existing time-series behavior recognition methods suffer from feature distortion and unstable behavior information extraction under signal perturbations. Specifically, Wi-Fi signals are highly susceptible to interference from multipath, obstruction by obstacles, and ambient noise during indoor propagation. This interference obscures or distorts key behavioral features in time-series data. Traditional feature extraction architectures struggle to accurately identify high-discrimination segments within action cycles, resulting in significant fluctuations in recognition performance.
[0181] Secondly, existing methods for recognizing temporal behavior suffer from a limited range of feature modeling and a lack of awareness of long-range dependencies. Specifically, temporal behaviors often exhibit significant persistence and phases, requiring understanding of their dynamic structure across time steps. However, existing models often employ local convolution or short-term attention mechanisms, making it difficult to model temporal dependencies across the entire behavior cycle. This results in insufficient awareness of the full picture of behavioral evolution and limited generalization performance.
[0182] Furthermore, existing methods for time-series behavior recognition suffer from a scattered response of the attention mechanism, making it difficult to focus on key time-series nodes. Specifically, existing self-attention mechanisms lack prior guidance or dynamic adjustment mechanisms. When processing noisy signals, they tend to overweight redundant frames and ignore the time steps with core semantics in behavioral changes, leading to misidentification and semantic drift.
[0183] Finally, existing methods for temporal behavior recognition suffer from a single feature extraction structure, failing to balance global and detailed modeling. Specifically, most existing models employ a single attention strategy, struggling to balance global modeling with local, fine-grained extraction. This results in incomplete behavioral modeling capabilities, particularly lacking robustness across scenarios or under changing user states.
[0184] In response to the above-mentioned existing defects, the present application provides a cross-domain temporal behavior recognition method based on the fusion of global and Gaussian enhanced attention, which integrates the global temporal attention mechanism and the Gaussian enhanced attention mechanism. Through the structural fusion and response guidance of the attention mechanism, the multi-scale modeling of temporal signals and the coordinated improvement of key frame perception capabilities are achieved.
[0185] The overall model architecture of the cross-domain temporal behavior recognition method based on the fusion of global temporal attention mechanism and Gaussian enhanced attention mechanism provided in this application is as follows Figure 12 As shown:
[0186] The model includes a signal preprocessing module, a feature extraction module, such as a feature extractor, and a category classification module, such as a closed set classifier. Through the coordinated cooperation of the three, a recognition system with high discriminability and strong robustness is constructed.
[0187] The signal preprocessing module is primarily responsible for normalizing and unifying the timing of Wi-Fi CSI signals collected by Wi-Fi. The feature extraction module is modeled using a global temporal attention mechanism to capture long-range temporal dependencies and a Gaussian boosted attention mechanism to enhance local key time-step features. The global temporal attention mechanism captures the long-range temporal dependencies of behavior, enhancing the model's understanding of the structure of the entire sequence of behaviors. The Gaussian boosted attention mechanism introduces a Gaussian-shaped attention weight distribution to enhance the perception of key local behavioral changes. The feature extraction module also fuses the global and local features extracted by the two submodules to form the final feature representation for recognition. The category classification module receives these fused features and achieves accurate recognition in closed-set scenarios. Specifically, the category classification module consists of a multi-layer fully connected network, combining normalization and activation functions for feature compression and mapping. It uses standard supervised learning mechanisms to optimize recognition accuracy. The highly discriminative gait features output by the feature extraction module are mapped into specific category labels to complete the final recognition task.
[0188] Specifically, the CSI signals collected by Wi-Fi are normalized by the signal preprocessing module and then input into the feature extractor. Feature extraction is performed by the global temporal attention module and the Gaussian enhanced attention module, respectively. These signals are distinguished by positional encoding tags and finally processed by FC. The global temporal attention module first performs one-dimensional convolution, batch normalization, and ReLU processing on the input signal, followed by feature extraction using GTA. This is followed by another one-dimensional convolution, batch normalization, ReLU processing, and feature extraction using GTA. Finally, global average pooling and FC are used to obtain global features. The Gaussian enhanced attention module linearly maps the input signal to obtain a query vector Q, a key vector K, and a value vector V. Local features are then weighted and normalized using GWSS. Finally, global average pooling and FC are performed to output local features. Once global features (focusing on global temporal enhanced full-sequence behavior) and local features (focusing on Gaussian enhanced local behavior changes) are obtained, the two feature extraction results are fused to produce a fused feature extraction result. Then, the fusion feature extraction results are input into the classifier. For example, in the closed set classifier, FC processing and ReLU processing are performed first, and then FC processing and ReLU processing are performed again. After two full connection layer transformations, the class probability predicted by the model is generated through the normalization function Softmax. , thereby generating the corresponding cross-domain temporal behavior recognition results. In addition, during the training phase of the model, after extracting the global features and local features for training and generating the category probability through the closed set classifier, the category probability and the cross entropy loss function are used to identify the corresponding cross-domain temporal behavior recognition results. The loss value is calculated, and based on the loss value, the global temporal attention module and Gaussian enhanced attention module used for feature extraction, as well as the closed set classifier used for predicting probability are updated.
[0189] In summary, to address the issues of long-range dependency modeling and local keyframe focus in complex temporal behavior recognition in wireless signal environments, this application proposes a cross-domain temporal behavior feature extraction method that integrates a global temporal attention mechanism with a Gaussian boosted attention mechanism, as well as a cross-domain temporal behavior recognition method based on the fusion of global and Gaussian boosted attention. Through a global perception strategy, the importance of each time step in a complete time series is dynamically modeled, generating a unified attention distribution across the time range. This method effectively captures long-range dependencies in gait and behavior sequences, addressing the difficulty of traditional local attention methods in modeling cross-time-step behavioral correlations. It is suitable for recognition tasks involving periodic, continuous, and highly temporally correlated behaviors. Furthermore, the cross-domain temporal recognition method proposed in this application designs a deformable Gaussian distribution based on temporal position to regulate the attention bias between time steps, giving higher attention to key time steps within a local range and suppressing the negative impact of interference from noise, occlusion, and other interference on the recognition results. Compared to the existing standard self-attention mechanism, the Gaussian boosted mechanism has stronger spatial structure perception and noise suppression capabilities, significantly improving the model's robustness in complex environments. Furthermore, the cross-domain temporal sequence recognition method proposed in this application effectively combines global modeling and local key focus through structural fusion, forming a multi-scale, multi-granular feature extraction path. The fused feature representation combines the ability to understand macroscopic behavioral patterns with the ability to capture microscopic details, significantly improving recognition performance in cross-domain and cross-state scenarios.
[0190] The global temporal attention mechanism introduced in this application enables unified modeling based on dynamic features within the complete time series, significantly enhancing the model's ability to perceive long-range dependent patterns across time steps, such as gait and movement. Compared to traditional methods based on local windows or short-term memory structures, it can more comprehensively capture gait cycle changes, improve the integrity of temporal feature expression, and thus achieve higher accuracy and stability in complex dynamic behavior recognition tasks.
[0191] The Gaussian enhanced attention mechanism employed in this application introduces a temporal position-sensitive bias modeling strategy based on standard attention computation. This effectively guides the model to focus on key time steps in the behavioral sequence while actively suppressing irrelevant disturbances caused by factors such as environmental noise, multipath interference, human occlusion, and clothing changes. In typical cross-environment gait recognition tests, the proposed cross-domain temporal behavior feature extraction method and cross-domain temporal behavior recognition method based on the fusion of global and Gaussian enhanced attention improved recognition accuracy by up to 15% compared to traditional methods based on single convolution or standard attention structures. In particular, in closed-set recognition tasks with dense sample categories and drastic state changes, this method demonstrated superior discriminative performance and generalization capabilities, providing a reliable guarantee for high-precision recognition in complex environments. Furthermore, this application utilizes a modular feature extraction design with low overall computational complexity and high parallel efficiency, making it suitable for edge computing and embedded platform deployment requirements. In actual hardware platform testing, the model inference latency was stably controlled at the millisecond level, meeting the low-latency, high-real-time recognition requirements of application scenarios such as public security monitoring and intelligent access verification, and possessing excellent engineering application potential.
[0192] In summary, the cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion provided in this application has achieved substantial improvements over the existing technology in key performance indicators such as feature extraction accuracy, environmental adaptability, recognition accuracy and system real-time performance. It can be widely used in public security, smart travel, identity authentication and other fields, and can also be extended to non-contact behavior recognition scenarios such as smart medical care, rehabilitation monitoring, and elderly fall warning. It has important engineering application value and social promotion significance.
[0193] Example 3
[0194] This application also provides a specific cross-domain temporal behavior recognition experiment example, taking into account the channel characteristics, multipath effects and occlusion interference of different environments, and conducting comparative experiments and evaluations in different scenarios and under different interference conditions, thereby proving the recognition performance of the feature extraction method proposed in this application that integrates the global temporal attention mechanism and the Gaussian enhanced attention mechanism in complex environments.
[0195] The first step is to verify the recognition in the lobby and corridor scenes of a building. Commercial Wi-Fi equipment is used to collect the channel state information CSI of human gait activities and construct a data set. Among them, the collected data covers images of different users, different time periods and different walking angles, so as to ensure the diversity and authenticity of the samples. The data set is randomly divided into a training data set and a test data set according to the ratio of 80% training and 20% testing, and cross-validation is performed. The existing best deep neural network recognition method and the deep neural network recognition method proposed in this application that integrates the global temporal attention mechanism and Gaussian enhanced attention are compared together. Among them, the deep neural networks of the two schemes both use convolutional networks, as shown in Table 1:
[0196] Table 1 Verification experiments for hall and corridor scenes
[0197]
[0198] The best existing solution, the existing neural network recognition method, achieved an accuracy of 85.3% in the lobby and 85.2% in the corridor. The proposed solution, a deep neural network recognition method that integrates a global temporal attention mechanism with Gaussian enhanced attention, achieved an accuracy of 96.1% in the lobby and 94.8% in the corridor. The comparison results show that the proposed deep neural network recognition method, which integrates a global temporal attention mechanism with Gaussian enhanced attention, improved the accuracy by 10.8 percentage points in the lobby and 9.6 percentage points in the corridor compared to the best existing deep neural network recognition method, fully demonstrating the high recognition accuracy and strong robustness of the technical solution proposed in this application across multiple scenarios. Secondly, to evaluate the recognition capabilities of this application in environments with multiple occlusions and multipath interference, a validation experiment was designed in a real laboratory environment. The collected data covers images of users in different wearing conditions, such as carrying a backpack and changing a coat. The data was randomly divided into training and testing datasets with an 80% training and 20% testing ratio, and cross-validation was performed. At this point, the existing best deep neural network recognition method and the deep neural network recognition method proposed in this application that integrates the global temporal attention mechanism and Gaussian enhanced attention are compared together, as shown in Table 2:
[0199] Table 2 Verification experiment of laboratory scenario
[0200]
[0201] The existing neural network recognition method has an accuracy rate of 82.3% in a multi-occlusion and multi-path interference environment. The deep neural network recognition method proposed in this application, which integrates a global temporal attention mechanism and Gaussian enhanced attention, has an accuracy rate of 93.7% in a multi-occlusion and multi-path interference environment. From the above comparison results, it can be seen that the deep neural network recognition method proposed in this application, which integrates a global temporal attention mechanism and Gaussian enhanced attention, has an accuracy rate of more than 11 percentage points higher than the best existing deep neural network recognition method in complex laboratory environments, such as multi-occlusion and multi-path interference environments. This fully proves that the technical solution provided by this application can still stably extract effective features under non-line-of-sight and multi-path interference conditions, and has good environmental adaptability and application potential.
[0202] Finally, to further verify the independent contributions of the global temporal attention mechanism and the Gaussian enhanced attention mechanism in this application, an ablation comparison was performed. On the hall scene dataset, the key submodules in the feature extraction module were removed respectively to observe the impact on the final recognition performance, as shown in Table 3:
[0203] Table 3 Comparison of recognition accuracy of ablation experiments
[0204]
[0205] In the ablation experiment, the recognition accuracy of the recognition scheme using only convolutional networks without global temporal attention mechanism and Gaussian enhanced attention mechanism in the hall scene was 85.3%; the recognition accuracy of the recognition scheme using Gaussian enhanced attention mechanism without global temporal attention mechanism in the hall scene was 93.1%; the recognition accuracy of the recognition scheme using global temporal attention mechanism without Gaussian enhanced attention mechanism in the hall scene was 91.6%; the recognition accuracy of the complete method with both global temporal attention mechanism and Gaussian enhanced attention mechanism in the hall scene was 96.1%.
[0206] In summary, no matter which attention mechanism is removed, the recognition accuracy rate drops significantly, which fully demonstrates the independent contribution of the two modules to performance improvement. The global attention mechanism effectively enhances the model's ability to model long-range temporal dependencies, while the Gaussian enhancement mechanism improves the ability to focus on local key time steps. The combination of the two forms a complementary advantage, significantly enhancing the model's feature expression ability and recognition accuracy in complex scenes. A large number of experiments under the above-mentioned different scenarios and environmental conditions have proved that the feature extraction scheme that integrates the dual attention mechanism proposed in this application can significantly outperform existing technologies in complex temporal behavior recognition tasks such as gait recognition, showing superior accuracy, robustness and engineering deployment potential, and has broad application prospects and practical promotion value.
[0207] Those skilled in the art will appreciate that embodiments of the present invention may provide methods, systems, or computer program products. Therefore, the present invention may take the form of a fully hardware embodiment, a fully software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, may be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, such that instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the functions described in the processes. Figure 1 a process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including the instruction device, which implements the function specified in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0208] It should be pointed out that the above specific implementation methods can enable those skilled in the art to understand the invention more comprehensively, but do not limit the invention in any way. Therefore, although this specification and examples have described the invention in detail, those skilled in the art should understand that the invention can still be modified or replaced by equivalents; and all technical solutions and improvements that do not deviate from the spirit and scope of the invention are included in the scope of protection of the patent for the invention. Any figure mark in the claims should not be regarded as limiting the claims involved. Any simple change or equivalent replacement of the technical solution that can be obviously obtained by any person familiar with the art within the technical scope disclosed in the present invention belongs to the scope of protection of the present invention.
Claims
1. A cross-domain temporal behavior recognition method based on the fusion of global and Gaussian enhanced attention, characterized by: include: Obtain the Wi-Fi CSI signal to be identified; Adding a time embedding matrix to the Wi-Fi CSI signal to be identified to obtain a fused location perception result; Performing linear mapping on the fused position sensing result to obtain a linear mapping result; Perform Softmax activation on the linear mapping result to obtain the weight of temporal attention; Performing time-step feature weighting on the Wi-Fi CSI signal to be identified according to the temporal attention weight to obtain a global feature, wherein the global temporal attention module is used to calculate the global temporal attention weight according to the time embedding matrix and the Wi-Fi CSI signal to be identified and perform time-step feature weighted feature extraction; Performing linear mapping on the Wi-Fi CSI signal to be identified to obtain a query vector and a key vector; obtaining a basic attention matrix based on the scaled dot product of the query vector and the key vector; fusing the basic attention matrix with the Gaussian distribution time offset matrix to obtain a Gaussian distribution attention matrix; performing weighted feature extraction on the Wi-Fi CSI signal to be identified based on the Gaussian distribution attention matrix to obtain local features, wherein the Gaussian enhanced attention module is configured to calculate the Gaussian distribution attention matrix based on the Wi-Fi CSI signal to be identified and the Gaussian distribution time offset matrix and perform weighted feature extraction of Gaussian distribution features; Feature fusion is performed based on the global features and the local features to obtain a fused feature extraction result; category prediction is performed on the fused feature extraction result, and the temporal behavior recognition result is generated based on the category prediction result.
2. The cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion according to claim 1 is characterized in that: After weighting the time step features of the Wi-Fi CSI signal to be identified according to the temporal attention weight to obtain the global feature, the method further includes: Performing residual connection and normalization processing on the global features to obtain the normalized global features; The standardized global features are input into a classification function to generate a prediction probability vector, wherein the prediction probability vector is used to generate the temporal behavior recognition result.
3. The cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion according to claim 1 is characterized in that: The performing feature fusion according to the global feature and the local feature to obtain a fusion feature extraction result includes: The global features and the local features are weightedly fused according to a preset fusion weight ratio to obtain the fusion feature extraction result.
4. The cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion according to claim 1 is characterized in that: The performing category prediction on the fusion feature extraction result and generating the temporal behavior recognition result based on the category prediction result includes: Performing probability prediction on the fusion feature extraction result to obtain a prediction probability vector; Perform feature mapping on the predicted probability vector, and generate the temporal behavior recognition result based on the feature mapping result.
5. The cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion according to claim 1 is characterized in that: Before extracting weighted features of the Wi-Fi CSI signal to be identified based on the global temporal attention module to obtain global features, the method further includes: Extract features of the Wi-Fi CSI signal to be identified and construct a frequency domain amplitude feature matrix; Normalizing the frequency domain amplitude feature matrix to obtain an amplitude mapping result; Format processing is performed on the time dimension of the amplitude mapping result to obtain the to-be-identified Wi-Fi CSI signal after unified time sequence processing.
6. The cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion according to claim 1 is characterized in that: The method is applied to a convolutional neural network, the convolutional neural network including a pre-trained feature extractor and a pre-trained closed set classifier. The feature extractor is used to perform weighted feature extraction on the Wi-Fi CSI signal to be identified based on a global temporal attention module to obtain the global feature. The closed set classifier is used to perform category prediction based on the global feature and generate the temporal behavior recognition result based on the category prediction result. Before performing weighted feature extraction on the Wi-Fi CSI signal to be identified based on the global temporal attention module to obtain the global feature, the method further includes: Obtain Wi-Fi CSI signals for training; performing weighted feature extraction on the training Wi-Fi CSI signal using an untrained feature extractor to obtain a training global feature; Performing category prediction on the training global features using an untrained closed set classifier, and calculating a cross entropy loss function based on the category prediction result and the true label to obtain a cross entropy loss value; The untrained feature extractor and the untrained closed set classifier are optimized according to the cross entropy loss value to obtain the pre-trained feature extractor and the pre-trained closed set classifier.
7. The cross-domain temporal behavior recognition method based on global and Gaussian enhanced attention fusion according to claim 6 is characterized in that: The step of optimizing the untrained feature extractor and the untrained closed set classifier according to the cross entropy loss value to obtain the pre-trained feature extractor and the pre-trained closed set classifier comprises: The untrained feature extractor and the untrained closed set classifier are jointly iteratively optimized by a back propagation algorithm and a gradient descent algorithm to obtain the pre-trained feature extractor and the pre-trained closed set classifier.
Citation Information
Patent Citations
Driver driving behavior detection and identification method based on deep learning
CN113128360A
Video pedestrian re-identification method based on multi-scale feature fusion
CN114299542A