Fall detection algorithm model for wearable device of stroke patient
By preprocessing and decoupling features of inertial sensor data using an STL-LSTM model, and combining it with a two-layer LSTM network, the problems of large size and insufficient generalization ability of fall detection models in wearable devices are solved, and high-precision fall monitoring of stroke patients is achieved.
Patent Information
- Application Number
- CN202510977611.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-16
- Publication Date
- 2025-11-07
AI Technical Summary
Existing wearable devices based on inertial sensors suffer from problems such as large model size, insufficient generalization ability and low accuracy in fall detection, especially when the wearing position is changed or the sensor model is changed in stroke patients, the accuracy drops sharply.
An STL-LSTM model is adopted, which processes inertial sensor data through low-pass filtering, STL cyclic trend decomposition and LOESS smoothing. Combined with a two-layer cascaded LSTM network and Dropout layer, feature decoupling and temporal dynamic modeling are achieved, reducing the dimensionality of the hidden layer of the model and enhancing the feature capture capability.
It achieves high-precision fall detection under the resource constraints of wearable devices, reduces model size by 80%, improves accuracy from 95.93% to 99.73%, and effectively shields against noise interference.
Smart Images

Figure CN120910609A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of health monitoring and posture detection, and particularly relates to a fall detection algorithm model of a wearable device for stroke patients. BACKGROUND
[0002] The wearable device based on inertial sensors in the prior art is the mainstream technology route for fall detection, the core of which is to capture human motion characteristics through micro sensors such as accelerometers and gyroscopes, and the technical core is to monitor the acceleration change of the body by using a three-axis accelerometer, and to measure the angular velocity of rotation by using a gyroscope. When a feature sequence of sudden weightlessness, violent impact, and abnormal posture is detected, a fall alarm is triggered. In the existing fall detection scheme based on inertial sensors, there are threshold algorithms and deep learning model algorithms.
[0003] The deep learning algorithm solves the problem of the traditional threshold method relying on artificial rules through end-to-end feature learning, and achieves breakthrough progress in the field of fall detection. This kind of algorithm uses a deep neural network to automatically learn features from raw sensor data, avoiding the limitations of manually designed features (such as thresholds), and can capture complex spatiotemporal patterns, having better recognition ability for complex scenes such as slow falls and multi-step falls. Compared with the traditional threshold method, the deep learning algorithm greatly improves the detection accuracy, but still has the following shortcomings: the model size is large, and it is difficult to deploy to portable embedded devices; the model has insufficient cross-device generalization ability, and changing the wearing position or changing the type of inertial sensor causes the model accuracy to drop sharply. How to train a lightweight, highly generalized and highly accurate deep learning model has become the focus of current research on fall detection devices for stroke patients. SUMMARY
[0004] The purpose of the present application is to solve the technical problem of the lack of lightweight, highly generalized and highly accurate deep learning models in the prior art.
[0005] In order to achieve the above-mentioned purpose, the present application adopts the following technical solutions:
[0006] A construction method of a fall detection algorithm model of a wearable device for stroke patients, comprising the following steps:
[0007] S1: Data collection and screening: acquiring the posture information of the wearer by using the inertial sensor IMU in the wearable device After the data collection is completed, the original data is subjected to low-pass filtering to obtain sensor data I t ;
[0008] S2: Data processing: acquiring the inertial sensor data I t at time t, using LOESS to decompose the inertial sensor data It Decomposition into trend component Seasonal component and residual component Then the data is normalized;
[0009] S3: Model establishment and training
[0010] After data processing, LSTM is used to model the time series of each inertial sensor component in S1, respectively.
[0011] Preferably, the low-pass filtering process in S1 is used to filter out sensor circuit thermal noise (> 100Hz), high-frequency jitter caused by human muscle micro-vibration (10-50Hz), and random high-frequency jitter generated by device and clothing friction.
[0012] Preferably, the STL cycle trend decomposition method in S2 is as follows:
[0013] Step 1: IMU data minus the trend component of the last round result Used as the component derivation of this round;
[0014] Step 2: Integrate data at different times within a short time period, use LOESS with smoothing parameter n s for local weighted regression smoothing to obtain smoothed time series C t+1 ;
[0015] Step 3: Perform LOESS with smoothing parameter n t on the smoothed time series C t+1 obtained in the last step to obtain a subsequence that can reflect the trend characteristics of the sequence
[0016] Step 4: Subtract the trend characteristic subsequence from the time series data to obtain the seasonal component
[0017] Step 5: Remove the seasonal component from the IMU data to prepare for the trend component of the IMU;
[0018] Step 6: Perform LOESS regression with smoothing parameter n t on the data obtained in Step 5 to obtain the trend component of the IMU data After obtaining the seasonal component and the trend component, determine whether the result converges, perform the next cycle or output the STL decomposed IMU data;
[0019] The STL decomposed IMU data is represented as:
[0020]
[0021] Preferably, the data normalization processing in S2 is as follows:
[0022]
[0023] After the data normalization processing is completed, it is input to the deep learning model.
[0024] Preferably, after the STL feature data of the IMU in S3 is input to the model, feature enhancement is realized through a nonlinear layer, so that the LSTM unit can more effectively capture the time-varying characteristics of the motion signal, and the gradient attenuation problem of the deep network is alleviated. The main operation is:
[0025]
[0026] wherein is the data finally input to the network, and b N is a bias parameter.
[0027] Preferably, a double-layer cascaded LSTM network is set in the LSTM hidden layer, which can accurately capture the multi-dimensional change pattern of the time series data in the time domain and the frequency domain, thereby establishing a nonlinear mapping relationship between the input variables and the target function.
[0028] Preferably, a Dropout layer is set in the LSTM hidden layer to prevent model overfitting, and 30% of the neuron outputs are randomly discarded.
[0029] The application also provides a fall detection algorithm model of a wearable device for stroke patients, which is obtained by using the construction method described above.
[0030] Preferably, after the model training is completed, all neurons of the previous layer are connected to all neurons of the current layer through a fully connected layer, Sigmoid() is used as an activation function, the output is mapped to the interval [0, 1], and the prediction result is represented;
[0031] Finally, a solution is provided, and it is judged whether it is a fall or normal behavior and recorded in the log.
[0032] Compared with the prior art, the application has the following beneficial effects:
[0033] The fall detection algorithm model of the wearable device for stroke patients provided by the application solves the problem of large volume and generalization of the fall detection model in the current wearable device. The collaborative optimization of multi-physical quantity coupling feature decoupling and time series dynamic modeling is realized, and the medical-level fall monitoring performance is realized under the resource constraint of the wearable device.
[0034] In addition, the STL-LSTM model is designed, and the effect of accurately monitoring the falling of the stroke patient by using the low-volume model is realized. Compared with the traditional time sequence network, the dimension of the hidden layer of the model is reduced from 64 to 16, the memory occupation is reduced by 80%, and the model accuracy is increased from 95.93% to 99.73%. BRIEF DESCRIPTION OF DRAWINGS
[0035] Figure 1 It is a flowchart of a fall detection algorithm model of a wearable device for a stroke patient in an embodiment of the application;
[0036] Figure 2 It is a complete flowchart of the fall detection algorithm model STL-LSTM of the wearable device for the stroke patient in an embodiment of the application;
[0037] Figure 3 It is a fall detection algorithm model IMU data decomposition cycle flowchart of a wearable device for a stroke patient in an embodiment of the application;
[0038] Figure 4 It is a deep learning model framework diagram of a fall detection algorithm model of a wearable device for a stroke patient in an embodiment of the application;
[0039] Figure 5 It is a comparison diagram of the loss curve and the model accuracy of the traditional model and the model of the application;
[0040] Figure 6 It is the loss curve and the model accuracy of the STL-LSTM of the fall detection algorithm model of the wearable device for the stroke patient in an embodiment of the application;
[0041] Figure 7 It is the accuracy rate verification comparison of the LSTM2 and the STL-LSTM of the application;
[0042] Figure 8 It is the confusion matrix of the LSTM2 and the STL-LSTM in the application. DETAILED DESCRIPTION
[0043] The application will be further described in detail below in combination with specific embodiments.
[0044] A fall detection algorithm model of a wearable device for a stroke patient, please refer to Figure 1 , the model is realized by the following process:
[0045] S1: data collection and screening:
[0046] The posture information of the wearer is obtained by using the inertial sensor IMU in the wearable device, mainly two three-axis accelerometers and one three-axis gyroscope data;
[0047] After data collection is completed, the raw data is low-pass filtered to retain the low-frequency components in the signal and filter out the thermal noise of the sensor circuit (>100Hz), the high-frequency jitter caused by the micro-tremors of human muscles (10-50Hz), and the random high-frequency jitter caused by the friction between the equipment and clothing.
[0048] Specifically, the raw sensor data at time t Low-pass filtering is performed to obtain the filtered sensor data I. t :
[0049]
[0050] Where b and a are the numerator and denominator coefficients of the filter. Filtering can improve the quality of subsequent feature decomposition and model training.
[0051] S2: Data Processing
[0052] The inertial sensor data acquired at time t Based on the STL cyclic trend decomposition method, LOESS (Local Estimation Smoothing) is used to process the inertial sensor data I... t Decomposed into trend components Seasonal portion and residual components Right now
[0053]
[0054] in,
[0055] For example:
[0056] by For example, after performing STL cyclic trend decomposition, we can obtain:
[0057]
[0058] in The trend component of the accelerometer is estimated using LOESS to predict the long-term trend. This component can be used to better monitor slow falls that are difficult to detect using traditional methods.
[0059] It is the seasonal component of the accelerometer, which focuses on the periodic patterns of the data. It can capture repetitive patterns within a fixed period. Stroke patients often have hemiplegia or gait asymmetry. The seasonal component can capture the periodic patterns in walking and quantify gait asymmetry by analyzing the time difference and amplitude difference of the left and right strides.
[0060] Residual component in data, which represents the part of original data that cannot be explained by trend and seasonal components, contains sudden events, measurement noise, outliers, etc. When wearer's acceleration produces a sudden change, spikes in residual component can be seen, providing alert information. By filtering out residual component in daily life, sensor electronic noise and environmental interference can be limitedly shielded.
[0061] Decomposed data will provide more reliable decisions for fall detection:
[0062]
[0063] Obtain decomposed data After that, to ensure data validity, eliminate dimension differences of different sensor types, and enhance model robustness, normalize the data:
[0064]
[0065] On the other hand, the numerical range of the three components of season, residual, and trend is very different, and normalization avoids the dominance of a certain component in the learning process.
[0066] For details, please refer to Figure 2 and Figure 3 In an embodiment, after obtaining 9-axis IMU data and completing low-pass filtering of the data, the obtained data I t is decomposed by STL, and the IMU data decomposition cycle steps are as follows:
[0067] Step 1, IMU data minus the trend component of the last round result used as the derivation of each component of this round.
[0068] Step 2, integrate data at different times within a short time period, use LOESS with smoothing parameter n s for local weighted regression smoothing to obtain smoothed time series C t+1 .
[0069] Step 3, LOESS with smoothing parameter n t is performed on the smoothed time series C t+1 obtained in the last step to obtain a subsequence
[0070] Step 4, time series data minus trend feature subsequence, to obtain seasonal component
[0071] Step 5, IMU data removes seasonal component, Prepare for the trend component of the IMU.
[0072] Step 6, the data obtained in step 5 is smoothed with a LOESS regression with a smoothing parameter n t The trend component of the IMU data is obtained After obtaining the seasonal component and the trend component, it is determined whether the result converges, and the next cycle or STL decomposition data is output.
[0073] S3: Model building and training
[0074] After data processing, LSTM (Long Short Term Memory) is used to model the time sequence of each inertial sensor component.
[0075] Compared with traditional deep learning algorithms, the application further extracts key features through STL cyclic trend decomposition, and makes bidirectional LSTM focus on learning useful information, effectively reduces the dimension of the hidden layer of the trained model, greatly reduces the model size, and realizes low-noise high-precision decision.
[0076] STL cyclic trend decomposition makes each component orthogonal, reducing feature redundancy:
[0077]
[0078] Each component corresponds to a specific motion pattern, and the physical meaning is clear, and LSTM only needs to learn a simple mapping. The model size of the application is small, and the update speed is 3 times faster. After being deployed to a wearable device, it can effectively release the MCU resources, and can be used for additional functions such as ECG monitoring.
[0079] After the model training is completed, all neurons of the previous layer are connected to all neurons of the current layer through a fully connected layer, Sigmoid() is used as the activation function, the output is mapped to the [0, 1] interval, and is used to represent the prediction result. Finally, the solution is divided, and it is judged to be a fall or normal behavior and recorded in the log.
[0080] For details, please refer to Figure 2 and Figure 4 In an embodiment, the IMU data after STL decomposition After normalizing the data , it is input into the deep learning model.
[0081] After the STL feature data of the IMU is input into the model, feature enhancement is realized through a nonlinear layer, so that the LSTM unit can more effectively capture the time-varying characteristics of the motion signal, and at the same time, the gradient attenuation problem of the deep network is alleviated. The main operation is:
[0082]
[0083] wherein is the final input to the network, b N is the bias parameter. A double-layered LSTM network is set in the LSTM hidden layer, which can accurately capture the multi-dimensional change pattern of the time series data in the time domain and the frequency domain, thereby establishing a nonlinear mapping relationship between the input variables and the target function. A Dropout layer is set to prevent model overfitting, and 30% of the neuron outputs are randomly discarded. Finally, through a fully connected layer, the feature mapping output by the LSTM is mapped to the classification result.
[0084] The STL-LSTM model is designed in the application, and the effect of accurately monitoring the falling situation of stroke patients by using a low-volume model is realized. Compared with the traditional time series network, the dimension of the hidden layer of the model is reduced from 64 to 16, the memory occupation is reduced by 80%, and at the same time, the model accuracy is improved from 95.93% to 99.73%.
[0085] The above content will be described below in combination with specific verification tests:
[0086] In the application, the SisFall data set is used for training and testing. The data set uses a three-axis accelerometer and a gyroscope, fixes the inertial sensor on the waist, and contains 15 falls and 19 daily activities. The unique feature of the SisFall data set is that it contains pre-prepared falls and daily activities of the elderly. In order to ensure the rationality of model training and testing, 80% of the data in the fall and normal behavior are randomly extracted as the training set, and 20% of the data are randomly extracted as the test set.
[0087] In the experiment, the traditional LSTM model and the STL-LSTM model are compared, and the experimental parameters are shown in the following table:
[0088] LSTM1 LSTM2 STL-LSTM Number of training iterations 100 100 100 Number of input features 9 9 27 Number of hidden neurons 64 16 16 Model accuracy 97.02% 95.93% 99.73% Model size 2886KB 43KB 52KB
[0089] Please refer to Figures 5-7 It can be seen that the STL-LSTM model of the application has an accuracy of 2.71% higher than that of the traditional LSTM model (LSTM1 in the table), the number of model hidden neurons is reduced by 4 times, and the model volume is reduced by 82%. When the number of neurons of the traditional LSTM model is the same as that of the STL-LSTM (LSTM2 in the table), the STL-LSTM model of the application is only 9kB larger in volume, but the model accuracy is improved by 3.8%.
[0090] The confusion matrix is a visualization tool in the field of machine learning, mainly used for comparing classification results and actual measured values, and can display the accuracy of the classification results in a confusion matrix. The confusion matrices of LSTM2 and STL-LSTM are shown in Figure 8 .
[0091] Based on Figure 8 It can be seen that the traditional model misjudges 15 daily behavior data as falling situations, while the STL-LSTM model does not misjudge daily behavior data as falling situations, and only one example misjudges falling as daily behavior.
[0092] In summary, the application provides a fall detection algorithm model of a wearable device for stroke patients, which is used to solve the problem of large volume and generalization of the fall detection model in the prior art. The collaborative optimization of multi-physical quantity coupling feature decoupling and time sequence dynamic modeling is realized, and the medical level fall monitoring performance is realized under the constraint of wearable device resources.
Claims
1. A method for constructing a fall detection algorithm model of a wearable device for a stroke patient, the method comprising: Comprising the following steps: S1: Data collection and screening: Obtain the posture information of the wearer by using the inertial sensor IMU in the wearable device After the data collection is completed, the original data is low-pass filtered to obtain sensor data I t ; S2: Processing of data: Decompose the inertial sensor data I t at time t into trend component t seasonal component and residual component using LOESS according to STL cycle trend decomposition method Then normalize the data; S3: Model building and training After data processing is complete, LSTM is used to process the data separately. The inertial sensor components are time-series modeled, and the model is trained using the data obtained in S2.
2. The method of claim 1, wherein the method comprises: The low-pass filter processing in S1 is used to filter out sensor circuit thermal noise (> 100 Hz), high-frequency jitter caused by human muscle micro-vibration (10-50 Hz), and random high-frequency jitter generated by equipment and clothing friction.
3. The method of claim 2, wherein the method comprises: determining a plurality of features of the stroke patient; and determining a plurality of weights of the features. The STL cycle trend decomposition method in S2 is as follows: First step, IMU data minus trend component from previous cycle result Used as component derivation for this cycle; Secondly, the data at different time in short time period is integrated, and the local weighted regression smoothing is carried out by using LOESS with smoothing parameter n s to obtain the smoothed time series C t+1 ; Third step, make the LOESS with the smoothing parameter n t+1 of the above step, get the sub-sequence which can reflect the trend characteristics of the sequence t of the above step, get the sub-sequence which can reflect the trend characteristics of the sequence Step 4, the time series data minus the trend characteristic sub-sequence, to obtain the seasonal component Step 5, IMU data remove seasonal component, Prepare for the trend component of the IMU; Step 6: LOESS regression with smoothing parameter n = 0.5 is performed on the data obtained in step 5 to obtain the trend component of the IMU data t Step 6: LOESS regression with smoothing parameter n = 0.5 is performed on the data obtained in step 5 to obtain the trend component of the IMU data After obtaining the seasonal component and the trend component, it is determined whether the result converges, and the next cycle is performed or the STL decomposed IMU data is output The IMU data after STL decomposition is represented as:
4. The method of claim 3, wherein the method comprises: The data normalization processing in S2 is as follows: After the data normalization processing is completed, it is input into the deep learning model.
5. The method of claim 4, wherein the method comprises: determining a fall detection algorithm model of the wearable device for stroke patients by using the data of the stroke patients. After the STL feature data of the IMU in S3 is input into the model, the feature enhancement is realized through the nonlinear layer, so that the LSTM unit can more effectively capture the time-varying characteristics of the motion signal, and at the same time, the gradient attenuation problem of the deep network is alleviated. The main operation is: wherein is the data input to the network, b N is a bias parameter.
6. The method of claim 5, wherein the method comprises: The double-layer cascaded LSTM network is set in the LSTM hidden layer, which can accurately capture the multi-dimensional change pattern of the time series data in the time domain and the frequency domain, thereby establishing the nonlinear mapping relationship between the input variables and the target function.
7. The method of claim 6, wherein the method comprises: The Dropout layer is set in the LSTM hidden layer to prevent model overfitting, and 30% of the neuron outputs are randomly discarded. 8.A fall detection algorithm model of a wearable device for a stroke patient, characterized in that: Obtained by using the construction method of any one of claims 1-7. 9.The fall detection algorithm model of the wearable device for stroke patients according to claim 8, characterized in that: After the model training is completed, all neurons of the previous layer are connected with all neurons of the current layer through the fully connected layer, Sigmoid() is used as the activation function, the output is mapped to the [0, 1] interval, and is used to represent the prediction result; Finally, the solution strategy is performed, and it is judged as falling or normal behavior and recorded in the log.
Citation Information
Cited By
Remote monitoring and health management system for falling risk of stroke patient
CN121839142A
Remote monitoring and health management system for fall risk in stroke patients
CN121839142B