Motion recognition method based on fusion of multiple machine learning algorithms
By integrating multiple machine learning algorithms and multi-source sensor data in motion recognition technology, the problems of low recognition accuracy and poor real-time performance caused by single algorithms and single sensor data in the prior art are solved, and higher recognition accuracy and real-time performance are achieved.
Patent Information
- Application Number
- CN202411895548.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-22
- Publication Date
- 2025-05-13
AI Technical Summary
Existing motion recognition technology relies on a single machine learning algorithm and a single sensor data, resulting in low recognition accuracy and poor real-time performance when facing complex motion patterns.
The fusion method of a variety of machine learning algorithms (such as decision trees, support vector machines and neural networks) is adopted, and combined with multi-source sensor data (such as accelerometers, gyroscopes and magnetometers) is processed. Through sliding windows, feature extraction and model fusion, high-precision recognition and real-time feedback of complex motion patterns are achieved.
The accuracy, comprehensiveness and real-time nature of motion recognition have been significantly improved, the recognition accuracy has been improved by 15%-20%, the real-time ability has been improved by 30%, and the error rate of multi-source sensor data fusion has been reduced to 3%.
Smart Images

Figure CN119989250A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of motion recognition technology and intelligent wearable devices, and specifically relates to a motion recognition method based on the fusion of multiple machine learning algorithms. Background Art
[0002] Currently, motion recognition technology has been widely used in many fields such as smart wearable devices, health monitoring, human-computer interaction, sports training, virtual reality, etc. Smart wearable devices such as smart watches, smart bracelets, smart shoes, etc. can monitor the user's motion status in real time through built-in sensors, thereby providing users with personalized health advice and exercise guidance. In the field of health monitoring, motion recognition technology is used to monitor the daily activities of the elderly or patients, helping to detect abnormal conditions in a timely manner and improve the level of health management. In terms of human-computer interaction, motion recognition technology enables users to interact with devices through natural movements, improving the convenience and friendliness of the user experience.
[0003] The purpose of this invention is to propose a motion recognition method and system based on the fusion of multiple machine learning algorithms and multi-source sensor data processing, aiming to solve the following problems in existing motion recognition technology:
[0004] 1. Reliance on a single machine learning algorithm: Existing motion recognition technologies usually use a single machine learning algorithm, such as decision trees, support vector machines, or neural networks. These algorithms often show limitations when faced with complex and changing motion patterns. For example, decision trees have reduced performance when dealing with nonlinear problems, support vector machines have high computational complexity when dealing with large-scale data sets, and neural networks require a large amount of data for training and are prone to overfitting. A single algorithm is difficult to fully cope with various motion patterns, resulting in low recognition accuracy.
[0005] 2. Reliance on single sensor data: Existing technologies mostly rely on a single type of sensor data, such as using only accelerometer data. This method cannot fully reflect the complexity of human motion, and therefore may not be able to accurately identify multi-dimensional and multi-directional motion. For example, relying solely on accelerometers cannot accurately distinguish between rotational motion and linear motion, resulting in limited recognition accuracy.
[0006] 3. Poor real-time performance: Due to the complex algorithms and large amounts of data processing used in existing technologies, the system has a heavy computational burden, which results in a longer response time during the recognition process and poor real-time performance. This will affect the user experience in practical applications, especially in scenarios that require real-time feedback, such as sports training, health monitoring, and human-computer interaction. Summary of the invention
[0007] 1. Technical issues to be resolved
[0008] The technical problem to be solved by the present invention is how to provide a motion recognition method based on the fusion of multiple machine learning algorithms to solve the problem that the existing motion recognition technology relies on a single machine learning algorithm, relies on a single sensor data, and has poor real-time performance.
[0009] (II) Technical solution
[0010] In order to solve the above technical problems, the present invention proposes a motion recognition method based on the fusion of multiple machine learning algorithms, which comprises the following steps:
[0011] Step 1: Data loading
[0012] Load sensor data through hardware;
[0013] Step 2: Data preprocessing
[0014] Normalize sensor data and merge multi-source data;
[0015] Step 3: Sliding Window
[0016] The sliding window is obtained by sliding a fixed-size window forward on the time axis with a certain step size to generate data fragments;
[0017] Step 4: Feature extraction
[0018] Extract features from different domains from each window: time domain, frequency domain, spatial domain and autocorrelation features;
[0019] Step 5: Data Division
[0020] The extracted feature data is formed into a feature matrix, and is divided into a training set and a test set based on the label vector;
[0021] Step 6: Model training
[0022] Train different classifier models: decision trees, support vector machines, and neural networks;
[0023] Step 7: Model Fusion
[0024] The prediction results of each model are integrated through the voting mechanism, that is, the current motion state is predicted;
[0025] Step 8: Model Evaluation
[0026] Calculate the accuracy of the fused model.
[0027] (III) Beneficial effects
[0028] The present invention proposes a motion recognition method based on the fusion of multiple machine learning algorithms. Compared with the prior art, the motion recognition method and system based on the fusion of multiple machine learning algorithms and multi-source sensor data processing proposed by the present invention have the following significant advantages:
[0029] 1. Improved recognition accuracy: By integrating multiple machine learning algorithms such as decision trees, support vector machines, and deep learning, the advantages of each algorithm are fully utilized to make up for the shortcomings of a single algorithm and achieve high-precision recognition of complex motion patterns. Experiments show that after mixing multiple algorithms, the recognition accuracy is improved by 15%-20% compared to a single algorithm. For example, in complex motion modes such as running, jumping, and spinning, the recognition accuracy rate is increased from 85% to 95%.
[0030] 2. Enhanced data comprehensiveness: Combining data from multiple sensors such as accelerometers, gyroscopes, and magnetometers, it provides more comprehensive motion information, effectively reflects the movement changes of the human body in multi-dimensional space, and improves the robustness and stability of the system. Through multi-source data fusion, the system can accurately identify movements in different dimensions, such as lateral, longitudinal, and rotational movements. Experimental data show that the error rate after combining multiple source sensors is only 3%, which is much lower than the 8% error rate of a single sensor.
[0031] 3. Improved real-time performance: By optimizing algorithms and data processing processes, the system's computing burden is reduced, processing speed is increased, and real-time feedback on the user's motion status is achieved. In actual applications, the optimized system response time is shortened by 30%, and users can obtain accurate feedback information in real time during exercise. Especially in the application of smart wearable devices, the system can provide real-time feedback on the motion status with a delay of milliseconds, significantly improving the user experience.
[0032] 4. Experimental verification: Through experimental verification in different motion modes and complex environments, the method can maintain high recognition accuracy and real-time performance. In the experiment, the recognition accuracy of the system in different motion scenes (such as indoors, outdoors, and complex terrain) was higher than 93%. In addition, in the application tests in the fields of smart wearable devices, health monitoring, and human-computer interaction, the system showed excellent stability and robustness. The specific experimental results show that during the continuous 12-hour monitoring process, the recognition accuracy and real-time performance of the system did not show a significant decline.
[0033] 5. Improved user experience: The method and system of the present invention significantly improve the user's sports monitoring experience in practical applications. Through real-time and accurate sports recognition, users can obtain more comprehensive sports data analysis, helping them optimize their sports strategies and achieve better exercise results. In addition, the high real-time performance and stability of the system ensures reliability in various complex sports environments and meets the needs of different application scenarios.
[0034] In summary, the present invention significantly improves the accuracy, comprehensiveness and real-time performance of motion recognition through the fusion of multiple machine learning algorithms and multi-source sensor data processing, and has broad application prospects and significant advantages. The method and system can effectively improve user experience in the fields of smart wearable devices, health monitoring, human-computer interaction, etc., and has important commercial value and social benefits. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 is a flow chart of the present invention;
[0036] Figure 2 This is the evaluation diagram of the case data result model of the present invention; (a) is the confusion matrix; (b) is the time domain and frequency domain analysis; (c) is the classification result of the validation set. DETAILED DESCRIPTION
[0037] In order to make the purpose, content and advantages of the present invention more clear, the specific implementation methods of the present invention are further described in detail below in conjunction with the drawings and examples.
[0038] In order to solve the above problems, the present invention proposes a fusion strategy that integrates multiple machine learning algorithms and combines a method and system for multi-source sensor data processing to improve the accuracy and real-time performance of motion recognition. Specifically, the present invention solves the problems in the prior art through the following technical means:
[0039] 1. Algorithm fusion: Integrate multiple machine learning algorithms such as decision trees, support vector machines, and deep learning, take advantage of the complementary advantages of each algorithm, and improve the system's ability to recognize complex motion patterns through methods such as ensemble learning, voting mechanism, or weighted average.
[0040] 2. Multi-source sensor data processing: Combine data from multiple sensors such as accelerometers, gyroscopes, and magnetometers to build multi-dimensional motion feature vectors, thereby providing more comprehensive motion information. This can not only improve motion accuracy that a single sensor cannot provide, but also enhance the system's ability to identify different types of motion.
[0041] 3. Optimize algorithms and data processing procedures: Optimize data preprocessing, feature extraction, model training and other links to reduce the system's computational burden and improve data processing efficiency, thereby achieving real-time feedback on the user's motion status.
[0042] Through the above improvements, the present invention aims to provide an efficient, accurate and real-time motion recognition method and system to meet the needs of smart wearable devices, health monitoring, human-computer interaction and other fields.
[0043] The present invention proposes a motion recognition method and system based on the fusion of multiple machine learning algorithms, which improves the recognition performance by collecting and processing multi-source sensor data. Specifically, the present invention uses data from multiple sensors such as accelerometers, gyroscopes, and magnetometers, and integrates multiple machine learning algorithms, including but not limited to decision trees, support vector machines, deep learning, etc., to make a comprehensive judgment and recognition of the motion state. Through experimental verification, this method can maintain high recognition accuracy and real-time performance in different motion modes and complex environments, providing an efficient and reliable technical solution for the fields of smart wearable devices, health monitoring, and human-computer interaction.
[0044] The present invention proposes a motion recognition method based on the fusion of multiple machine learning algorithms, which specifically includes the following steps:
[0045] Step 1: Data loading
[0046] In this step, we load the sensor data through the hardware.
[0047] Step 2: Data preprocessing
[0048] Normalize sensor data and merge multi-source data.
[0049]
[0050] Among them, is μ x The mean of the data, σ x is the standard deviation of the data. Here, the data is processed according to the general statistical method of calculating the mean and standard deviation.
[0051] Step 3: Sliding Window
[0052] Sliding window is a commonly used method in time series analysis. It can split time series data into multiple small subsequences and can be used for tasks such as feature extraction and model training. The sliding window is generated by sliding a fixed-size window forward on the time axis with a certain step size to generate data fragments.
[0053] S31. Define sliding window parameters
[0054] Window size: represents the length of each window (number of samples), denoted as w.
[0055] Step size: represents the distance (number of samples) that the window slides each time, recorded as s.
[0056] Assuming that the given time series data is X and the corresponding label Y, we use a sliding window to construct multiple time segments, each segment length is w, and the step size of the window sliding is s.
[0057] S32, sliding window function
[0058] The sliding window function is responsible for generating sliding window data. Let the input data be D, the window size be w, the step size be s, and the output of the function be a cell array containing multiple window data.
[0059] For a data sequence D of length N, the window size is w, the step size is s, and the number of sliding windows is n w It can be expressed as:
[0060]
[0061] S33, start and end index of each window
[0062] For the i-th window, i=1,2,…,n w :
[0063] Start index i :
[0064] s i =(i-1)·s+1
[0065] End index e i :
[0066] e i =s i +w-1=(i-1)·s+w
[0067] S34, window data extraction
[0068] For the input data D, the data segment W of the i-th window i yes:
[0069] W i =D(s i :e i )
[0070] Among them, D(s i :e i ) represents the sth i Go to e i The data for all columns of the row.
[0071] In this way, we can split the original time series data into multiple overlapping subsequences as the basis for subsequent analysis and processing. The sliding window technology can capture the local characteristics of time series data and is very useful for feature extraction and pattern recognition of time series data.
[0072] Step 4: Feature extraction
[0073] Features in different domains are extracted from each window: time domain, frequency domain, spatial domain and autocorrelation features.
[0074] S41. Time Domain Characteristics
[0075] Mean:
[0076] Among them, x i is the data point in the window, and w is the window size. The mean reflects the central trend of the signal.
[0077] Standard Deviation:
[0078] The standard deviation measures the dispersion of the signal. The larger the standard deviation, the greater the fluctuation of the data.
[0079] S42, frequency domain characteristics
[0080] Fast Fourier Transform:
[0081] Among them, FFT(x) is the representation of the signal in the frequency domain, x[n] is the time domain signal, and w is the number of samples of the signal (window size)
[0082] Absolute value: |FFT(x)|
[0083] This feature represents the energy distribution of the signal at different frequencies.
[0084] S43, spatial domain characteristics
[0085] variance:
[0086] Variance reflects the degree of fluctuation of the signal and is used to characterize the stability and variation of the signal.
[0087] S44, Autocorrelation characteristics
[0088] Autocorrelation function:
[0089] Where R(k) is the autocorrelation value and k is the delay time. The autocorrelation function helps identify the periodicity and trend of the signal.
[0090] Step 5: Data Division
[0091] The extracted feature data are organized into a feature matrix and divided into a training set and a test set based on the label vector.
[0092] For each window i, we can construct the feature vector F i =[μ i ,σ i ,Var i ,FFT i ,R(k)].
[0093] Fill the feature matrix F:
[0094]
[0095] For a given feature matrix F and label vector y, the data is divided into training set and test set using the cross-validation method.
[0096] Let F be the feature matrix and y be the corresponding label, that is, the state corresponding to the current training data label (walking, running, jumping, etc.).
[0097]
[0098] Use the Hold-Out method to partition data:
[0099] Train:(X train ,y train )Test:(X test ,y test )
[0100] Step 6: Model training
[0101] Train different classifier models: decision trees, support vector machines, and neural networks.
[0102] S61, Decision Tree:
[0103] A decision tree is a method for recursively segmenting data to predict target values by learning simple decision rules (like branches of a tree).
[0104] S62, Support Vector Machine:
[0105] The support vector machine achieves the purpose of classification by finding an optimal hyperplane to segment the data. This method is a classic multi-class support vector machine classification algorithm, and the corresponding kernel function is the radial basis function.
[0106] S63, Feedforward Neural Network:
[0107] The feedforward neural network consists of an input layer, a hidden layer, and an output layer, and is trained using a multi-layer perceptron (MLP) structure and a back-propagation algorithm.
[0108] Output=f(WX+b)
[0109] Among them, f is the activation function, such as ReLU, Sigmoid, etc., W and b are the weight matrix and bias vector respectively.
[0110] Step 7: Model Fusion
[0111] The prediction results of each model are fused through a voting mechanism, that is, the predicted current motion state (sitting, lying, squatting, etc.).
[0112] Assume that the prediction results of the three models are p tree ,p svm and p nn
[0113] p final =mode(p tree ,p svm ,p nn )
[0114] That is, the most predicted category is selected as the final prediction result by voting.
[0115] Step 8: Model Evaluation
[0116] Calculate the accuracy of the fused model. Accuracy is defined as the ratio of correctly classified samples to the total number of samples.
[0117]
[0118] Among them, I is the indicator function, is the model’s predicted label, y i is the true label, test N is the number of test samples.
[0119] Embodiment 1:
[0120] Figure 2 This is the evaluation diagram of the case data result model of the present invention. The prediction accuracy of the model in this case is 90%, in which the confusion matrix shows the recognition accuracy and confusion of the classifier for different types of motion; the time domain and frequency domain analysis show the signal characteristics and distribution of each type of motion; the validation set classification results evaluate the generalization performance of the model on unseen data, and the overall evaluation shows that the model has a high accuracy and good generalization ability.
[0121] Compared with the prior art, the motion recognition method and system based on the fusion of multiple machine learning algorithms and multi-source sensor data processing proposed in the present invention have the following significant advantages:
[0122] 1. Improved recognition accuracy: By integrating multiple machine learning algorithms such as decision trees, support vector machines, and deep learning, the advantages of each algorithm are fully utilized to make up for the shortcomings of a single algorithm and achieve high-precision recognition of complex motion patterns. Experiments show that after mixing multiple algorithms, the recognition accuracy is improved by 15%-20% compared to a single algorithm. For example, in complex motion modes such as running, jumping, and spinning, the recognition accuracy rate is increased from 85% to 95%.
[0123] 2. Enhanced data comprehensiveness: Combining data from multiple sensors such as accelerometers, gyroscopes, and magnetometers, it provides more comprehensive motion information, effectively reflects the movement changes of the human body in multi-dimensional space, and improves the robustness and stability of the system. Through multi-source data fusion, the system can accurately identify movements in different dimensions, such as lateral, longitudinal, and rotational movements. Experimental data show that the error rate after combining multiple source sensors is only 3%, which is much lower than the 8% error rate of a single sensor.
[0124] 3. Improved real-time performance: By optimizing algorithms and data processing processes, the system's computing burden is reduced, processing speed is increased, and real-time feedback on the user's motion status is achieved. In actual applications, the optimized system response time is shortened by 30%, and users can obtain accurate feedback information in real time during exercise. Especially in the application of smart wearable devices, the system can provide real-time feedback on the motion status with a delay of milliseconds, significantly improving the user experience.
[0125] 4. Experimental verification: Through experimental verification in different motion modes and complex environments, the method can maintain high recognition accuracy and real-time performance. In the experiment, the recognition accuracy of the system in different motion scenes (such as indoors, outdoors, and complex terrain) was higher than 93%. In addition, in the application tests in the fields of smart wearable devices, health monitoring, and human-computer interaction, the system showed excellent stability and robustness. The specific experimental results show that during the continuous 12-hour monitoring process, the recognition accuracy and real-time performance of the system did not show a significant decline.
[0126] 5. Improved user experience: The method and system of the present invention significantly improve the user's sports monitoring experience in practical applications. Through real-time and accurate sports recognition, users can obtain more comprehensive sports data analysis, helping them optimize their sports strategies and achieve better exercise results. In addition, the high real-time performance and stability of the system ensures reliability in various complex sports environments and meets the needs of different application scenarios.
[0127] In summary, the present invention significantly improves the accuracy, comprehensiveness and real-time performance of motion recognition through the fusion of multiple machine learning algorithms and multi-source sensor data processing, and has broad application prospects and significant advantages. The method and system can effectively improve user experience in the fields of smart wearable devices, health monitoring, human-computer interaction, etc., and has important commercial value and social benefits.
[0128] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A motion recognition method based on the fusion of multiple machine learning algorithms, characterized in that: The method comprises the following steps: Step 1: Data loading Load sensor data through hardware; Step 2: Data preprocessing Normalize sensor data and merge multi-source data; Step 3: Sliding Window The sliding window is obtained by sliding a fixed-size window forward on the time axis with a certain step size to generate data fragments; Step 4: Feature extraction Extract features in different domains from each window: time domain, frequency domain, spatial domain and autocorrelation features; Step 5: Data Division The extracted feature data is formed into a feature matrix, and is divided into a training set and a test set based on the label vector; Step 6: Model training Train different classifier models: decision trees, support vector machines, and neural networks; Step 7: Model Fusion The prediction results of each model are integrated through the voting mechanism, that is, the current motion state is predicted; Step 8: Model Evaluation Calculate the accuracy of the fused model.
2. The motion recognition method based on the fusion of multiple machine learning algorithms as claimed in claim 1, characterized in that: The second step comprises: Among them, is μ x The mean of the data, σ x is the standard deviation of the data.
3. The motion recognition method based on the fusion of multiple machine learning algorithms as claimed in claim 1, characterized in that: The step three comprises: S31. Define sliding window parameters Window size: represents the number of samples in each window, denoted as w; Step size: represents the number of samples that the window slides each time, recorded as s; Assume that the given time series data is X and the corresponding label Y, and use a sliding window to construct multiple time segments, each segment length is w, and the step length of the window sliding is s; S32, sliding window function The sliding window function is responsible for generating sliding window data; let the input data be D, the window size be w, the step size be s, and the output of the function be a cell array containing multiple window data; For a data sequence D of length N, the window size is w, the step size is s, and the number of sliding windows is n w It is expressed as: S33, start and end index of each window For the i-th window, i=1,2,…,n w : Start index i : s i =(i-1)·s+1 End index e i : e i =s i +w-1=(i-1)·s+w S34, window data extraction For the input data D, the data segment W of the i-th window i yes: W i =D(s i :e i ) Among them, D(s i :e i ) represents the sth i Go to e i The data for all columns of the row.
4. The motion recognition method based on the fusion of multiple machine learning algorithms as claimed in claim 3, characterized in that: The step 4 comprises: extracting features of different domains from each window: time domain, frequency domain, space domain and autocorrelation features; S41. Time Domain Characteristics Mean: Among them, x i is the data point in the window, w is the window size; Standard Deviation: The standard deviation measures the dispersion of the signal; S42, frequency domain characteristics Fast Fourier Transform: Among them, FFT(x) is the representation of the signal in the frequency domain, x[n] is the time domain signal, and w is the number of samples of the signal; Absolute value: |FFT(x)| This feature represents the energy distribution of the signal at different frequencies; S43, spatial domain characteristics variance: Variance reflects the degree of fluctuation of the signal and is used to characterize the stability and variation of the signal; S44, Autocorrelation characteristics Autocorrelation function: Where R(k) is the autocorrelation value and k is the delay time; the autocorrelation function helps identify the periodicity and trend of the signal.
5. The motion recognition method based on the fusion of multiple machine learning algorithms as claimed in claim 4, characterized in that: The step five includes: for each window i, constructing a feature vector F i =[μ i ,σ i ,Var i ,FFT i ,R(k)]; Fill the feature matrix F: For a given feature matrix F and label vector y, the data is divided into training set and test set using the cross-validation method.
6. The motion recognition method based on the fusion of multiple machine learning algorithms as claimed in claim 5, characterized in that: Let F be the feature matrix and y be the corresponding label, that is, the state corresponding to the current training data label: Use the Hold-Out method to partition data: Train:(X train ,y train )Test:(X test ,y test ) 7. The motion recognition method based on the fusion of multiple machine learning algorithms as claimed in claim 5 or 6, characterized in that: The step six includes: training different classifier models: decision tree, support vector machine and neural network; S61, Decision Tree: A decision tree is a method for recursively segmenting data and predicting target values by learning decision rules; S62, Support Vector Machine: The support vector machine achieves the purpose of classification by finding an optimal hyperplane to segment the data; this method is a multi-category support vector machine classification algorithm, and the corresponding kernel function is the radial basis function; S63, Feedforward Neural Network: The feedforward neural network consists of an input layer, a hidden layer, and an output layer, and is trained using a multilayer perceptron (MLP) structure and a back-propagation algorithm; Output=f(WX+b) Where f is the activation function, W and b are the weight matrix and bias vector respectively.
8. The motion recognition method based on the fusion of multiple machine learning algorithms as claimed in claim 7, characterized in that: The step 7 includes: fusing the prediction results of each model through a voting mechanism, that is, predicting the current motion state, assuming that the prediction results of the three models are p tree ,p svm and p nn p final =mode(p tree ,p svm ,p nn ) That is, the most predicted category is selected as the final prediction result by voting.
9. The motion recognition method based on the fusion of multiple machine learning algorithms as claimed in claim 8, characterized in that: The step eight comprises: Accuracy is defined as the ratio of correctly classified samples to the total number of samples; Among them, I is the indicator function, is the model’s predicted label, y i is the true label, test N is the number of test samples.
10. The motion recognition method based on the fusion of multiple machine learning algorithms as claimed in claim 8, characterized in that: Movement states include: sitting, lying and squatting.