A behavior recognition system and method based on multi-position sensor feature fusion

By adopting a multi-position sensor feature fusion system in human behavior recognition and using a two-level post-fusion model and convolution kernel to extract features, the problem of difficult mining of spatial dependencies between sensors is solved and the accuracy of complex behavior recognition is improved.

CN114881150BActive Publication Date: 2024-09-06NORTHEASTERN UNIV CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210511116.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-11
Publication Date
2024-09-06
Estimated Expiration
2042-05-11

AI Technical Summary

Technical Problem

In the multi-sensor-based human behavior recognition, the existing technology is difficult to effectively mine the spatial dependence between different sensors, resulting in low recognition accuracy in complex behavior recognition. The traditional method simply splices multi-sensor data and ignores the space and time between sensors. dependency.

Method used

A system based on multi-position sensor feature fusion is used to perform data preprocessing and feature extraction through the data module to form three groups of action pictures, and a two-level post-fusion model is used for feature fusion, combining one-dimensional and two-dimensional convolution kernel extraction time and spatial features, and finally classified through a fully connected layer.

Benefits of technology

It realizes deep mining of multi-dimensional time series data, effectively extracts time and space features, improves the accuracy of human behavior recognition, and is suitable for complex behavior recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114881150B
    Figure CN114881150B
Patent Text Reader

Abstract

The present invention belongs to the field of behavior recognition technology, and proposes a behavior recognition system and method based on multi-position sensor feature fusion. The behavior recognition system based on multi-position sensor feature fusion includes a data module and a model module. The data module stores and pre-processes the collected raw data to obtain action pictures for subsequent model training; the model module includes a feature extraction submodule and a classification submodule to obtain the final prediction result. The present invention abandons the spatial dependency between all data and selects the spatial dependency between the same axial data of different sensors with stronger correlation. The data is extracted according to the three-axis direction (x, y, z), and three groups of action pictures are formed after data fusion. The feature fusion is then performed through a secondary post-fusion model to effectively extract the time and space characteristics of the multi-dimensional time series data, thereby achieving the purpose of accurately identifying human behavior.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of behavior recognition, and in particular to a behavior recognition system and method based on multi-position sensor feature fusion. Background Art

[0002] Human behavior is an indispensable part of people's daily life. Each action has its own special meaning and function. Accurately identifying human behavior is a basic function of many health monitoring, smart factories and sports scenes, and is of great significance to promoting the progress of artificial intelligence. At present, human behavior recognition is divided into behavior recognition based on video time series data and behavior recognition based on sensor time series data according to the data type. Compared with video data, wearable sensor data is not restricted by scenes, and has fast storage and transmission, making it easier to achieve real-time recognition. For example, the elderly can wear smart bracelets to determine whether they have fallen in time, and wearable clothing can be used to monitor workers' operating specifications.

[0003] Human behavior recognition based on wearable sensor data collects information such as acceleration, angular velocity, angle, etc. from wearable sensors, analyzes and extracts feature values, and uses models for classification based on feature values ​​to achieve accurate recognition. According to the different classification algorithms, it can be divided into human behavior recognition based on traditional machine learning and human behavior recognition based on deep learning; according to the number of sensors used, it can be extended to human behavior recognition based on multiple sensors.

