CN111920429B - Mental stress detection method and device and electronic equipment - Google Patents
Mental stress detection method and device and electronic equipment Download PDFInfo
- Publication number
- CN111920429B CN111920429B CN202010954324.4A CN202010954324A CN111920429B CN 111920429 B CN111920429 B CN 111920429B CN 202010954324 A CN202010954324 A CN 202010954324A CN 111920429 B CN111920429 B CN 111920429B
- Authority
- CN
- China
- Prior art keywords
- value
- user
- frequency power
- obtaining
- peak
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 230000003340 mental effect Effects 0.000 title claims abstract description 61
- 238000001514 detection method Methods 0.000 title claims abstract description 33
- 238000000034 method Methods 0.000 claims abstract description 32
- 230000003287 optical effect Effects 0.000 claims abstract description 28
- 238000001228 spectrum Methods 0.000 claims description 23
- 238000004364 calculation method Methods 0.000 claims description 19
- 230000008859 change Effects 0.000 claims description 13
- 230000001133 acceleration Effects 0.000 claims description 11
- 238000004590 computer program Methods 0.000 claims description 7
- 238000012952 Resampling Methods 0.000 claims description 3
- 238000000926 separation method Methods 0.000 claims 2
- 230000002159 abnormal effect Effects 0.000 description 11
- 238000012545 processing Methods 0.000 description 8
- 238000005070 sampling Methods 0.000 description 7
- 238000004891 communication Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000005259 measurement Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 238000001914 filtration Methods 0.000 description 2
- 230000010354 integration Effects 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 230000003190 augmentative effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000009499 grossing Methods 0.000 description 1
- 230000036541 health Effects 0.000 description 1
- 230000006996 mental state Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/16—Devices for psychotechnics; Testing reaction times ; Devices for evaluating the psychological state
- A61B5/165—Evaluating the state of mind, e.g. depression, anxiety
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/02—Detecting, measuring or recording for evaluating the cardiovascular system, e.g. pulse, heart rate, blood pressure or blood flow
- A61B5/024—Measuring pulse rate or heart rate
- A61B5/02416—Measuring pulse rate or heart rate using photoplethysmograph signals, e.g. generated by infrared radiation
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/72—Signal processing specially adapted for physiological signals or for diagnostic purposes
- A61B5/7203—Signal processing specially adapted for physiological signals or for diagnostic purposes for noise prevention, reduction or removal
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/72—Signal processing specially adapted for physiological signals or for diagnostic purposes
- A61B5/7235—Details of waveform analysis
- A61B5/725—Details of waveform analysis using specific filters therefor, e.g. Kalman or adaptive filters
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/72—Signal processing specially adapted for physiological signals or for diagnostic purposes
- A61B5/7235—Details of waveform analysis
- A61B5/7253—Details of waveform analysis characterised by using transforms
- A61B5/7257—Details of waveform analysis characterised by using transforms using Fourier transforms
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Veterinary Medicine (AREA)
- Surgery (AREA)
- Psychiatry (AREA)
- Public Health (AREA)
- General Health & Medical Sciences (AREA)
- Animal Behavior & Ethology (AREA)
- Molecular Biology (AREA)
- Biophysics (AREA)
- Pathology (AREA)
- Biomedical Technology (AREA)
- Heart & Thoracic Surgery (AREA)
- Medical Informatics (AREA)
- Physiology (AREA)
- Signal Processing (AREA)
- Artificial Intelligence (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Cardiology (AREA)
- Social Psychology (AREA)
- Psychology (AREA)
- Hospice & Palliative Care (AREA)
- Child & Adolescent Psychology (AREA)
- Developmental Disabilities (AREA)
- Educational Technology (AREA)
- Mathematical Physics (AREA)
- Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)
Abstract
The method comprises the steps of firstly acquiring a light volume description signal of a user, calculating a peak interval value according to a peak of the acquired light volume description signal, and acquiring an average heart rate, a low-frequency power and a high-frequency power of the user according to the peak interval value, so that a mental pressure value of the user is calculated through the average heart rate, the low-frequency power and the high-frequency power. According to the mental stress detection device and the mental stress detection method, the optical volume description signal of the user is acquired, the mental stress value of the user is calculated based on the optical volume signal, the user can see the mental stress condition more visually through the value of the value, the size of the sensor acquiring the optical volume description signal is small, the size of the device used for detecting the mental stress of the user is small, and the device is convenient to carry.
Description
Technical Field
The application relates to the technical field of data processing, in particular to a mental stress detection method and device and electronic equipment.
Background
People in modern society are exposed to various stresses, and are often required to bear mental stress in various aspects of work, life, economy, interpersonal relationship, and the like. The continuous mental stress can bring psychological and physiological obstacles and defects, the daily mental stress state of the individual is tracked and recorded in real time, the individual is warned in time when abnormality occurs, and appropriate intervention and guidance are given, so that the individual can be promoted to keep a good mental state.
At present, the electrocardiograph is mainly used to obtain the electrocardiographic chart of the ECG of the patient, and the professional instrument is used to analyze the Heart Rate Variability (HRV) of the user, so as to determine the overall health condition and mental and physiological stable states of the user.
However, such instruments cannot be widely used due to their large size and the fact that the measurement results need to be interpreted by a professional.
Disclosure of Invention
In view of this, an object of the present application is to provide a mental stress detection method, apparatus and electronic device for measuring a mental stress value of a user.
In a first aspect, an embodiment of the present application provides a mental stress detection method, including:
acquiring a light volume description signal of a user;
obtaining a plurality of peaks of the light volume description signal;
calculating the time interval between two adjacent wave crests to obtain a plurality of wave crest interval values;
calculating an average of a plurality of the peak interval values and calculating an average heart rate of the user based on the average;
obtaining a power spectrum of the heart rate variability of the user according to the peak interval values, and calculating low-frequency power and high-frequency power of the power spectrum;
and calculating the pressure value of the user according to the average heart rate, the low-frequency power and the high-frequency power of the user.
In an alternative embodiment, the method further comprises:
acquiring a change value of an acceleration signal of a user within a preset time interval;
and judging whether to stop acquiring the light volume description signal of the user or not according to the size of the change value.
In an optional embodiment, the determining whether to terminate acquiring the light volume description signal of the user according to the magnitude of the change value includes:
judging whether the change value is larger than a preset change range or not according to the change value in each preset time interval;
if the variation value is larger than the preset variation range, judging that the movement amplitude in a preset time interval corresponding to the variation value is large;
judging whether the time continuously judged as the time with large motion amplitude is greater than a preset time threshold value or not;
and if the light volume description signal is larger than the preset time threshold, terminating the acquisition of the light volume description signal of the user.
In an alternative embodiment, said obtaining a plurality of peaks of said light volume description signal comprises:
de-noising the light volume description signal;
searching a maximum value of the denoised luminous volume description signal, wherein the maximum value is larger than the values of two points adjacent to the maximum value;
judging whether the maximum value is the maximum value of the adjacent preset number of points;
and if so, judging that the maximum value is a peak of the light volume description signal.
In an alternative embodiment, before calculating the average of a plurality of said peak interval values, said method further comprises:
judging whether the peak interval value is within a preset threshold range or not according to each peak interval value;
and if the peak interval value is out of the preset threshold range, removing the peak interval value.
In an alternative embodiment, before calculating the average of a plurality of said peak interval values, said method further comprises:
judging whether the difference value between the peak interval value and the previous peak interval value is greater than a preset value or not according to each peak interval value;
if the peak value is larger than the preset value, the peak interval value is removed.
In an alternative embodiment, obtaining a power spectrum of heart rate variability of the user from a plurality of said peak interval values comprises:
resampling the plurality of peak interval values by cubic spline interpolation;
performing a discrete Fourier transform on the resampled plurality of peak interval values to obtain a power spectrum of the heart rate variability of the user.
In an optional embodiment, the calculating the pressure value of the user according to the average heart rate, the low frequency power and the high frequency power of the user includes:
calculating a pressure value for the user by the following formula:
STRESS=A*HR+B*LF*HF+C
the method comprises the steps of obtaining a pressure value of a user, obtaining an average heart rate of the user, obtaining a low frequency power (LF), obtaining a high frequency power (HF), and obtaining constants of A, B and C.
In a second aspect, an embodiment of the present application provides a mental stress detection apparatus, including:
the signal acquisition module is used for acquiring a light volume description signal of a user;
a peak acquisition module for acquiring a plurality of peaks of the light volume description signal;
the first calculation module is used for calculating the time interval between two adjacent wave crests to obtain a plurality of wave crest interval values;
a second calculation module, configured to calculate an average value of the peak interval values, and calculate an average heart rate of the user based on the average value;
the third calculation module is used for obtaining a power spectrum of the heart rate variability of the user according to the plurality of peak interval values and calculating low-frequency power and high-frequency power of the power spectrum;
and the pressure value calculation module is used for calculating the pressure value of the user according to the average heart rate, the low-frequency power and the high-frequency power of the user.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the steps of the method in any one of the foregoing embodiments when executing the computer program.
According to the mental stress detection method, the mental stress detection device and the electronic equipment, firstly, the optical volume description signal of the user is obtained, the peak interval value is calculated according to the peak of the obtained optical volume description signal, the average heart rate, the low-frequency power and the high-frequency power of the user are obtained according to the peak interval value, and therefore the mental stress value of the user is calculated through the average heart rate, the low-frequency power and the high-frequency power. According to the mental stress detection device and the mental stress detection method, the optical volume description signal of the user is acquired, the mental stress value of the user is calculated based on the optical volume signal, the user can see the mental stress condition more visually through the value of the value, the size of the sensor acquiring the optical volume description signal is small, the size of the device used for detecting the mental stress of the user is small, and the device is convenient to carry.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
To more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
FIG. 1 is a schematic view of an electronic device provided herein;
fig. 2 is a flowchart of a mental stress detection method applied to the electronic device in fig. 1 according to an embodiment of the present disclosure;
fig. 3 is a flowchart illustrating sub-steps of step S102 in fig. 2 according to an embodiment of the present disclosure;
fig. 4 is a second flowchart of a stress detection method according to an embodiment of the present application;
fig. 5 is a third flowchart of a mental stress detection method according to an embodiment of the present application;
fig. 6 is a partial sub-step flowchart of step S105 in fig. 2 provided in an embodiment of the present application;
fig. 7 is a fourth flowchart of a mental stress detection method according to an embodiment of the present application;
fig. 8 is a functional block diagram of a mental stress detection apparatus according to an embodiment of the present application.
Description of the main element symbols: 10-an electronic device; 11-a processor; 12-a memory; 100-stress detection means; 101-a signal acquisition module; 102-a peak acquisition module; 103-a first calculation module; 104-a second calculation module; 105-a third calculation module; 106-pressure value calculation module.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
First, referring to fig. 1, fig. 1 is a schematic view of an electronic device 10 provided in the present application. In the present embodiment, the mental stress detection method is applied to the electronic device 10 in fig. 1, the electronic device 10 may include a memory 12 and a processor 11, the memory 12 stores a computer program, and the processor 11 executes the computer program to implement the mental stress detection method provided in the following embodiments of the present embodiment.
In some embodiments, processor 11 may include one or more processing cores (e.g., a single-core processor (S) or a multi-core processor (S)). By way of example only, processor 11 may include a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), an Application Specific Instruction Set Processor (ASIP), a Graphics Processing Unit (GPU), a Physical Processing Unit (PPU), a Digital Signal Processor (DSP), a Field Programmable Gate Array (FPGA), a Programmable Logic Device (PLD), a controller, a microcontroller Unit, a Reduced Instruction Set Computer (RISC), a microprocessor, or the like, or any combination thereof.
In some embodiments, the electronic device 10 may be any one of a mobile phone, a tablet computer, a wearable device, a smart home device, an in-vehicle device, an Augmented Reality (AR)/Virtual Reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, and a Personal Digital Assistant (PDA), and the specific type of the electronic device 10 is not limited in this embodiment.
For describing the stress detection method provided in the embodiment of the present application in detail, please refer to fig. 1 and fig. 2 in combination, and fig. 2 is a flowchart of the stress detection method applied to the electronic device 10 in fig. 1 provided in the embodiment of the present application.
In the present embodiment, a sensor for acquiring a photo volume description signal (PPG) of the user is provided in the electronic device 10. The method comprises the following steps:
step S101, acquiring a light volume description signal of a user;
step S102, a plurality of peaks of the light volume description signal are acquired.
Step S103, calculating the time interval between two adjacent wave crests to obtain a plurality of wave crest interval values.
Step S104, calculating the average value of the plurality of peak interval values, and calculating the average heart rate of the user based on the average value.
Step S105, obtaining a power spectrum of the heart rate variability of the user according to the plurality of peak interval values, and calculating low-frequency power and high-frequency power of the power spectrum.
And step S106, calculating the pressure value of the user according to the average heart rate, the low-frequency power and the high-frequency power of the user.
In the above steps, the electronic device 10 obtains the light volume description signal of the user, and calculates the mental pressure value of the user based on the light volume signal, so that the user can more intuitively see the mental pressure of the user through the value, and the sensor obtaining the light volume description signal has a small volume, so that the device for detecting the mental pressure of the user has a small volume and is convenient to carry.
For example, the electronic device 10 may acquire the light volume description signal of the user through a built-in sensor at preset time intervals, for example, the electronic device 10 may acquire the light volume description signal of the user every 1s interval and generate a continuous light volume description signal.
The electronic device 10 needs to acquire a plurality of peaks of the light volume description signal after acquiring the continuous light volume description signal. Specifically, referring to fig. 3 in combination, fig. 3 is a flowchart illustrating sub-steps of step S102 in fig. 2 according to an embodiment of the present disclosure, where in the embodiment, step S102 includes the following sub-steps:
and a substep S1021, denoising the optical volume description signal.
In order to ensure the accuracy and reliability of the calculation result, the acquired light volume description signal needs to be preprocessed.
In a possible embodiment, the optical volume description signal may be preprocessed by a moving average filtering method to eliminate noise interference of the optical volume description signal curve. The processing mode of the moving average filtering is as follows: selecting a window of a certain length N, calculating the arithmetic mean of all values within the window, taking the arithmetic mean as the right end point value of the window, subsequently sliding the window one grid to the right in the light volume describing signal curve, obtaining a new window of length N, calculating again a new arithmetic mean of all values within the new window, and taking the new arithmetic mean as the right end point value of the new window. The above steps are repeated until the window slides to the rightmost end of the light volume description signal curve.
In the above embodiments, the value of the specific length N may be selected according to experimental data or experimental experience, and is not limited herein. It should be noted that if the value of the specific length N is selected to be too small, the smoothing effect will be weakened, and if the value is selected to be too large, an overfitting phenomenon will occur.
In sub-step S1022, the maximum value of the denoised optical volume description signal is searched. Wherein the maximum value is greater than the values of two points adjacent to the maximum value.
And a substep S1023 of determining whether the maximum value is the maximum value of the preset number of adjacent points.
And a substep S1024, if yes, determining that the maximum value is a peak of the optical volume description signal.
In sub-steps S1022 to S1024, after the electronic device 10 performs denoising preprocessing on the light volume description signal, a maximum value of the denoised light volume description signal is searched, wherein the maximum value is greater than the values of the adjacent points.
For example, if there are three consecutive points in the light volume description signal, which are point a, point B, and point C, respectively, where the point a corresponds to a value A1, the point B corresponds to a value B2, and the point C corresponds to a value C3. If the value B2 of the point B is larger than the values A1 and C3, the point B2 is a maximum value, and the point B is a maximum value point.
After the maximum value is obtained, it is also necessary to determine whether the maximum value is the maximum value of the adjacent preset number of points. In the above example, B is the searched maximum value point, and there are several other points on both sides of B, and at this time, taking point B as a boundary, it is determined whether the value B2 corresponding to point B is the maximum value of N points on both sides of point B.
Taking N as 10 for example, it needs to be determined whether the value B2 corresponding to the point B is the maximum value of the values corresponding to 10 points (5 points on both sides) adjacent to the point B, and if so, the position of the point B is a peak of the optical volume description signal.
It should be noted that, in this embodiment, the value of N is determined according to the sampling frequency of the light volume description signal. For example, if the sampling frequency is 25Hz, the value range of N may be 10 to 20, and the specific value may be selected as needed.
And repeating the steps continuously until the last wave crest of the optical volume description signal is found, and acquiring a plurality of wave crests of the optical volume description signal at the moment.
After acquiring a plurality of peaks of the light volume description signal, the time interval between two adjacent peaks needs to be calculated. For example, if three consecutive peaks are acquired as X, Y, and Z, respectively, it is necessary to calculate the time interval t1 between X and Y and the time interval t2 between Y and Z, so as to obtain a plurality of peak interval values t1 and t2.
After obtaining the plurality of peak interval values, an average of the plurality of peak interval values is calculated, and an average heart rate of the user is calculated based on the average.
In some embodiments, before calculating the average of the plurality of peak interval values, it is also necessary to remove outliers in the plurality of peak interval values.
For example, referring to fig. 4, fig. 4 is a second flowchart of a mental stress detection method according to an embodiment of the present application. In the present embodiment, before step S104, an abnormal value among the plurality of peak interval values may be removed by:
step S401, judging whether the peak interval value is within a preset threshold range or not according to each peak interval value.
Step S402, if the peak interval value is out of the preset threshold range, the peak interval value is removed.
In some implementations of this embodiment, the light volume description signal has a plurality of peaks, that is, a plurality of peak interval values, but each peak interval value does not meet the requirement, and therefore, it is possible to determine whether the peak interval value meets the requirement by determining whether each peak interval value is within a preset threshold range.
For example, the maximum value of the preset threshold range may be 2s, and the minimum value may be 0.3s, it is understood that when the peak interval value (i.e. the time interval between two adjacent peaks) is in the range of 0.3s-2s, the peak interval value is satisfactory, whereas, the peak interval value is an abnormal value, and the abnormal peak interval value needs to be removed.
It should be noted that the preset threshold range is only an example of the embodiment of the present application, and in other embodiments of the present application, the preset threshold range may also be other values, which are not specifically limited herein.
For example, referring to fig. 5, fig. 5 is a third flowchart of a mental stress detection method according to an embodiment of the present application. In this embodiment, before step S104, an abnormal value in the plurality of peak interval values may be removed by:
step S501, aiming at each peak interval value, judging whether the difference value between the peak interval value and the previous peak interval value is less than or equal to a preset value;
step S502, if not, the peak interval value is removed.
In some implementations of this embodiment, the light volume description signal has a plurality of peaks, that is, a plurality of peak interval values, but each peak interval value does not meet the requirement, and therefore, whether the peak interval value meets the requirement may be determined by determining whether a difference between each peak interval value and a previous peak interval value is greater than a preset value.
For example, if there are three consecutive peak interval values t1, t2, t3 of the light volume description signal, when the preset value is 0.2s, if the difference between t1 and t2 is 0.1s, the difference between t2 and t3 is 0.3s, and the difference between t2 and the previous peak interval value t1 is less than 0.2s, it means that t2 is satisfactory; the difference between t3 and t2 is greater than 0.2s, which indicates that t3 is an abnormal peak interval value and needs to be removed.
If the light volume description signal still has the peak interval value t4, since t3 is an abnormal peak interval value and needs to be removed, when determining whether t4 is an abnormal value, t4 should be compared with a t2 value meeting the requirement, if the difference between t4 and t2 is greater than a preset value (e.g. 0.2 s), t4 is removed, otherwise, t4 is retained.
It should be noted that the above is only an example of the value of the preset value in the embodiment of the present application, and is not used to limit the size of the preset value, and in other embodiments of the present application, the preset value may also be another value, and is not specifically limited herein.
In addition, in this embodiment, the two methods for determining whether the peak interval value is an abnormal value may be used alone or in combination, and when used in combination, when the peak interval value does not satisfy any one of the determination conditions, the peak interval value is an abnormal value, and only when the two conditions are satisfied simultaneously, the peak interval value is a normally usable peak interval value.
In the present embodiment, after the electronic device 10 removes the abnormal values of the plurality of peak interval values, an average value of remaining normal peak interval values is calculated, and the average heart rate of the user is calculated based on the average value.
Illustratively, the user's average heart rate may be calculated by the following formula:
HR=60/PPI AVG
wherein HR is the user's average heart rate, PPI AVG The average of the peak interval values of the signal is described for the optical volume.
In this embodiment, after the electronic device 10 acquires the peak interval values, it is further required to acquire a power spectrum of the heart rate variability of the user according to the peak interval values. Referring to fig. 6, fig. 6 is a partial flowchart of a sub-step of step S105 in fig. 2 according to an embodiment of the present disclosure. In the present embodiment, step S105 includes the following sub-steps:
in sub-step S1051, a plurality of peak interval values are resampled by cubic spline interpolation.
Sub-step S1052, performing discrete fourier transform on the resampled plurality of peak interval values to obtain a power spectrum of the heart rate variability of the user.
In this embodiment, after the electronic device 10 removes the abnormal peak interval value of the optical volume description signal, the peak interval value sequence of the optical volume description signal is a non-uniform sampling sequence, and since only the uniform sampling sequence can perform frequency domain analysis, the peak interval value sequence of the optical volume description signal needs to be resampled to obtain a peak interval value sequence of the optical volume description signal with uniform sampling.
Illustratively, in this embodiment, the sequence of peak-to-peak intervals of the non-uniformly sampled light volume description signal described above may be resampled using cubic spline differences, and the sampling frequency may be 4Hz. Of course, in other embodiments of the present application, the light volume description signal may be resampled with a sampling frequency of another size, which is not specifically limited herein.
After resampling, obtaining a peak interval value sequence of the uniformly sampled optical volume description signal, and then processing the peak interval value sequence of the uniformly sampled optical volume description signal by a discrete Fourier transform method, thereby obtaining a power spectrum of the heart rate variability of the user.
In step S105, after obtaining the power spectrum of the heart rate variability of the user, the low frequency power and the high frequency power of the power spectrum also need to be calculated.
Illustratively, in the power spectrum, 0.04Hz-0.15Hz is generally referred to as the low band, and 0.15Hz-0.4Hz is generally referred to as the high band. The low-frequency power calculation method comprises the following steps: integrating the area formed by the curve in the low-frequency band and the abscissa and the ordinate, wherein the integration result is the low-frequency power; the calculation method of the high-frequency power is as follows: and integrating the area formed by the curve in the high-frequency section, the abscissa and the ordinate, wherein the integration result is the high-frequency power.
In the embodiment, since the discrete fourier transform is performed on the optical volume description signal, the power spectrum thereof is a discrete sequence, and the power calculation method is to calculate the sum of the amplitudes of all the points in the corresponding frequency band.
For example, three points a, b, and c are included in the low frequency band, three points d, e, and f are included in the high frequency band, the amplitudes corresponding to the three points a, b, and c are a1, b1, and c1, respectively, and the amplitudes corresponding to the three points d, e, and f are d1, e1, and f1, respectively, then the low frequency power is the sum of a1, b1, and c1, and the high frequency power is the sum of d1, e1, and f 1.
Through the above steps, the electronic device 10 can calculate the average heart rate, the low-frequency power and the high-frequency power of the user, so that the mental stress value of the user can be calculated according to the average heart rate, the low-frequency power and the high-frequency power of the user.
For example, the electronic device 10 may calculate the mental stress value of the user by the following formula:
STRESS=A*HR+B*LF*HF+C
the method comprises the steps of obtaining a pressure value of a user, obtaining an average heart rate of the user, obtaining a low frequency power LF, obtaining a high frequency power HF, and obtaining constants A, B and C.
In this example, the values of a, B, and C are obtained by analyzing a large amount of data, for example, the value of a may be 1, the value of B may be 1/2000, and the value of C may be-30.
In this embodiment, the mental stress of the user can be calculated according to the obtained light volume description signal of the user through the above steps.
Exemplarily, in the present embodiment, when the mental stress value is [1, 29], it indicates that the user is relaxed and there is almost no mental stress; when the mental pressure value is [30, 59], indicating that the user has slight stress, and when the mental pressure value is [60, 79], indicating that the user has moderate stress; when the mental stress value is [80, 99], it indicates that the user has severe stress.
In practice, the user may have a raised heart rate due to running or exercise, and calculating the mental stress of the user through the light volume description signal may cause inaccurate results, so that the situation needs to be excluded.
To solve the above problem, please refer to fig. 7, and fig. 7 is a fourth flowchart of a mental stress detection method according to an embodiment of the present application. In this embodiment, the electronic device 10 is further provided with a sensor for acquiring an acceleration of the user, and the method includes:
step S701, acquiring a variation value of the acceleration signal of the user within a preset time interval.
Step S702, determining whether to terminate the acquisition of the light volume description signal of the user according to the magnitude of the variation value.
In the implementation process of the above steps, the electronic device 10 acquires the acceleration signal once within a preset time interval through the acceleration sensor, and calculates a variation value of the acceleration signal within the preset time interval. For example, the acceleration signal is acquired every 1s, and the variation value of the acceleration signal within the 1s is calculated.
The electronic device 10 determines whether the acceleration signal causes a large interference to the measurement of the mental pressure value according to the magnitude of the variation, and if a plurality of interferences are increased, the calculation of the mental pressure value is terminated, that is, the acquisition of the optical volume description signal of the user is terminated.
For example, in this embodiment, the step S702 of determining whether to terminate acquiring the light volume description signal of the user according to the magnitude of the variation value may include:
judging whether the change value is larger than a preset change range or not according to the change value in each preset time interval; if the variation value is larger than the preset variation range, judging that the movement amplitude in a preset time interval corresponding to the variation value is large; judging whether the time continuously judged as the time with large motion amplitude is greater than a preset time threshold value or not; and if the light volume description signal is larger than the preset time threshold, terminating the acquisition of the light volume description signal of the user.
For example, the electronic device 10 determines whether the variation value in each 1s is greater than a preset variation range (e.g., 200), if so, it indicates that the motion amplitude of the user in the 1s is relatively large, and if the motion amplitudes in the continuous time (e.g., 5 s) are greater than 200, then interference may be generated on the mental pressure value measurement of the user, and the acquisition of the light volume description signal of the user should be terminated.
In another embodiment of this embodiment, it may also be determined whether it is necessary to terminate acquiring the light volume description signal of the user by determining whether there is a time within 30s when 15s are both large in motion amplitude.
In other implementations of this embodiment, the variation value of the acceleration in each preset interval time (1 s) can be further divided into a plurality of disturbance levels, wherein a level 0 can be used to indicate that the motion amplitude is small, indicating that the user is in a sleep or rest state; a level of 1 may be used to indicate slight motion, which level is less disturbing to the light volume description signal; while level 2 may be used to indicate that the motion amplitude is large, this level interferes significantly with the volume description signal.
When the disturbance level of the continuous period (for example, continuous 5 s) is greater than 1 or the disturbance level of the 15s within 30s is greater than 1, the acquisition of the optical volume description signal of the user is terminated.
It should be noted that the time periods of 5s, 30s, 15s, etc. in the above embodiments are only an example of the present embodiment, and in other embodiments of the present embodiment, the variables such as the preset time interval, the preset time threshold, etc. may also be other values, which are not specifically limited herein.
To sum up, the embodiment of the present application provides a mental stress detection method, which includes first obtaining a light volume description signal of a user, calculating a peak interval value according to a peak of the obtained light volume description signal, and obtaining an average heart rate, a low frequency power and a high frequency power of the user according to the peak interval value, so as to calculate a mental stress value of the user through the average heart rate, the low frequency power and the high frequency power. According to the method and the device, the light volume description signal of the user is acquired, the mental pressure value of the user is calculated based on the light volume signal, the user can see the mental pressure of the user more intuitively through the value of the value, the size of the sensor for acquiring the light volume description signal is small, the size of the device for detecting the mental pressure of the user is small, and the device is convenient to carry.
Based on the same inventive concept, the embodiment of the present application further provides a mental stress detection apparatus 100 corresponding to the mental stress detection method, and since the principle of solving the problem of the apparatus in the embodiment of the present application is similar to that of the above-mentioned mental stress detection method in the embodiment of the present application, the implementation of the apparatus may refer to the implementation of the method, and repeated details are not repeated.
Referring to fig. 8, fig. 8 is a functional block diagram of a mental stress detection apparatus 100 according to an embodiment of the present disclosure. In this embodiment, the apparatus includes:
a signal obtaining module 101, configured to obtain a light volume description signal of a user;
a peak obtaining module 102, configured to obtain a plurality of peaks of the light volume description signal;
a first calculating module 103, configured to calculate a time interval between two adjacent peaks, and obtain a plurality of peak interval values;
a second calculating module 104, configured to calculate an average value of a plurality of peak interval values, and calculate an average heart rate of the user based on the average value;
a third calculating module 105, configured to obtain a power spectrum of the heart rate variability of the user according to the peak interval values, and calculate low-frequency power and high-frequency power of the power spectrum;
a pressure value calculation module 106, configured to calculate a pressure value of the user according to the average heart rate, the low-frequency power, and the high-frequency power of the user.
The mental stress detection apparatus 100 provided in the embodiment of the present application may be specific hardware on the electronic device 10, or software or firmware installed on the electronic device 10.
The computer program product for detecting mental stress provided in the embodiment of the present application includes a computer readable storage medium storing a program code, where instructions included in the program code may be used to execute the method described in the foregoing method embodiment, and specific implementation may refer to the method embodiment, and details are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and there may be other divisions in actual implementation, and for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined or explained in subsequent figures, and moreover, the terms "first," "second," "third," etc. are used merely to distinguish one description from another, and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the present application; such modifications, changes or substitutions do not depart from the spirit and scope of the present disclosure, which should be construed in light of the above teachings. Are intended to be covered by the scope of this application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims (9)
1. A mental stress detection method is characterized by being applied to an electronic device which is provided with a sensor for acquiring a light volume description signal of a user; the method comprises the following steps:
acquiring a light volume description signal of a user;
obtaining a plurality of peaks of the light volume description signal;
calculating the time interval between two adjacent wave crests to obtain a plurality of wave crest interval values;
calculating an average of a plurality of the peak interval values and calculating an average heart rate of the user based on the average;
obtaining a power spectrum of the heart rate variability of the user according to the peak interval values, and calculating low-frequency power and high-frequency power of the power spectrum;
calculating the pressure value of the user according to the average heart rate, the low-frequency power and the high-frequency power of the user;
the calculating the pressure value of the user according to the average heart rate, the low-frequency power and the high-frequency power of the user comprises:
calculating a pressure value for the user by the following formula:
STRESS=A*HR+B*LF*HF+C
the method comprises the steps of obtaining a pressure value of a user, obtaining a low frequency power LF, obtaining a high frequency power HF, obtaining constants A, B and C, obtaining a ratio of 1 to 1/2000 of B and obtaining a ratio of-30 of C, and obtaining a pressure value of the user, wherein HR is the average heart rate of the user, LF is the low frequency power, HF is the high frequency power, A, B and C are constants, and A is 1, B is 1/2000 and C is-30.
2. The method of claim 1, further comprising:
acquiring a change value of an acceleration signal of a user within a preset time interval;
and judging whether to terminate acquiring the light volume description signal of the user according to the magnitude of the change value.
3. The method of claim 2, wherein determining whether to terminate the acquisition of the light volume description signal of the user according to the magnitude of the variation value comprises:
judging whether the change value in each preset time interval is larger than a preset change range or not;
if the variation value is larger than the preset variation range, judging that the movement amplitude in a preset time interval corresponding to the variation value is large;
judging whether the time continuously judged as the large motion amplitude is larger than a preset time threshold value or not;
and if the light volume description signal is larger than the preset time threshold, terminating the acquisition of the light volume description signal of the user.
4. The method of claim 1, wherein said obtaining a plurality of peaks of the light volume description signal comprises:
denoising the optical volume description signal;
searching a maximum value of the denoised light volume description signal, wherein the maximum value is larger than the values of two points adjacent to the maximum value;
judging whether the maximum value is the maximum value of the adjacent preset number of points;
and if so, determining that the maximum value is a peak of the optical volume description signal.
5. The method of claim 1, wherein prior to calculating an average of a plurality of the peak-to-peak separation values, the method further comprises:
judging whether the peak interval value is within a preset threshold range or not according to each peak interval value;
and if the peak interval value is out of the preset threshold range, removing the peak interval value.
6. The method of claim 1, wherein prior to calculating an average of a plurality of the peak-to-peak separation values, the method further comprises:
judging whether the difference value between the peak interval value and the previous peak interval value is greater than a preset value or not according to each peak interval value;
if the peak distance is larger than the preset value, the peak distance value is removed.
7. The method of claim 5 or 6, wherein obtaining a power spectrum of heart rate variability of the user from a plurality of said peak interval values comprises:
resampling the plurality of peak interval values by cubic spline interpolation;
performing a discrete Fourier transform on the resampled plurality of peak interval values to obtain a power spectrum of the heart rate variability of the user.
8. A stress detection device is characterized by being applied to an electronic device, wherein the electronic device is provided with a sensor for acquiring a light volume description signal of a user; the device comprises:
the signal acquisition module is used for acquiring a light volume description signal of a user;
a peak acquisition module for acquiring a plurality of peaks of the light volume description signal;
the first calculation module is used for calculating the time interval between two adjacent wave crests to obtain a plurality of wave crest interval values;
a second calculation module for calculating an average of a plurality of the peak interval values and calculating an average heart rate of the user based on the average;
the third calculation module is used for obtaining a power spectrum of the heart rate variability of the user according to the plurality of peak interval values and calculating low-frequency power and high-frequency power of the power spectrum;
the pressure value calculation module is used for calculating the pressure value of the user according to the average heart rate, the low-frequency power and the high-frequency power of the user;
the pressure value calculation module is specifically configured to: the calculating the pressure value of the user according to the average heart rate, the low-frequency power and the high-frequency power of the user comprises:
calculating a pressure value for the user by the following formula:
STRESS=A-HR+B*LF*HF+C
the method comprises the steps of obtaining a pressure value of a user, obtaining an average heart rate of the user, obtaining a low frequency power (LF), obtaining a high frequency power (HF), obtaining constants of A, B and C, obtaining a value of 1/2000 of B and obtaining a value of-30 of C, and obtaining a pressure value of the user.
9. An electronic device, comprising a memory and a processor, the memory storing a computer program, wherein the processor, when executing the computer program, implements the steps of the method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010954324.4A CN111920429B (en) | 2020-09-11 | 2020-09-11 | Mental stress detection method and device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010954324.4A CN111920429B (en) | 2020-09-11 | 2020-09-11 | Mental stress detection method and device and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111920429A CN111920429A (en) | 2020-11-13 |
CN111920429B true CN111920429B (en) | 2023-04-18 |
Family
ID=73309337
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010954324.4A Active CN111920429B (en) | 2020-09-11 | 2020-09-11 | Mental stress detection method and device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111920429B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113288149B (en) * | 2021-06-17 | 2024-10-25 | 深圳市爱都科技有限公司 | Method and device for displaying psychological stress interval of user and wearable device |
CN116019423B (en) * | 2022-12-30 | 2024-12-24 | 广州昂宝电子有限公司 | Sleep monitoring method and system |
CN116636846B (en) * | 2023-05-29 | 2023-12-15 | 秦皇岛市惠斯安普医学系统股份有限公司 | Mental stress monitoring and intervention management system |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103815896B (en) * | 2014-01-22 | 2016-04-27 | 东软熙康健康科技有限公司 | A kind of mental fatigue monitoring method, device, system and mobile processing terminal |
US10004408B2 (en) * | 2014-12-03 | 2018-06-26 | Rethink Medical, Inc. | Methods and systems for detecting physiology for monitoring cardiac health |
CN105550530B (en) * | 2016-01-29 | 2018-07-17 | 北京心量科技有限公司 | Spirit degree at random obtains device |
CN106419937A (en) * | 2016-09-12 | 2017-02-22 | 南京邮电大学 | Mental stress analysis system based on heart sound HRV theory |
CN109106383A (en) * | 2017-06-22 | 2019-01-01 | 罗杰谊 | Emotion sensing system and method |
US20200129130A1 (en) * | 2018-10-26 | 2020-04-30 | Firstbeat Technologies Oy | Minimum heart rate value approximation |
CN109924960A (en) * | 2019-01-31 | 2019-06-25 | 深圳市爱都科技有限公司 | A kind of blood oxygen saturation, the calculation method and wearable device of heart rate value and pressure rating |
CN111493886A (en) * | 2019-01-31 | 2020-08-07 | 深圳市爱都科技有限公司 | Calculation method of blood oxygen saturation and pressure level and wearable device |
CN111248928A (en) * | 2020-01-20 | 2020-06-09 | 北京津发科技股份有限公司 | Pressure identification method and device |
-
2020
- 2020-09-11 CN CN202010954324.4A patent/CN111920429B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN111920429A (en) | 2020-11-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111920429B (en) | Mental stress detection method and device and electronic equipment | |
US20140081088A1 (en) | Computer-implemented method for determining physical movements of a body organ | |
CN113080857B (en) | Respiration monitoring method, device and terminal equipment | |
US20210267551A1 (en) | Noise detection method and apparatus | |
US8456295B2 (en) | Alarm generation method for patient monitoring, physiological monitoring apparatus and computer program product for a physiological monitoring apparatus | |
CN109864705B (en) | Method and device for filtering pulse wave and computer equipment | |
US11497450B2 (en) | System and methods for adaptive noise quantification in dynamic biosignal analysis | |
EP3679860B1 (en) | Control method and system for filtering out working frequency interference signal | |
CN107743048B (en) | Signal processing system for removing OTDR noise | |
CN102209493B (en) | Device or method for operating autonomic balance | |
CN112914588A (en) | Electroencephalogram outbreak inhibition index calculation method and system | |
CN116784852A (en) | Fatigue state determining method and device, intelligent mattress and medium | |
KR20090081885A (en) | Heart rate detection device and control method | |
CN113545753B (en) | Waveform detection method and device, wearable equipment and computer readable storage medium | |
CN109498001B (en) | Sleep quality evaluation method and device | |
CN114832193A (en) | Respiratory waveform identification method, device, equipment and storage medium | |
CN110313902B (en) | Blood volume change pulse signal processing method and related device | |
EP3272283B1 (en) | Measurement device, measurement method, and program | |
CN111700610A (en) | Method, device and system for analyzing electroencephalogram outbreak suppression mode and storage medium thereof | |
JP2010213809A (en) | Biological signal analyzer | |
JP7269709B2 (en) | Venous pressure measuring device | |
CN114010185B (en) | Method, device, equipment and medium for monitoring respiratory disorder | |
CN116616762A (en) | Pulse wave blood oxygen saturation detection method and blood oxygen saturation detection device | |
CN115067902A (en) | Blood pressure estimation device and method and electronic equipment | |
CN110693474B (en) | Method and device for identifying characteristic points of radial artery pressure waveform dicrotic wave |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |