Emotional stress monitoring method, device and intelligent wearable device
By using PPG sensors and emotional stress classification models on smart wearable devices to monitor users' emotional stress status in real time, it solves the problem of ECG technology being unable to achieve real-time and long-term monitoring, and improves the portability and accuracy of emotional stress monitoring.
Patent Information
- Application Number
- CN202211410640.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-10
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2042-11-10
AI Technical Summary
Existing ECG technology has a harsh environment when monitoring emotional stress and cannot achieve real-time and long-term monitoring, which limits the continuous tracking of emotional stress states.
Use the PPG sensor on the smart wearable device to obtain the pulse signal, remove baseline drift and high-frequency noise, find the wave peak, calculate the time domain and frequency domain indicators of the RR interval, and input the emotional stress classification model to achieve real-time and long-term emotional stress monitor.
It realizes real-time and long-term monitoring of the user's emotional stress state on smart wearable devices, improves the portability and accuracy of monitoring, and avoids the environmental limitations of ECG technology.
Smart Images

Figure CN115886815B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent wearable technology, and in particular to an emotional stress monitoring method, device and intelligent wearable device. Background Art
[0002] Nowadays, people's pace of life is accelerating, work is busy, and long-term psychological pressure will affect the physical state of the human body. In the existing technology, the ECG signal of the human body is collected, the ECG signal is processed, the position of the R peak (peak) of the ECG (electrocardiography) ECG waveform is found, the adjacent R peak time interval is calculated to obtain HRV (heart rate variability) data, the HRV data is analyzed in time domain and frequency domain, and various indicators reflecting the HRV data are calculated. Medical staff use these indicators to analyze the emotional stress state of the human body.
[0003] ECG is widely used in hospital clinics to monitor emotional stress due to the harsh testing environment. In recent years, some portable ECG monitors have appeared, which are small in size and easy to carry. However, ECG electrode wires are required to connect the electrodes to the body or the electrodes must be held with both hands. Real-time measurements cannot be performed during work or study, and long-term monitoring cannot be achieved. In summary, ECG has many detection limitations and a harsh testing environment, and cannot be monitored anytime and anywhere. Summary of the invention
[0004] The present invention provides an emotional stress monitoring method, an apparatus and an intelligent wearable device, which can monitor the emotional stress state of a user in real time and over a long period of time.
[0005] In the first aspect, the present invention provides an emotional stress monitoring method, which is applied to smart wearable devices. The emotional stress monitoring method includes: obtaining a PPG signal of a user's pulse within a preset time period through a PPG (photoplethysmography) sensor, and the PPG signal within the preset time period is a first PPG signal; removing the baseline drift and high-frequency noise of the first PPG signal to obtain a second PPG signal; finding all the peaks in the second PPG signal; calculating the PRV (pulse rate variability) data containing multiple RR intervals in the second PPG signal; the RR interval is the time difference between two adjacent peaks; calculating the time domain index and frequency domain index of the PRV data; inputting the time domain index and the frequency domain index into the emotional stress classification model to obtain the user's emotional stress state.
[0006] In the above scheme, the PPG signal of the user's pulse within a preset time period is obtained by using the PPG sensor on the smart wearable device. The PPG signal within the preset time period is the first PPG signal. The first PPG signal is processed to remove the baseline drift and high-frequency noise to obtain the second PPG signal; all the peaks in the second PPG signal are found, and the PRV data of the second PPG signal containing multiple RR intervals is calculated. The RR interval is the time difference between two adjacent peaks; the time domain index and frequency domain index of the PRV data are calculated, and the emotional stress state of the user can be obtained by inputting the emotional stress classification model. Compared with the prior art that uses ECG to monitor emotional stress, the scheme in the present application can collect the PPG signal of the user's pulse in real time based on the smart wearable device, and monitor the user's emotional stress state in real time and for a long time.
[0007] In a specific embodiment, removing the baseline drift and high-frequency noise of the first PPG signal includes: using a linear phase integer coefficient filter to remove the baseline drift of the first PPG signal; using a low-pass filter to remove the high-frequency noise of the first PPG signal. By using a linear phase integer coefficient filter to remove the baseline drift of the first PPG signal, real-time calculation is satisfied on the wearable device, making the filtering simple and efficient, preventing the PPG waveform after filtering from being distorted, ensuring the integrity of the PPG waveform, and also improving the calculation rate.
[0008] In a specific embodiment, all the peaks in the second PPG signal are found, including: setting a sliding window with a time length of a×fs×f, where fs represents the sampling rate and f represents the preset frequency; using the sliding window to slide on the second PPG signal, and finding the maximum and minimum values of the second PPG signal in the sliding window after sliding; judging whether the maximum value satisfies the amplitude value of 0.7 to 1.3 times of the previous peak, and whether the minimum value satisfies the amplitude value of 0.7 to 1.3 times of the previous trough; if satisfied, the maximum value is the peak of the second PPG signal in the sliding window; if not satisfied, the sliding window continues to slide until all the peaks in the second PPG signal are found. By using the sliding window threshold method to find all the peaks in the second PPG signal, the PPG peaks can be accurately found in the case of motion interference, which is convenient for the subsequent more accurate calculation of PRV data, so that the subsequent time-frequency domain feature extraction is more accurate.
[0009] In a specific implementation, the preset frequency f is determined in the following manner: transform the second PPG signal into the frequency domain through Fourier transform; find the peak with the largest amplitude in the second PPG signal transformed into the frequency domain through Fourier transform, and determine whether the peak with the largest amplitude has harmonics; if the peak with the largest amplitude has harmonics, the frequency of the peak with the largest amplitude is used as the preset frequency f; if the peak with the largest amplitude does not have harmonics, find the peak with the second largest amplitude in the second PPG signal transformed into the frequency domain through Fourier transform, and use the frequency of the peak with the second largest amplitude as the preset frequency f. By determining the size of the preset frequency f in the above manner, the step time length of the sliding window can be dynamically adjusted, so that the sliding window is suitable for PPG signals in different states.
[0010] In a specific implementation, before calculating the time domain index and the frequency domain index of the PRV data, the singular point data in the PRV data is first removed to prevent the singular point data in the PRV data from affecting the accuracy of subsequent time-frequency domain feature extraction.
[0011] In a specific implementation, removing the singular point data in the PRV data includes: determining whether each RR interval in a plurality of RR intervals satisfies the following condition: 0.8×P(i)﹤P(i+1)﹤1.2×P(i); wherein P(i) and P(i+1) respectively represent the i-th RR interval and the i+1-th RR interval in a plurality of RR intervals; if satisfied, retaining P(i+1); if not satisfied, removing P(i+1). This facilitates accurate finding of each singular point.
[0012] In a specific implementation, calculating the time domain index and frequency domain index of the PRV data includes: calculating the PRV mean value, PRV standard deviation and the root mean square value of the difference between adjacent RR intervals of the PRV data as the time domain index of the PRV data; calculating the low frequency power, high frequency power, and low frequency power / high frequency power of the PRV data as the frequency domain index of the PRV data. This facilitates accurate extraction of the time and frequency domain features of the PRV data and improves the accuracy of the time and frequency domain indexes.
[0013] In a specific implementation, the emotional stress classification model is a BP neural network model (a multi-layer feedforward neural network trained according to the error back propagation algorithm) obtained by neural network training; wherein the BP neural network model includes six input nodes, and the six input nodes are respectively used to input the PRV mean, PRV standard deviation, the root mean square value of the difference between adjacent RR intervals, low frequency power, high frequency power, and low frequency power / high frequency power; the BP neural network model includes four output nodes, which are used to output a certain emotional stress state in the emotional stress state category; wherein the emotional stress state category at least includes: no stress state, mild stress state, moderate stress state, and high stress state. Inputting the time domain index and the frequency domain index into the emotional stress classification model to obtain the user's emotional stress state includes: inputting the PRV mean, PRV standard deviation, the root mean square value of the difference between adjacent RR intervals, low frequency power, high frequency power, and low frequency power / high frequency power of the calculated PRV data into the BP neural network model to obtain the user's emotional stress state. By classifying the stress state through the BP neural network, the accurate measurement of the stress state is realized, and the stress state can be monitored for a long time, making stress monitoring more convenient and intelligent.
[0014] In a second aspect, the present invention also provides an emotional stress monitoring device, which is applied to a smart wearable device. The emotional stress monitoring device includes: an acquisition module, a preprocessing module, a peak finding module, a first calculation module, a second calculation module and an emotional stress classification model. Among them, the acquisition module is used to obtain a PPG signal within a preset time period of the user's pulse through a PPG sensor, and the PPG signal within the preset time period is a first PPG signal. The preprocessing module is used to remove the baseline drift and high-frequency noise of the first PPG signal to obtain a second PPG signal. The peak finding module is used to find all peaks in the second PPG signal. The first calculation module is used to calculate the PRV data of the second PPG signal containing multiple RR intervals; the RR interval is the time difference between two adjacent peaks. The second calculation module is used to calculate the time domain index and the frequency domain index of the PRV data. The emotional stress classification model is used to receive the time domain index and the frequency domain index, and output the user's emotional stress state according to the received time domain index and the frequency domain index.
[0015] In the above scheme, the PPG signal of the user's pulse within a preset time period is obtained by using the PPG sensor on the smart wearable device. The PPG signal within the preset time period is the first PPG signal. The first PPG signal is processed to remove the baseline drift and high-frequency noise to obtain the second PPG signal; all the peaks in the second PPG signal are found, and the PRV data of the second PPG signal containing multiple RR intervals is calculated. The RR interval is the time difference between two adjacent peaks; the time domain index and frequency domain index of the PRV data are calculated, and the emotional stress state of the user can be obtained by inputting the emotional stress classification model. Compared with the prior art that uses ECG to monitor emotional stress, the scheme in the present application can collect the PPG signal of the user's pulse in real time based on the smart wearable device, and monitor the user's emotional stress state in real time and for a long time.
[0016] In the third aspect, the present invention also provides a smart wearable device including: a PPG sensor and a processor connected to the PPG sensor; the PPG sensor is used to obtain a PPG signal within a preset time period of the user's pulse, the PPG signal within the preset time period is a first PPG signal, and the first PPG signal is sent to the processor; the processor is used to execute the above-mentioned emotional stress monitoring method.
[0017] The first PPG signal of the user's pulse is obtained by using the PPG sensor on the smart wearable device, and the first PPG signal is processed to remove the baseline drift and high-frequency noise to obtain the second PPG signal; and all the peaks in the second PPG signal and the time period of two adjacent peaks are found and calculated to obtain PRV data containing multiple RR intervals; and then the time domain index and frequency domain index of the PRV data are calculated, and the emotional stress state of the user can be obtained by inputting the emotional stress classification model. Compared with the prior art that uses ECG to monitor emotional stress, the solution in this application can collect the first PPG signal of the user's pulse in real time based on the smart wearable device, and monitor the user's emotional stress state in real time and for a long time. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A flowchart of an emotional stress monitoring method provided by an embodiment of the present invention;
[0019] Figure 2 A flowchart of another emotional stress monitoring method provided by an embodiment of the present invention;
[0020] Figure 3 A flowchart of another emotional stress monitoring method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0022] In order to facilitate understanding of the emotional stress monitoring method provided by the embodiment of the present invention, the following first describes the application scenario of the emotional stress monitoring method provided by the embodiment of the present invention. The emotional stress monitoring method is applied to a smart wearable device to monitor the emotional stress state of the user wearing the smart wearable device in real time. The smart wearable device may be a wearable device such as, but not limited to, a diving computer. The emotional stress monitoring method is described in detail below in conjunction with the accompanying drawings.
[0023] refer to Figure 1 The emotional stress monitoring method provided by the embodiment of the present invention includes: obtaining a PPG signal of a user's pulse within a preset time period through a PPG sensor, the PPG signal within the preset time period is a first PPG signal; removing the baseline drift and high-frequency noise of the first PPG signal to obtain a second PPG signal; finding all peaks in the second PPG signal; calculating PRV data containing multiple RR intervals in the second PPG signal, the RR interval being the time difference between two adjacent peaks; calculating the time domain index and the frequency domain index of the PRV data; inputting the time domain index and the frequency domain index into an emotional stress classification model to obtain the user's emotional stress state.
[0024] In the above scheme, the PPG signal of the user's pulse within a preset time period is obtained by using the PPG sensor on the smart wearable device. The PPG signal is the first PPG signal. The time period does not include the boundary time. In actual use, the preset time period is 30s. The 30s time period contains about 60 peaks. The data volume is moderate and convenient for the processor on the smart wearable device to process without reducing the accuracy. The first PPG signal is processed to remove the baseline drift and high-frequency noise to obtain the second PPG signal; all the peaks in the second PPG signal are found, and the second PPG signal contains multiple RR intervals. The PRV data, the RR interval is the time difference between two adjacent peaks; then the time domain index and frequency domain index of the PRV data are calculated, and the emotional stress state of the user can be obtained by inputting the emotional stress classification model. Compared with the prior art that uses ECG to monitor emotional stress, the scheme in this application can collect the PPG signal of the user's pulse in real time based on the smart wearable device, and monitor the user's emotional stress state in real time and for a long time. The above steps are described in detail below in conjunction with the accompanying drawings.
[0025] First, refer to Figure 1 and Figure 2 , obtain the PPG signal of the user's pulse within a preset time period through the PPG sensor. Specifically, Figure 2 As shown, a PPG sensor can be installed on the smart wearable device, and the PPG sensor can specifically be a photoelectric sensor.
[0026] Next, if Figure 1 and Figure 2 As shown, the baseline drift and high-frequency noise of the first PPG signal are removed to obtain the second PPG signal. Due to human breathing, movement, shaking, myoelectric interference and other reasons, the first PPG signal directly collected under normal circumstances is often accompanied by more burrs (high frequency) and baseline drift (low frequency) and motion artifacts. The first PPG signal is preprocessed to filter out interference signals. When removing the baseline drift and high-frequency noise of the first PPG signal, refer to Figure 2 , a linear phase integer coefficient filter can be first used to remove the baseline drift of the first PPG signal. By using a linear phase integer coefficient filter to remove the baseline drift of the first PPG signal, real-time operation can be met on the wearable device, making the filtering simple and efficient, preventing the PPG waveform from being distorted after filtering, ensuring the integrity of the PPG waveform, and also improving the operation rate. The prior art uses a high-pass filter to filter out interference signals. General high-pass filters such as Butterworth filters are nonlinear phase filters, which will cause the PPG waveform to be distorted after filtering. At the same time, the filter coefficients are floating point types, which will reduce the operating efficiency. The present application uses a linear phase integer coefficient filter to remove the baseline drift. Since the filter coefficients are integers, the operation rate can be improved, real-time operation can be met on the wearable device, and the PPG waveform can be guaranteed not to be distorted. The linear high-pass filter is composed of a low-pass filter and an all-pass filter with the same delay as the low-pass filter. The specific principles are as follows:
[0027]
[0028]
[0029]
[0030]
[0031]
[0032]
[0033] Y1(Z)=H1(Z)×X(Z)
[0034]
[0035] Among them, f pm is the 3db cutoff frequency point, h1 is the maximum fluctuation amplitude in the passband, K and M are both integers, Y1(Z), Y2(Z), Y3(Z) are the outputs of the all-pass filter, low-pass filter and high-pass filter, H1(Z), H2(Z), H3(Z) are the transfer functions of the all-pass filter, low-pass filter and high-pass filter. y3(n) is the inverse transform of Y3(Z), x(n) is the inverse transform of X(Z), x(n) is the input signal, y1(n) is the inverse transform of Y1(Z), f s2 is 50Hz, f s1 is the sampling frequency and L is the length of the filter.
[0036] Then, a low-pass filter is used to remove the high-frequency noise of the first PPG signal. The low-pass filter may be a FIR low-pass filter, which can effectively remove the high-frequency noise while ensuring that the PPG waveform is not distorted and the calculation is simple. It should be understood that the above only shows one way to remove baseline drift and high-frequency noise. In addition, other ways may be used.
[0037] Next, refer to Figure 1 and Figure 2 , find all the peaks in the second PPG signal. When specifically looking for all the peaks in the second PPG signal, a sliding window threshold method can be used to find all the peaks in the second PPG signal. Since wearable devices are worn on the hands, there will be more motion artifacts. Traditional differential and extreme value methods will cause false detection of PPG peaks in the presence of motion artifacts, making PRV calculation inaccurate. The present application can use the sliding window threshold method to find all the peaks in the second PPG signal, which can effectively avoid motion artifacts and accurately find PPG peaks.
[0038] The principle of using the sliding window threshold method to find all the peaks in the second PPG signal is as follows: Figure 1-3, a sliding window with a time length of a×fs×f can be set, where fs represents the sampling rate and f represents the preset frequency. Then use the sliding window to slide on the second PPG signal, and find the maximum and minimum values of the second PPG signal in the sliding window after each sliding. Determine whether the maximum value meets the amplitude value of 0.7 to 1.3 times the previous peak, and whether the minimum value meets the amplitude value of 0.7 to 1.3 times the previous trough. If the maximum value meets the amplitude of 0.7 to 1.3 times the previous peak and the minimum value meets the amplitude of 0.7 to 1.3 times the previous trough, the maximum value is the peak of the PPG signal in the sliding window. If one of the maximum and minimum values does not meet the above conditions, the sliding window continues to slide until all peaks in the second PPG signal are found. If there is motion interference, the collected PPG signal is extremely unstable, and the peak or trough amplitude is large. Only when the maximum and minimum values in the sliding window meet the above conditions, the maximum value is used as the peak amplitude. By using the sliding window threshold method to find all the peaks in the second PPG signal, the PPG peak points can be accurately found in the presence of motion interference, which facilitates the subsequent more accurate calculation of PRV data, making the subsequent time-frequency domain feature extraction more accurate.
[0039] refer to Figure 3 , wherein the preset frequency f can be determined in the following manner: transform the second PPG signal into the frequency domain through Fourier transform; find the peak with the largest amplitude in the second PPG signal transformed into the frequency domain through Fourier transform, and determine whether the peak with the largest amplitude has harmonics; if the peak with the largest amplitude has harmonics, the frequency of the peak with the largest amplitude is used as the preset frequency f; if the peak with the largest amplitude does not have harmonics, find the peak with the second largest amplitude in the second PPG signal transformed into the frequency domain through Fourier transform, and use the frequency of the peak with the second largest amplitude as the preset frequency f. By determining the size of the preset frequency f in the above manner, the step time length of the sliding window can be dynamically adjusted, so that the sliding window is suitable for PPG signals in different states.
[0040] Next, refer to Figure 1 and Figure 2 , the second PPG signal may include PRV data of multiple RR intervals, where the RR interval is the time difference between two adjacent peaks.
[0041] In addition, after obtaining PRV data containing multiple RR intervals, before calculating the time domain and frequency domain indicators of the PRV data, refer to Figure 2, the singular point data in the PRV data can be removed first to prevent the singular point data in the PRV data from affecting the accuracy of subsequent time-frequency domain feature extraction. Specifically, the following method can be used to remove the singular point data in the PRV data. Determine whether each RR interval in multiple RR intervals meets the following conditions: 0.8×P(i)﹤P(i+1)﹤1.2×P(i); where P(i) and P(i+1) represent the i-th RR interval and the i+1-th RR interval in multiple RR intervals, respectively. If satisfied, the i+1-th RR interval is retained, that is, P(i+1). If not satisfied, the i+1-th RR interval is removed from the PRV data as singular point data. This method makes it easy to find each singular point accurately.
[0042] Next, if Figure 1 and Figure 2 As shown, the time domain index and frequency domain index of PRV data are calculated. When calculating the time domain index and frequency domain index of PRV data, the PRV mean value, PRV standard deviation and the root mean square value of the difference between adjacent RR intervals of the PRV data can be calculated first as the time domain index of the PRV data. Specifically, the following formula for calculating the time domain index of PRV data can be used:
[0043]
[0044]
[0045]
[0046] Mean represents the PRV mean of the calculated PRV data, SDNN represents the standard deviation of the calculated PRV data, r-MSSD represents the root mean square value of the difference between adjacent RR intervals, and RR i is the time difference between the i-th and i+1-th PPG peaks, and RR is the time difference between two adjacent PPG peaks.
[0047] Then, the low-frequency power, high-frequency power, and low-frequency power / high-frequency power of the PRV data are calculated as the frequency domain indicators of the PRV data. The Lomb-Scargle algorithm can be used to analyze and transform the time domain signal into the frequency domain, so that the frequency domain indicators are more accurate. Specifically, the Lomb-Scargle algorithm can be used to analyze the PRV frequency domain indicators to obtain the power spectrum information. It should be explained that the Lomb-Scargle periodogram method is based on the principle of discrete Fourier transform, which decomposes the time domain signal into a linear combination of some sine functions y=acosωt+bsinωt, and converts the time domain signal to the frequency domain. The Lomb-Scargle periodogram method uses the least squares method to fit the model curve to the data using the sine function, and uses the mean square error to judge the implicit periodic change trend of the data, so that the Fourier transform can be applied to non-uniform signals. Lomb-Scargle has a good effect on analyzing non-uniform signals, can effectively extract weak periodic signals, and can also reduce the false signals generated by non-uniform signals in the time domain. The mathematical expression of Lomb-scargle is as follows.
[0048]
[0049] Where f represents frequency, P x (f) is the power spectrum of each frequency band, τ is the time offset, t j is the sampling time, X(t j ) is t j Input data at the moment.
[0050] Then, the low-frequency power, high-frequency power, and low-frequency power / high-frequency power of the PRV data are calculated using the following formula.
[0051]
[0052]
[0053]
[0054] LF represents the low-frequency power of PRV data, which is the total power of 0.04-0.15Hz. HF represents the high-frequency power of PRV data, which is the total power of 0.15-0.4Hz. LH represents the low-frequency power / high-frequency power of PRV data, which is LF / HF.
[0055] The above method is used to calculate the time-frequency domain indicators of PRV data, which facilitates the accurate extraction of the time-frequency domain features of PRV data and improves the accuracy of the time-frequency domain indicators.
[0056] Next, refer to Figure 1 and Figure 2, input the time domain index and the frequency domain index into the emotional stress classification model to obtain the emotional stress state of the user. The emotional stress classification model can be a BP neural network model obtained by neural network training. It should be explained that the BP neural network is a multi-layer feedforward network trained by the error back propagation algorithm, and the model training includes forward propagation and reverse calculation. Forward propagation means that the input data is transmitted from the input layer, processed by the hidden layer, and then transmitted to the output layer. The network minimizes the mean square error between the output and the expected value, and the weight value and threshold of each network layer are reversely calculated by the gradient descent method to obtain the model parameters. The BP neural network model in this application includes six input nodes, and the six input nodes are used to input the PRV mean, PRV standard deviation, the root mean square value of the difference between adjacent RR intervals, low frequency power, high frequency power, and low frequency power / high frequency power. The BP neural network model includes four output nodes for outputting a certain emotional stress state in the emotional stress state category; wherein the emotional stress state category includes at least: no stress state, mild stress state, moderate stress state, and high stress state. Each output node corresponds to an emotional stress state category.
[0057] The neural network training process of the BP neural network model can be carried out in the following manner: obtain training set data and train the BP neural network model. The training set data is subjected to stress tests of different degrees (no stress, mild stress, moderate stress, and high stress), and PPG data of different stress states are obtained. PRV is calculated and features are extracted, including Mean, SDNN, r-MSSD, LF, HF, and LH. The training set data is then used as the input feature of the neural network to train the neural network model. The trained model is then used as the BP neural network model to clearly judge the stress state and output the emotional stress state (no stress, mild stress, moderate stress, and high stress).
[0058] When the BP neural network model obtained by the above neural network training is used as the emotional stress classification model, the time domain index and the frequency domain index are input into the emotional stress classification model to obtain the user's emotional stress state. Specifically, the PRV mean, PRV standard deviation, root mean square value of the difference between adjacent RR intervals, low frequency power, high frequency power, and low frequency power / high frequency power of the calculated PRV data are input into the BP neural network model to obtain the user's emotional stress state. By classifying the stress state through the BP neural network, the accurate measurement of the stress state is realized, the stress state can be monitored for a long time, and the stress monitoring is more convenient and intelligent.
[0059] It should be noted that the above emotional stress classification model is not limited to the BP neural network model, and other methods may be used. For example, the SVM multi-classification model may be used instead of the BP neural network model.
[0060] In the various embodiments shown above, the PPG signal of the user's pulse within a preset time period is obtained by using a PPG sensor on a smart wearable device. The PPG signal within the preset time period is the first PPG signal. The first PPG signal is processed to remove baseline drift and high-frequency noise to obtain a second PPG signal; all peaks in the second PPG signal are found, and the second PPG signal contains PRV data of multiple RR intervals, where the RR interval is the time difference between two adjacent peaks; the time domain index and frequency domain index of the PRV data are calculated, and the emotional stress state of the user can be obtained by inputting the emotional stress classification model. Compared with the prior art that uses ECG to monitor emotional stress, the solution in the present application can collect the PPG signal of the user's pulse in real time based on smart wearable devices, and monitor the user's emotional stress state in real time and for a long time.
[0061] In addition, an embodiment of the present invention further provides an emotional stress monitoring device, which is applied to a smart wearable device. The emotional stress monitoring device includes: an acquisition module, a preprocessing module, a peak finding module, a first calculation module, a second calculation module and an emotional stress classification model. Among them, the acquisition module is used to obtain a PPG signal within a preset time period of the user's pulse through a PPG sensor, and the PPG signal within the preset time period is a first PPG signal. The preprocessing module is used to remove the baseline drift and high-frequency noise of the first PPG signal to obtain a second PPG signal. The peak finding module is used to find all peaks in the second PPG signal. The first calculation module is used to calculate the PRV data of the second PPG signal containing multiple RR intervals, and the RR interval is the time difference between two adjacent peaks. The second calculation module is used to calculate the time domain index and the frequency domain index of the PRV data. The emotional stress classification model is used to receive the time domain index and the frequency domain index, and output the user's emotional stress state according to the received time domain index and the frequency domain index.
[0062] In the above scheme, the PPG signal of the user's pulse within a preset time period is obtained by using the PPG sensor on the smart wearable device. The PPG signal within the preset time period is the first PPG signal. The first PPG signal is processed to remove the baseline drift and high-frequency noise to obtain the second PPG signal; all the peaks in the second PPG signal are found, and the PRV data of the second PPG signal containing multiple RR intervals is calculated. The RR interval is the time difference between two adjacent peaks; the time domain index and frequency domain index of the PRV data are calculated, and the emotional stress state of the user can be obtained by inputting the emotional stress classification model. Compared with the prior art that uses ECG to monitor emotional stress, the scheme in the present application can collect the PPG signal of the user's pulse in real time based on the smart wearable device, and monitor the user's emotional stress state in real time and for a long time.
[0063] It should be explained that the above-mentioned acquisition module, preprocessing module, peak search module, first calculation module, second calculation module and emotional stress classification model are specifically functional modules that realize corresponding functions. Each functional module is specifically a collection of hardware and software. The hardware is specifically hardware with logical operation and storage functions such as processors and memories, and the software is specifically software code stored in the memory. When the processor reads and executes the software code, it can execute the corresponding functions of the corresponding functional modules. In addition, it should be noted that the functional modules in the emotional stress monitoring device are not limited to the modules shown above, and other functional modules may also be included.
[0064] For example, the preprocessing module may include a first removal module and a second removal module, wherein the first removal module is used to remove the baseline drift of the first PPG signal by using a linear phase integer coefficient filter, and the second removal module is used to remove the high-frequency noise of the first PPG signal by using a low-pass filter.
[0065] The peak search module may include a sliding window module. The sliding window module is used to set a sliding window with a time length of a×fs×f, where fs represents the sampling rate and f represents the preset frequency. The sliding window module is also used to slide the sliding window on the second PPG signal and find the maximum and minimum values of the second PPG signal in the sliding window after each sliding. The sliding window module is also used to determine whether the maximum value meets the amplitude value of 0.7 to 1.3 times the previous peak, and whether the minimum value meets the amplitude value of 0.7 to 1.3 times the previous trough; if the maximum value meets the amplitude of 0.7 to 1.3 times the previous peak and the minimum value meets the amplitude of 0.7 to 1.3 times the previous trough, the sliding window module uses the maximum value as the peak of the PPG signal in the sliding window; if one of the maximum and minimum values does not meet the above conditions, the sliding window continues to slide.
[0066] The peak search module may further include a preset frequency module, which is used to determine the preset frequency f in the following manner. The preset frequency module transforms the second PPG signal into the frequency domain through Fourier transform; the preset frequency module finds the peak with the largest amplitude in the second PPG signal transformed into the frequency domain through Fourier transform, and determines whether the peak with the largest amplitude has harmonics; if the peak with the largest amplitude has harmonics, the preset frequency module uses the frequency of the peak with the largest amplitude as the preset frequency f; if the peak with the largest amplitude does not have harmonics, the preset frequency module finds the peak with the second largest amplitude in the second PPG signal transformed into the frequency domain through Fourier transform, and uses the frequency of the peak with the second largest amplitude as the preset frequency f.
[0067] The emotional stress monitoring device may further include a singular point data removal module, which removes the singular point data in the PRV data before calculating the time domain index and the frequency domain index of the PRV data.
[0068] The singular point data removal module can remove the singular point data in the PRV data in the following manner. The singular point data removal module determines whether each RR interval in multiple RR intervals satisfies the following condition: 0.8×P(i)﹤P(i+1)﹤1.2×P(i); wherein P(i) and P(i+1) represent the i-th RR interval and the i+1-th RR interval in multiple RR intervals, respectively; if satisfied, the singular point data removal module retains the i+1-th RR interval, i.e., P(i+1); if not satisfied, the singular point data removal module removes the i+1-th RR interval as singular point data from the PRV data.
[0069] The second calculation module can calculate the time domain index and frequency domain index of the PRV data in the following manner. The second calculation module calculates the PRV mean, PRV standard deviation and the root mean square value of the difference between adjacent RR intervals of the PRV data as the time domain index of the PRV data. The second calculation module calculates the low frequency power, high frequency power, and low frequency power / high frequency power of the PRV data as the frequency domain index of the PRV data.
[0070] The emotional stress classification model can be a BP neural network model obtained by neural network training; wherein the BP neural network model includes six input nodes, and the six input nodes are respectively used to input the PRV mean, PRV standard deviation, the root mean square value of the difference between adjacent RR intervals, low frequency power, high frequency power, and low frequency power / high frequency power; the BP neural network model includes four output nodes, which are used to output a certain emotional stress state in the emotional stress state category; wherein the emotional stress state category at least includes: no stress state, mild stress state, moderate stress state, and high stress state. When the time domain index and frequency domain index calculated by the second calculation module are input into the emotional stress classification model to obtain the emotional stress state of the user, the PRV mean, PRV standard deviation, the root mean square value of the difference between adjacent RR intervals, low frequency power, high frequency power, and low frequency power / high frequency power of the calculated PRV data are input into the BP neural network model to obtain the emotional stress state of the user.
[0071] In addition, an embodiment of the present invention also provides a smart wearable device, which includes a PPG sensor and a processor connected to the PPG sensor; the PPG sensor is used to obtain a PPG signal within a preset time period of the user's pulse, the PPG signal within the preset time period is a first PPG signal, and the first PPG signal is sent to the processor; the processor is used to execute the aforementioned emotional stress monitoring method.
[0072] The embodiment of the present invention further provides a smart wearable device, which includes: a body. The body may be a dial and a strap of the smart wearable device, and various functional components of the smart wearable device are integrated in the dial. The above-mentioned emotional stress monitoring device is integrated in the body.
[0073] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0074] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0075] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0076] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. An emotional stress monitoring method, applied to a smart wearable device, characterized in that: include: Acquire a PPG signal of a user's pulse within a preset time period through a photoplethysmography (PPG) sensor, wherein the PPG signal within the preset time period is a first PPG signal; removing the baseline drift and high-frequency noise of the first PPG signal to obtain a second PPG signal; Find all peaks in the second PPG signal; Calculating pulse rate variability (PRV) data of a plurality of RR intervals in the second PPG signal; the RR interval being the time difference between two adjacent peaks; Calculating time domain indicators and frequency domain indicators of the PRV data; Inputting the time domain index and the frequency domain index into an emotional stress classification model to obtain the emotional stress state of the user; Wherein, searching for all peaks in the second PPG signal includes: Set a sliding window with a time length of a×fs×f, where fs represents the sampling rate and f represents the preset frequency; Slide the second PPG signal using the sliding window, and find the maximum value and the minimum value of the second PPG signal within the sliding window after sliding; Determine whether the maximum value satisfies an amplitude value of 0.7 to 1.3 times of the previous peak, and whether the minimum value satisfies an amplitude value of 0.7 to 1.3 times of the previous trough; If satisfied, the maximum value is the peak of the second PPG signal within the sliding window; If not satisfied, the sliding window continues to slide until all peaks in the second PPG signal are found; The preset frequency f is determined in the following manner: Transforming the second PPG signal into the frequency domain through Fourier transform; Finding the peak with the largest amplitude in the second PPG signal converted to the frequency domain by Fourier transform, and determining whether the peak with the largest amplitude has harmonics; If the peak with the largest amplitude has harmonics, the frequency of the peak with the largest amplitude is used as the preset frequency f; If the peak with the largest amplitude does not have harmonics, find the peak with the second largest amplitude in the second PPG signal transformed to the frequency domain through Fourier transform, and use the frequency of the peak with the second largest amplitude as the preset frequency f.
2. The emotional stress monitoring method according to claim 1, characterized in that: The removing of the baseline drift and high-frequency noise of the first PPG signal comprises: Using a linear phase integer coefficient filter to remove the baseline drift of the first PPG signal; A low-pass filter is used to remove high-frequency noise of the first PPG signal.
3. The emotional stress monitoring method according to claim 1, characterized in that: Before calculating the time domain index and the frequency domain index of the PRV data, the method includes: The singular point data in the PRV data is removed.
4. The emotional stress monitoring method according to claim 3, characterized in that: The removing of singular point data in the PRV data comprises: Determine whether each RR interval in the plurality of RR intervals satisfies the following condition: 0.8×P(i)<P(i+1)<1.2×P(i); wherein P(i) and P(i+1) represent the i-th RR interval and the i+1-th RR interval in the plurality of RR intervals, respectively; If satisfied, keep P(i+1); If not satisfied, remove P(i+1).
5. The emotional stress monitoring method according to claim 1, wherein the step of calculating the time domain index and the frequency domain index of the PRV data comprises: Calculating the PRV mean value, PRV standard deviation and the root mean square value of the difference between adjacent RR intervals of the PRV data as the time domain index of the PRV data; The low-frequency power, high-frequency power, and low-frequency power / high-frequency power of the PRV data are calculated as frequency domain indicators of the PRV data.
6. The emotional stress monitoring method according to claim 5, characterized in that: The emotional stress classification model is a BP neural network model obtained by neural network training; wherein the BP neural network model includes six input nodes, and the six input nodes are respectively used to input the PRV mean, the PRV standard deviation, the root mean square value of the difference between adjacent RR intervals, the low-frequency power, the high-frequency power, and the low-frequency power / high-frequency power; the BP neural network model includes four output nodes, which are used to output a certain emotional stress state in the emotional stress state category; wherein the emotional stress state category includes at least: no stress state, mild stress state, moderate stress state and high stress state; The step of inputting the time domain index and the frequency domain index into the emotional stress classification model to obtain the emotional stress state of the user comprises: inputting the calculated PRV mean value, PRV standard deviation, root mean square value of the difference between adjacent RR intervals, low frequency power, high frequency power, and low frequency power / high frequency power of the PRV data into the BP neural network model to obtain the emotional stress state of the user.
7. An emotional stress monitoring device, applied to a smart wearable device, characterized in that: include: An acquisition module, used for acquiring a PPG signal of a user's pulse within a preset time period through a photoplethysmography (PPG) sensor, wherein the PPG signal within the preset time period is a first PPG signal; A preprocessing module, used to remove the baseline drift and high-frequency noise of the first PPG signal to obtain a second PPG signal; A peak finding module, used to find all peaks in the second PPG signal; A first calculation module is used to calculate the pulse rate variability (PRV) data of the second PPG signal including a plurality of RR intervals; the RR interval is the time difference between two adjacent peaks; A second calculation module, used to calculate the time domain index and frequency domain index of the PRV data; An emotional stress classification model, used for receiving the time domain index and the frequency domain index, and outputting the emotional stress state of the user according to the received time domain index and the frequency domain index; Wherein, the peak finding module includes: Sliding window module: The sliding window module is used to set a sliding window with a time length of a×fs×f, wherein fs represents the sampling rate and f represents the preset frequency; use the sliding window to slide on the second PPG signal, and find the maximum value and the minimum value of the second PPG signal in the sliding window after sliding; determine whether the maximum value satisfies the amplitude value of 0.7 to 1.3 times of the previous peak, and whether the minimum value satisfies the amplitude value of 0.7 to 1.3 times of the previous trough; if satisfied, the maximum value is the peak of the second PPG signal in the sliding window; if not satisfied, the sliding window continues to slide until all peaks in the second PPG signal are found; A preset frequency module, the preset frequency module is used to determine the preset frequency f in the following manner: transform the second PPG signal into the frequency domain through Fourier transform; find the peak with the largest amplitude in the second PPG signal transformed into the frequency domain through Fourier transform, and determine whether the peak with the largest amplitude has harmonics; if the peak with the largest amplitude has harmonics, use the frequency of the peak with the largest amplitude as the preset frequency f; if the peak with the largest amplitude does not have harmonics, find the peak with the second largest amplitude in the second PPG signal transformed into the frequency domain through Fourier transform, and use the frequency of the peak with the second largest amplitude as the preset frequency f.
8. A smart wearable device, characterized in that: include: A PPG sensor and a processor connected to the PPG sensor; The PPG sensor is used to obtain a PPG signal of a user's pulse within a preset time period, the PPG signal within the preset time period is a first PPG signal, and the first PPG signal is sent to the processor; The processor is used to execute the emotional stress monitoring method according to any one of claims 1 to 6.