[0004] Traditional human behavior recognition methods based on machine learning rely on the experience of researchers in extracting feature values, and require manual screening of feature values. Different feature values ​​need to be extracted for different data sets or data in different application fields, and the selection of these feature values ​​depends on the professional knowledge and experience of researchers. Different researchers will have different choices due to experience bias, so these methods cannot be universally applied to different application fields. For example, extracting time domain features and frequency domain features from time series data. In recent years, with the continuous development of deep learning technology, its automatic extraction of data features has attracted the attention of researchers. Deep learning methods can automatically extract the most representative features of data from a large amount of training data, thereby further improving the recognition effect. Convolutional Neural Network (CNN) is one of the most widely used deep learning methods and is widely used in the field of human behavior recognition. At present, CNN-based feature extraction is mainly divided into two categories. One is temporal feature extraction based on one-dimensional convolution kernels. For example, the two articles "Deepconvolutional neural networks for human activity recognition with smartphonesensors" and "Human activity recognition with smartphone sensors using deeplearning neural networks" use three-axis data of accelerometer and three-axis data of gyroscope to form six-channel data, and extract temporal features through one-dimensional convolution kernels to achieve the purpose of identifying human behavior; the other is spatiotemporal feature extraction based on two-dimensional convolution kernels. The article "Human activity recognition, Deeplearning, Convolutional neural networks" uses the three-axis accelerometer on the mobile phone, processes the three-axis data into action pictures through sliding time windows, and finally extracts spatiotemporal features through two-dimensional convolution kernels. The one-dimensional convolution kernel performs convolution on the time axis. When processing single-sensor low-dimensional time series data, it can effectively mine the time dependency of time series data. However, when facing multi-sensor multi-dimensional time series data, the one-dimensional convolution kernel ignores the spatial dependency between different categories of sensors and different axial sensor data, and cannot effectively extract the spatial features of multi-dimensional time series data. Two-dimensional convolution kernels can solve the above problems, but when constructing two-dimensional spatiotemporal data input, they simply concatenate the various axial data without considering the spatiotemporal dependency between the axial data.

[0005] In view of the differences in the number and location of sensors, researchers have proposed corresponding solutions. A single sensor has a good effect in identifying some simple actions such as sitting, standing, lying, etc., but it often cannot guarantee the accuracy of recognition when facing complex behavior recognition. In order to improve the accuracy of recognition and effectively identify complex behaviors, multiple sensors are widely used in the recognition of complex behaviors. For a single sensor, feature extraction is simply to send the information it collects as input into the convolutional neural network, which is automatically extracted by the convolutional neural network. However, when using multiple sensors, how to send the information of multiple sensors into the network becomes a problem. Therefore, researchers study how to fuse the information of multiple sensors based on two-dimensional convolution. When processing multi-sensor information, most researchers choose to simply list and splice multiple sensor data, but this method is difficult to mine the spatial dependency between different sensor data. Therefore, existing work has taken into account the spatial dependency of different sensor data. For example, Song Xinrui proposed to use a two-level late fusion strategy (TLLF) in the network structure in "Research on Human Complex Activity Recognition Based on Multi-Sensor Data Fusion". First, convolution extracts features from different sensor data, then splices and merges the features and then convolution extracts features. This strategy uses two different convolutions to extract feature values ​​that contain the spatial dependency features between different sensors. However, the secondary post-fusion strategy still simply feeds sensor information into the convolutional neural network in feature extraction, and fails to design an effective feature extraction method to further extract the spatial features of different sensor information.

[0006] In summary, it is necessary to design an effective feature extraction and feature fusion method for multi-position sensors, deeply explore the spatial dependencies between different sensors, and build a human behavior recognition framework including "data acquisition-model training-behavior recognition". Summary of the invention

[0007] The purpose of the present invention is to propose a behavior recognition system and method based on multi-position sensor feature fusion, which can fully exploit the feature extraction algorithm of the time and space characteristics of multi-position and multi-dimensional sensor time series data, and adopt data fusion and feature fusion strategies to build a model, so as to realize an integrated human behavior recognition framework including data acquisition-data preprocessing-model construction-data analysis.

[0008] The technical solution adopted by the present invention is: a behavior recognition system based on multi-position sensor feature fusion, including a data module and a model module;

[0009] The data module stores and preprocesses the collected raw data to obtain action pictures for subsequent model training; the preprocessing includes data fusion, data calibration, data downsampling, normalization and data segmentation; the data of the action pictures after data segmentation are extracted by sensors according to the (x, y, z) axis respectively, and all x-axis data, all y-axis data and all z-axis data are combined to form three new (X, Y, Z) action pictures, and the sensor data of the same axis are combined at the same time;

[0010] The model module includes a feature extraction submodule and a classification submodule;

[0011] The feature extraction submodule includes an input layer, a one-dimensional convolution layer, a concat layer, a two-dimensional convolution layer, and a fully connected layer. The action pictures obtained by the data module are input into the feature extraction submodule. After the temporal features are extracted by the one-dimensional convolution layer, the temporal features extracted from the three groups of action pictures are combined by the concat layer for feature fusion. The spatial features are then extracted by the two-dimensional convolution kernel layer. Finally, the features are flattened and expanded by the fully connected layer.

[0012] The classification submodule is a softmax layer, and the features output by the feature extraction submodule are sent to the softmax function for classification to obtain the final prediction result.

[0013] The data module includes a data acquisition submodule, a data storage submodule and a data preprocessing submodule;

[0014] The data acquisition submodule is a sensor that collects raw data generated by the human body in daily life for later model training;

[0015] The data storage submodule stores the collected data offline in different folders according to different behavior categories in a set file format;

[0016] The data preprocessing submodule is used to read local files, perform data preprocessing, and process the raw data into action pictures for subsequent model training.

[0017] The model module is a two-level post-fusion model, which includes 14 network layers;

[0018] The 1st, 3rd, and 5th convolutional layers use one-dimensional convolution kernels to extract features from the time series data;

[0019] The 2nd, 4th, and 6th pooling layers use one-dimensional filters to reduce spatial data loss;

[0020] The seventh layer is the concat layer, which merges the feature values ​​extracted from the x, y, and z axis data along the time axis to achieve feature fusion;

[0021] The 8th and 9th convolutional layers use two-dimensional convolution kernels to extract spatial features from the merged eigenvalues;

[0022] The 10th layer is a pooling layer, which uses a two-dimensional filter;

[0023] The 11th, 12th, and 13th layers are three fully connected layers, which expand the pooled eigenvalues ​​into one dimension, abstract the one-dimensional eigenvalues, and connect to the final softmax layer.

[0024] A method for behavior recognition based on multi-position sensor feature fusion is used for behavior recognition, and the specific steps are as follows:

[0025] Step 1: Place two six-axis sensors on the left wrist and right thigh of the human body respectively to collect acceleration and angular velocity information generated by six types of human behaviors: walking, going upstairs, going downstairs, sitting, standing and lying down. The sampling frequency is fixed;

[0026] Step 2: Create six folders for the six behaviors. After each action is collected, save the data as a file in a set format and store it offline in the corresponding folder;

[0027] Step 3: Process the data in step 2 into action pictures through data fusion, data calibration, data normalization and data segmentation;

[0028] Step 3-1: Data fusion: Extract the acceleration and angular velocity data of the two six-axis sensors respectively, and merge the data of the two six-axis sensors in time order according to the timestamps in the spatial axis direction;

[0029] Step 3-2: Data calibration; Get the path of the folder, get the folder name number, read all the files in the folder, fuse all the data according to step 3-1, and add a last column of digital labels to the fused data with the folder name number;

[0030] Step 3-3: Data normalization: The data set contains data collected by two different six-axis sensors. In order to improve the model training speed and recognition accuracy, it is necessary to perform data normalization processing on each column of the data set according to formula (1);

[0031]

[0032] In the formula, x is the data of a column in the data set, x* is the normalized column data, μ is the mean, and σ is the standard deviation;

[0033] Step 3-4: Data segmentation; Use the sliding time window method to segment the data. Each time the sliding window is used, the data in the window is extracted as an action picture, and a fixed window overlap rate is set. The sliding time window method is to move a window of fixed size on the time series. Each time it moves, the data in the window is extracted as an action picture, thereby achieving the segmentation of longer time series data. It is worth noting that when the sliding window is used to segment the data, there will be two different labels in the same window. In this case, we use the maximum label given method, that is, the label item that appears the most times in this window is assigned as the label to the segmented action picture.

[0034] Step 4: After data segmentation, the data in the action picture is extracted according to the (x, y, z) three-axis directions, and all x-axis data, all y-axis data, and all z-axis data are combined to form three groups of (X, Y, Z) action pictures, which are input into the model module; the mode of using a single sensor as input for the secondary post-fusion model is changed, and data fusion is realized at the input end;

[0035] Step 5: Use the processed (X, Y, Z) three groups of action pictures as input data, divide the training set and test set into 7:3, and train and test the model module;

