Indoor daily activity identification method based on comparative learning and few-sample learning
Based on the method of comparative learning and less sample learning, the reliance on a large amount of annotation data in human activity identification has been solved, and the ability to identify the daily activities of indoor activities in the medium -efficient identification of smart homes, improve the generalization ability and accuracy of the model and identify accuracy of the model Essence
Patent Information
- Application Number
- CN202411475946.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-01-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In human activity recognition, using deep learning models to achieve competitive performance requires a large amount of annotation data, and annotating activity data in real-world smart homes is a major challenge.
Adopting interior daily activities identification methods based on comparative learning and less sample learning, through obtaining environmental sensor data, synchronous sequence alignment, converting to a two -dimensional image vector matrix, data enhancement, initialization of the less sample comparison learning model, using the pre -training module and using the pre -training module and using the pre -training module and using the pre -training module and Filtering modules to learn.
Without a large number of data labeling data, it can achieve better activity recognition effects, improve the generalization ability of the model, enable the model to quickly adapt to the type of new activity, adapt to the complex environment of indoor daily activities, provide users with providing users with providing users with Accurate human activity identification service.
Smart Images

Figure CN119377770A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of target recognition, and in particular to a method for recognizing indoor daily activities based on contrastive learning and few-sample learning. Background Art
[0002] With the rapid development of the Internet of Things, especially in IoT applications related to human activities, the importance of indoor daily activity recognition has become increasingly prominent. For example, in intelligent service systems, automatic recognition of indoor daily activities can help the system better understand the behavioral intentions, living habits, health status, and abnormal activities of the target population, so as to provide timely personalized services.
[0003] The purpose of indoor daily activity recognition is to use the characteristics of sensors such as small space restrictions, easy installation, wide perception content and good privacy, and adopt a suitable sensor layout scheme to collect sensor data. Then, through data preprocessing, feature extraction, model construction, rule definition, semantic reasoning and other steps, the recognition of indoor daily activities in multi-occupant scenarios is realized.
[0004] In recent decades, deep learning models such as Convolutional Neural Network (CNN) and Long Short-Term Memory (LSTM) networks have made significant progress in human activity recognition (HAR) applications. Wang et al. mentioned that CNN models can extract features without prior knowledge, making them suitable for HAR tasks. LSTM networks are particularly good at capturing long-term dependencies and obtaining hierarchical representations from continuous environmental sensor data, which is a feature often observed in HAR.
[0005] However, achieving competitive performance using deep learning models in human activity recognition requires a large amount of annotated data. Annotating activity data in real-world smart homes is a major challenge as it is time-consuming and tedious for researchers and experts. Therefore, how to fully mine the feature representation of human activities in sensor data with a small amount of annotated data, that is, to improve the recognition accuracy, is one of the problems that technicians in this field need to solve urgently. Summary of the invention
[0006] In view of the deficiencies in the prior art, the present invention provides a method for indoor daily activity recognition based on contrastive learning and few-sample learning, which solves the technical problem of low accuracy of few-sample human activity recognition.
[0007] To solve the above technical problems, the present invention provides the following technical solution: a method for indoor daily activity recognition based on contrastive learning and few-sample learning, the method comprising the following steps:
[0008] S1. Acquire environmental sensor data collected by various environmental sensors, and perform synchronous sequence alignment on the environmental sensor data to construct a time series data set of human activities;
[0009] S2, convert the time series dataset into two two-dimensional image vector matrices containing data time information and dynamic features and perform data augmentation;
[0010] S3, initializing the few-shot contrastive learning model, which consists of a pre-training module and a fine-tuning module;
[0011] S4. Input the unlabeled time series data into the pre-training module, and use the few-shot learning method to enable the few-shot contrastive learning model to quickly adapt to the new activity type and learn the differences between different activities;
[0012] S5. Input a small amount of labeled time series data into the fine-tuning module for activity recognition.
[0013] Furthermore, in step S1, the environmental sensor data collected by each environmental sensor includes data collected by infrared sensing, pressure and switch sensors, and the collected data includes at least six types of time series data of human daily activities.
[0014] Furthermore, in step S2, the specific process includes:
[0015] Standardize the original one-dimensional time series data so that all values fall in the interval [-1,1] or [0,1];
[0016] Treat the time series data as vectors in a vector space and calculate the inner product between these vectors to form a Gram matrix;
[0017] The angles between vectors at different times are calculated according to the Gram matrix, and converted into values between 0 and 1 to generate a new angle matrix. The angle matrix is used as the pixel value of the image to generate a two-dimensional image vector matrix.
[0018] The angle matrix is augmented by a data augmentation module to generate two 2D images with different views.
[0019] Further, in step S3, the pre-training module includes a feature extraction module for extracting time information and dynamic features from the two-dimensional image vector matrix, and a contrastive learning module for enabling the few-shot contrastive learning model to learn differences between different activities through contrastive learning;
[0020] The feature extraction module consists of a Transformer encoding layer and a Bi-GRU network layer, and the contrastive learning module consists of three fully connected neural network layers for receiving latent space representations as input and projecting them into different spaces.
[0021] Furthermore, in step S3, the fine-tuning module includes an encoder and a recognition module having two layers of multi-layer perceptrons (MLPs), and the recognition module uses a ReLU activation function and a Softmax activation function for multi-class activity classification on the hidden layer to classify and recognize indoor daily activities based on a small amount of labeled time series data.
[0022] Furthermore, the expression of the ReLU activation function is:
[0023] ReLU = f(x) = max(0,x)
[0024] Where x is the input feature vector.
[0025] Furthermore, the expression of the Softmax activation function is:
[0026]
[0027] Where e is the base of the natural logarithm (Euler number), n is the number of categories, and z is i 、z j are the raw scores of the i-th and j-th categories respectively.
[0028] By means of the above technical solution, the present invention provides a method for indoor daily activity recognition based on contrastive learning and few-sample learning, which has at least the following beneficial effects:
[0029] 1. The present invention can achieve good activity recognition results without the need for a large amount of labeled data. It has good robustness, can adapt to the complex environment of daily indoor activities, and provide users with accurate human activity recognition services, which is convenient and practical.
[0030] 2. The present invention improves the generalization ability of the few-sample contrastive learning model through contrastive learning and few-sample learning, so that the few-sample contrastive learning model can quickly adapt to new activity types. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0032] Figure 1 is a flow chart of the indoor daily activity recognition method of the present invention;
[0033] Figure 2 is a schematic diagram of the Gram angle field conversion in the present invention;
[0034] Figure 3 It is a structural diagram of the few-sample contrast learning model in the present invention;
[0035] Figure 4 It is a structural diagram of the feature extraction module in the present invention;
[0036] Figure 5 It is a structural diagram of the GRU network in the present invention;
[0037] Figure 6 This is a structural diagram of the Bi-GRU network in the present invention. DETAILED DESCRIPTION
[0038] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific implementation methods, so that the implementation process of how the present application uses technical means to solve technical problems and achieve technical effects can be fully understood and implemented accordingly.
[0039] Please refer to Figure 1-Figure 6 This embodiment proposes a method for indoor daily activity recognition based on contrastive learning and few-sample learning, and the method includes the following steps:
[0040] S1. Acquire environmental sensor data collected by various environmental sensors, and perform synchronous sequence alignment on the environmental sensor data to construct a time series data set of human activities; the environmental sensor data collected by various environmental sensors include data collected by infrared sensors, pressure sensors and switch sensors, and the collected data include time series data types of at least six types of human daily activities such as eating, sleeping, working, entertaining, bathing and going out.
[0041] In this embodiment, the collected environmental sensor data include data from motion sensors monitoring the movement of living bodies within a certain range, data from door sensors monitoring the opening and closing of doors, data from temperature sensors monitoring temperature, data from power consumption sensors monitoring power, data from burner sensors monitoring the working status of burners, data from object sensors counting the number of items, data from hot water sensors monitoring the use of hot water, data from cold water sensors monitoring the use of cold water, and other environmental sensor data. Then, the sequence synchronization and alignment of each environmental sensor data is performed to construct a time series data set.
[0042] Since these data change over time, they have time series characteristics. Each environmental sensor generates data according to its specific sampling frequency, and these data points are usually associated with a timestamp. However, since the sampling frequencies of different environmental sensors may be inconsistent and there may be hardware clock deviations, it is necessary to synchronize and align the environmental sensor data. This ensures that at the same point in time, the data of all environmental sensors are comparable, thereby constructing an accurate time series data set. In this embodiment, the sequence synchronization alignment can be achieved by existing technical means, such as setting a unique clock source, using a time synchronization protocol and data difference, etc., without any limitation here.
[0043] S2, convert the time series data set into two two-dimensional image vector matrices containing data time information and dynamic features and perform data enhancement; specifically, the input time series data of indoor daily activities is converted into image data through the Gram angle field, and then the converted two-dimensional image vector matrix is preprocessed and data enhanced, including scaling, cropping and other operations, to meet the input requirements of the few-sample contrast learning model. In step S2, the specific process includes:
[0044] Standardize the original one-dimensional time series data so that all values fall within the interval [-1, 1] or [0, 1]; for example, normalize to [0, 1] to eliminate the influence of different dimensions on the results. Figure 2 As shown, for the original time series data X = {x1, x2, ..., x n}, first rescale the time series data X so that all values fall in the interval [-1,1] or [0,1], calculated by the following formula:
[0045]
[0046] In the formula, The value of the observation at a certain moment normalized to [-1,1]; is the value of the observation at a certain moment normalized to [0,1]; x i is the time observation value at a certain moment; max(X) is the maximum observation value in the original time series data; min(X) is the minimum observation value in the original time series data.
[0047] The rescaled time in polar coordinates is then represented by encoding the value as the cosine of the angle and the timestamp as the radius. The formula is as follows:
[0048]
[0049] Among them, t iis the timestamp, N is a constant factor used to regularize the span of the polar coordinate system; r is the radius; x~ i is the normalized time series value at a certain moment; φ is the angle.
[0050] This polar coordinate-based representation is a new way to understand time series. As time increases, the corresponding values distort between different angle points across a circle, like water ripples. The rescaled data at different intervals have different angular boundaries, and [0,1] corresponds to The cosine function in the interval [-1,1] falls within the angle bounds [0,π]. They provide different information granularity for classification tasks in the Gram angle field, and the Gram angle difference angle field (GADF) of the [0,1] rescaled data has an exact inverse mapping. This property actually lays the foundation for estimating missing values of time series by restoring images.
[0051] After converting the rescaled time series to a polar coordinate system, the angular perspective can be easily exploited by considering the trigonometric sums / differences at each point to identify temporal correlations over different time intervals. The Gram's Difference Sum Field (GASF) and the Gram's Difference Angular Field (GADF) are defined as follows:
[0052]
[0053] where I is the unit vector [1,1,…,1]; φ i ,φ j Respectively represent the angles of the i-th and j-th data points in the sequence, represents the transpose of the normalized time series data, Represents the transpose of the square root of the unit vector minus the normalized time series.
[0054] The time series data is regarded as vectors in the vector space, and the inner products between these vectors are calculated to form a Gram matrix; the Gram matrix is a symmetric matrix whose elements reflect the similarity of data between different moments. After conversion to the polar coordinate system, the time series of each time step is regarded as a one-dimensional vector, and the two types of Gram angular fields (GAF) can be converted into Gram matrices by calculating the inner product. In the polar coordinate system, the relationship between two time step vectors can be obtained by calculating the inner product (or cosine similarity) between them. In this embodiment, the inner product is equal to the cosine similarity, that is, cos(θ).
[0055] The angles between vectors at different times are calculated according to the Gram matrix, and converted into values between 0 and 1 to generate a new angle matrix. The angle matrix is used as the pixel value of the image to generate a two-dimensional image vector matrix; each pixel value in the two-dimensional image vector matrix corresponds to the cosine value of the angle between different times in the time series data, thereby retaining the time information and dynamic characteristics of the data.
[0056] The angle matrix is enhanced by a data enhancement module to generate two two-dimensional images with different views; data enhancement techniques such as random signal inversion, reversal, time warping, random noise, scaling and cropping can be used to generate two different views.
[0057] Data augmentation has the following functions: increasing the training set data to alleviate model overfitting; introducing variable domain information to simulate more realistic and multi-view data. Contrastive learning changes the domain information of the sample through different data augmentation methods to obtain different views of the same sample. Then, it forces the encoder to output the same feature vector for these different views, with the aim of filtering out domain information from the sample and learning feature representations of basic domain invariant information.
[0058] S3, initialize the few-shot contrastive learning model, such as Figure 3 As shown, the few-shot contrastive learning model consists of a pre-training module and a fine-tuning module, wherein the pre-training module includes a feature extraction module for extracting temporal information and dynamic features from a two-dimensional image vector matrix, and a contrastive learning module for enabling the few-shot contrastive learning model to learn the differences between different activities through contrastive learning; the feature extraction module consists of a Transformer encoding layer and a Bi-GRU network layer, and the contrastive learning module consists of three fully connected neural network layers for receiving latent space representations as input and projecting them into different spaces.
[0059] The fine-tuning module includes an encoder and a recognition module with two layers of multi-layer perceptrons (MLPs). The recognition module uses a ReLU activation function for the hidden layer and a Softmax activation function for multi-class activity classification to classify and recognize indoor daily activities based on a small amount of labeled time series data.
[0060] Specifically, first initialize the weights of the Transformer encoding layer and the GRU network layer in the feature extraction network, such as Figure 4As shown. Among them, the Transformer encoding layer is essentially an encoder-decoder structure. The encoder is a stack of multiple identical layers, each with two sub-layers. First, through a multi-head self-attention mechanism, followed by a simple, positional, fully connected feedforward network. The decoder also consists of multiple layers of the same stack. Compared with the encoder, the decoder inserts a third sub-layer for performing multi-head attention on the output of the encoder stack. The self-attention mechanism is the core element of the Transformer encoding layer, using the weight of each environmental sensor event of the input vector, expressed as:
[0061]
[0062] where Q, K, and V are query, key, and value vectors, respectively; d k is the dimension of the key vector K; K T is the transpose of the key vector K.
[0063] Multi-head attention is equivalent to the integration of n different self-attentions. It can effectively process three vectors Q, K, and V in parallel, and obtain the final value through connection and calculation. The formula is as follows:
[0064] MultiHead(Q,K,V)=Concat(head1,...,head n )W O
[0065] where head1=Attention(QW i Q ,KW i K ,VW i V )
[0066] Among them, W i Q , W i K , W i V represents the linear transformation matrix of the query, key, and value corresponding to each attention head. These matrices are learnable parameters; Attention represents the attention function; Concat represents the concatenation operation, which concatenates the outputs of all heads together; W o Represents the final linear transformation matrix, which is used to further fuse the concatenated output. This is also a learnable parameter.
[0067] The GRU network is initialized by randomly selecting numbers from the range (-s, s) using the uniform distribution method, where s is determined as follows:
[0068]
[0069] In the formula, h s is the hidden state size in the GRU network.
[0070] In this structure, the GRU network has a reset gate and an update gate. Both gates enable the GRU to pass information across multiple time windows for better classification or prediction. More specifically, weights and data are stored in memory so that future values can be updated using a given state. The typical structure of a GRU network can be found in Figure 5 As mentioned earlier, the GRU network consists of an update gate and a reset gate. In the update gate, the GRU network calculates z at a given time t. t , to solve the gradient vanishing problem using the following formula, namely:
[0071] z t =σ(W z [h t-1 ,x t ]+b z )
[0072] Among them, z t represents the output of the update gate, ranging from 0 to 1, which determines how much past information needs to be retained; σ represents the sigmoid activation function, ensuring that the output is between 0 and 1, W z represents the weight parameter of the update gate; h t-1 、x t Respectively represent the parameters passed in at time periods t-1 and t; b z Represents the bias parameter of the update gate.
[0073] However, in the reset gate, the GRU network calculates z at a given time point t t , to account for how much past information has been forgotten. The reset gate performs the following calculation:
[0074] r t =σ(W r [h t-1 ,x t ]+b r )
[0075] Among them, r t Represents the output of the reset gate, ranging from 0 to 1, which determines how much past information needs to be ignored; W r Represents the weight parameter of the reset gate; b r Represents the bias parameters of the reset gate.
[0076] The current storage content stage is calculated according to the following formula:
[0077]
[0078] in, is a candidate hidden state, which is a new candidate state used to update the current hidden state.
[0079] Finally, h is calculated in the final memory at the current time step t To store the current unit information to calculate the output vector o t , as shown below:
[0080]
[0081] o t =σ0(W0h t +b0)
[0082] in, is the candidate hidden state, which is calculated by the hidden state of the previous time step controlled by the current input and the reset gate; o t is the output vector of the current unit information; σ0 represents the sigmoid activation function of the hidden state at the current moment; W0 represents the weight parameter of the hidden state at the current moment; b0 represents the bias parameter of the hidden state at the current moment.
[0083] For many sequence modeling tasks, it is helpful to have access to both future and past context. However, the standard GRU network processes the sequence in temporal order and ignores future context. Figure 6 As shown, this embodiment adopts a Bi-GRU network based on the GRU network. The Bi-GRU network extends the unidirectional GRU network by introducing a second layer, in which the hidden connections flow in time order. Therefore, the model can utilize past and future information.
[0084] The next step is to initialize the contrastive learning module. Through contrastive learning, the model can learn the differences between different activities and improve the generalization ability of the model. The contrastive learning module consists of three fully connected neural network layers. It receives latent space representations as input and projects them into different spaces. This projection helps calculate the contrastive loss, which is crucial for training self-supervised learning models. The expression g(·) represents the neural network projection head, which maps the latent representation to another space for contrastive loss. A multilayer perceptron (MLP) with two hidden layers is used to obtain the input z of the loss function, as follows:
[0085] z=g(s)=W [2] σ(W [1] σ(W [0] s))
[0086] Where σ is the ReLU activation function; W is the weight of the MLP; W [2] , W [1], W [0] Represented as the 1st, 2nd, and 3rd elements of the weight; s is the input of the neuron.
[0087] The projection representation generated by the projection head is then used to calculate the NT-Xent loss. The formula is as follows:
[0088]
[0089] In the given equation, z i 、z j Represents two vectors of model output, τ is a hyperparameter called temperature parameter, which is used to measure the similarity score between positive and negative pairs; sim(z i ,z j ) is the cosine similarity function; N is the batch size; I [k≠i] is an indicator function. When k is not equal to i, the value is 1; sim(z i ,z k ) represents the cosine similarity between two vectors, z k Indicates that it is different from z i Other sample vectors k≠i.
[0090] All positive pairs l(2k-1,2k) and l(2k,2k-1) in the mini-batch are calculated for the loss. 2k-1 and 2k are positive pairs, and 2k-1 combined with other views is a negative pair. Then SAM is performed on the model to improve the generalization ability of the model by penalizing the sharpness of the loss. When the given loss function L:W×X×Y→R + and training loss L s , SAM will obtain the parameter ω with low loss and low curvature in the neighborhood ρ by optimizing the min-max objective, which is formulated as:
[0091]
[0092] Among them, ρ ≥ 0 is a hyperparameter; is a standard L2 regularization term with hyperparameter ρ; Represents the target loss function under the SAM framework; is the maximum loss on the training set; ε represents the perturbation vector in the parameter space; Represents the minimum objective loss function under the SAM framework.
[0093] S4. Input the unlabeled time series data into the pre-training module. Through the method of few-sample learning, the few-sample contrastive learning model can quickly adapt to new activity types and learn the differences between different activities, thereby improving the generalization ability of the model. Specifically, the input time series data is unlabeled data, that is, unlabeled environmental sensor data. After image conversion by the Gram angle field, it is divided into two channels and input into the subsequent data enhancement module. Views from the same sample are considered positive pairs, while views from different samples in the same batch are considered negative pairs. The model parameters in the two channels are shared, and after feature extraction and contrastive learning, the few-sample contrastive learning model can quickly adapt to different enhanced data, thereby improving the generalization ability of the few-sample contrastive learning model. Finally, the parameters of the feature extraction model are retained.
[0094] S5. Input a small amount of labeled time series data into the fine-tuning module for activity recognition; specifically, use a pre-trained feature extraction network for feature extraction and fine-tune the pre-processed, sparsely labeled environmental sensor data. At this stage, the previously frozen encoder weights are unfrozen to allow updates. The contrastive learning module used in the pre-training module is then discarded. For the downstream task of activity classification, a multi-layer perceptron MLP with two layers is used as the recognition module. The recognition module uses the ReLU activation function for the hidden layer and the Softmax activation function for multi-class activity classification. The formula is as follows:
[0095] ReLU = f(x) = max(0,x)
[0096] Among them, x is the input feature vector; f(x) represents the ReLU activation function.
[0097]
[0098] Where e is the base of the natural logarithm (Euler number), n is the number of categories, and z is i 、z j are the raw scores of the i-th and j-th categories respectively; P i is the softmax activation function.
[0099] The present invention improves the generalization ability of the few-sample contrastive learning model through contrastive learning and few-sample learning, so that the few-sample contrastive learning model can quickly adapt to new activity types.
[0100] The present invention can achieve good activity recognition results without requiring a large amount of labeled data, has good robustness, can adapt to the complex environment of daily indoor activities, and provide users with accurate human activity recognition services, which is convenient and practical.
[0101] Those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, so the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can 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 codes.
[0102] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the above embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0103] The above implementation methods have been described in detail. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for indoor daily activity recognition based on contrastive learning and few-sample learning, characterized in that: The method comprises the following steps: S1. Acquire environmental sensor data collected by various environmental sensors, and perform synchronous sequence alignment on the environmental sensor data to construct a time series data set of human activities; S2, convert the time series dataset into two two-dimensional image vector matrices containing data time information and dynamic features and perform data augmentation; S3, initializing the few-shot contrastive learning model, which consists of a pre-training module and a fine-tuning module; S4. Input the unlabeled time series data into the pre-training module, and through the few-shot learning method, enable the few-shot contrastive learning model to quickly adapt to the new activity type and learn the differences between different activities; S5. Input a small amount of labeled time series data into the fine-tuning module for activity recognition.
2. The indoor daily activity recognition method according to claim 1, characterized in that: In step S1, the environmental sensor data collected by each environmental sensor includes data collected by infrared sensing, pressure and switch sensors, and the collected data includes at least six types of time series data of human daily activities.
3. The indoor daily activity recognition method according to claim 1, characterized in that: In step S2, the specific process includes: Standardize the original one-dimensional time series data so that all values fall in the interval [-1,1] or [0,1]; Treat the time series data as vectors in a vector space and calculate the inner product between these vectors to form a Gram matrix; The angles between vectors at different times are calculated according to the Gram matrix, and converted into values between 0 and 1 to generate a new angle matrix. The angle matrix is used as the pixel value of the image to generate a two-dimensional image vector matrix. The angle matrix is augmented by a data augmentation module to generate two 2D images with different views.
4. The indoor daily activity recognition method according to claim 1, characterized in that: In step S3, the pre-training module includes a feature extraction module for extracting time information and dynamic features from the two-dimensional image vector matrix, and a contrastive learning module for enabling the few-shot contrastive learning model to learn differences between different activities through contrastive learning; The feature extraction module consists of a Transformer encoding layer and a Bi-GRU network layer, and the contrastive learning module consists of three fully connected neural network layers for receiving latent space representations as input and projecting them into different spaces.
5. The indoor daily activity recognition method according to claim 1, characterized in that: In step S3, the fine-tuning module includes an encoder and a recognition module with two layers of multi-layer perceptrons (MLPs), and the recognition module uses a ReLU activation function and a Softmax activation function for multi-class activity classification on the hidden layer to classify and recognize indoor daily activities based on a small amount of labeled time series data.
6. The indoor daily activity recognition method according to claim 5, characterized in that: The expression of the ReLU activation function is: ReLU = f(x) = max(0,x) Where x is the input feature vector.
7. The indoor daily activity recognition method according to claim 5, characterized in that: The expression of the Softmax activation function is: Where e is the base of the natural logarithm (Euler number), n is the number of categories, and z is i 、z j are the raw scores of the i-th and j-th categories respectively.
Citation Information
Patent Citations
Method for monitoring tool wear state through enhanced comparative learning of Gramer angle field
CN114714145A
Human behavior recognition method and system based on self-attention active comparison coding
CN116110119A
Attention based Deep Ensemble Learning System for Activity Recognition in Smart Collaborative Environments
KR102369464B1
Cited By
Deep learning-based sales prediction method and system
CN120013590A
Activity identification method, system and equipment based on dual-band signal contrast learning
CN120372248A