Relaxation degree calculation method based on dynamic threshold heart rate analysis and physiological constraint model

By using dynamic threshold heart rate analysis and physiological constraint models, the problems of poor anti-interference ability and insufficient real-time performance in mental health assessments have been solved, achieving a stable and comprehensive assessment of psychological relaxation.

CN122056593APending Publication Date: 2026-05-19DALIAN NEUSOFT UNIV OF INFORMATION
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
DALIAN NEUSOFT UNIV OF INFORMATION
Filing Date
2026-02-03
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing technologies have poor resistance to interference in mental health assessments, cannot adapt to dynamic physiological changes within and between individuals, lack real-time performance, and have a single assessment dimension, resulting in high false positive and false negative rates and unstable assessment results.

Method used

A method based on dynamic threshold heart rate analysis and physiological constraint model is adopted. PPG signals are acquired through ear clip sensors, Kalman filtering and dynamic threshold calculation are performed to extract time domain and frequency domain features, and feature fusion is performed by combining dynamic weighting and physiological constraint module. Finally, consistency discrimination and relaxation degree calculation are performed in the output module.

Benefits of technology

It effectively filters out noise interference, improves system stability and adaptability, enables continuous online assessment of psychological relaxation, and enhances the comprehensiveness and reliability of assessment results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122056593A_ABST
    Figure CN122056593A_ABST
Patent Text Reader

Abstract

The invention discloses a relaxation degree calculation method based on dynamic threshold heart rate analysis and a physiological constraint model. The relaxation degree calculation method comprises the steps that a single-sample PPG signal is collected through an ear clip type sensor; performing cleaning and feature extraction on the signals to obtain heart rate basic data and time domain features; further extracting an RR interval sequence, and performing frequency domain conversion and psychological feature evaluation to obtain frequency domain features and psychological features; performing weighted fusion on the time domain and frequency domain features by using a dynamic weighting and physiological constraint module to obtain weighted features; and finally, based on the multi-sample data stored in the annular buffer area, performing feature consistency check, calculating psychological features meeting consistency conditions, and outputting a final psychological relaxation degree value. According to the method, dynamic threshold heart rate analysis and the physiological constraint model are combined, the accuracy and reliability of relaxation degree evaluation are effectively improved, and the method is suitable for real-time and continuous psychological state monitoring.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of biosignal processing and mental health assessment, and in particular to a method for calculating relaxation level based on dynamic threshold heart rate analysis and physiological constraint model. Background Technology

[0002] With the increasing prominence of mental health issues, real-time, accurate, and reliable monitoring of psychological relaxation has become an urgent need in the field of health management. Traditional methods, which are mostly based on static thresholds for heart rate variability analysis, have several limitations: First, they have poor anti-interference capabilities and are prone to false positives or false negatives due to noise such as motion artifacts and signal drift. Second, they cannot adapt to dynamic physiological changes within and between individuals, and fixed thresholds lead to unstable results in different states or for different users. Third, most methods focus on post-event analysis, lacking real-time capability and making it difficult to achieve continuous, online feedback on psychological state. Finally, the evaluation dimensions are singular, usually relying only on individual indicators in the time or frequency domains, failing to integrate multiple features for comprehensive judgment, thus limiting the comprehensiveness and reliability of the evaluation results. Summary of the Invention

[0003] This invention provides a method for calculating relaxation level based on dynamic threshold heart rate analysis and physiological constraint model to overcome the above-mentioned problems.

[0004] To achieve the above objectives, the technical solution of the present invention is as follows: A method for calculating relaxation level based on dynamic threshold heart rate analysis and a physiological constraint model, characterized by comprising: S1. Acquire the PPG signal of a single sample using an ear clip sensor; S2. The heart rate feature extraction module cleans and extracts features from the PPG signal of a single sample to obtain the basic heart rate data and time-domain features of the single sample, and stores them in a circular buffer. The baseline heart rate data for a single sample includes: effective RR interval and effective heart rate; The time-domain features include the standard deviation of the normal RR interval and the root mean square of the difference between adjacent RR intervals; S3. Extract equally spaced RR interval sequences from the basic heart rate data of a single sample using the frequency domain analysis module, and perform frequency domain transformation and psychological feature assessment to obtain the frequency domain features and psychological features of the single sample, and store them in a circular buffer. The frequency domain characteristics include low-frequency power and high-frequency power; The psychological characteristics include psychological harmony value, relaxation value, and instantaneous stress value; S4. The time-domain and frequency-domain features of a single sample are weighted and fused through the dynamic weighting and physiological constraint module to obtain the weighted time-domain features, weighted frequency-domain features and weighted psychological harmony value of the single sample, and stored in the circular buffer. The weighted time-domain features include the weighted standard deviation of normal RR intervals and the root mean square of the weighted difference between adjacent RR intervals; The weighted frequency domain features include weighted low-frequency power and weighted high-frequency power; S5. Extract psychological features, weighted time-domain features, and weighted frequency-domain features of multiple samples from the circular buffer through the output module, and perform a consistency check on the weighted time-domain features, weighted frequency-domain features, and weighted psychological harmony values ​​of multiple samples; if the consistency condition is not met, remove the psychological features of the samples; otherwise, calculate the psychological features to obtain the final psychological relaxation value.