[0036] During the model training process, when the capacity of the model is greater than the complexity of the problem, overfitting is prone to occur. In order to avoid overfitting, Dropout is used to solve the overfitting problem. A Dropout layer is added between each network layer to prevent overfitting in model training. The Dropout layer ensures that during the model training process, the network layer does not participate in the propagation process with a certain probability; the data input to the network layer during forward propagation is the data output from the network layer, and the parameters of the discarded network layer are not updated during reverse propagation. The formula is as follows:

[0037] x l =RanddomZero(p)x l-1 (2)

[0038] In the formula, p is the probability that the neuron in this network layer is dropped out, l represents the number of layers in the network layer, and RanddomZero() is the zeroing function; when outputting all the data x in this layer, they will be set to 0 with a certain probability p, that is, the neuron will not be used as the feature input of the next layer;

[0039] When testing the model, record the classification results on the test set and calculate F according to formula (3) 1 Value, in F 1 The value is the evaluation index to evaluate the classification effect;

[0040]

[0041] In the formula, precision and recall are the precision and recall rates under macro-average respectively;

[0042] According to the classification results of the trained model on the test set, the construction of the human behavior recognition framework based on the feature fusion of wearable multi-position sensors is completed.

[0043] The six-axis sensor includes a three-axis accelerometer and a three-axis gyroscope.

[0044] The digital labels in the digital label column represent behaviors respectively: 0 corresponds to walking, 1 corresponds to going upstairs, 2 corresponds to going downstairs, 3 corresponds to sitting, 4 corresponds to standing, and 5 corresponds to lying down.

[0045] When the probability p in the Dropout is 0.5, the overfitting problem is best solved; when making model predictions based on the trained model, the Dropout layer is turned off.

[0046] According to step 5, the classification results of the trained model on the test set are obtained, thereby completing the construction of a human behavior recognition framework based on wearable multi-position sensor feature fusion.

[0047] A behavior recognition system and method based on multi-position sensor feature fusion is actually a human behavior recognition framework based on wearable multi-position sensor feature fusion. A novel feature extraction algorithm is designed in the feature extraction part.

[0048] When general two-dimensional convolution kernels are used for feature extraction, they simply perform convolution on the multi-dimensional data of multiple sensors after being listed and spliced ​​to extract features. However, the data between different axes of the same sensor are independent of each other and have low correlation, and the data between different axes of different sensors have even lower correlation. Simply listing and splicing can only mine the spatial dependencies between the data of different axes of the same sensor and the data of different axes of different sensors, and the extracted spatial features are limited.

[0049] The feature extraction algorithm proposed in the present invention abandons the spatial dependence between all data and selects the spatial dependence between the same axial data of different sensors with stronger correlation. The data is extracted according to the three-axis direction (x, y, z), and three groups of action pictures are formed after data fusion. The feature fusion is then performed through a secondary post-fusion model to effectively extract the time and space characteristics of the multi-dimensional time series data, thereby achieving the purpose of accurately identifying human behavior.

[0050] Beneficial effects of the invention: The invention utilizes the spatial dependency between the same-axis data of different sensors to design a novel feature extraction algorithm, which solves the problem that the existing feature extraction strategy only considers the spatial dependency between the same-axis data of the same sensor and the different-axis data of different sensors, but ignores the spatial dependency between the same-axis data of different sensors, and constructs a human behavior recognition framework based on the feature fusion of wearable multi-position sensors to achieve the purpose of effectively identifying human behavior. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 It is a flow chart of a behavior recognition system based on multi-position sensor feature fusion;

[0052] Figure 2 The process diagram of the six-axis sensor activity collection behavior; (a) is the wrist; (b) is the thigh; T1 and T2 represent different time windows under the sliding time window method;

[0053] Figure 3 It is a schematic diagram of the secondary post-fusion model;

[0054] Figure 4 The correlation between the X-axis data calculated for the five three-axis sensors in the public dataset SKODA;

[0055] Figure 5 The correlation between the Y-direction data calculated by the five three-axis sensors in the public dataset SKODA;

[0056] Figure 6 Correlation between Z-direction data calculated for five triaxial sensors in the public dataset SKODA. DETAILED DESCRIPTION

