Psychological stress pre-judgment method and device based on motion features
By collecting step data using a triaxial EMS accelerometer, extracting multi-dimensional motion features, and combining them with an improved random forest algorithm, the problem of high cost and low accuracy in psychological stress monitoring in existing technologies has been solved, enabling high-precision psychological stress detection and personalized assessment on low-cost devices.
Patent Information
- Application Number
- CN202610124218.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-29
- Publication Date
- 2026-03-20
AI Technical Summary
Existing psychological stress monitoring technologies rely on physiological signals such as heart rate and skin conductance, which are costly and power-consuming, making it difficult to popularize them in low-cost devices. Furthermore, the lack of a systematic method for extracting step count features limits the accuracy of the detection.
Step data is collected using a triaxial EMS accelerometer, and six multi-dimensional features in three categories—microtremors, movement patterns, and behavioral rhythms—are extracted. Combined with an improved random forest algorithm and individual baselines, feature values are updated continuously to eliminate interference and output real-time psychological stress values.
It achieves high-precision psychological stress detection on low-cost devices, reduces hardware costs and power consumption, improves detection accuracy and individual adaptability, and provides personalized stress assessment and relief suggestions.
Smart Images

Figure CN121694755A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of psychological state detection technology, and in particular to a method and device for predicting psychological stress based on motion characteristics. Background Technology
[0002] Psychological stress is often difficult to quantify accurately through subjective perception. Objective testing data can provide a scientific basis for education and workplace health management, helping individuals or stakeholders to develop personalized adjustment plans. In addition, with the popularization of low-cost wearable devices, the limitations of traditional high-threshold testing solutions have been broken, and the public's demand for convenient and imperceptible stress monitoring is becoming increasingly prominent.
[0003] Existing psychological stress monitoring technologies mostly rely on physiological signals such as heart rate and skin conductance, which require dedicated sensors. This results in high hardware costs and high power consumption, making them only suitable for mid-to-high-end wearable devices and difficult to popularize in low-cost products such as wristbands.
[0004] Studies have shown that psychological stress can significantly alter human motor behavior characteristics, such as increased microtremors and disordered movement rhythms. However, current technologies lack systematic methods for extracting step count features. Stress status cannot be quantified by a single step count value alone, and individual differences in movement habits are not taken into account. Using fixed thresholds for judgment can easily lead to misjudgments, thus limiting the accuracy of detection. Summary of the Invention
[0005] This invention provides a method for predicting psychological stress based on motion features, which can quantify psychological stress through step count features, reduce false positives, and improve detection accuracy.
[0006] According to one aspect of the present invention, a method for predicting psychological stress based on motion characteristics is provided, comprising: Raw user motion data, including X, Y, and Z axis acceleration data, is collected using a triaxial EMS accelerometer at a sampling frequency of 10-50Hz, and the raw motion data is converted into a time-stamped step sequence. The step sequence is preprocessed to obtain a dynamic motion signal matrix; microtremor features, movement pattern features and behavioral rhythm features are extracted from the dynamic motion signal matrix to form a 6-dimensional feature vector, which includes high-frequency component energy ratio, tremor frequency entropy, movement amplitude variation coefficient, posture transition rate, activity entropy and movement interval fluctuation rate. An initial individual baseline is established by collecting normal step count data for a preset number of days. The initial individual baseline includes the mean baseline feature values of microtremor characteristics, movement pattern characteristics, and behavioral rhythm characteristics. Based on newly generated normal step count data according to a preset time period, the baseline feature values are recalculated and the individual baseline is updated on a rolling basis. The 6-dimensional feature vector is input into the stress assessment model constructed by the improved random forest algorithm. By comparing the deviation of the 6-dimensional feature vector with the individual baseline and combining it with a preset interference elimination mechanism, the real-time psychological stress value is output.
[0007] Optionally, the preprocessing of the step sequence includes: sequentially performing noise filtering, gravity separation, and segmentation on the step sequence to obtain the dynamic motion signal matrix; wherein, the noise filtering includes: performing 5-level db4 wavelet decomposition on the original motion data, using an adaptive threshold function to process high-frequency coefficients, and retaining effective signals in the 0.5-10Hz frequency band; the gravity separation is performed based on Kalman filtering to separate gravity components from dynamic components; the segmentation is performed by using a sliding window to divide the separated dynamic components into frames and outputting the dynamic motion signal matrix.
[0008] Optionally, the step of performing a 5-level db4 wavelet decomposition on the original motion data includes: The raw motion data is subjected to multi-resolution analysis and decomposed into one approximate component and five detail components, retaining the approximate component and the 3rd to 5th order detail components; After filtering noise from the first and second order detail components using an adaptive threshold function, an effective signal in the 0.5-10Hz frequency band is reconstructed.
[0009] Optionally, the microtremor features include high-frequency energy ratio and tremor frequency entropy; the movement pattern features include movement amplitude variation coefficient and posture transition rate; the behavioral rhythm features include activity entropy and movement interval fluctuation rate; correspondingly, the extraction of microtremor features, movement pattern features, and behavioral rhythm features from the dynamic motion signal matrix includes: The energy ratio of the 0.5-3Hz and 3-10Hz high-frequency bands is calculated using the following formula: ; The tremor frequency entropy is calculated using the following formula: ; in, The energy percentage for frequency i; The coefficient of variation of the amplitude of the movement is calculated using the following formula: ; Wherein, σ_peak acceleration is the standard deviation of the peak acceleration within the window, and μ_peak acceleration is the mean of the peak acceleration within the window; The pitch and roll angles are calculated using accelerometer data, and the average value of the angle changes per unit time is taken to obtain the attitude transition rate. The activity intensity within a preset statistical period is statistically analyzed by binning, and the Shannon entropy of the activity intensity distribution is calculated to obtain the activity entropy; The volatility of the action interval is calculated using the following formula: ; Wherein, σ is the standard deviation of the time difference between consecutive actions, and μ is the mean of the time difference between consecutive actions.
[0010] Optionally, after the rolling update of the individual baseline, the method further includes: Exclude step count anomalies caused by non-stress factors; wherein, step count anomalies caused by non-stress factors include: step count changes corresponding to data segments with acceleration values greater than 2g, step count changes corresponding to sleep states with posture angle changes less than 5° and durations exceeding 30 minutes, and step count changes caused by vehicle vibrations identified through spectral analysis.
[0011] Optionally, the interference rejection mechanism includes: Data segments with acceleration values greater than 2g were removed to avoid interference from strenuous exercise on stress assessment; When a change in posture angle is detected to be less than 5° and lasts for more than 30 minutes, it is determined to be a sleep state, and the step data during this period is blocked from participating in the stress assessment. By using spectral analysis, low-frequency periodic signals generated by vehicle vibrations can be distinguished, thus eliminating the influence of changes in the number of steps corresponding to these signals on the evaluation results.
[0012] Optionally, after outputting the real-time psychological stress value, the method further includes: Based on the real-time pressure values, low, medium, and high pressure are categorized, a 24-hour pressure trend curve is generated, and peak pressure periods are marked. Relief suggestions are pushed based on the extracted feature types. These relief suggestions include: when the high-frequency component energy ratio is >1.2, breathing training suggestions are pushed; when the activity entropy exhibits a bimodal disordered distribution, regular sleep and wake cycle suggestions are pushed; and when the coefficient of variation of the movement amplitude increases by a greater than a preset value and the posture transition rate decreases, relaxation training suggestions are pushed.
[0013] According to another aspect of the present invention, a psychological stress prediction device based on motion characteristics is provided, comprising: The step sequence conversion unit is used to collect raw user motion data, including X, Y, and Z axis acceleration data, through a triaxial EMS accelerometer at a sampling frequency of 10-50Hz, and convert the raw motion data into a step sequence with timestamps. The feature vector extraction unit is used to preprocess the step sequence to obtain a dynamic motion signal matrix; extract microtremor features, movement pattern features and behavioral rhythm features from the dynamic motion signal matrix to form a 6-dimensional feature vector, which includes high-frequency component energy ratio, tremor frequency entropy, movement amplitude variation coefficient, posture transition rate, activity entropy and movement interval fluctuation rate. The individual baseline update unit is used to collect normal step data for a preset number of days to establish an initial individual baseline. The initial individual baseline includes the mean baseline feature values of microtremor features, movement pattern features, and behavioral rhythm features. Based on newly generated normal step data according to a preset time period, the baseline feature values are recalculated and the individual baseline is updated on a rolling basis. The psychological stress value output unit is used to input the 6-dimensional feature vector into the stress assessment model constructed by the improved random forest algorithm, and output the real-time psychological stress value by comparing the deviation of the 6-dimensional feature vector with the individual baseline and combining the preset interference elimination mechanism.
[0014] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the motion-feature-based psychological stress prediction method according to any embodiment of the present invention.
[0015] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the psychological stress prediction method based on motion characteristics as described in any embodiment of the present invention.
[0016] According to another aspect of the present invention, a computer program product is provided, the computer program product comprising a computer program that, when executed by a processor, implements the psychological stress prediction method based on motion characteristics as described in any embodiment of the present invention.
[0017] The technical solution of this invention is based on step count data collected by a triaxial MEMS accelerometer. It extracts six multi-dimensional features in three categories: micro-tremors, movement patterns, and behavioral rhythms. Combined with feature validity verification, anomaly correction, and normalization processes, it provides a stable and consistent input for the stress assessment model. The feature extraction logic is directly linked to changes in movement behavior caused by psychological stress. Multi-dimensional feature fusion avoids the limitations of single step count values. At the same time, validity verification and normalization processes improve feature reliability. With the addition of an individual baseline adaptation mechanism, the impact of environmental interference and individual differences on the detection results is reduced, thereby improving the sensitivity of high-pressure state recognition and the overall assessment accuracy.
[0018] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart of a psychological stress prediction method based on motion characteristics provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of a psychological stress prediction device based on motion characteristics provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of an electronic device that implements the psychological stress prediction method based on motion characteristics according to an embodiment of the present invention. Detailed Implementation
[0021] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0022] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0023] Figure 1 This is a flowchart of a method for predicting psychological stress based on motion characteristics, provided by an embodiment of the present invention. This embodiment is applicable to situations where psychological stress is detected through wearable devices. The method can be executed by a motion-based psychological stress prediction device, which can be implemented in hardware and / or software and can be configured in a wearable device. Figure 1 As shown, the method includes: S110: Using a three-axis EMS accelerometer, collect raw user motion data including X, Y, and Z axis acceleration data at a sampling frequency of 10-50Hz, and convert the raw motion data into a time-stamped step sequence.
[0024] Among them, the triaxial MEMS accelerometer is a sensor manufactured using microelectromechanical systems (MEMS) technology. It can simultaneously detect acceleration changes in three orthogonal directions X, Y, and Z axes in space. It can capture various motion states such as walking, raising hands, and micro-tremors of the body. It features small size, low power consumption, and low cost. It is a commonly used core sensor in wearable devices such as smart bracelets and watches, and is also the hardware foundation for data acquisition in this solution.
[0025] Specifically, data is acquired through a triaxial MEMS accelerometer, eliminating the need for additional dedicated sensors and making it compatible with various wearable devices. A sampling frequency of 10-50Hz is set, balancing detection accuracy with device power consumption. The low frequency of 10Hz adapts to the device's low-power mode, while the high frequency of 50Hz accurately captures minute movements, such as pressure-related micro-vibrations, ensuring the capture of subtle movements under pressure without causing a surge in power consumption due to excessively high frequencies. Simultaneously, acceleration data in the X, Y, and Z directions is acquired, covering the spatial characteristics of the user's movement. The sensor's built-in step-counting algorithm identifies the raw acceleration data, determining movement patterns such as walking and running, filtering out invalid vibrations, and counting the user's real-time steps. Each set of step data is timestamped, resulting in a step sequence arranged chronologically. This step sequence includes the step count value and, through timestamps, records the temporal distribution and interval patterns of the movement.
[0026] S120. Preprocess the step sequence to obtain a dynamic motion signal matrix; extract microtremor features, movement pattern features and behavioral rhythm features from the dynamic motion signal matrix to form a 6-dimensional feature vector. The 6-dimensional feature vector includes the high-frequency component energy ratio, tremor frequency entropy, movement amplitude variation coefficient, posture transition rate, activity entropy and movement interval fluctuation rate.
[0027] Among them, microtremor features reflect quantitative parameters of the unconscious subtle vibration state of the human body, and are core related to changes in limb micro-vibration caused by pressure; movement pattern features describe a set of features of the user's limb movement amplitude and posture transition efficiency, which can capture behavioral changes such as stiffness and amplitude fluctuations under pressure; behavioral rhythm features are feature parameters based on the distribution and interval patterns of movement time over 24 hours, which can reflect the phenomenon of activity rhythm disorder caused by pressure; high-frequency component energy ratio: the core parameter of microtremor features, refers to the energy ratio of signals in the 0.5-3Hz frequency band to those in the 3-10Hz frequency band, which increases significantly under high pressure; tremor frequency entropy is calculated using frequency domain Shannon entropy. The entropy value reflects the degree of disorder in the vibration frequency distribution, and decreases under high pressure; the coefficient of variation of motion amplitude is a characteristic parameter of motion mode, which is the ratio of the standard deviation of the peak acceleration within the window to the mean, and increases under high pressure; the attitude transition rate is a characteristic parameter of motion mode, which refers to the average rate of change of pitch angle and roll angle per unit time, and decreases under high pressure; the activity entropy is a characteristic parameter of behavioral rhythm, calculated by Shannon entropy of 24-hour activity intensity distribution, reflecting the regularity of motion time distribution, and shows a bimodal disordered distribution under high pressure; the motion interval volatility is a characteristic parameter of behavioral rhythm, which is the ratio of the standard deviation of the time difference of continuous motion to the mean, and increases under high pressure.
[0028] Specifically, the time-stamped step sequence is first preprocessed using wavelet decomposition for noise reduction, Kalman filtering to separate gravity components, and sliding window segmentation to transform the original motion data into a structured dynamic motion signal matrix. This removes invalid interference information and retains effective dynamic features related to stress. Based on the physiological behavior that psychological stress can lead to increased micro-tremors, abnormal movement patterns, and disordered behavioral rhythms, three core features—micro-tremors, movement patterns, and behavioral rhythms—are extracted from the dynamic motion signal matrix. These features include the energy ratio of high-frequency components and tremor frequency entropy, which reflect subtle vibration changes; the coefficient of variation of movement amplitude and posture transition rate, which describe the movement state; and the activity entropy and movement interval fluctuation rate, which reflect the movement time distribution pattern. These features are then integrated into a standardized 6-dimensional feature vector.
[0029] S130. Collect normal step data for a preset number of days to establish an initial individual baseline. The initial individual baseline includes the mean baseline feature values of microtremor characteristics, movement pattern characteristics, and behavioral rhythm characteristics. Based on the preset time period, recalculate the baseline feature values based on the newly generated normal step data and update the individual baseline on a rolling basis.
[0030] Specifically, the system collects users' normal step count data for a preset number of days (e.g., 14 days). During this period, abnormal scenario data such as strenuous exercise, sleep, and vehicle vibration are automatically filtered out. From the valid data, three types of features are extracted: micro-tremors, movement patterns, and behavioral rhythms. The statistical mean of each feature is calculated to form an initial individual baseline containing multi-dimensional mean benchmarks, accurately depicting the user's exercise behavior characteristics under stress-free conditions. Subsequently, according to a preset time period (e.g., 7 days), newly generated normal step count data is continuously collected from users. Normal step count data refers to the number of steps and corresponding exercise data generated by users under no significant stress and with stable exercise habits. Interference data from abnormal scenarios such as strenuous exercise and special environments are excluded to ensure that the baseline can truly reflect the individual's daily exercise behavior characteristics. Based on the updated dataset, the mean benchmark values of various features are recalculated, and the initial individual baseline is continuously optimized to ensure that the baseline can dynamically adapt to the slow changes in users' exercise habits, such as increases or decreases in daily activity levels and adjustments to work and rest schedules. This ensures that when assessing stress, the deviation between real-time features and the baseline is only due to behavioral changes caused by psychological stress, rather than individual habit differences, significantly improving the accuracy and individual adaptability of stress detection.
[0031] S140. Input the 6-dimensional feature vector into the stress assessment model constructed by the improved random forest algorithm. By comparing the deviation of the 6-dimensional feature vector with the individual baseline and combining the preset interference elimination mechanism, output the real-time psychological stress value.
[0032] The standardized 6-dimensional feature vector, formed after preprocessing and feature extraction, is input into a stress assessment model built on an improved random forest algorithm. This model can be trained using a labeled dataset of 120 people per day, and microtremor features are given higher weights to improve the sensitivity of high stress identification. The core operation logic of the model is to calculate the deviation of each feature in the real-time 6-dimensional feature vector from the mean baseline feature value corresponding to the individual baseline, accurately capturing the changes in movement behavior characteristics caused by stress. At the same time, a preset interference elimination mechanism is activated during the deviation calculation process. By filtering out strenuous exercise, blocking sleep state, and identifying vehicle vibration, invalid deviations caused by non-stress factors are eliminated, ensuring that only effective deviations strongly correlated with psychological stress are retained. The model is based on a comprehensive quantitative analysis of effective deviations to obtain a real-time psychological stress value. The real-time psychological stress value is the quantitative stress result output by the model, with a value range of 0-100. The value directly corresponds to the stress level. For example, 0-30 is low stress, 31-60 is medium stress, and 61-100 is high stress, which can intuitively reflect the user's current psychological stress state and achieve accurate quantitative assessment of the user's current psychological stress state.
[0033] In this embodiment of the invention, the step sequence is preprocessed, including: performing noise filtering, gravity separation, and segmentation on the step sequence sequentially to obtain a dynamic motion signal matrix; wherein, noise filtering includes: performing 5-level db4 wavelet decomposition on the original motion data, using an adaptive threshold function to process high-frequency coefficients, and retaining the effective signal in the 0.5-10Hz frequency band; gravity separation, using Kalman filtering to separate gravity components from dynamic components; segmentation, using a sliding window to divide the separated dynamic components into frames, and outputting a dynamic motion signal matrix.
[0034] Specifically, the preprocessing of the step sequence first involves noise filtering. The original motion data is decomposed into components of different frequency bands using a 5-layer db4 wavelet decomposition. Then, an adaptive threshold function is used to precisely filter high-frequency detail components, eliminating noise such as environmental interference and sensor errors, while retaining effective signals strongly correlated with pressure and motion within the 0.5-10Hz frequency band. Gravity separation is performed based on the Kalman filter algorithm. By establishing state and observation equations, the gravity and dynamic components in the original signal are dynamically estimated and separated, highlighting pressure-related dynamic motion characteristics. Finally, segmentation processing is performed. A sliding window is used to continuously frame the separated dynamic components, dividing the continuous dynamic signal into several structured data segments of fixed duration. These segments are arranged in chronological order to form a dynamic motion signal matrix, which preserves the temporal correlation of motion characteristics while standardizing the data.
[0035] In this embodiment of the invention, the raw motion data undergoes a 5-level db4 wavelet decomposition, including: Multi-resolution analysis was performed on the raw motion data, decomposing it into one approximate component and five detail components, while retaining the approximate component and the 3rd to 5th order detail components. After filtering noise from the first and second order detail components using an adaptive threshold function, an effective signal in the 0.5-10Hz frequency band is reconstructed.
[0036] Specifically, the original data is decomposed into one approximate component reflecting the basic low-frequency characteristics and five detail components corresponding to different high-frequency bands through multi-resolution analysis. The approximate component and the 3rd to 5th order detail components are retained. This part contains key features related to human movement and pressure micro-vibrations. At the same time, an adaptive threshold function is used to accurately filter the 1st and 2nd order detail components, mainly noise signals such as environmental interference and sensor errors. Finally, the processed approximate component, the 3rd to 5th order detail components and the filtered 1st and 2nd order detail components are used to reconstruct the signal to obtain the effective signal in the 0.5-10Hz frequency band.
[0037] In this embodiment of the invention, microtremor features include high-frequency energy ratio and tremor frequency entropy; movement pattern features include movement amplitude variation coefficient and posture transition rate; behavioral rhythm features include activity entropy and movement interval fluctuation rate; correspondingly, microtremor features, movement pattern features, and behavioral rhythm features are extracted from the dynamic motion signal matrix, including: The energy ratio of the 0.5-3Hz and 3-10Hz high-frequency bands is calculated using the following formula: ; The tremor frequency entropy can be calculated using the following formula: ; in, The energy percentage for frequency i; The coefficient of variation of the amplitude of motion is calculated using the following formula: ; Wherein, σ_peak acceleration is the standard deviation of the peak acceleration within the window, and μ_peak acceleration is the mean of the peak acceleration within the window; The pitch and roll angles are calculated using accelerometer data, and the attitude transition rate is obtained by taking the average value of the angle changes per unit time. The activity intensity within a preset statistical period is statistically analyzed by binning, and the Shannon entropy of the activity intensity distribution is calculated to obtain the activity entropy; The volatility of the action interval is calculated using the following formula: ; Wherein, σ is the standard deviation of the time difference between consecutive actions, and μ is the mean of the time difference between consecutive actions.
[0038] The high-frequency energy ratio refers to the energy ratio of the 0.5-3Hz frequency band to the 3-10Hz frequency band in dynamic motion signals. It is obtained by calculating the ratio of the sum of the squares of the amplitudes of the two frequency band signals after Fast Fourier Transform. This ratio will increase significantly when psychological stress increases.
[0039] Tremor frequency entropy is calculated based on the frequency domain Shannon entropy algorithm, by statistically analyzing the proportion of energy of each frequency component to the total energy. Substituting into the entropy formula, we obtain the result, which reflects the degree of disorder in the distribution of microtremor frequencies. Under high pressure, the distribution of human microtremor frequencies tends to be concentrated, and the entropy value will decrease significantly.
[0040] The coefficient of variation of motion amplitude is the ratio of the standard deviation of the peak acceleration to the mean within a sliding window. It is used to reflect the degree of fluctuation in motion amplitude. When psychological stress increases, the stability of human motion decreases, and this coefficient will increase significantly.
[0041] The attitude transition rate is obtained by calculating the pitch and roll angles of the human body using accelerometer data and taking the average value of the changes in the two types of angles per unit time. It reflects the efficiency and smoothness of attitude transition. Under high pressure, the human body tends to be stiff during attitude transition, and this rate will decrease significantly.
[0042] Activity entropy is obtained by calculating the Shannon entropy of the activity intensity distribution after binning the activity intensity within a preset period. It reflects the regularity of the activity time distribution. Under high pressure, the distribution of human activity is prone to disordered states such as bimodal disorder, and the entropy value will change significantly.
[0043] The volatility of the action interval is the ratio of the standard deviation to the mean of the time difference between consecutive actions. It is used to reflect the stability of the action interval. When psychological stress increases, the stability of human behavioral rhythm decreases, and this volatility will increase significantly.
[0044] To analyze the micro-flutter characteristics, the sum of squares of the amplitudes of the signals in the 0.5-3Hz and 3-10Hz frequency bands was calculated using Fast Fourier Transform, and then the energy ratio of the high-frequency band was obtained using the formula mentioned above. The proportion of energy of each frequency component to the total energy was then calculated. Substituting into the Shannon entropy formula, we obtain the tremor frequency entropy. For the characteristics of the movement pattern, we first statistically analyze the standard deviation σ of the peak acceleration and the mean μ of the peak acceleration within the sliding window, calculate the coefficient of variation of the movement amplitude according to the above formula, and then solve the pitch angle and roll angle through accelerometer data. We take the mean of the two types of angle changes per unit time as the attitude transition rate. For the characteristics of the behavioral rhythm, we first perform binning statistics on the activity intensity within the preset statistical period, calculate the Shannon entropy of the distribution to obtain the activity entropy, and then statistically analyze the standard deviation σ of the time difference between continuous movements σ of the movement interval and the mean μ of the movement interval to obtain the movement interval volatility. We integrate the above six parameters to form a complete 6-dimensional feature vector.
[0045] In this embodiment of the invention, after the individual baseline is updated on a rolling basis, the method further includes: Step count anomalies caused by non-stress factors were excluded. These non-stress factor anomalies included: step count changes corresponding to data segments with acceleration values greater than 2g, step count changes corresponding to sleep states with posture angle changes less than 5° and durations exceeding 30 minutes, and step count changes caused by vehicle vibrations identified through spectral analysis.
[0046] Specifically, after completing the rolling update of the individual baseline, abnormal step counts caused by non-stress factors are excluded. Three types of step count changes unrelated to psychological stress are screened and eliminated through preset judgment rules: First, step count fluctuations corresponding to data segments with acceleration values greater than 2g are identified, as such data mostly originate from strenuous exercise and are unrelated to stress; second, states with posture angle changes of less than 5° and a duration of more than 30 minutes are identified as sleep states, and step count changes in this state are masked; third, vibration signals from vehicles with low-frequency periodic characteristics are identified through spectrum analysis, and step count changes caused by these signals are excluded. This ensures that the deviation between real-time motion characteristics and the individual baseline in subsequent stress assessments is only caused by psychological stress, avoiding irrelevant interference from affecting the accuracy of the detection.
[0047] In this embodiment of the invention, the interference elimination mechanism includes: Data segments with acceleration values greater than 2g were removed to avoid interference from strenuous exercise on stress assessment; When a change in posture angle is detected to be less than 5° and lasts for more than 30 minutes, it is determined to be a sleep state, and the step data during this period is blocked from participating in the stress assessment. By using spectral analysis, low-frequency periodic signals generated by vehicle vibrations can be distinguished, thus eliminating the influence of changes in the number of steps corresponding to these signals on the evaluation results.
[0048] Specifically, the interference elimination mechanism filters out non-stress interference through three rules: real-time monitoring of acceleration values in motion data, eliminating step count changes corresponding to data segments with acceleration greater than 2g to prevent abnormal motion characteristics caused by vigorous exercise from interfering with stress assessment results; continuous tracking of posture angle changes, automatically determining that the user is asleep when a posture angle change of less than 5° is detected and the duration of this state exceeds 30 minutes, blocking all step count data during this period to ensure that rest or unconscious movements during sleep do not affect stress assessment; and frequency domain analysis of motion signals to identify the low-frequency periodic signal characteristics unique to vehicle vibration, thereby eliminating step count changes corresponding to such signals, avoiding misjudgments caused by external environmental vibrations, and ensuring that the motion characteristics input to the stress assessment model are only related to psychological stress, improving the reliability and accuracy of the assessment results.
[0049] In this embodiment of the invention, after outputting the real-time psychological stress value, the method further includes: Based on real-time pressure values, low, medium, and high pressure are categorized, and a 24-hour pressure trend curve is generated, marking peak pressure periods. Relief suggestions are pushed based on extracted feature types, including: when the high-frequency component energy ratio is >1.2, breathing training suggestions are pushed; when the activity entropy shows a bimodal disordered distribution, regular rest suggestions are pushed; when the coefficient of variation of movement amplitude increases by more than a preset value and the posture transition rate decreases, relaxation training suggestions are pushed.
[0050] Specifically, based on the real-time stress value range, it is divided into three stress levels: low, medium, and high, allowing users to quickly perceive their own stress status. Then, a 24-hour stress trend curve is generated based on historical data, visually presenting the stress change pattern over time and marking peak periods where stress values are concentrated in the high range, clearly identifying key stress-focused points. Finally, combining the specific states of three types of features obtained during the feature extraction phase—microtremors, movement patterns, and behavioral rhythms—targeted relief suggestions are pushed. When the high-frequency component energy ratio is detected to be >1.2 (abnormal microtremor features), breathing training suggestions are pushed to regulate the autonomic nervous system and reduce microtremors. When the activity entropy shows a bimodal disordered distribution (disordered behavioral rhythm features), regular sleep suggestions are pushed to regulate activity rhythms and stabilize physical and mental state. When the coefficient of variation of movement amplitude increases beyond a preset value and the posture transition rate decreases (abnormal movement pattern features), relaxation training suggestions are pushed to improve movement stiffness and relieve muscle tension, helping users to specifically regulate stress.
[0051] For example, breathing training suggestions may include: finding a quiet environment to sit or lie down, placing your hands naturally on your abdomen, closing your eyes and relaxing; slowly inhaling through your nose to fully inhale oxygen; holding your breath to allow oxygen to circulate fully in your body and regulate your autonomic nervous system; slowly exhaling through your mouth to expel air evenly, while feeling the micro-tremors in your limbs gradually subside, quickly calming sympathetic nerve excitation and reducing unconscious micro-tremors caused by stress.
[0052] Regular routines can include fixed sleep times, fixed activity times, fixed meal times, and fixed eating times to avoid completely disrupting the routine and causing further disruption of activity entropy.
[0053] Relaxation training suggestions can include progressive muscle relaxation, limb stretching exercises, and training frequency recommendations. By specifically relaxing muscles and improving limb flexibility, these exercises can improve problems such as large fluctuations in the range of motion and stiffness in posture transitions caused by stress, while simultaneously relieving psychological tension.
[0054] Figure 2 This is a schematic diagram of a psychological stress prediction device based on motion characteristics provided in an embodiment of the present invention. Figure 2 As shown, the device includes: The step sequence conversion unit 210 is used to collect raw user motion data, including X, Y, and Z axis acceleration data, through a triaxial EMS accelerometer at a sampling frequency of 10-50Hz, and convert the raw motion data into a step sequence with timestamps. The feature vector extraction unit 220 is used to preprocess the step sequence to obtain a dynamic motion signal matrix; microtremor features, movement pattern features and behavioral rhythm features are extracted from the dynamic motion signal matrix to form a 6-dimensional feature vector. The 6-dimensional feature vector includes the high-frequency component energy ratio, tremor frequency entropy, movement amplitude variation coefficient, posture transition rate, activity entropy and movement interval fluctuation rate. The individual baseline update unit 230 is used to collect normal step data for a preset number of days to establish an initial individual baseline. The initial individual baseline includes the mean baseline feature values of microtremor features, movement pattern features, and behavioral rhythm features. Based on the preset time period, the baseline feature values are recalculated based on the newly generated normal step data, and the individual baseline is updated on a rolling basis. The psychological stress value output unit 240 is used to input a 6-dimensional feature vector into a stress assessment model constructed by an improved random forest algorithm. By comparing the deviation of the 6-dimensional feature vector with the individual baseline and combining it with a preset interference elimination mechanism, it outputs the real-time psychological stress value.
[0055] The motion-based psychological stress prediction device provided in this embodiment of the invention can execute the motion-based psychological stress prediction method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0056] Figure 3 A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0057] like Figure 3As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0058] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0059] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as a psychological stress prediction method based on motion characteristics.
[0060] In some embodiments, the motion-based psychological stress prediction method can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the motion-based psychological stress prediction method described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the motion-based psychological stress prediction method by any other suitable means (e.g., by means of firmware).
[0061] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0062] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0063] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0064] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0065] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0066] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0067] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0068] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for predicting psychological stress based on motion characteristics, characterized in that, include: Raw user motion data, including X, Y, and Z axis acceleration data, is collected using a triaxial EMS accelerometer at a sampling frequency of 10-50Hz, and the raw motion data is converted into a time-stamped step sequence. The step sequence is preprocessed to obtain a dynamic motion signal matrix; microtremor features, movement pattern features and behavioral rhythm features are extracted from the dynamic motion signal matrix to form a 6-dimensional feature vector, which includes high-frequency component energy ratio, tremor frequency entropy, movement amplitude variation coefficient, posture transition rate, activity entropy and movement interval fluctuation rate. An initial individual baseline is established by collecting normal step count data for a preset number of days from the user. The initial individual baseline includes the mean baseline feature values of microtremor characteristics, movement pattern characteristics, and behavioral rhythm characteristics. Based on the newly generated normal step count data, the baseline feature value is recalculated according to the preset time period, and the individual baseline is updated on a rolling basis. The 6-dimensional feature vector is input into the stress assessment model constructed by the improved random forest algorithm. By comparing the deviation of the 6-dimensional feature vector with the individual baseline and combining it with a preset interference elimination mechanism, the real-time psychological stress value is output.
2. The method according to claim 1, characterized in that, The preprocessing of the step sequence includes: sequentially performing noise filtering, gravity separation, and segmentation on the step sequence to obtain the dynamic motion signal matrix; wherein, the noise filtering includes: performing 5-level db4 wavelet decomposition on the original motion data, using an adaptive threshold function to process high-frequency coefficients, and retaining the effective signal in the 0.5-10Hz frequency band; the gravity separation is performed based on Kalman filtering to separate the gravity component from the dynamic component; the segmentation is performed by using a sliding window to divide the separated dynamic component into frames and outputting the dynamic motion signal matrix.
3. The method according to claim 2, characterized in that, The step of performing a 5-level db4 wavelet decomposition on the raw motion data includes: The raw motion data is subjected to multi-resolution analysis and decomposed into one approximate component and five detail components, retaining the approximate component and the 3rd to 5th order detail components; After filtering noise from the first and second order detail components using an adaptive threshold function, an effective signal in the 0.5-10Hz frequency band is reconstructed.
4. The method according to claim 1, characterized in that, The microtremor features include high-frequency energy ratio and tremor frequency entropy; the movement pattern features include movement amplitude variation coefficient and posture transition rate; the behavioral rhythm features include activity entropy and movement interval fluctuation rate; correspondingly, the extraction of microtremor features, movement pattern features, and behavioral rhythm features from the dynamic motion signal matrix includes: The energy ratio of the 0.5-3Hz and 3-10Hz high-frequency bands is calculated using the following formula: ; The tremor frequency entropy is calculated using the following formula: ;in, The energy percentage for frequency i; The coefficient of variation of the amplitude of the movement is calculated using the following formula: ; Wherein, σ_peak acceleration is the standard deviation of the peak acceleration within the window, and μ_peak acceleration is the mean of the peak acceleration within the window; The pitch and roll angles are calculated using accelerometer data, and the average value of the angle changes per unit time is taken to obtain the attitude transition rate. The activity intensity within a preset statistical period is statistically analyzed by binning, and the Shannon entropy of the activity intensity distribution is calculated to obtain the activity entropy; The volatility of the action interval is calculated using the following formula: ; Wherein, σ is the standard deviation of the time difference between consecutive actions, and μ is the mean of the time difference between consecutive actions.
5. The method according to claim 1, characterized in that, After the individual baseline is updated in a rolling manner, the method further includes: Exclude step count anomalies caused by non-stress factors; wherein, step count anomalies caused by non-stress factors include: step count changes corresponding to data segments with acceleration values greater than 2g, step count changes corresponding to sleep states with posture angle changes less than 5° and durations exceeding 30 minutes, and step count changes caused by vehicle vibrations identified through spectral analysis.
6. The method according to claim 1, characterized in that, The interference elimination mechanism includes: Data segments with acceleration values greater than 2g were removed to avoid interference from strenuous exercise on stress assessment; When a change in posture angle is detected to be less than 5° and lasts for more than 30 minutes, it is determined to be a sleep state, and the step data during this period is blocked from participating in the stress assessment. By using spectral analysis, low-frequency periodic signals generated by vehicle vibrations can be distinguished, thus eliminating the influence of changes in the number of steps corresponding to these signals on the evaluation results.
7. The method according to claim 4, characterized in that, After outputting the real-time psychological stress value, the method further includes: Based on the real-time pressure values, low, medium, and high pressure are categorized, a 24-hour pressure trend curve is generated, and peak pressure periods are marked. Relief suggestions are pushed based on the extracted feature types. These relief suggestions include: when the high-frequency component energy ratio is >1.2, breathing training suggestions are pushed; when the activity entropy exhibits a bimodal disordered distribution, regular sleep and wake cycle suggestions are pushed; and when the coefficient of variation of the movement amplitude increases by a greater than a preset value and the posture transition rate decreases, relaxation training suggestions are pushed.
8. A psychological stress prediction device based on motion characteristics, characterized in that, include: The step sequence conversion unit is used to collect raw user motion data, including X, Y, and Z axis acceleration data, through a triaxial EMS accelerometer at a sampling frequency of 10-50Hz, and convert the raw motion data into a step sequence with timestamps. The feature vector extraction unit is used to preprocess the step sequence to obtain a dynamic motion signal matrix; extract microtremor features, movement pattern features and behavioral rhythm features from the dynamic motion signal matrix to form a 6-dimensional feature vector, which includes high-frequency component energy ratio, tremor frequency entropy, movement amplitude variation coefficient, posture transition rate, activity entropy and movement interval fluctuation rate. The individual baseline update unit is used to collect normal step data for a user's preset number of days to establish an initial individual baseline. The initial individual baseline includes the mean baseline feature values of microtremor features, movement pattern features, and behavioral rhythm features. Based on the newly generated normal step count data, the baseline feature value is recalculated according to the preset time period, and the individual baseline is updated on a rolling basis. The psychological stress value output unit is used to input the 6-dimensional feature vector into the stress assessment model constructed by the improved random forest algorithm, and output the real-time psychological stress value by comparing the deviation of the 6-dimensional feature vector with the individual baseline and combining the preset interference elimination mechanism.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the psychological stress prediction method based on motion characteristics according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the psychological stress prediction method based on motion characteristics as described in any one of claims 1-7.
11. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the psychological stress prediction method based on motion characteristics according to any one of claims 1-7.