[0005] Furthermore, the heart rate feature extraction module includes a Kalman filter calculation block, a dynamic threshold calculation block, an RR interval calculation block, an effective heart rate calculation block, a time-domain feature calculation block, and a first storage block; The Kalman filter calculation block is used to perform Kalman filtering on the PPG signal to reduce noise and obtain a denoised signal sequence. The dynamic threshold calculation block is used to obtain the maximum and minimum values ​​of the denoised signal sequence based on the denoised signal sequence; and to calculate and obtain the dynamic threshold based on the maximum and minimum values ​​of the denoised signal sequence. The RR interval calculation block is used to mark the denoised signal in the denoised signal sequence that is greater than the dynamic threshold as a potential rising edge of the heartbeat, based on the denoised signal sequence and the dynamic threshold; if the interval between two adjacent potential rising edges of the heartbeat is greater than the calculated dynamic de-jitter time threshold, then the potential rising edge of the heartbeat is marked as a real rising edge of the heartbeat; the difference between the time points corresponding to two adjacent real rising edges of the heartbeat is calculated, and the time difference is used as the RR interval. The effective heart rate calculation block is used to compare the RR interval with the physiological constraint range, and to take the RR interval within the physiological constraint range as the effective RR interval; based on the effective RR interval, the effective heart rate is obtained through the heart rate calculation formula; The time-domain feature calculation block is used to obtain the root mean square of the standard deviation of the normal RR interval that reflects heart rate variability and the root mean square of the difference between adjacent RR intervals that reflects parasympathetic activity, through the effective RR interval. The first storage block is used to store the effective RR interval, effective heart rate, standard deviation of normal RR interval, and root mean square of the difference between adjacent RR intervals into a circular buffer.

[0006] Furthermore, the expressions for calculating the maximum and minimum values ​​of the denoised signal sequence are as follows:

[0007]

[0008] In the formula, The maximum value of the noise-reducing signal sequence; for The maximum value of the noise-reduced signal sequence at any given time; The decay factor is the historical maximum value; The minimum value of the noise-reduced signal sequence; for The minimum value of the signal sequence for noise reduction at any given time; The growth factor is the historical minimum value; For the noise reduction signal sequence The value at time; Sampling time point; Based on the maximum and minimum values ​​of the noise-reduced signal sequence, the expression for the dynamic threshold is calculated as follows:

[0009] In the formula, For dynamic thresholds; The weighting coefficient is the historical maximum value; The weighting coefficient is the historical minimum value.

[0010] Furthermore, the root mean square expressions for the standard deviation of the normal RR interval in response to heart rate variability and the difference between adjacent RR intervals in response to parasympathetic activity are calculated and obtained as follows:

[0011]

[0012] In the formula, The standard deviation of the normal RR interval; It is the root mean square of the difference between adjacent RR periods; The number of effective RR intervals; Index for RR intervals; For the first One effective RR interval value; The mean of the effective RR interval, and = .

[0013] Furthermore, the frequency domain analysis module includes a data preparation block, a feature calculation block, and a second storage block; The data preparation block is used to extract the effective RR intervals of the circular buffer and perform interpolation resampling to obtain an equally spaced RR interval sequence; Hamming window processing is applied to the equally spaced RR interval sequence to obtain a windowed sequence; Fast Fourier Transform is applied to the windowed sequence to obtain a frequency domain representation; Windowing effect compensation and normalization processing are performed on the frequency domain representation to obtain the power spectral density. The feature calculation block is used to calculate and obtain the low-frequency power and the high-frequency power of the parasympathetic nervous system based on the power spectral density; to calculate the single-sample psychological harmony value based on the high-frequency power and the calculated respiratory rate synchronicity score, and to directly assign the single-sample psychological harmony value as the single-sample relaxation value; and to calculate and obtain the single-sample instantaneous pressure value based on the high-frequency power and the low-frequency power. The second storage block is used to store low-frequency power, high-frequency power, single-sample psychological harmony value, single-sample relaxation value, and single-sample instantaneous pressure value into a circular buffer.

[0014] Furthermore, the expressions for the low-frequency power responding to sympathetic nerve activity and the high-frequency power responding to parasympathetic nerve activity are calculated as follows:

[0015]

[0016] In the formula, This refers to the low-frequency power that reflects sympathetic nerve activity. This refers to the high-frequency power that reflects parasympathetic nerve activity. Power spectral density; Frequency index; It is the low frequency band, among which, The lowest frequency in the low-frequency band. It is the highest frequency in the low-frequency band; It is a high-frequency band, in which, The lowest frequency in the high-frequency band. It is the highest frequency in the high-frequency band; The expression for calculating the psychological harmony value is:

[0017] In the formula, The value represents psychological harmony. As the baseline value; This is the scaling factor; The respiratory rate synchrony score; The respiratory rate synchronicity score is calculated based on the degree of synchronicity between respiratory rate and heart rate variability. The expression for calculating the instantaneous pressure value based on low-frequency power and high-frequency power is as follows:

[0018] In the formula, This is the instantaneous pressure value; This is the ratio of low-frequency power to high-frequency power. Stress score for heart rate; for Stress factor weighting; Weights for heart rate stress factors.

[0019] Furthermore, the dynamic weighting and physiological constraint module includes a weight calculation block, a weighting calculation block, and a third storage block; The weight calculation block is used to obtain the psychological harmony value of the current sample from the circular buffer and calculate the dynamic weight based on the psychological harmony value of the current sample. The weighted calculation block is used to obtain the standard deviation of the normal RR interval, the root mean square of the difference between adjacent RR intervals, low-frequency power, high-frequency power, and all psychological harmony values ​​from the circular buffer. Through dynamic weight calculation, it obtains the weighted standard deviation of the normal RR interval, the root mean square of the weighted difference between adjacent RR intervals, the weighted low-frequency power, and the weighted high-frequency power. The time-decayed weighted average of all effective psychological harmony values ​​is then used to obtain the weighted psychological harmony value. The third storage block is used to store the weighted normal RR interval standard deviation, the root mean square of the weighted adjacent RR interval difference, the weighted low-frequency power, the weighted high-frequency power, and the weighted psychological harmony value into the feature ring buffer.