[0057] When processing multi-sensor multi-dimensional data, the two-dimensional convolution kernel comprehensively considers the time dependency of multi-dimensional data and the spatial dependency between sensor data of different categories. However, most researchers simply list and splice multiple sensor data, and the spatial features extracted in this way are limited. Because in theory, different axial data on the same sensor are independent of each other and have weak correlation, and different axial data from different sensors have even less correlation. Simple splicing can only mine the spatial dependency between different axial data of the same sensor and different axial data of different sensors, and the extracted spatial features are limited. From a data perspective, we selected five three-axis sensors from the public data set SKODA to calculate the correlation between each axial data, such as Figures 4 to 6As shown, the weak correlation ratio of the same-axis data accounts for only one-third of the total data correlation ratio, so the present invention abandons the spatial dependence of all data, selects the spatial dependence between the same-axis data of different sensors, and constructs an action picture for convolutional network input.

[0058] A behavior recognition system based on multi-position sensor feature fusion, including a data module and a model module;

[0059] The data module includes data acquisition submodule, data storage submodule and data preprocessing submodule:

[0060] The data acquisition submodule is used to collect the original data generated by the human body in daily life and provide data for later model training;

[0061] The data storage submodule stores the collected data offline in different folders in txt file format according to different behavior categories;

[0062] The data preprocessing submodule is used to read local txt files and process the raw data into action pictures for subsequent model training through a series of data preprocessing processes such as data fusion, data calibration, data downsampling and normalization, and data segmentation.

[0063] The model module includes a feature extraction submodule and a classification submodule:

[0064] The feature extraction submodule consists of five parts, including the input layer, one-dimensional convolution layer, concat layer, two-dimensional convolution layer and fully connected layer. The input is the action picture passed in by the data module. The picture is defined as: extract according to the sensor (x, y, z) axis, combine all x-axis data, all y-axis data and all z-axis data to form three new (X, Y, Z) action pictures. At the same time, data fusion is achieved by combining the sensor data of the same axis. After the three groups of action pictures are processed by the one-dimensional convolution kernel to extract the temporal features, the features extracted from the three groups of action pictures are combined through the model concat layer for feature fusion, and then the spatial features are extracted through the two-dimensional convolution kernel. Finally, the features are flattened and expanded through the fully connected layer.

[0065] The classification submodule is composed of a softmax layer. The features output by the feature extraction submodule are sent to the softmax function for classification to obtain the final prediction result.

[0066] Figure 1 This is the main flow chart of the technical solution of the present invention. The present invention proposes a method for behavior recognition based on a behavior recognition system of multi-position sensor feature fusion, and the specific steps are as follows:

[0067] Step 1: Place two six-axis sensors, including a three-axis accelerometer and a three-axis gyroscope, on the left wrist and right thigh of the human body, respectively, to collect acceleration and angular velocity information generated by six types of human behaviors: walking, going upstairs, going downstairs, sitting, standing, and lying. The sampling frequency is 50 Hz.

[0068] Step 2: Create six folders for the six behaviors. The folders are named with numbers 0-5. After each action is collected, the data is saved as a txt file and stored offline in the corresponding folders.

[0069] Step 3: Through a series of data preprocessing processes such as data fusion, data calibration, data normalization, and data segmentation, the raw data is processed into action pictures;

[0070] Step 3-1: Data fusion: According to the difference between "HID-1" and "HID-2" in the first column of the original data, the acceleration and angular velocity data of the two six-axis sensors are extracted respectively, and then the data of the two sensors are spliced ​​and fused in the spatial axis in time order according to the timestamp in the second column;

[0071] Step 3-2: Data calibration; Get the path of the folder, get the folder name number, read all the txt files in the folder, fuse all the data according to step 3-1, and add a last label column to the fused data with the folder name number. The digital labels represent the following behaviors: 0: walking, 1: going upstairs, 2: going downstairs, 3: sitting, 4: standing, 5: lying down;

[0072] Step 3-3: Data normalization: The data set contains data collected by two different six-axis sensors, and their data ranges are also different, which will affect the subsequent model training and recognition accuracy. In order to improve the model training speed and recognition accuracy, the data needs to be normalized. According to formula (1), each column of the data set is normalized separately;

