Human activity recognition method based on signal channel scaling and frequency domain feature completion
Through the method of signal channel scaling and frequency domain feature completion, the problem of data heterogeneity in human activity recognition is solved, more accurate recognition results are achieved, and the performance is better than that of advanced methods.
Patent Information
- Application Number
- CN202410465732.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-18
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2044-04-18
AI Technical Summary
In the field of human activity recognition, data heterogeneity among multiple sensors makes information fusion and feature mining difficult, affecting recognition accuracy.
A method based on signal channel scaling and frequency domain feature completion is adopted. By preprocessing, feature extraction and fusion of sensor data, the signal channel scaling strategy and frequency domain feature splicing and fusion are used to obtain time-frequency fusion features and preset classification device for identification.
It effectively alleviates the problem of data heterogeneity, improves the accuracy of human activity recognition and the information mining ability of multi-modal signals, and shows better performance than advanced methods.
Smart Images

Figure CN118070106B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of human activity recognition, and in particular relates to a human activity recognition method based on signal channel scaling and frequency domain feature completion. Background Art
[0002] Human activity recognition is a task that aims to identify and classify people's physical activities or behaviors in their daily lives. It plays a vital role in the fields of mobile computing and ubiquitous computing. This field relies on data collected from various sensors, which can be accelerometers, gyroscopes, heart rate monitors on wearable devices, or sensors built into devices such as smartphones and smart watches. Based on the data collected by these sensors, through data preprocessing, feature extraction, pattern recognition and other steps, the system can identify the activities that the user is performing, such as walking, running, sitting, standing, etc.
[0003] With the demand for more and more complex human behavior recognition, researchers have begun to collect more data from various sensors for model training. However, due to the diversity of data collection methods, time and location, inconsistent data quality, and different user backgrounds, behavior patterns and preferences, the data between different sensors is highly heterogeneous and complex, which poses challenges to the core issues in the human activity recognition task, namely, information fusion between different sensors and full mining of information features. Summary of the invention
[0004] The purpose of the present invention is to propose a human activity recognition method based on signal channel scaling and frequency domain feature completion, which effectively calibrates the feature representation of multi-channel signals, better alleviates the heterogeneity problem of data in human recognition activities, and realizes accurate recognition of human recognition activities.
[0005] To achieve the above object, the present invention provides a human activity recognition method based on signal channel scaling and frequency domain feature completion, comprising:
[0006] Preprocess the sensor data in human activities to obtain frequency domain information and time domain information;
[0007] Extracting features from the frequency domain information and the time domain information, and compressing and fusing the extracted features to obtain time-frequency fusion features;
[0008] The time-frequency fusion features are classified and identified using a preset classifier to obtain a human activity recognition result.
[0009] Optionally, the method includes: preprocessing sensor data in human activities to obtain frequency domain information and time domain information, including:
[0010] The sensor data are spliced in the channel dimension to merge into multi-channel time domain information;
[0011] Performing a fast Fourier transform on the time domain information to obtain initial frequency domain information;
[0012] The phase information and amplitude information in the initial frequency domain information are spliced and fused to obtain the frequency domain information.
[0013] Optionally, obtaining the time-frequency fusion feature includes:
[0014] Based on a signal channel scaling strategy, compressing the frequency domain information and the time domain information;
[0015] Performing feature extraction on the compressed frequency domain information and time domain information to obtain multimodal frequency domain features and multimodal time domain features;
[0016] The multimodal frequency domain features and the multimodal time domain features are fused to obtain time-frequency fusion features.
[0017] Optionally, performing feature extraction on the frequency domain information and the time domain information to obtain multimodal frequency domain features and multimodal time domain features includes:
[0018] Capturing channel dependencies for the frequency domain information and the time domain information respectively, and obtaining a scaling factor for each channel of the frequency domain information and the time domain information;
[0019] After the scaling factor acts on the original channel, a new calibration channel is obtained;
[0020] Based on the channel scaling strategy, the multimodal frequency domain features and the multimodal time domain features are extracted using the new calibration channel.
[0021] Optionally, the new calibration channel is:
[0022]
[0023] in =[ ,..., ], Refers to the feature map and scalar The channel multiplication between is the number of channels, is a real number, is a real number sequence, j represents the jth channel.
[0024] Optionally, performing feature fusion on the multimodal frequency domain features and the multimodal time domain features to obtain the time-frequency fusion features includes:
[0025] Obtaining hidden representations of the multimodal frequency domain features and the multimodal time domain features;
[0026] Based on the hidden representation, obtaining the importance weight of each of the multimodal frequency domain features and the multimodal time domain features;
[0027] The importance weights of the multimodal frequency domain features and the multimodal time domain features are processed by inner product to obtain the time-frequency fusion features.
[0028] Optionally, the hidden representation is:
[0029] =
[0030] in, represents hidden representation, Represents multimodal data stitched from multi-channel sequences of multiple sensors, Indicates the offset, represents the activation function;
[0031] The importance weights are:
[0032]
[0033] in, represents the importance weight, represents the number of modes, represents the random initialization value learned during training, represents the transpose of the hidden representation (transposition is the process of swapping the rows and columns of a matrix, used for calculations), T Indicates transpose.
[0034] The present invention has the following beneficial effects:
[0035] The present invention first preprocesses the sensor data in human activities to obtain frequency domain information and time domain information; then extracts and fuses the frequency domain information and time domain information to obtain time-frequency fusion features, wherein the signal channel scaling method is used to effectively calibrate the feature representation of multi-channel signals, and better alleviate the problem of data heterogeneity in human recognition activities; finally, the time-frequency fusion features are classified and identified using a preset classifier to obtain human activity recognition results, wherein a stable and simple frequency domain feature completion strategy is proposed in the recognition task of unsupervised adversarial training, and the phase information and amplitude information in the initial frequency domain information are spliced and fused to realize the frequency domain feature completion strategy, which has a favorable effect on the full mining of multimodal signal information. The comparison results with several most advanced comparison methods show that the performance of the present invention is the best. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0037] Figure 1 It is a flowchart of a method for human activity recognition based on signal channel scaling and frequency domain feature completion according to an embodiment of the present invention;
[0038] Figure 2 The network architecture block diagram of an embodiment of the present invention. DETAILED DESCRIPTION
[0039] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0040] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0041] like Figure 1 As shown, this embodiment proposes a human activity recognition method based on signal channel scaling and frequency domain feature completion, including:
[0042] Preprocess the sensor data in human activities to obtain frequency domain information and time domain information;
[0043] Furthermore, the sensor data are spliced in the channel dimension and merged into multi-channel time domain information;
[0044] Perform fast Fourier transform on the time domain information to obtain initial frequency domain information;
[0045] The phase information and amplitude information in the initial frequency domain information are spliced and fused to obtain the frequency domain information.
[0046] Specifically, in this embodiment, the first step is time-frequency information processing. Multiple sensor data are spliced in the channel dimension to merge into a multi-channel time series, and the frequency domain information is obtained by fast Fourier transforming the time domain information, and then the phase information and amplitude information in the frequency domain information are spliced and fused to obtain richer frequency domain information.
[0047] The first step is to process the time-frequency information. In the task of human activity recognition, the multi-channel data of the sensor (e.g., the x, y, and z axes of the accelerometer and gyroscope) is defined as ,in Represents the number of channels, Represents the sampling length. In the multimodal human activity recognition scenario, it is assumed that k sensors are strategically embedded at various locations on the human body, and these sensors generate synchronized data sample points. By aggregating these data points along the channel dimension, a multi-channel time series is formed, which is expressed as ,in represents the data from sensor k.
[0048] First, in order to analyze and process these data more efficiently, the fused data of multiple sensor dimensions are divided into individual sensor inputs, where each sensor input Next, Perform fast Fourier transform to obtain its frequency domain spectrum information, which is expressed as , the obtained frequency domain information is a complex number. This embodiment extracts the real part of the complex number and expresses it as , similarly, extract the imaginary part and express it as , as the feature completion of frequency domain information. Then it is fused by connection and To obtain new frequency domain information .
[0049] Perform feature extraction and feature fusion on frequency domain information and time domain information to obtain time-frequency fusion features;
[0050] Obtaining time-frequency fusion features includes:
[0051] Extract features from frequency domain information and time domain information to obtain multimodal frequency domain features and multimodal time domain features;
[0052] The multimodal frequency domain features and the multimodal time domain features are fused to obtain the time-frequency fusion features.
[0053] Feature extraction is performed on frequency domain information and time domain information to obtain multimodal frequency domain features and multimodal time domain features, including:
[0054] Capturing channel dependencies for frequency domain information and time domain information respectively, and obtaining scaling factors for each channel of frequency domain information and time domain information;
[0055] After the scaling factor is applied to the original channel, a new calibration channel is obtained;
[0056] Based on the new calibration channel, the channel scaling strategy is used to extract multimodal frequency domain features and multimodal time domain features.
[0057] The multimodal frequency domain features and multimodal time domain features are fused to obtain the time-frequency fusion features including:
[0058] Obtain hidden representations of multimodal frequency domain features and multimodal time domain features;
[0059] Based on the hidden representation, the importance weight of each multimodal frequency domain feature and multimodal time domain feature is obtained;
[0060] The importance weights of multimodal frequency domain features and multimodal time domain features are processed by inner product to obtain time-frequency fusion features.
[0061] Specifically, in this embodiment, the second step is to extract time-frequency signal features. The time domain and frequency domain information are sent to the convolutional subnet to extract time-frequency features respectively. In the subnet, the channel dependency is captured for the time-frequency multi-channel sequence to obtain the scaling factor of each channel of the time-frequency signal. After acting on the channel, more characteristic signal features are obtained, and multimodal time-frequency features are obtained through subsequent feature extraction.
[0062] Step 3: Time-frequency feature fusion. The interdependence between each sensor of the time-frequency information is calculated through the attention mechanism to obtain the contribution of the multimodal sensor, and then the time-frequency information is spliced and fused to obtain a unified representation.
[0063] The second step is to extract the time-frequency signal features and propose a signal channel scaling strategy based on the problem. For multi-channel sequence information, the traditional feature extraction convolution method cannot integrate the contextual information of data features, especially in the lower-level network with limited receptive field. Therefore, this embodiment converts the spatial information of multimodal sensors into Compress to get channel descriptor ,in and Depending on the number of channels and sequence length after the first convolution layer, this operation is implemented by global average pooling. The The elements are calculated as follows:
[0064]
[0065] After obtaining the compressed aggregate information, it is necessary to capture channel dependencies to obtain the scaling factor of each channel. This embodiment requires the function to be able to flexibly learn the nonlinear interactions and mutual exclusion relationships between channels, so a gating mechanism with sigmoid activation is chosen to achieve this:
[0066]
[0067] in refers to the ReLU function, ∈ and ∈ This embodiment parameterizes the gating mechanism by forming a bottleneck around the nonlinearity of the two fully connected layers, specifically, a gating mechanism with an expansion ratio of of Extended mapping layer, ReLU function, parameters are After that, the scaling factor corresponding to the channel is obtained through the sigmoid activation function. , with the original channel After the action, a new calibration channel is obtained:
[0068]
[0069] in =[ ,..., ], Refers to the feature map and scalar The channel multiplication between .
[0070] This embodiment embeds a signal channel scaling strategy in the feature extraction subnet to make the channel information more discriminative. After the data is extracted by the subnet, all the information from the time domain and frequency domain is The sensor data features are stacked along the sensor axis to form the input of the subsequent modules.
[0071] The third step is to fuse the time-frequency features. After feature extraction, we get In order to solve the problem that the data features of each sensor contribute inconsistently to the final prediction result, this embodiment alleviates this problem by adopting an attention-based modality fusion module (AF).
[0072] Specifically, given a multimodal input ,in represents the number of modes, Indicates the length. In this embodiment, Input into a single-layer multilayer perceptron (MLP) to derive its hidden representation :
[0073] =
[0074] Then, this embodiment calculates The degree of interdependence between the various modes in the To achieve, is a random initialization value learned during training. Next, the calculated dependency scores are normalized using the softmax function to obtain the importance weights representing each modality feature. :
[0075]
[0076] Furthermore, this embodiment calculates and The inner product of , generates a unified multimodal representation :
[0077] .
[0078] By performing the above operations on the frequency domain and time domain information respectively, we can obtain the time domain after feature fusion and frequency domain Finally, connect and Produces the final output .
[0079] The preset classifier is used to classify and identify the time-frequency fusion features to obtain the human activity recognition results.
[0080] Specifically, in this embodiment, the fourth step: perform unsupervised adversarial training to perform the recognition task. The obtained time-frequency fusion features are sent to the classifier to obtain the final result. At the same time, this embodiment designs a discriminator with the same structure as the classifier to learn the differences between the source domain and the target domain of human activity categories for unsupervised training. Unsupervised means that the training data does not need to be labeled, and adversarial training refers to training with a discriminator. Specifically, the classifier trains the classification accuracy. The discriminator is used to identify whether the data is in the source domain or the target domain, and is used to enhance the domain adaptability of the model. The fourth step is the training process, adding the discriminator, and removing the discriminator during the testing process.
[0081] Unsupervised domain adaptation includes source domain and target domain The specific process is to use the labeled source domain samples Train the model on the target domain and apply it to unlabeled samples of the target domain The label space of the source domain and the target domain The same, among which represents the number of labels. The challenge of this method is that the distribution of data samples that should belong to the same label is different, that is, ,This difference in distribution reflects the heterogeneity of the data.
[0082] The goal of this embodiment is to train a The cross-domain network represented by can effectively extract and fuse features from multimodal data, and finally The specific steps are as follows:
[0083] First, this embodiment designs a classifier C , the unified representation obtained after feature extraction is converted into a confidence score for each activity. The classifier is a dense block D consisting of three fully connected layers and a softmax function During the inference phase, the model makes predictions based on the activity with the maximum certainty score. The process is as follows:
[0084]
[0085] Next, use the classifier The same architecture is used to design the domain discriminator . Identify the target domain by training the discriminator and source domain The difference between the data in is used to distinguish which domain the input data belongs to. Before training, this embodiment manually generates domain labels .
[0086] In addition, this embodiment introduces an adversarial training method, using Module optimization and The details are as follows:
[0087] Minimize the activity classification loss:
[0088]
[0089] Among them, for samples from the source domain, is minimized.
[0090] Maximize domain discrimination loss:
[0091]
[0092] in represents the predefined domain label. For samples from two domains, are maximized.
[0093] Afterwards, this embodiment uses the gradient reversal layer to reverse the gradient during the back-propagation process to overcome the min-max optimization problem, formalized as a special function :
[0094] =
[0095] in is a constant that controls the degree of inversion, is the identity matrix. Further
[0096]
[0097] can be rewritten as:
[0098]
[0099] Finally, the new optimization goal is as follows:
[0100]
[0101] The entire process is trained in an unsupervised manner. During the training process, a stable and simple feature completion strategy can provide the model framework with richer data features. The signal channel scaling strategy calibrates the channel features by scaling the channel information, providing more representative features for the subsequent training process, and effectively alleviating the heterogeneity problem of human activity recognition data. Among them, the feature completion strategy refers to the step 4 in which the imaginary part of the imaginary number of the frequency domain information is taken out as a real number and spliced into the original frequency domain amplitude information. The specific steps are marked in the previous text.
[0102] like Figure 2 As shown, the network architecture of the model proposed in this embodiment is shown. First, the multimodal time domain signal after Fourier transformation is converted into a frequency domain signal, and the phase and amplitude value information in the frequency domain are fused into a complete frequency domain signal. Then, the time domain and frequency domain are input into two parallel channel convolution subnetworks, during which a channel scaling module is added after the first convolution block for channel calibration. The segmented sensor features are input into two independent modal fusion modules (AF) to fuse important modal features and produce a unified representation in the time domain and frequency domain. Finally, the two unified representations are connected as a whole, and the resulting output is used as the input of the classifier to predict the activity label. The discriminator is used to distinguish which field the sample belongs to. It should be noted that the classifier and the discriminator share the same structure, namely MLP.
[0103] As shown in the following Table 1, which shows the performance indicators of the existing methods, and Table 2, which shows the comparative performance indicators of the method of this embodiment and the existing methods, the comparison results with several most advanced comparison methods show that the performance of this embodiment is the best.
[0104] Table 1
[0105]
[0106] Table 2
[0107]
[0108] It can be seen from Tables 1 and 2 that the method of this embodiment exceeds AdvSKM-multi, codats-multi, and CoTMix-multi, which treat each modal input equally. It highlights that the channel scaling strategy proposed in this embodiment is very important for the results by capturing and fusing basic modes to reduce redundant information in multimodal HAR. The method of this embodiment exceeds significance and ATFA, which shows that more complete frequency domain information has an important improvement in the accuracy of the results.
[0109] The above are only preferred specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A human activity recognition method based on signal channel scaling and frequency domain feature completion, characterized in that: include: Preprocess the sensor data in human activities to obtain frequency domain information and time domain information; Extracting features from the frequency domain information and the time domain information, and compressing and fusing the extracted features to obtain time-frequency fusion features; Acquiring the time-frequency fusion feature includes: Based on a signal channel scaling strategy, compressing the frequency domain information and the time domain information; Performing feature extraction on the compressed frequency domain information and time domain information to obtain multimodal frequency domain features and multimodal time domain features; Performing feature fusion on the multimodal frequency domain features and the multimodal time domain features to obtain time-frequency fusion features; Extracting features from the frequency domain information and the time domain information to obtain multimodal frequency domain features and multimodal time domain features includes: Capturing channel dependencies for the frequency domain information and the time domain information respectively, and obtaining a scaling factor for each channel of the frequency domain information and the time domain information; After the scaling factor acts on the original channel, a new calibration channel is obtained; The new calibration channel is: in =[ ,..., ], Refers to the feature map The scaling factor corresponding to this channel The channel multiplication between is a real number, is the sequence length after the first layer of convolution, and j represents the jth channel; The method for obtaining the scaling factor is: in, represents the scaling factor, represents the ReLU function, Indicates the extended mapping layer, represents the dimension reduction compression layer, Represents a channel descriptor; The method for obtaining the channel descriptor is: in, Represents a feature map; Based on the channel scaling strategy, using the new calibration channel, extracting the multimodal frequency domain features and the multimodal time domain features; Performing feature fusion on the multimodal frequency domain features and the multimodal time domain features to obtain time-frequency fusion features includes: Obtaining hidden representations of the multimodal frequency domain features and the multimodal time domain features; The hidden representation is: = in, represents hidden representation, Represents multimodal data stitched from multi-channel sequences of multiple sensors, Indicates the offset, represents the activation function; Based on the hidden representation, obtaining the importance weight of each of the multimodal frequency domain features and the multimodal time domain features; The importance weights are: in, represents the importance weight, represents the number of modes, represents the random initialization value learned during training, represents the transpose of the hidden representation, T represents transpose; Performing inner product processing on the importance weights of the multimodal frequency domain features and the multimodal time domain features to obtain the time-frequency fusion features; calculate and The inner product of , generates a unified multimodal representation : By performing feature fusion operations on the frequency domain and time domain information respectively, the time domain after feature fusion is obtained and frequency domain ; Finally, connect and Produces the final output ; Using a preset classifier to classify and identify the time-frequency fusion features to obtain a human activity recognition result; The default classifier is a dense block D consisting of three fully connected layers and a softmax function. ; The preset classifier makes predictions based on the activity with the maximum certainty score; The process is as follows: 。 2. The human activity recognition method based on signal channel scaling and frequency domain feature completion according to claim 1, characterized in that: include: Preprocessing of sensor data in human activities to obtain frequency domain information and time domain information includes: The sensor data are spliced in the channel dimension to merge into multi-channel time domain information; Performing a fast Fourier transform on the time domain information to obtain initial frequency domain information; The phase information and amplitude information in the initial frequency domain information are spliced and fused to obtain the frequency domain information.