[0020] Furthermore, the expression for calculating the dynamic weights is:

[0021] In the formula, Dynamic weights; The slope coefficient; This is the median value of psychological harmony.

[0022] Furthermore, the expressions for the weighted normal RR interval standard deviation, the weighted root mean square of the adjacent RR interval difference, the weighted low-frequency power, and the weighted high-frequency power are obtained through dynamic weighting:

[0023]

[0024]

[0025]

[0026] In the formula, The weighted average standard deviation of the normal RR interval; It is the root mean square of the weighted average difference between adjacent RR intervals; Weighted low-frequency power; Weighted high-frequency power; The expression for the time-decayed weighted average of all effective psychological harmony values ​​is as follows:

[0027] In the formula, The weighted psychological harmony value; For the first One effective psychological harmony value; The number of effective psychological harmony values; An index for effective psychological harmony values; This is the time decay weighting coefficient.

[0028] Furthermore, the output module includes a relaxation value calculation block and a relaxation value output block; The relaxation value calculation block is used to obtain the relaxation value from the circular buffer, relative to a preset time period prior to the current time. Each sample includes instantaneous pressure values, relaxation values, weighted time-domain features, and weighted frequency-domain features; like The final relaxation value is obtained by calculating the average of the relaxation values, expressed as:

[0029] In the formula, This represents the final relaxation level value. The number of samples; For the first The relaxation level value of each sample; like Then, an optimized calculation method is used to calculate... The median of relaxation level and the median of instantaneous pressure values ​​for each sample; based on The median relaxation level and median instantaneous pressure value of each sample were used to test sample validity using the following criteria:

[0030] In the formula, For the first The instantaneous pressure value of each sample; for The median of the instantaneous pressure values ​​of the samples; for The median of the relaxation level values ​​for each sample; For samples that meet the validity detection conditions, a consistency test is performed on the weighted time-domain features and weighted frequency-domain features. If the weighted time-domain features, weighted frequency-domain features, and weighted psychological harmony value are within the preset expected range of change, then a sample set that passes the consistency test is obtained; otherwise, the corresponding sample is removed. Consistency testing is performed by calculating the median of the relaxation level values ​​and the median of the instantaneous pressure values ​​in the sample set; If the number of samples that pass the consistency check is less than Then the median of the relaxation values ​​of the consistency test-passing sample set is taken as the final relaxation value, and the median of the instantaneous pressure values ​​of the consistency test-passing sample set is taken as the final instantaneous pressure value. If the number of samples in the sample set that pass the consistency check is greater than or equal to Then, the mean of the relaxation value and the mean of the instantaneous pressure value of the consistency test sample set are calculated, and the mean of the relaxation value is used as the final relaxation value and the mean of the instantaneous pressure value is used as the final instantaneous pressure value. If the sum of the median of the relaxation value and the median of the instantaneous pressure value in the consistency test sample set is greater than 120, then the final relaxation value is scaled according to the scaling formula, and the final instantaneous pressure value is directly output. The expression of the scaling formula is:

[0031] In the formula, This represents the final instantaneous pressure value. Otherwise, directly output the final relaxation value and the final instantaneous pressure value; The relaxation value output block is used to output the final relaxation value and the final instantaneous pressure value to the visualization interface.

[0032] Beneficial effects: The present invention is based on a relaxation degree calculation method using dynamic threshold heart rate analysis and physiological constraint model. The heart rate feature extraction module cleans and extracts features from the PPG signal, effectively filtering out noise interference such as motion artifacts and signal drift, reducing false detection and false negative rates, and enhancing the stability of the system in complex environments. Through the dynamic weighting and physiological constraint module, the weights of time-domain and frequency-domain features can be adjusted in real time according to the current physiological state, overcoming the limitations of fixed thresholds, and maintaining the stability and adaptability of the evaluation effect for different users and different states of the same user. By using a circular buffer to achieve rolling storage and processing of multi-sample features, combined with multi-sample consistency analysis and psychological feature calculation in the output module, continuous and online relaxation assessment is achieved, effectively improving the problems of post-analysis and insufficient real-time performance of traditional methods. The frequency domain analysis module extracts frequency domain features and psychological features, while the dynamic weighting and physiological constraint module dynamically weights and fuses the time domain and frequency domain features. Finally, the output module integrates psychological features, weighted time domain and frequency domain features to perform consistency discrimination and relaxation degree calculation, which overcomes the limitations of single-dimensional evaluation and improves the comprehensiveness and reliability of the results. Attached Figure Description

[0033] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0034] Figure 1 This is a flowchart illustrating the execution of the relaxation degree calculation method of the present invention. Detailed Implementation

[0035] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0036] This embodiment provides a method for calculating relaxation level based on dynamic threshold heart rate analysis and a physiological constraint model, such as... Figure 1 As shown, it includes: S1. Acquire single-sample photo-plethysmography (PPG) signals using an ear clip sensor; S2. The heart rate feature extraction module cleans and extracts features from the PPG signal of a single sample to obtain the basic heart rate data and time-domain features of the single sample, and stores them in a circular buffer. The baseline heart rate data for a single sample includes: effective RR interval and effective heart rate; The time-domain features include the standard deviation of the normal RR interval and the root mean square of the difference between adjacent RR intervals; S3. Extract equally spaced RR interval sequences from the basic heart rate data of a single sample using the frequency domain analysis module, and perform frequency domain transformation and psychological feature assessment to obtain the frequency domain features and psychological features of the single sample, and store them in a circular buffer. The frequency domain characteristics include low-frequency power and high-frequency power; The psychological characteristics include psychological harmony value, relaxation value, and instantaneous stress value; S4. The time-domain and frequency-domain features of a single sample are weighted and fused through the dynamic weighting and physiological constraint module to obtain the weighted time-domain features, weighted frequency-domain features and weighted psychological harmony value of the single sample, and stored in the circular buffer. The weighted time-domain features include the weighted standard deviation of normal RR intervals and the root mean square of the weighted difference between adjacent RR intervals; The weighted frequency domain features include weighted low-frequency power and weighted high-frequency power; S5. Extract psychological features, weighted time-domain features, and weighted frequency-domain features of multiple samples from the circular buffer through the output module, and perform a consistency check on the weighted time-domain features, weighted frequency-domain features, and weighted psychological harmony values ​​of multiple samples; if the consistency condition is not met, remove the psychological features of the samples; otherwise, calculate the psychological features to obtain the final psychological relaxation value.