[0073]

[0074] Where x is the data of a column in the data set, x* is the normalized column data, μ is the mean, and σ is the standard deviation.

[0075] Step 3-4: Data segmentation: When processing the data set, the sliding time window method is used to segment the data, using a 2.56s window (i.e., the window size is 50*2.56=128), and taking a 50% window overlap rate. The sliding time window method is to move a fixed-size window on the time series, and each movement will extract the data in the window as an action picture, thereby achieving the segmentation of longer time series data; it is worth noting that when the sliding window is segmented, there will be two different labels in the same window. In this case, we use the maximum label given method, that is, the label item that appears the most times in this window is assigned as the label to the segmented action picture;

[0076] The algorithm description of the data preprocessing submodule is shown in Algorithm 1:

[0077] Algorithm 1: Data preprocessing method

[0078] Input: data storage file path path, window size ws

[0079] Output: All segmented action images and the corresponding labels of the group of action images

[0080] / / Among them, the two-dimensional convolution kernel input action picture one-dimensional convolution kernel input action picture

[0081] 1.filepaths_list = getpath(path); / / Get the names of the folders 0-6

[0082] 2.for i in filepaths_list

[0083] 3.label=getLabel(i); / / Get the label by folder name

[0084] 4.filename_list = getname(i); / / Get the file name in the folder

[0085] 5.for j in filename_list

[0086] 6.data=Load(j); / / Load the data file in the same folder

[0087] 7.D1,D2...,Dn=Load(data); / / Extract different sensor data according to sensor device name

[0088] 8.Dataj=concat(D1,D2...,Dn,label); / / Data fusion and calibration

[0089] 9. Data = append (Data j);

[0090] 10.Data = Normalize(Data); / / Normalize data

[0091] 11.L = Label (Data); / / Get the label

[0092] 12.Dimag = Segment (Data, ws); / / Divide data by window size

[0093] 13.Return List(Dimag,L);

[0094] Step 4: After data segmentation, the data in the action picture is extracted according to the (x, y, z) three-axis directions, and all x-axis data, all y-axis data, and all z-axis data are combined to form three groups of (X, Y, Z) action pictures, which changes the mode of using a single sensor as input in the secondary post-fusion model and realizes data fusion at the input end;

[0095] Step 5: Second level post-fusion model Figure 3 As shown, the model has a total of 14 layers of networks:

[0096] The 1st, 3rd, and 5th convolutional layers use one-dimensional convolution kernels to extract features from the time series data;

[0097] The 2nd, 4th and 6th pooling layers use one-dimensional filters to reduce spatial data loss. The pooling method selects the maximum pooling method;

[0098] The seventh layer is the concat layer, which merges the feature values ​​extracted from the x, y, and z axis data along the time axis to achieve feature fusion;

[0099] The 8th and 9th convolutional layers use two-dimensional convolution kernels to extract temporal and spatial features from the merged eigenvalues;

[0100] The 10th layer is the pooling layer, which uses a two-dimensional filter and the pooling method is maximum pooling;

[0101] The 11th, 12th, and 13th layers are three fully connected layers, which expand the pooled eigenvalues ​​into one dimension and then abstract the one-dimensional eigenvalues ​​to facilitate the connection to the final softmax layer.

[0102] The algorithm from step 4 to step 5 is shown in Algorithm 2:

[0103] Algorithm 2: Feature extraction and classification method

[0104] Input: List(Dimag,L), epoch

[0105] Output: All segmented action images and the corresponding labels of the group of action images

[0106] / / Among them, the two-dimensional convolution kernel input action picture one-dimensional convolution kernel input action picture

[0107] 1.Ximag=Input(List(Dimag,L),X); extract all data on the x-axis

[0108] 2. Yimag = Input (List (Dimag, L), Y); extract all data on the y-axis

[0109] 3. Zimag = Input (List (Dimag, L), Z); extract all data of the z axis

[0110] 4. L = get_label(List(Dimag,L)); Get label

[0111] 5. Initialize(W,B); / / Initialize weights and biases

[0112] 5.for i in epoch:

[0113] 6.for each in(Ximag,Yimag,Zimag):

