CN114190940B - Fatigue detection method and device, electronic equipment and storage medium - Google Patents
Fatigue detection method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN114190940B CN114190940B CN202111396127.6A CN202111396127A CN114190940B CN 114190940 B CN114190940 B CN 114190940B CN 202111396127 A CN202111396127 A CN 202111396127A CN 114190940 B CN114190940 B CN 114190940B
- Authority
- CN
- China
- Prior art keywords
- data
- interval
- electrocardiosignal
- digital
- fatigue
- 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
- 238000001514 detection method Methods 0.000 title claims abstract description 50
- 238000001914 filtration Methods 0.000 claims abstract description 40
- 230000003321 amplification Effects 0.000 claims abstract description 20
- 238000003199 nucleic acid amplification method Methods 0.000 claims abstract description 20
- 238000012952 Resampling Methods 0.000 claims abstract description 16
- 238000006243 chemical reaction Methods 0.000 claims abstract description 15
- 238000000034 method Methods 0.000 claims abstract description 15
- 238000012545 processing Methods 0.000 claims description 15
- 238000000605 extraction Methods 0.000 claims description 10
- 238000005070 sampling Methods 0.000 claims description 7
- 238000012549 training Methods 0.000 claims description 5
- 238000012805 post-processing Methods 0.000 claims description 4
- 238000007781 pre-processing Methods 0.000 abstract description 9
- 206010016256 fatigue Diseases 0.000 description 59
- 230000006870 function Effects 0.000 description 11
- 208000019914 Mental Fatigue Diseases 0.000 description 4
- WABPQHHGFIMREM-UHFFFAOYSA-N lead(0) Chemical group [Pb] WABPQHHGFIMREM-UHFFFAOYSA-N 0.000 description 4
- 238000000718 qrs complex Methods 0.000 description 4
- 208000024172 Cardiovascular disease Diseases 0.000 description 2
- 208000017667 Chronic Disease Diseases 0.000 description 2
- 206010028980 Neoplasm Diseases 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 206010012601 diabetes mellitus Diseases 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 201000010099 disease Diseases 0.000 description 2
- 208000037265 diseases, disorders, signs and symptoms Diseases 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 239000011159 matrix material Substances 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 206010015856 Extrasystoles Diseases 0.000 description 1
- 101100289792 Squirrel monkey polyomavirus large T gene Proteins 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 230000000747 cardiac effect Effects 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 239000004020 conductor Substances 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000003183 myoelectrical effect Effects 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 230000000474 nursing effect Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
- 238000010183 spectrum analysis Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
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/16—Devices for psychotechnics; Testing reaction times ; Devices for evaluating the psychological state
- A61B5/161—Flicker fusion testing
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/24—Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
- A61B5/316—Modalities, i.e. specific diagnostic methods
- A61B5/318—Heart-related electrical modalities, e.g. electrocardiography [ECG]
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/24—Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
- A61B5/316—Modalities, i.e. specific diagnostic methods
- A61B5/318—Heart-related electrical modalities, e.g. electrocardiography [ECG]
- A61B5/346—Analysis of electrocardiograms
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/24—Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
- A61B5/316—Modalities, i.e. specific diagnostic methods
- A61B5/318—Heart-related electrical modalities, e.g. electrocardiography [ECG]
- A61B5/346—Analysis of electrocardiograms
- A61B5/349—Detecting specific parameters of the electrocardiograph cycle
- A61B5/352—Detecting R peaks, e.g. for synchronising diagnostic apparatus; Estimating R-R interval
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/24—Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
- A61B5/316—Modalities, i.e. specific diagnostic methods
- A61B5/318—Heart-related electrical modalities, e.g. electrocardiography [ECG]
- A61B5/346—Analysis of electrocardiograms
- A61B5/349—Detecting specific parameters of the electrocardiograph cycle
- A61B5/366—Detecting abnormal QRS complex, e.g. widening
-
- 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/7225—Details of analog processing, e.g. isolation amplifier, gain or sensitivity adjustment, filtering, baseline or drift compensation
-
- 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
-
- 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/7264—Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems
- A61B5/7267—Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems involving training the classification device
Landscapes
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Health & Medical Sciences (AREA)
- Biophysics (AREA)
- Veterinary Medicine (AREA)
- Public Health (AREA)
- Animal Behavior & Ethology (AREA)
- Surgery (AREA)
- Molecular Biology (AREA)
- Medical Informatics (AREA)
- Pathology (AREA)
- Biomedical Technology (AREA)
- Heart & Thoracic Surgery (AREA)
- Cardiology (AREA)
- Psychiatry (AREA)
- Artificial Intelligence (AREA)
- Signal Processing (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physiology (AREA)
- Child & Adolescent Psychology (AREA)
- Educational Technology (AREA)
- Developmental Disabilities (AREA)
- Social Psychology (AREA)
- Hospice & Palliative Care (AREA)
- Psychology (AREA)
- Power Engineering (AREA)
- Evolutionary Computation (AREA)
- Fuzzy Systems (AREA)
- Mathematical Physics (AREA)
- Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)
- Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)
Abstract
The invention provides a fatigue detection method, a device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring initial electrocardiosignal data, and performing pre-filtering, differential amplification and analog-to-digital conversion on the initial electrocardiosignal data to obtain digital electrocardiosignal data; preprocessing the digital electrocardiosignal data and extracting features to obtain RR interval sequence data; performing interval filtering, resampling and trend term removal on the RR interval series data to obtain RR interval histogram data; establishing a regression model, and establishing a corresponding relation between the RR interval histogram data and a preset fatigue level based on the regression model; and acquiring electrocardiosignal data to be detected, and performing fatigue detection according to the corresponding relation. According to the invention, the human body electrocardiosignals are obtained, classified, the corresponding relation between the electrocardiosignals and the fatigue degree is determined, and the fatigue state can be accurately detected according to the corresponding relation.
Description
Technical Field
The invention relates to the technical field of fatigue detection, in particular to a fatigue detection method, a device, electronic equipment and a storage medium.
Background
Chronic diseases such as cardiovascular diseases, diabetes and cancers have the characteristics of late onset and unidentifiable early stage, and early screening of early risk factors or early diseases can delay or prevent the incidence and the incidence degree of the early diseases.
At present, mental fatigue is a key cause of many chronic diseases such as cardiovascular diseases, diabetes and cancers, however, mental fatigue is difficult to quantitatively evaluate and measure, so the detection of mental fatigue provides serious test for medical and nursing industries.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a fatigue detection method, apparatus, electronic device, and storage medium capable of achieving accurate detection and recognition of mental fatigue.
In order to solve the technical problems, the invention provides a fatigue detection method, which comprises the following steps:
acquiring initial electrocardiosignal data, and performing pre-filtering, differential amplification and analog-to-digital conversion on the initial electrocardiosignal data to obtain digital electrocardiosignal data;
preprocessing the digital electrocardiosignal data and extracting features to obtain RR interval sequence data;
performing interval filtering, resampling and trend term removal on the RR interval series data to obtain RR interval histogram data;
establishing a regression model, and establishing a corresponding relation between the RR interval histogram data and a preset fatigue level based on the regression model;
and acquiring electrocardiosignal data to be detected, and performing fatigue detection according to the corresponding relation.
Preferably, the pre-filtering, differential amplifying and analog-to-digital converting the initial electrocardiograph signal data to obtain digital electrocardiograph signal data includes:
filtering high-frequency component signals with the frequency higher than the sampling frequency preset multiplying power by adopting a prepositive low-pass filter;
differential amplification is carried out on the electrocardiosignal data processed by the pre-low-pass filter to obtain a differential amplification signal;
and carrying out analog-to-digital conversion on the differential amplification signals to obtain the digital electrocardiosignal data.
Preferably, preprocessing the digital electrocardiograph signal data includes:
and sequentially carrying out digital high-pass filtering, digital notch and digital low-pass filtering on the digital electrocardiosignal data to obtain preprocessed electrocardiosignal data.
Preferably, the RR interval sequence data is obtained after feature extraction, including:
carrying out feature extraction on the preprocessed electrocardiosignal data based on QRS wave amplitude by adopting a digital band-pass filter;
judging whether the electrocardiosignal data after feature extraction exceeds a preset threshold value, and acquiring the RR interval sequence data when the electrocardiosignal data exceeds the preset threshold value.
Preferably, performing interval filtering, resampling and trend term removal on the RR interval series data to obtain RR interval histogram data, including:
setting a sliding window to carry out filtering treatment on the RR interval sequence data;
resampling the RR interval sequence data to obtain RR interval sequence data with equal intervals;
carrying out trend term removal processing on the RR interval sequence data by adopting a digital high-pass filter;
and extracting the maximum value and the minimum value of the RR interval sequence after interval filtering, resampling and trend term removal post-processing, taking the maximum value and the minimum value as intervals of histogram distribution, and counting the distribution number of the RR interval sequence based on preset intervals to obtain RR interval histogram data.
Preferably, the regression model is a softmax regression model; establishing a corresponding relation between the RR interval histogram data and a preset fatigue level based on the regression model, wherein the method comprises the following steps:
setting each category of fatigue level, and acquiring a plurality of preset parameters in the RR interval histogram data;
and taking the plurality of preset parameters as input of the softmax regression model, taking each category of the fatigue level as output of the softmax regression model, and obtaining the corresponding relation between the RR interval histogram data and the preset fatigue level through training of the softmax regression model.
Preferably, acquiring electrocardiograph signal data to be detected, and performing fatigue detection according to the correspondence relationship, including:
acquiring a plurality of preset parameters in the electrocardiosignal data to be detected, and forming a plurality of classes according to the plurality of preset parameters;
calculating scores of the plurality of classes, and calculating probability of each of the plurality of classes according to the scores of the plurality of classes;
and selecting the class with the highest probability, and determining the corresponding fatigue level according to the corresponding relation.
The present invention also provides a fatigue detection device including:
the electrocardiosignal acquisition unit is used for acquiring initial electrocardiosignal data, and obtaining digital electrocardiosignal data after pre-filtering, differential amplification and analog-to-digital conversion of the initial electrocardiosignal data;
the electrocardiosignal processing unit is used for preprocessing the digital electrocardiosignal data and extracting characteristics to obtain RR interval sequence data;
the RR interval data processing unit is used for performing interval filtering, resampling and trend item removal on the RR interval series data to obtain RR interval histogram data;
the relation establishing unit is used for establishing a regression model, and establishing a corresponding relation between the RR interval histogram data and a preset fatigue level based on the regression model;
and the fatigue detection unit is used for acquiring electrocardiosignal data to be detected and carrying out fatigue detection according to the corresponding relation.
The invention also provides an electronic device comprising a memory and a processor, wherein:
the memory is used for storing programs;
the processor is coupled to the memory and is configured to execute the program stored in the memory to implement the steps in the fatigue detection method in any of the above implementations.
The present invention also provides a computer-readable storage medium storing a computer-readable program or instructions that, when executed by a processor, enable the steps in the fatigue detection method in any one of the above-mentioned implementations to be performed.
The beneficial effects of adopting the embodiment are as follows: according to the fatigue detection method provided by the invention, the human body electrocardiosignals are obtained, the electrocardiosignals are classified, the corresponding relation between the electrocardiosignals and the fatigue degree is determined, and the accurate detection of the fatigue state can be realized according to the corresponding relation.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of an embodiment of a fatigue detection method according to the present invention;
FIG. 2 is a schematic structural diagram of an embodiment of a fatigue detection device according to the present invention;
fig. 3 is a schematic structural diagram of an embodiment of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. It will be apparent that the described embodiments are only some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terms "first" and "second" are used below for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the embodiments of the present application, unless otherwise indicated, the meaning of "a plurality" is two or more.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the invention. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
The invention provides a fatigue detection method, a fatigue detection device, an electronic device and a storage medium, which are respectively described below.
As shown in fig. 1, a flowchart of an embodiment of a fatigue detection method according to an embodiment of the present invention is shown, where the method includes:
step S101, acquiring initial electrocardiosignal data, and carrying out pre-filtering, differential amplification and analog-to-digital conversion on the initial electrocardiosignal data to obtain digital electrocardiosignal data;
step S102, preprocessing the digital electrocardiosignal data and extracting features to obtain RR interval sequence data;
step S103, performing interval filtering, resampling and trend term removal on the RR interval series data to obtain RR interval histogram data;
step S104, a regression model is established, and a corresponding relation between the RR interval histogram data and a preset fatigue level is established based on the regression model;
step S105, obtaining electrocardiosignal data to be detected, and performing fatigue detection according to the corresponding relation.
Specifically, the initial electrocardiograph signal data of the human body can be acquired by the electrode and the lead wire unit, in general, the output end of the electrode and the lead wire unit is connected to the input end of the signal acquisition unit, the electrode and the lead wire unit are connected to the human body, and physiological signals are output to the signal acquisition unit. The electrode and lead wire unit is generally a conductor such as a limb clamp, a chest suction ball, an electrode plate and the like, and is closely contacted with a human body to acquire physiological signals of the human body.
As a preferred embodiment, in step S101, specifically including:
filtering high-frequency component signals with the frequency higher than the sampling frequency preset multiplying power by adopting a prepositive low-pass filter;
differential amplification is carried out on the electrocardiosignal data processed by the pre-low-pass filter to obtain a differential amplification signal;
and carrying out analog-to-digital conversion on the differential amplification signals to obtain the digital electrocardiosignal data.
Specifically, the pre-low-pass filter is used for filtering some useless high-frequency components and other spurious signals with the frequency being 1/2 times higher than the sampling frequency, so that the signals meet the Nyquist sampling theorem, aliasing distortion can not occur after sampling, and the pre-low-pass filter is output to the differential amplifying unit. The differential amplifying unit is used for carrying out differential amplification on the input signal and outputting the amplified signal to the analog-to-digital conversion unit to complete conversion from analog quantity to digital quantity. The differential amplifying unit is used for filtering common-mode signals and ensuring the subsequent analog-digital conversion accuracy through amplification.
As a preferred embodiment, in step S102, preprocessing the digital electrocardiograph signal data specifically includes:
and sequentially carrying out digital high-pass filtering, digital notch and digital low-pass filtering on the digital electrocardiosignal data to obtain preprocessed electrocardiosignal data.
Specifically, the signal preprocessing function is to restrain 50/60Hz power frequency interference, baseline drift and myoelectric interference outside the electrocardiosignal frequency band, and extract the electrocardiosignal with small interference and good performance.
As a preferred embodiment, in step S102, RR interval sequence data is obtained after feature extraction, including:
carrying out feature extraction on the preprocessed electrocardiosignal data based on QRS wave amplitude by adopting a digital band-pass filter;
judging whether the electrocardiosignal data after feature extraction exceeds a preset threshold value, and acquiring the RR interval sequence data when the electrocardiosignal data exceeds the preset threshold value.
Specifically, a normal electrocardiogram is composed of P waves, QRS complexes, T waves, and the like. Each specific wave corresponds to a specific cardiac activity and electrophysiological phase. The R wave has a higher amplitude than the other waveforms. From spectral analysis, it is known that the center frequency of the QRS complex is around 17Hz (this frequency is also known as the characteristic frequency of the QRS complex), with a bandwidth of about 10Hz. The frequency bands of the T wave, the P wave, the baseline drift and the like are all outside the low end of the frequency band, and the QRS wave group is distinguished from other waveforms.
Based on the above background knowledge, a digital band-pass filter is designed, and the main function of the digital band-pass filter is to highlight the amplitude of the QRS wave and inhibit the amplitude of the P wave, the amplitude of the T wave and the amplitude of the interference.
After the QRS wave characteristics are extracted, the waveform extracted by the characteristics is compared with a preset threshold value, and whether the waveform is the QRS wave or not is judged. If the preset threshold value is exceeded, the RR interval sequence is obtained by determining the QRS wave and locating the positions of all the R waves according to the QRS wave.
As a preferred embodiment, step S103 specifically includes:
setting a sliding window to carry out filtering treatment on the RR interval sequence data;
resampling the RR interval sequence data to obtain RR interval sequence data with equal intervals;
carrying out trend term removal processing on the RR interval sequence data by adopting a digital high-pass filter;
and extracting the maximum value and the minimum value of the RR interval sequence after interval filtering, resampling and trend term removal post-processing, taking the maximum value and the minimum value as intervals of histogram distribution, and counting the distribution number of the RR interval sequence based on preset intervals to obtain RR interval histogram data.
It should be noted that, the three steps of interval filtering, resampling and trend term removal may be performed simultaneously in parallel or may be performed in a certain order.
Specifically, during the RR interval filtering process, abnormal fluctuations in the RR interval sequence are mainly caused by the following situations: (1) A long RR interval due to QRS complex missed detection, producing a significantly upward pulse; (2) The false detection of the QRS wave group caused by high and large T waves or noise forms a short RR interval, and a significant downward pulse is generated; (3) A bi-directional and paired pulse is formed due to the ectopic beats producing a short RR interval followed by a long RR interval.
RR interval filtering is to remove abnormal fluctuation in RR interval sequence and reduce its influence on subsequent analysis. In RR interval filtering, setting the width of a sliding window as w; for each sequence, a median or mean value a is calculated. Comparing the central point with A, and removing the difference value if the difference value exceeds d of A; the window position is then moved and the above calculation is repeated to filter all data points.
Further, in the RR interval removal trend item, the basic heart rates of different people are different; the basal heart rate of the same person varies from period to period. In order to maintain the consistency of the fatigue analysis module, the RR interval sequence needs to be subjected to trend term removal treatment. And selecting a digital high-pass filter when the RR interval removes the trend item.
As a preferred embodiment, in step S104, the regression model is a softmax regression model; establishing a corresponding relation between the RR interval histogram data and a preset fatigue level based on the regression model, wherein the method comprises the following steps:
setting each category of fatigue level, and acquiring a plurality of preset parameters in the RR interval histogram data;
and taking the plurality of preset parameters as input of the softmax regression model, taking each category of the fatigue level as output of the softmax regression model, and obtaining the corresponding relation between the RR interval histogram data and the preset fatigue level through training of the softmax regression model.
As a specific example, the degree of fatigue of a human body is classified into N levels according to actual needs, and replaced with N values of 1 to N, and the correspondence is shown in the following figure (N is taken as an example in the figure).
Fatigue degree | Easy and relaxed | Normal state | Slight | Higher height |
Representing the numerical value | 1 | 2 | 3 | 4 |
To achieve the above classification, a plurality of preset parameters, such as average heart rate HR, maximum frequency of histogram distribution P, are extracted max As input, and histogram distribution interval width d; in addition, the gender sex, age and age also have important reference values for fatigue classification, and the two parameters are also used as input. For gender, it was binarized to 0 and 1, corresponding to male and female, respectively.
Human fatigue is classified into N classes, which is a single-label multi-class classification problem, by using the Softmax regression model.
When an instance x is given (x is defined by HR, P max Vector composed of d, sex, age), the Softmax regression model first calculates the score sk (x) for the kth class, then applies the score to the Softmax function, estimates the probability for each class, and calculates sk (x) as:
s k (x)=θ k T ·x (1)
once the score for each class of sample x is calculated, the probability P that the sample belongs to the kth class can be estimated by the Softmax function k : by calculating the sk (x) power of e, they are then normalized as shown in equation (2).
In the above formula, K represents the total category number, which is 4 in the present invention; s (X) represents a score vector containing each class of sample X; sigma (s (x)) k Representing the probability that instance X belongs to the kth class given each class score.
Further, the Softmax regression classifier takes the class with the highest estimated probability as a prediction result, as shown in the following formula (3):
y=argmaxσ(s(x)) k =argmaxs k (x)=argmaxθ k T ·x (3)
the argmax operation returns a variable value that the function takes the maximum value. In the above, it returns to sigma (s (x)) k And obtaining the corresponding relation between the RR interval histogram data and the preset fatigue level by the maximum value of k.
In order to obtain accurate corresponding relation, the method also needs to obtain the relation of theta k A determination is made which may be obtained by training a Softmax regression model on the sample data (including the input vector x and the corresponding fatigue level).
The desire for model training is to have a higher probability on the target class (and thus lower probability on other classes), and minimizing equation (4) can achieve this goal, which represents the loss function of the current model, called cross entropy, which penalizes the model when it gives a lower probability for the target class. Cross entropy is typically used to measure the degree of matching between a category under test and a target category:
if forThe target class of the ith instance is k, thenWhereas it is zero, this loss function is related to θ k The gradient vector of (2) is equation (5):
by computing the gradient vector for each class, the gradient descent (or other optimization algorithm) is then used to find the parameter matrix Θ that minimizes the loss function.
As a preferred embodiment, step S105 specifically includes:
acquiring a plurality of preset parameters in the electrocardiosignal data to be detected, and forming a plurality of classes according to the plurality of preset parameters;
calculating scores of the plurality of classes, and calculating probability of each of the plurality of classes according to the scores of the plurality of classes;
and selecting the class with the highest probability, and determining the corresponding fatigue level according to the corresponding relation.
Specifically, after the parameter matrix Θ is trained, fatigue detection can be performed on the actual input vector. HR, P max The vector x formed by d, sex, age is input into a formula (1), and the score sk (x) of each class is calculated; and then bringing sk (x) into a formula (2), and carrying out normalization calculation to obtain the probability that the instance x belongs to each class. Finally, the formula (3) is applied again, and the category when the probability is the maximum value, namely the fatigue grade, is returned.
According to the fatigue detection method provided by the invention, the human body electrocardiosignals are obtained, the electrocardiosignals are classified, the corresponding relation between the electrocardiosignals and the fatigue degree is determined, and the accurate detection of the fatigue state can be realized according to the corresponding relation.
In order to better implement the fatigue detection method according to the embodiment of the present invention, correspondingly, as shown in fig. 2, the embodiment of the present invention further provides a fatigue detection apparatus 200, which includes:
an electrocardiosignal acquisition unit 201, configured to acquire initial electrocardiosignal data, and obtain digital electrocardiosignal data after pre-filtering, differential amplification and analog-to-digital conversion of the initial electrocardiosignal data;
an electrocardiosignal processing unit 202, configured to perform preprocessing and feature extraction on the digital electrocardiosignal data to obtain RR interval sequence data;
an RR interval data processing unit 203, configured to perform interval filtering, resampling, and trend term removal on the RR interval series data to obtain RR interval histogram data;
a relationship establishing unit 204, configured to create a regression model, and establish a corresponding relationship between the RR interval histogram data and a preset fatigue level based on the regression model;
and the fatigue detection unit 205 acquires electrocardiosignal data to be detected and performs fatigue detection according to the corresponding relation.
What needs to be explained here is: the fatigue detection device 200 provided in the foregoing embodiments may implement the technical solutions described in the foregoing method embodiments, and the specific implementation principles of the foregoing modules or units may be referred to the corresponding content in the foregoing method embodiments, which is not repeated herein.
As shown in fig. 3, based on the fatigue detection method, the invention further provides an electronic device 300 accordingly. The electronic device 300 comprises a processor 301, a memory 302 and a display 303. Fig. 3 shows only some of the components of the electronic device 300, but it should be understood that not all of the illustrated components are required to be implemented and that more or fewer components may be implemented instead.
The memory 302 may in some embodiments be an internal storage unit of the electronic device 300, such as a hard disk or a memory of the electronic device 300. The memory 302 may also be an external storage device of the electronic device 300 in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the electronic device 300.
Further, the memory 302 may also include both internal storage units and external storage devices of the electronic device 300. The memory 302 is used to store application software and various data for installing the electronic device 300,
the processor 301 may in some embodiments be a central processing unit (Central Processing Unit, CPU), microprocessor or other data processing chip for executing program code or processing data stored in the memory 302, such as the fatigue detection method of the present invention.
The display 303 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like in some embodiments. The display 303 is used for displaying information on the electronic device 300 and for displaying a visual user interface. The components 301-303 of the electronic device 300 communicate with each other via a system bus.
In one embodiment, when the processor 301 executes the fatigue detection program 304 in the memory 302, the following steps may be implemented:
acquiring initial electrocardiosignal data, and performing pre-filtering, differential amplification and analog-to-digital conversion on the initial electrocardiosignal data to obtain digital electrocardiosignal data;
preprocessing the digital electrocardiosignal data and extracting features to obtain RR interval sequence data;
performing interval filtering, resampling and trend term removal on the RR interval series data to obtain RR interval histogram data;
establishing a regression model, and establishing a corresponding relation between the RR interval histogram data and a preset fatigue level based on the regression model;
and acquiring electrocardiosignal data to be detected, and performing fatigue detection according to the corresponding relation. .
It should be understood that: the processor 302 may perform other functions in addition to the above functions when executing the fatigue detection program 304 in the memory 301, see in particular the description of the corresponding method embodiments above.
Further, the type of the electronic device 300 is not particularly limited, and the electronic device 300 may be a mobile phone, a tablet computer, a personal digital assistant (personal digital assistant, PDA), a wearable device, a laptop (laptop), or other portable electronic devices. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices that carry iOS, android, microsoft or other operating systems. The portable electronic device described above may also be other portable electronic devices, such as a laptop computer (laptop) or the like having a touch-sensitive surface, e.g. a touch panel. It should also be appreciated that in other embodiments of the invention, the electronic device 300 may not be a portable electronic device, but rather a desktop computer having a touch-sensitive surface (e.g., a touch panel).
Accordingly, the embodiments of the present application further provide a computer readable storage medium, where the computer readable storage medium is used to store a computer readable program or instructions, where the program or instructions, when executed by a processor, can implement the method steps or functions provided by the foregoing method embodiments.
Those skilled in the art will appreciate that all or part of the flow of the methods of the embodiments described above may be accomplished by way of a computer program to instruct associated hardware, where the program may be stored on a computer readable storage medium. Wherein the computer readable storage medium is a magnetic disk, an optical disk, a read-only memory or a random access memory, etc.
The fatigue detection method, the device, the electronic equipment and the storage medium provided by the invention are described in detail, and specific examples are applied to the description of the principle and the implementation mode of the invention, and the description of the examples is only used for helping to understand the method and the core idea of the invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present invention, the present description should not be construed as limiting the present invention.
Claims (8)
1. A fatigue detection method, comprising:
acquiring initial electrocardiosignal data, filtering a high-frequency component signal with the frequency higher than the sampling frequency by a prepositive low-pass filter, carrying out differential amplification and analog-to-digital conversion on the initial electrocardiosignal data to obtain digital electrocardiosignal data;
sequentially performing digital high-pass filtering, digital notch and digital low-pass filtering on the digital electrocardiosignal data to obtain preprocessed electrocardiosignal data, and extracting features to obtain RR interval sequence data;
setting a sliding window to carry out filtering treatment on the RR interval sequence data;
resampling the RR interval sequence data to obtain RR interval sequence data with equal intervals;
carrying out trend term removal processing on the RR interval sequence data by adopting a digital high-pass filter;
extracting maximum and minimum values of the RR interval sequence after interval filtering, resampling and trend term removal post-processing as intervals of histogram distribution, and counting the distribution number of the RR interval sequence based on preset intervals to obtain RR interval histogram data;
establishing a regression model, and establishing a corresponding relation between the RR interval histogram data and a preset fatigue level based on the regression model;
and acquiring electrocardiosignal data to be detected, and performing fatigue detection according to the corresponding relation.
2. The fatigue detection method according to claim 1, wherein the obtaining digital electrocardiograph signal data after differential amplification and analog-to-digital conversion of the initial electrocardiograph signal data includes:
differential amplification is carried out on the electrocardiosignal data processed by the pre-low-pass filter to obtain a differential amplification signal;
and carrying out analog-to-digital conversion on the differential amplification signals to obtain the digital electrocardiosignal data.
3. The method of claim 1, wherein the feature extraction to obtain RR interval sequence data comprises:
carrying out feature extraction on the preprocessed electrocardiosignal data based on QRS wave amplitude by adopting a digital band-pass filter;
judging whether the electrocardiosignal data after feature extraction exceeds a preset threshold value, and acquiring the RR interval sequence data when the electrocardiosignal data exceeds the preset threshold value.
4. The fatigue detection method according to claim 1, wherein the regression model is a softmax regression model; establishing a corresponding relation between the RR interval histogram data and a preset fatigue level based on the regression model, wherein the method comprises the following steps:
setting each category of fatigue level, and acquiring a plurality of preset parameters in the RR interval histogram data;
and taking the plurality of preset parameters as input of the softmax regression model, taking each category of the fatigue level as output of the softmax regression model, and obtaining the corresponding relation between the RR interval histogram data and the preset fatigue level through training of the softmax regression model.
5. The fatigue detection method according to claim 4, wherein acquiring electrocardiographic signal data to be detected, performing fatigue detection according to the correspondence relation, comprises:
acquiring a plurality of preset parameters in the electrocardiosignal data to be detected, and forming a plurality of classes according to the plurality of preset parameters;
calculating scores of the plurality of classes, and calculating probability of each of the plurality of classes according to the scores of the plurality of classes;
and selecting the class with the highest probability, and determining the corresponding fatigue level according to the corresponding relation.
6. A fatigue detection device, comprising:
the electrocardiosignal acquisition unit is used for acquiring initial electrocardiosignal data, filtering high-frequency component signals with the frequency higher than the sampling frequency preset multiplying power by adopting a prepositive low-pass filter, carrying out differential amplification and analog-to-digital conversion on the initial electrocardiosignal data to obtain digital electrocardiosignal data;
the electrocardiosignal processing unit is used for sequentially carrying out digital high-pass filtering, digital notch and digital low-pass filtering on the digital electrocardiosignal data to obtain preprocessed electrocardiosignal data, and extracting features to obtain RR interval sequence data;
the RR interval data processing unit is used for setting a sliding window to carry out filtering processing on the RR interval sequence data, resampling the RR interval sequence data to obtain RR interval sequence data with equal intervals, carrying out trend removal item processing on the RR interval sequence data by adopting a digital high-pass filter, extracting the maximum value and the minimum value of the RR interval sequence after interval filtering, resampling and trend removal item post-processing as intervals of histogram distribution, and carrying out statistics on the distribution number of the RR interval sequence based on preset intervals to obtain RR interval histogram data;
the relation establishing unit is used for establishing a regression model, and establishing a corresponding relation between the RR interval histogram data and a preset fatigue level based on the regression model;
and the fatigue detection unit is used for acquiring electrocardiosignal data to be detected and carrying out fatigue detection according to the corresponding relation.
7. An electronic device comprising a memory and a processor, wherein,
the memory is used for storing programs;
the processor, coupled to the memory, is configured to execute the program stored in the memory to implement the steps in the fatigue detection method according to any of the preceding claims 1 to 5.
8. A computer readable storage medium storing a computer readable program or instructions which, when executed by a processor, is capable of carrying out the steps of the fatigue detection method according to any of the claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111396127.6A CN114190940B (en) | 2021-11-23 | 2021-11-23 | Fatigue detection method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111396127.6A CN114190940B (en) | 2021-11-23 | 2021-11-23 | Fatigue detection method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114190940A CN114190940A (en) | 2022-03-18 |
CN114190940B true CN114190940B (en) | 2024-04-02 |
Family
ID=80648550
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111396127.6A Active CN114190940B (en) | 2021-11-23 | 2021-11-23 | Fatigue detection method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114190940B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106326644A (en) * | 2016-08-16 | 2017-01-11 | 沈阳东软熙康医疗系统有限公司 | Method and device for calculating HRV (heart rate variability) parameters and fatigue indexes |
CN109222964A (en) * | 2018-07-20 | 2019-01-18 | 广州视源电子科技股份有限公司 | Atrial fibrillation detection apparatus and storage medium |
CN109864736A (en) * | 2019-03-22 | 2019-06-11 | 深圳市理邦精密仪器股份有限公司 | Processing method, device, terminal device and the medium of electrocardiosignal |
CN110801221A (en) * | 2019-12-09 | 2020-02-18 | 中山大学 | Sleep apnea fragment detection method and device based on unsupervised feature learning |
CN113080986A (en) * | 2021-05-07 | 2021-07-09 | 中国科学院深圳先进技术研究院 | Method and system for detecting exercise fatigue based on wearable equipment |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7146206B2 (en) * | 2002-03-20 | 2006-12-05 | Medtronic, Inc. | Detection of cardiac arrhythmia using mathematical representation of standard ΔRR probability density histograms |
US20180358119A1 (en) * | 2016-06-03 | 2018-12-13 | FOURTH FRONTIER TECHNOLOGIES, Pvt. Ltd. | Method and system for continuous monitoring of health parameters during exercise |
-
2021
- 2021-11-23 CN CN202111396127.6A patent/CN114190940B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106326644A (en) * | 2016-08-16 | 2017-01-11 | 沈阳东软熙康医疗系统有限公司 | Method and device for calculating HRV (heart rate variability) parameters and fatigue indexes |
CN109222964A (en) * | 2018-07-20 | 2019-01-18 | 广州视源电子科技股份有限公司 | Atrial fibrillation detection apparatus and storage medium |
CN109864736A (en) * | 2019-03-22 | 2019-06-11 | 深圳市理邦精密仪器股份有限公司 | Processing method, device, terminal device and the medium of electrocardiosignal |
CN110801221A (en) * | 2019-12-09 | 2020-02-18 | 中山大学 | Sleep apnea fragment detection method and device based on unsupervised feature learning |
CN113080986A (en) * | 2021-05-07 | 2021-07-09 | 中国科学院深圳先进技术研究院 | Method and system for detecting exercise fatigue based on wearable equipment |
Non-Patent Citations (2)
Title |
---|
一种基于滑动均值滤波的疲劳脑电信号识别方法;谭峰;贾蓉;郑红运;朱朝范;;机电技术(第05期);第52-55页 * |
基于生理状态的疲劳驾驶检测技术综述;岳嘉瑜;薛兴乐;刘秀;;科技创新导报;第17卷(第10期);第254-256页 * |
Also Published As
Publication number | Publication date |
---|---|
CN114190940A (en) | 2022-03-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110840402B (en) | Atrial fibrillation signal identification method and system based on machine learning | |
CN109171712B (en) | Atrial fibrillation identification method, atrial fibrillation identification device, atrial fibrillation identification equipment and computer readable storage medium | |
CN110338786B (en) | Epileptic discharge identification and classification method, system, device and medium | |
CN108186011B (en) | Atrial fibrillation detection method, atrial fibrillation detection device and readable storage medium | |
Oweis et al. | QRS detection and heart rate variability analysis: A survey | |
Narin et al. | Investigating the performance improvement of HRV Indices in CHF using feature selection methods based on backward elimination and statistical significance | |
CN109276241B (en) | Pressure identification method and equipment | |
Fotiadou et al. | A dilated inception CNN-LSTM network for fetal heart rate estimation | |
US9380956B2 (en) | Method and apparatus for classifying cardiac arrhythmia | |
Poddar et al. | Automated classification of hypertension and coronary artery disease patients by PNN, KNN, and SVM classifiers using HRV analysis | |
Bagheri et al. | A fast machine learning approach to facilitate the detection of interictal epileptiform discharges in the scalp electroencephalogram | |
US20230301581A1 (en) | Fusion signal processing for maternal uterine activity detection | |
CN115486814A (en) | Intelligent fusion analysis and processing method based on multi-modal epilepsy data | |
CN116196013A (en) | Electrocardiogram data processing method, device, computer equipment and storage medium | |
Zaman et al. | Estimating reliability of signal quality of physiological data from data statistics itself for real-time wearables | |
Farrokhi et al. | Reliable peak detection and feature extraction for wireless electrocardiograms | |
Hugeng et al. | Development of the ‘Healthcor’system as a cardiac disorders symptoms detector using an expert system based on arduino uno | |
CN107837083B (en) | J wave automatic testing method based on least square method supporting vector machine | |
Deka et al. | Detection of meditation-induced HRV dynamics using averaging technique-based oversampled feature set and machine learning classifiers | |
CN114190940B (en) | Fatigue detection method and device, electronic equipment and storage medium | |
CN109770920A (en) | Intense strain method of discrimination and its system based on wearable ECG signal | |
CN115486849A (en) | Electrocardiosignal quality evaluation method, device and equipment | |
Biran et al. | Automatic qrs detection and segmentation using short time fourier transform and feature fusion | |
CN110507299A (en) | Heart rate signal detection device and method | |
CN116098633A (en) | Minimally invasive intervention brain-computer interface ideation brain control system for consciousness disturbance |
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 |