[0037] Preferably, the heart rate feature extraction module includes a Kalman filter calculation block, a dynamic threshold calculation block, an RR interval calculation block, an effective heart rate calculation block, a time-domain feature calculation block, and a first storage block; The Kalman filter calculation block is used to perform Kalman filtering on the PPG signal to reduce noise and obtain a denoised signal sequence. The dynamic threshold calculation block is used to obtain the maximum and minimum values ​​of the denoised signal sequence based on the denoised signal sequence; and to calculate and obtain the dynamic threshold based on the maximum and minimum values ​​of the denoised signal sequence. The RR interval calculation block is used to mark the denoised signal in the denoised signal sequence that is greater than the dynamic threshold as a potential rising edge of the heartbeat, based on the denoised signal sequence and the dynamic threshold; if the interval between two adjacent potential rising edges of the heartbeat is greater than the calculated dynamic de-jitter time threshold, then the potential rising edge of the heartbeat is marked as a real rising edge of the heartbeat; the difference between the time points corresponding to two adjacent real rising edges of the heartbeat is calculated, and the time difference is used as the RR interval. The dynamic shaking time threshold is calculated using a medical dynamic shaking method. The calculation process is existing technology and will not be described in detail here. The effective heart rate calculation block is used to compare the RR interval with the physiological constraint range, and to take the RR interval within the physiological constraint range as the effective RR interval; based on the effective RR interval, the effective heart rate is obtained through the heart rate calculation formula; In this embodiment, the value of the physiological constraint range is... Where RR is the RR interval; The heart rate calculation formula is as follows: ,in, For the first One effective heart rate, For the first One effective RR interval; The time-domain feature calculation block is used to obtain the root mean square of the standard deviation of the normal RR interval that reflects heart rate variability and the root mean square of the difference between adjacent RR intervals that reflects parasympathetic activity, through the effective RR interval. The first storage block is used to store the effective RR interval, effective heart rate, standard deviation of normal RR interval, and root mean square of the difference between adjacent RR intervals into a circular buffer.

[0038] Specifically, the expression for Kalman filtering the PPG signal is as follows:

[0039]

[0040] In the formula, for The state estimate at time 1, i.e., the optimal state estimate at the current time; for State estimation at time; This is the state transition matrix; For control matrix; For control input; This is process noise; The observed value is the PPG signal; The observation matrix; To observe noise; The optimal state estimate at the current moment is used as the filtered signal through Kalman filtering calculations. .

[0041] Preferably, the expression for calculating the maximum and minimum values ​​of the denoised signal sequence is:

[0042]

[0043] In the formula, The maximum value of the noise-reducing signal sequence; for The maximum value of the noise-reduced signal sequence at any given time; The decay factor is the historical maximum value; The minimum value of the noise-reduced signal sequence; for The minimum value of the signal sequence for noise reduction at any given time; The growth factor is the historical minimum value; For the noise reduction signal sequence The value at time; Sampling time point; Based on the maximum and minimum values ​​of the noise-reduced signal sequence, the expression for the dynamic threshold is calculated as follows:

[0044] In the formula, For dynamic thresholds; The weighting coefficient is the historical maximum value; The weighting coefficient is the historical minimum value.

[0045] Preferably, the expression for calculating and obtaining the root mean square of the normal RR interval standard deviation in response to heart rate variability and the difference in adjacent RR intervals in response to parasympathetic activity is as follows:

[0046]

[0047] In the formula, The standard deviation of the normal RR interval; It is the root mean square of the difference between adjacent RR periods; The number of effective RR intervals; Index for RR intervals; For the first One effective RR interval value; The mean of the effective RR interval, and = .

[0048] Preferably, the frequency domain analysis module includes a data preparation block, a feature calculation block, and a second storage block; The data preparation block is used to extract the effective RR intervals of the circular buffer and perform interpolation resampling to obtain an equally spaced RR interval sequence; Hamming window processing is applied to the equally spaced RR interval sequence to obtain a windowed sequence; Fast Fourier Transform is applied to the windowed sequence to obtain a frequency domain representation; Windowing effect compensation and normalization processing are performed on the frequency domain representation to obtain the power spectral density. The feature calculation block is used to calculate and obtain the low-frequency power and the high-frequency power of the parasympathetic nervous system based on the power spectral density; to calculate the single-sample psychological harmony value based on the high-frequency power and the calculated respiratory rate synchronicity score, and to directly assign the single-sample psychological harmony value as the single-sample relaxation value; and to calculate and obtain the single-sample instantaneous pressure value based on the high-frequency power and the low-frequency power. The second storage block is used to store low-frequency power, high-frequency power, single-sample psychological harmony value, single-sample relaxation value, and single-sample instantaneous pressure value into a circular buffer.