[0114] 7.for j in range(3): / / Set three layers of convolution and three layers of pooling

[0115] 8.FP(l=Conv1D); / / One-dimensional convolution

[0116] 9.FP(l=Maxpool); / / Maximum pooling method

[0117] 10.Concat(Xf,Yf,Zf); / / Fuse the axial features after convolution

[0118] 11.FP(l=Conv2D); / / 2D convolution twice

[0119] 12.FP(l=Maxpool); / / Maximum pooling method

[0120] 13.FP(l=FC); / / Fully connected layer

[0121] 14.FP(l=softmax); / / softmax layer classification

[0122] 15.BP(L); / / Backward propagation for all layers

[0123] 16.SaveModel(W, B); / / Save model

[0124] The processed (X, Y, Z) three groups of action pictures are used as input to train and test the secondary post-fusion model, of which 70% are taken as training sets and 30% as test sets.

[0125] In the process of model training, when the capacity of the model is greater than the complexity of the problem, overfitting is prone to occur. In order to avoid the occurrence of overfitting, Dropout is used to solve the overfitting problem. Dropout is to make the network layer not participate in the propagation process with a certain probability during the model training process. The data input to this layer during forward propagation is the data output of this layer, and the parameters of the discarded layer will not be updated during backward propagation. Its expression is as follows:

[0126] x l =RanddomZero(p)x l-1 (2)

[0127] Where p is the probability of the neurons in this layer being dropped. When p = 0.5, the overfitting problem is best solved. The Dropout layer is probabilistically triggered during model training, but when we predict data, we need a complete model framework to make predictions, so we need to turn off the Dropout layer during prediction.

[0128] When testing the model, record the classification results on the test set and calculate F according to formula (3) 1 Value, in F 1 The value is used as the evaluation index to evaluate the classification effect.

[0129]

[0130] In the formula, precision and recall are the precision and recall rates under macro averaging.

[0131] According to step 5, the classification results of the trained model on the test set are obtained, thereby completing the construction of a human behavior recognition framework based on wearable multi-position sensor feature fusion.

Claims

1. A behavior recognition system based on multi-position sensor feature fusion, It is characterized in that The behavior recognition system based on multi-position sensor feature fusion includes a data module and a model module; The data module stores and preprocesses the collected raw data to obtain action pictures for subsequent model training; the preprocessing includes data fusion, data calibration, data downsampling, normalization and data segmentation; the data of the action pictures after data segmentation are extracted by sensors according to the (x, y, z) axis respectively, and all x-axis data, all y-axis data and all z-axis data are combined to form three new (X, Y, Z) action pictures, and the sensor data of the same axis are combined at the same time; The model module includes a feature extraction submodule and a classification submodule; The feature extraction submodule includes an input layer, a one-dimensional convolution layer, a concat layer, a two-dimensional convolution layer, and a fully connected layer. The action pictures obtained by the data module are input into the feature extraction submodule. After the temporal features are extracted by the one-dimensional convolution layer, the temporal features extracted from the three groups of action pictures are combined by the concat layer for feature fusion. The spatial features are then extracted by the two-dimensional convolution kernel layer. Finally, the features are flattened and expanded by the fully connected layer. The classification submodule is a softmax layer, and the features output by the feature extraction submodule are sent to the softmax function for classification to obtain the final prediction result.

2. The behavior recognition system based on multi-position sensor feature fusion according to claim 1, It is characterized in that The data module includes a data acquisition submodule, a data storage submodule and a data preprocessing submodule; The data acquisition submodule is a sensor that collects raw data generated by the human body in daily life for later model training; The data storage submodule stores the collected data offline in different folders according to different behavior categories in a set file format; The data preprocessing submodule is used to read local files, perform data preprocessing, and process the raw data into action pictures for subsequent model training.