[0049] Specifically, the process of obtaining the power spectral density is as follows: S31. Extract L valid RR interval values ​​that are close to the current time from the circular buffer, and combine the L valid RR interval values ​​with the corresponding timestamps to form a non-equal interval valid RR interval sequence. S32. Based on the non-equal interval effective RR interval sequence, use cubic spline interpolation or other interpolation methods to resample at equal interval time points to obtain the equal interval effective RR interval sequence RR[n]. The cubic spline interpolation or other interpolation methods described above, which involve resampling at equal time intervals, are existing technologies and will not be elaborated upon here. S33. Define the window function as follows:

[0050] In the formula, The window function is used; n is the index of the effective RR interval value. S34. Windowing is applied to the equally spaced effective RR period using a window function to reduce spectral leakage. The expression is:

[0051] In the formula, For windowed effective RR interval sequences; S35. Perform a fast Fourier transform on the windowed effective RR interval sequence to obtain the frequency domain representation F[m]; The Fast Fourier Transform is an existing technology and will not be described in detail here; S36. Perform windowing compensation and normalization on the frequency domain representation to obtain the power spectral density, expressed as:

[0052] In the formula, This represents the power spectral density.

[0053] Preferably, the expressions for calculating the low-frequency power of the response to sympathetic nerve activity and the high-frequency power of the response to parasympathetic nerve activity are as follows:

[0054]

[0055] In the formula, This refers to the low-frequency power that reflects sympathetic nerve activity. This refers to the high-frequency power that reflects parasympathetic nerve activity. Power spectral density; Frequency index; It is the low frequency band, among which, The lowest frequency in the low-frequency band. It is the highest frequency in the low-frequency band; It is a high-frequency band, in which, The lowest frequency in the high-frequency band. It is the highest frequency in the high-frequency band; The expression for calculating the psychological harmony value is:

[0056] In the formula, The value represents psychological harmony. As the baseline value; This is the scaling factor; The respiratory rate synchrony score; The respiratory rate synchronicity score is calculated based on the degree of synchronicity between respiratory rate and heart rate variability; the calculation process is as follows: S41. Detect and obtain the respiratory rate from the power spectral density; S42. The matching degree between the respiratory frequency and the preset ideal respiratory frequency range is calculated using a piecewise linear function. If the respiratory frequency domain is within the preset ideal respiratory frequency range, the matching degree is the highest. If the respiratory frequency domain is outside the preset ideal respiratory frequency range, the matching degree is linearly attenuated based on the difference between the maximum or minimum value of the respiratory frequency domain and the preset ideal respiratory frequency range. The larger the difference, the smaller the matching degree, until the matching degree is 0. S43. Calculate the peak sharpness of the power spectral density, i.e., the ratio of the main peak to the secondary peak; S44. Calculate the stability of the high-frequency power that responds to parasympathetic nerve activity, that is, the degree of change of the high-frequency power in a continuous time period. If the high-frequency power changes within a preset range in a continuous time period, the high-frequency power is considered to be stable; otherwise, the high-frequency power is considered to be in a fluctuating and unstable state. S45. The respiratory matching degree, peak clarity of power spectral density and stability of high frequency power are weighted and averaged, and a synchronization score in the range of 0-1 is obtained through nonlinear enhancement. The weights of the weighted averages are 0.4, 0.3, and 0.3, respectively. The expression for calculating the instantaneous pressure value based on low-frequency power and high-frequency power is as follows:

[0057] In the formula, This is the instantaneous pressure value; This is the ratio of low-frequency power to high-frequency power. Stress score for heart rate; for Stress factor weighting; Weights for heart rate stress factors.

[0058] Preferably, the dynamic weighting and physiological constraint module includes a weight calculation block, a weighting calculation block, and a third storage block; The weight calculation block is used to obtain the psychological harmony value of the current sample from the circular buffer and calculate the dynamic weight based on the psychological harmony value of the current sample. The weighted calculation block is used to obtain the standard deviation of the normal RR interval, the root mean square of the difference between adjacent RR intervals, low-frequency power, high-frequency power, and all psychological harmony values ​​from the circular buffer. Through dynamic weight calculation, it obtains the weighted standard deviation of the normal RR interval, the root mean square of the weighted difference between adjacent RR intervals, the weighted low-frequency power, and the weighted high-frequency power. The time-decayed weighted average of all effective psychological harmony values ​​is then used to obtain the weighted psychological harmony value. The third storage block is used to store the weighted normal RR interval standard deviation, the root mean square of the weighted adjacent RR interval difference, the weighted low-frequency power, the weighted high-frequency power, and the weighted psychological harmony value into the feature ring buffer.

[0059] Specifically, the dynamic weighting and physiological constraint module also includes a heart rate and RR interval optimization block; The processing procedure for the heart rate and RR interval optimization block is as follows: S51. Extract the heart rate sequence and RR interval sequence from the circular buffer, which are traced back to the current time within a preset duration. S52. Outlier removal is performed on the heart rate sequence using a median filter with a window size of 5 to obtain a smoothed heart rate. The expression is:

[0060] In the formula, To smooth the heart rate; Current heart rate; To find the median function; This represents the index position of the currently processed heart rate data point within the recent heart rate sequence. S53. Apply physiological constraints to the smooth heart rate to ensure it remains within a reasonable physiological range. The expression is:

[0061] In the formula, This is the constrained heart rate value; Update the constrained heart rate value to the circular buffer; S54. The RR interval sequence is interpolated and sampled using cubic spline interpolation to fill in abnormal RR intervals, ensuring the continuity of heart rate variability analysis. The sampled RR interval sequence is denoted as... And update it in the circular buffer.

[0062] Preferably, the expression for calculating the dynamic weights is:

[0063] In the formula, Dynamic weights; The slope coefficient; This is the median value of psychological harmony.

[0064] Preferably, the expressions for calculating and obtaining the weighted normal RR interval standard deviation, the root mean square of the weighted adjacent RR interval difference, the weighted low-frequency power, and the weighted high-frequency power through dynamic weighting are as follows:

[0065]

[0066]

[0067]

[0068] In the formula, The weighted average standard deviation of the normal RR interval; It is the root mean square of the weighted average difference between adjacent RR intervals; Weighted low-frequency power; Weighted high-frequency power; The expression for the time-decayed weighted average of all effective psychological harmony values ​​is as follows:

[0069] In the formula, The weighted psychological harmony value; For the first One effective psychological harmony value; The number of effective psychological harmony values; An index for effective psychological harmony values; This is the time decay weighting coefficient, and , This is the attenuation factor, with a value of 0.9; The time decay weighting coefficient is assigned a maximum weight of As the data progresses over time, the weights decay exponentially, with the second and third weights being respectively... .

[0070] Preferably, the output module includes a relaxation value calculation block and a relaxation value output block; The relaxation value calculation block is used to obtain the relaxation value from the circular buffer, relative to a preset time period prior to the current time. Each sample includes instantaneous pressure values, relaxation values, weighted time-domain features, and weighted frequency-domain features; like The final relaxation value is obtained by calculating the average of the relaxation values, expressed as:

[0071] In the formula, This represents the final relaxation level value. The number of samples; For the first The relaxation level value of each sample; like Then, an optimized calculation method is used to calculate... The median of relaxation level and the median of instantaneous pressure values ​​for each sample; based on The median relaxation level and median instantaneous pressure value of each sample were used to test sample validity using the following criteria:

[0072] In the formula, For the first The instantaneous pressure value of each sample; for The median of the instantaneous pressure values ​​of the samples; for The median of the relaxation level values ​​for each sample; For samples that meet the validity detection conditions, a consistency test is performed on the weighted time-domain features and weighted frequency-domain features. If the weighted time-domain features, weighted frequency-domain features, and weighted psychological harmony value are within the preset expected range of change, then a sample set that passes the consistency test is obtained; otherwise, the corresponding sample is removed. Consistency testing is performed by calculating the median of the relaxation level values ​​and the median of the instantaneous pressure values ​​in the sample set; If the number of samples that pass the consistency check is less than Then the median of the relaxation values ​​of the consistency test-passing sample set is taken as the final relaxation value, and the median of the instantaneous pressure values ​​of the consistency test-passing sample set is taken as the final instantaneous pressure value. If the number of samples in the sample set that pass the consistency check is greater than or equal to Then, the mean of the relaxation value and the mean of the instantaneous pressure value of the consistency test sample set are calculated, and the mean of the relaxation value is used as the final relaxation value and the mean of the instantaneous pressure value is used as the final instantaneous pressure value. If the sum of the median of the relaxation value and the median of the instantaneous pressure value in the consistency test sample set is greater than 120, then the final relaxation value is scaled according to the scaling formula, and the final instantaneous pressure value is directly output. The expression of the scaling formula is:

[0073] In the formula, This represents the final instantaneous pressure value. Otherwise, directly output the final relaxation value and the final instantaneous pressure value; The relaxation value output block is used to output the final relaxation value and the final instantaneous pressure value to the visualization interface.

[0074] Specifically, the output module further includes an output judgment block and a sampling delay block; The output judgment block is used to compare the time difference between the current output time and the previous output time with a preset time interval; if the time difference is greater than or equal to the preset time interval, the final relaxation value is output; otherwise, the heart rate at the latest moment is recorded and the sampling delay block is entered. The sampling delay block is used to check whether the PPG signal sampling is delayed; if the PPG signal sampling exceeds the preset delay interval, the sampling timestamp is updated and sampling is restarted; otherwise, it waits until the next sampling period.

[0075] The present invention has the following specific beneficial effects: This invention is based on a relaxation degree calculation method using dynamic threshold heart rate analysis and a physiological constraint model. It cleans and extracts features from PPG signals through a heart rate feature extraction module, effectively filtering out noise interference such as motion artifacts and signal drift, reducing false detection and false negative rates, and enhancing the stability of the system in complex environments. Through the dynamic weighting and physiological constraint module, the weights of time-domain and frequency-domain features can be adjusted in real time according to the current physiological state, overcoming the limitations of fixed thresholds, and maintaining the stability and adaptability of the evaluation effect for different users and different states of the same user. By using a circular buffer to achieve rolling storage and processing of multi-sample features, combined with multi-sample consistency analysis and psychological feature calculation in the output module, continuous and online relaxation assessment is achieved, effectively improving the problems of post-analysis and insufficient real-time performance of traditional methods. The frequency domain analysis module extracts frequency domain features and psychological features, while the dynamic weighting and physiological constraint module dynamically weights and fuses the time domain and frequency domain features. Finally, the output module integrates psychological features, weighted time domain and frequency domain features to perform consistency discrimination and relaxation degree calculation, which overcomes the limitations of single-dimensional evaluation and improves the comprehensiveness and reliability of the results.