3. The behavior recognition system based on multi-position sensor feature fusion according to claim 1 or 2, It is characterized in that The model module is a two-level post-fusion model, which includes 14 network layers; The 1st, 3rd, and 5th convolutional layers use one-dimensional convolution kernels to extract features from the time series data; The 2nd, 4th, and 6th pooling layers use one-dimensional filters to reduce spatial data loss; The seventh layer is the concat layer, which merges the feature values ​​extracted from the x, y, and z axis data along the time axis to achieve feature fusion; The 8th and 9th convolutional layers use two-dimensional convolution kernels to extract spatial features from the merged eigenvalues; The 10th layer is a pooling layer, which uses a two-dimensional filter; The 11th, 12th, and 13th layers are three fully connected layers, which expand the pooled eigenvalues ​​into one dimension, abstract the one-dimensional eigenvalues, and connect to the final softmax layer.

4. The method for behavior recognition using the behavior recognition system according to claim 3, It is characterized in that The specific steps are as follows: Step 1: Place two six-axis sensors on the left wrist and right thigh of the human body respectively to collect acceleration and angular velocity information generated by six types of human behaviors: walking, going upstairs, going downstairs, sitting, standing and lying down. The sampling frequency is fixed; Step 2: Create six folders for the six behaviors. After each action is collected, save the data as a file in a set format and store it offline in the corresponding folder; Step 3: Process the data in step 2 into action pictures through data fusion, data calibration, data normalization and data segmentation; Step 3-1: Data fusion: Extract the acceleration and angular velocity data of the two six-axis sensors respectively, and merge the data of the two six-axis sensors in time order according to the timestamps in the spatial axis direction; Step 3-2: Data calibration; Get the path of the folder, get the folder name number, read all the files in the folder, merge all the data according to step 3-1, and add a last column of digital labels to the merged data with the folder name number; Step 3-3: Data normalization: The data set contains data collected by two different six-axis sensors. In order to improve the model training speed and recognition accuracy, it is necessary to perform data normalization processing on each column of the data set according to formula (1); In the formula, x is the data of a column in the data set, x* is the normalized column data, μ is the mean, and σ is the standard deviation; Step 3-4: Data segmentation: Use the sliding time window method to segment the data. Each time the sliding window is extracted, the data is taken as an action picture. The fixed window overlap rate is set. When there are two different labels in the same window, the maximum label assignment method is used, that is, the label item that appears the most times in this window is assigned as the label to the segmented action picture. Step 4: After data segmentation, the data in the action picture is extracted according to the (x, y, z) three-axis directions, and all x-axis data, all y-axis data and all z-axis data are combined to form three groups of (X, Y, Z) action pictures, which are input into the model module; Step 5: Use the processed (X, Y, Z) three groups of action pictures as input data, divide the training set and test set into 7:3, and train and test the model module; A Dropout layer is added between each network layer to prevent overfitting problems in model training. The Dropout layer ensures that during the model training process, the network layer does not participate in the propagation process with a certain probability; the data input to the network layer during forward propagation is the data output from the network layer, and the parameters of the discarded network layer are not updated during back propagation. The formula is as follows: x l =RanddomZero(p)x l-1 (2) In the formula, p is the probability that the neuron in this network layer is dropped out, l represents the number of layers in the network layer, and RanddomZero() is the zeroing function; when outputting all the data x in this layer, they will be set to 0 with a certain probability p, that is, the neuron will not be used as the feature input of the next layer; When testing the model, record the classification results on the test set and calculate F according to formula (3) 1 Value, in F 1 The value is the evaluation index to evaluate the classification effect; In the formula, precision and recall are the precision and recall rates under macro-average respectively; According to the classification results of the trained model on the test set, the construction of the human behavior recognition framework based on the feature fusion of wearable multi-position sensors is completed.

5. The method for behavior recognition using the behavior recognition system according to claim 4, It is characterized in that The six-axis sensor includes a three-axis accelerometer and a three-axis gyroscope.

6. The method for behavior recognition using the behavior recognition system according to claim 4, It is characterized in that The digital labels in the digital label column represent behaviors: 0 corresponds to walking, 1 corresponds to going upstairs, 2 corresponds to going downstairs, 3 corresponds to sitting, 4 corresponds to standing, and 5 corresponds to lying down.

7. The method for behavior recognition using the behavior recognition system according to claim 4, It is characterized in that When the probability p in the Dropout is 0.5, the overfitting problem is best solved; when making model predictions based on the trained model, the Dropout layer is turned off.