[0076] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for calculating relaxation level based on dynamic threshold heart rate analysis and a physiological constraint model, characterized in that, include: S1. Acquire the PPG signal of a single sample using an ear clip sensor; S2. The heart rate feature extraction module cleans and extracts features from the PPG signal of a single sample to obtain the basic heart rate data and time-domain features of the single sample, and stores them in a circular buffer. The baseline heart rate data for a single sample includes: effective RR interval and effective heart rate; The time-domain features include the standard deviation of the normal RR interval and the root mean square of the difference between adjacent RR intervals; S3. Extract equally spaced RR interval sequences from the basic heart rate data of a single sample using the frequency domain analysis module, and perform frequency domain transformation and psychological feature assessment to obtain the frequency domain features and psychological features of the single sample, and store them in a circular buffer. The frequency domain characteristics include low-frequency power and high-frequency power; The psychological characteristics include psychological harmony value, relaxation value, and instantaneous stress value; S4. The time-domain and frequency-domain features of a single sample are weighted and fused through the dynamic weighting and physiological constraint module to obtain the weighted time-domain features, weighted frequency-domain features and weighted psychological harmony value of the single sample, and stored in the circular buffer. The weighted time-domain features include the weighted standard deviation of normal RR intervals and the root mean square of the weighted difference between adjacent RR intervals; The weighted frequency domain features include weighted low-frequency power and weighted high-frequency power; S5. Extract psychological features, weighted time-domain features, and weighted frequency-domain features of multiple samples from the circular buffer through the output module, and perform a consistency check on the weighted time-domain features, weighted frequency-domain features, and weighted psychological harmony values ​​of multiple samples; if the consistency condition is not met, remove the psychological features of the samples; otherwise, calculate the psychological features to obtain the final psychological relaxation value.

2. The method for calculating relaxation degree based on dynamic threshold heart rate analysis and physiological constraint model according to claim 1, characterized in that, The heart rate feature extraction module includes a Kalman filter calculation block, a dynamic threshold calculation block, an RR interval calculation block, an effective heart rate calculation block, a time-domain feature calculation block, and a first storage block; The Kalman filter calculation block is used to perform Kalman filtering on the PPG signal to reduce noise and obtain a denoised signal sequence. The dynamic threshold calculation block is used to obtain the maximum and minimum values ​​of the denoised signal sequence based on the denoised signal sequence; and to calculate and obtain the dynamic threshold based on the maximum and minimum values ​​of the denoised signal sequence. The RR interval calculation block is used to mark the denoised signal in the denoised signal sequence that is greater than the dynamic threshold as a potential rising edge of the heartbeat, based on the denoised signal sequence and the dynamic threshold; if the interval between two adjacent potential rising edges of the heartbeat is greater than the calculated dynamic de-jitter time threshold, then the potential rising edge of the heartbeat is marked as the real rising edge of the heartbeat. Calculate the time difference between the time points corresponding to the rising edge of two adjacent real heartbeats, and use the time difference as the RR interval; The effective heart rate calculation block is used to compare the RR interval with the physiological constraint range, and to take the RR interval within the physiological constraint range as the effective RR interval; based on the effective RR interval, the effective heart rate is obtained through the heart rate calculation formula; The time-domain feature calculation block is used to obtain the root mean square of the standard deviation of the normal RR interval that reflects heart rate variability and the root mean square of the difference between adjacent RR intervals that reflects parasympathetic activity, through the effective RR interval. The first storage block is used to store the effective RR interval, effective heart rate, standard deviation of normal RR interval, and root mean square of the difference between adjacent RR intervals into a circular buffer.

3. The method for calculating relaxation level based on dynamic threshold heart rate analysis and physiological constraint model according to claim 2, characterized in that, The expressions for calculating the maximum and minimum values ​​of the denoised signal sequence are: In the formula, The maximum value of the noise-reducing signal sequence; for The maximum value of the noise-reduced signal sequence at any given time; The decay factor is the historical maximum value; The minimum value of the noise-reduced signal sequence; for The minimum value of the signal sequence for noise reduction at any given time; The growth factor is the historical minimum value; For the noise reduction signal sequence The value at time; Sampling time point; Based on the maximum and minimum values ​​of the noise-reduced signal sequence, the expression for the dynamic threshold is calculated as follows: In the formula, For dynamic thresholds; The weighting coefficient is the historical maximum value; The weighting coefficient is the historical minimum value.

4. The method for calculating relaxation degree based on dynamic threshold heart rate analysis and physiological constraint model according to claim 2, characterized in that, The root mean square expressions for calculating and obtaining the normal RR interval standard deviation in response to heart rate variability and the adjacent RR interval differences in response to parasympathetic activity are as follows: In the formula, The standard deviation of the normal RR interval; It is the root mean square of the difference between adjacent RR periods; The number of effective RR intervals; Index for RR intervals; For the first One effective RR interval value; The mean of the effective RR interval, and = .

5. The method for calculating relaxation level based on dynamic threshold heart rate analysis and physiological constraint model according to claim 1, characterized in that, The frequency domain analysis module includes a data preparation block, a feature calculation block, and a second storage block; The data preparation block is used to extract the effective RR intervals of the circular buffer and perform interpolation resampling to obtain an equally spaced RR interval sequence; Hamming window processing is applied to the equally spaced RR interval sequence to obtain a windowed sequence; Fast Fourier Transform is applied to the windowed sequence to obtain a frequency domain representation; Windowing effect compensation and normalization processing are performed on the frequency domain representation to obtain the power spectral density. The feature calculation block is used to calculate and obtain the low-frequency power and the high-frequency power of the parasympathetic nervous system based on the power spectral density; to calculate the single-sample psychological harmony value based on the high-frequency power and the calculated respiratory rate synchronicity score, and to directly assign the single-sample psychological harmony value as the single-sample relaxation value; and to calculate and obtain the single-sample instantaneous pressure value based on the high-frequency power and the low-frequency power. The second storage block is used to store low-frequency power, high-frequency power, single-sample psychological harmony value, single-sample relaxation value, and single-sample instantaneous pressure value into a circular buffer.

6. The method for calculating relaxation level based on dynamic threshold heart rate analysis and physiological constraint model according to claim 5, characterized in that, The expressions for calculating the low-frequency power of the response to sympathetic nerve activity and the high-frequency power of the response to parasympathetic nerve activity are as follows: In the formula, This refers to the low-frequency power that reflects sympathetic nerve activity. This refers to the high-frequency power that reflects parasympathetic nerve activity. Power spectral density; Frequency index; It is the low frequency band, among which, The lowest frequency in the low-frequency band. It is the highest frequency in the low-frequency band; It is a high-frequency band, in which, The lowest frequency in the high-frequency band. It is the highest frequency in the high-frequency band; The expression for calculating the psychological harmony value is: In the formula, The value represents psychological harmony. As the baseline value; This is the scaling factor; The respiratory rate synchrony score; The respiratory rate synchronicity score is calculated based on the degree of synchronicity between respiratory rate and heart rate variability. The expression for calculating the instantaneous pressure value based on low-frequency power and high-frequency power is as follows: In the formula, This is the instantaneous pressure value; This is the ratio of low-frequency power to high-frequency power. Stress score for heart rate; for Stress factor weighting; Weights for heart rate stress factors.

7. The method for calculating relaxation degree based on dynamic threshold heart rate analysis and physiological constraint model according to claim 5, characterized in that, The dynamic weighting and physiological constraint module includes a weight calculation block, a weighting calculation block, and a third storage block; The weight calculation block is used to obtain the psychological harmony value of the current sample from the circular buffer and calculate the dynamic weight based on the psychological harmony value of the current sample. The weighted calculation block is used to obtain the standard deviation of normal RR intervals, the root mean square of the difference between adjacent RR intervals, low-frequency power, high-frequency power and all psychological harmony values ​​from the circular buffer, and to obtain the weighted standard deviation of normal RR intervals, the root mean square of the weighted difference between adjacent RR intervals, the weighted low-frequency power and the weighted high-frequency power through dynamic weight calculation. The weighted psychological harmony value is obtained by performing a time-decay-weighted average on all valid psychological harmony values. The third storage block is used to store the weighted normal RR interval standard deviation, the root mean square of the weighted adjacent RR interval difference, the weighted low-frequency power, the weighted high-frequency power, and the weighted psychological harmony value into the feature ring buffer.

8. The method for calculating relaxation level based on dynamic threshold heart rate analysis and physiological constraint model according to claim 7, characterized in that, The expression for calculating dynamic weights is: In the formula, Dynamic weights; The slope coefficient; This is the median value of psychological harmony.

9. The method for calculating relaxation degree based on dynamic threshold heart rate analysis and physiological constraint model according to claim 7, characterized in that, The expressions for the weighted normal RR interval standard deviation, the root mean square of the weighted adjacent RR interval difference, the weighted low-frequency power, and the weighted high-frequency power, calculated using dynamic weighting, are as follows: In the formula, The weighted average standard deviation of the normal RR interval; It is the root mean square of the weighted average difference between adjacent RR intervals; Weighted low-frequency power; Weighted high-frequency power; The expression for the time-decayed weighted average of all effective psychological harmony values ​​is as follows: In the formula, The weighted psychological harmony value; For the first One effective psychological harmony value; The number of effective psychological harmony values; An index for effective psychological harmony values; This is the time decay weighting coefficient.

10. The method for calculating relaxation degree based on dynamic threshold heart rate analysis and physiological constraint model according to claim 1, characterized in that, The output module includes a relaxation value calculation block and a relaxation value output block; The relaxation value calculation block is used to obtain the relaxation value from the circular buffer, relative to a preset time period prior to the current time. Each sample includes instantaneous pressure values, relaxation values, weighted time-domain features, and weighted frequency-domain features; like The final relaxation value is obtained by calculating the average of the relaxation values, expressed as: In the formula, This represents the final relaxation level value. The number of samples; For the first The relaxation level value of each sample; like Then, an optimized calculation method is used to calculate... The median of relaxation level and the median of instantaneous pressure values ​​for each sample; based on The median relaxation level and median instantaneous pressure value of each sample were used to test sample validity using the following criteria: In the formula, For the first The instantaneous pressure value of each sample; for The median of the instantaneous pressure values ​​of the samples; for The median of the relaxation level values ​​for each sample; For samples that meet the validity detection conditions, a consistency test is performed on the weighted time-domain features and weighted frequency-domain features. If the weighted time-domain features, weighted frequency-domain features, and weighted psychological harmony value are within the preset expected range of change, then a sample set that passes the consistency test is obtained; otherwise, the corresponding sample is removed. Consistency testing is performed by calculating the median of the relaxation level values ​​and the median of the instantaneous pressure values ​​in the sample set; If the number of samples that pass the consistency check is less than Then the median of the relaxation values ​​of the consistency test-passing sample set is taken as the final relaxation value, and the median of the instantaneous pressure values ​​of the consistency test-passing sample set is taken as the final instantaneous pressure value. If the number of samples in the sample set that pass the consistency check is greater than or equal to Then, the mean of the relaxation value and the mean of the instantaneous pressure value of the consistency test sample set are calculated, and the mean of the relaxation value is used as the final relaxation value and the mean of the instantaneous pressure value is used as the final instantaneous pressure value. If the sum of the median of the relaxation value and the median of the instantaneous pressure value in the consistency test sample set is greater than 120, then the final relaxation value is scaled according to the scaling formula, and the final instantaneous pressure value is directly output. The expression of the scaling formula is: In the formula, This represents the final instantaneous pressure value. Otherwise, directly output the final relaxation value and the final instantaneous pressure value; The relaxation value output block is used to output the final relaxation value and the final instantaneous pressure value to the visualization interface.