Apparatus and method for classifying stress

11877852 ยท 2024-01-23

Assignee

Inventors

Cpc classification

International classification

Abstract

An apparatus for classifying stress includes an electrocardiogram (ECG) measurement module configured to measure an ECG signal in a first state, an idle state, and an ECG signal in a second state in which noise, having various magnitudes, is generated, a feature point extraction module configured to extract a feature point of each of the measured ECG signal in the first state and the measured ECG signal in the second state, and a clustering module configured to perform K-means clustering on the ECG signals in the first and second states based on the extracted feature points to classify stress.

Claims

1. A computer system for classifying electrical signals representing stress experienced by a subject, computer system comprising: one or more computer processors configured to: measure one or more instances of an electrocardiogram (ECG) signal categorized in sequentially input datasets, each ECG signal being in either a first state in which the ECG signal is idle or a second state in which noise is generated; extract one or more feature points of each measured ECG signal in the first state and in the second state, wherein extracted feature points comprise an R-peak value and an S-peak value of a respective ECG signal; perform K-means clustering on the ECG signals in the first and second states based on extracted feature points and generate clustered ECG signals based on performed K-means clustering; and classify stress experienced by the subject in the first state or the second state based on an R-peak value and an S-peak value calculated based on clustered ECG signals and train a long-short term memory (LTSM), a type of recurrent neural network (RNN), to recognize patterns in clustered ECG signals even when a distance between sequentially input datasets is relatively long.

2. The computer system of claim 1, wherein one or more computer processors are further configured to: determine an R-S amplitude difference value based on classification of stress in the first state or the second state, wherein: the R-S amplitude difference value is indicative of a difference between the R-peak value and the S-peak value and expresses ECG as stress levels compared with the R-S amplitude difference value.

3. The computer system of claim 2, wherein one or more computer processors are further configured to: classify the R-S amplitude difference value into either the first state or the second state based on whether the R-S amplitude difference value exceeds a predetermined numerical threshold.

4. The computer system of claim 1, wherein one or more computer processors are further configured to: filter the ECG signal using a median filter and a low-pass filter; and control noise associated with the ECG signal based on filtering.

5. A computer-implemented method comprising: measuring, by at least one computer processor, one or more instances of an electrocardiogram (ECG) signal categorized in sequentially input datasets, wherein each ECG signal is in either: a first state in which the ECG signal is idle; or a second state in which noise is generated; extracting, by the at least one computer processor, one or more feature points of each measured ECG signal in the first state and in the second state, wherein extracted feature points comprise an R-peak value and an S-peak value of a respective ECG signal; performing, by the at least one computer processor, K-means clustering on one or more instances the ECG signal in the first state or the second states based on extracted feature points and generating clustered ECG signals based on performed K-means clustering; and classifying, by the at least one computer processor, stress experienced by a subject in the first state or the second state based on an R-peak value and an S-peak value calculated based on clustered ECG signals and training a long-short term memory (LTSM), a type of recurrent neural network (RNN), to recognize patterns in clustered ECG signals even when a distance between sequentially input datasets is relatively long.

6. The computer-implemented method of claim 5 further comprising: determining, by the at least one computer processor, an R-S amplitude difference value based on classification of stress in the first state or the second state, wherein: the R-S amplitude difference value is indicative of a difference between the R-peak value and the S-peak value and expresses ECG as stress levels compared with the R-S amplitude difference value.

7. The computer-implemented method of claim 6 further comprising: classifying, by the at least one computer processor, the R-S amplitude difference value into either the first state or the second state based on whether the R-S amplitude difference value exceeds a predetermined numerical threshold.

8. The computer-implemented method of claim 5 further comprising: filtering, by the at least one computer processor, the ECG signal using a median filter and a low-pass filter; and controlling, by the at least one computer processor, noise associated with the ECG signal based on filtering.

9. A computer-readable recording medium having embedded therein a set of instructions which, when executed by one or more processors of a computer, causes the computer to execute operations comprising: measuring one or more instances of an electrocardiogram (ECG) signal categorized in sequentially input datasets, wherein each ECG signal is in either: a first state in which the ECG signal is idle; or a second state in which noise is generated; extracting one or more feature points of each measured ECG signal in the first state and in the second state, wherein extracted feature points comprise an R-peak value and an S-peak value of a respective ECG signal; performing K-means clustering on one or more instances the ECG signal in the first state or the second states based on extracted feature points and generating clustered ECG signals based on performed K-means clustering; and classifying stress experienced by a subject in the first state or the second state based on an R-peak value and an S-peak value calculated based on clustered ECG signals and training a long-short term memory (LTSM), a type of recurrent neural network (RNN), to recognize patterns in clustered ECG signals even when a distance between sequentially input datasets is relatively long.

10. The computer-readable recording medium of claim 9 further comprising: determining an R-S amplitude difference value based on classification of stress in the first state or the second state, wherein: the R-S amplitude difference value is indicative of a difference between the R-peak value and the S-peak value and expresses ECG as stress levels compared with the R-S amplitude difference value.

11. The computer-readable recording medium of claim 10 further comprising: classifying the R-S amplitude difference value into either the first state or the second state based on whether the R-S amplitude difference value exceeds a predetermined numerical threshold.

12. The computer-readable recording medium of claim 9 further comprising: filtering the ECG signal using a median filter and a low-pass filter; and controlling noise associated with the ECG signal based on filtering.

Description

BRIEF DESCRIPTION OF DRAWINGS

(1) The above and other aspects, features, and advantages of the present disclosure will be more clearly understood from the following detailed description, taken in conjunction with the accompanying drawings.

(2) FIG. 1 is a block diagram of an apparatus for classifying stress according to an example embodiment of the present disclosure.

(3) FIG. 2A and FIG. 2B illustrate a comparison between a first state (without state) and a second state (under stress) measured according to an example embodiment of the present disclosure.

(4) FIG. 3A and FIG. 3B illustrate power spectra for the first state and the second state according to an example embodiment of the present disclosure.

(5) FIG. 4A and FIG. 4B illustrate a K-means clustered electrocardiogram (ECG) signal according to an example embodiment of the present disclosure.

(6) FIG. 5A and FIG. 5B illustrate classification accuracy based on training by a long-short term memory module according to an example embodiment of the present disclosure.

(7) FIG. 6 is a flowchart illustrating a method for classification stress according to an example embodiment of the present disclosure.

DETAILED DESCRIPTION

(8) Hereinafter, example embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. The present disclosure may, however, be embodied in many different forms, and should not be construed as being limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art. In the drawings, the shapes and dimensions may be exaggerated for clarity, and the same reference numerals will be used throughout to designate the same or like components.

(9) FIG. 1 is a block diagram of an apparatus 100 for classifying stress according to an example embodiment.

(10) As illustrated in FIG. 1, the apparatus 100 for classifying stress according to an example embodiment may include an electrocardiogram (ECG) measurement module 110, a preprocessing module 120, a feature point extraction module 130, a clustering module 140, and a long-short term memory network module 150.

(11) Specifically, the ECG measurement module 120 may be a device measuring an ECG of a subject, and may measure an ECG signal in a first state, in which the ECG signal is idle, and an ECG signal in a second state, in which noise of various magnitudes (for example, 10 dB, 20 dB, 30 dB, 40 dB, 50 dB, 60 dB, 70 dB, 80 dB, 90 dB, and the like) occurs, and may transmit the measured ECG signal in the first state and the measured ECG signal in the second state to the preprocessing module 120.

(12) The preprocessing module 120 may be provided to preprocess an ECG signal measured by the ECG measurement module 110, and may be a module canceling noise from the measured ECG signal. The ECG signal, from which noise has been canceled by the preprocessing module 120, may be transmitted to the feature point extraction module 130. The preprocessing module 120 may include, for example, a median filter and a low-pass filter.

(13) The feature point extraction module 130 may extract a feature point of each of the measured ECG signal in the first state and the measured ECG signal in the second state. The feature points may include an R-peak value and an S-peak value of an ECG signal.

(14) For example, the feature point extraction module 130 may set a threshold value. When the ECG signal exceeds the set threshold value, the feature point extraction module 130 may set a value at that point in time to an R-peak value or an S-peak value.

(15) In this regard, FIG. 2A and FIG. 2B illustrate a comparison between a first state (without stress) and a second state (under stress) measured according to an example embodiment. FIG. 2A illustrates the first state and FIG. 2B illustrates the second state. In FIG. 2A and FIG. 2B, a reference numeral 211 represents an R-peak value in the first state, a reference numeral 212 represents an S-peak value in the first state, a reference numeral 221 represents an R-peak value in the second state, and a reference numeral 222 represents an S-peak value in the second state.

(16) Referring to FIG. 2A and FIG. 2B, it can be seen in FIG. 2A that in the case of an ECG signal of a subject exposed to noise, a heart rate is increased, an interval of the ECG signal is formed to irregular, and an R-peak value and an S-peak value are great. Meanwhile, it can be seen in FIG. 2B that in the case of an ECG signal of the subject in an idle state, a heart rate is stable, an interval of the ECG signal is formed to be regular, and an R-peak value and an S-peak value are great.

(17) In the following Table 1, the ECG signal in the first state (the ECG signal in the idle state) and the ECG signal in the second state (the ECG signal exposed to noise) are compared and listed.

(18) TABLE-US-00001 TABLE 1 ECG Signal in ECG Signal Idle State Exposed to Noise R-Peak Value (mV) 0.38 1.36 S-Peak Value (mV) 0.57 0.07 R-S Amplitude Difference (mV) 0.95 1.43

(19) FIG. 3A and FIG. 3B illustrate power spectra of a frequency domain for the first state and the second state according to an example embodiment. FIG. 3A illustrates a power spectrum in the first state, and FIG. 3B illustrates a power spectrum in the second state.

(20) A frequency domain may be divided into three domains, for example, a very Low frequency (VLF) domain (0.003 to 0.04 Hz), a low frequency (LF) domain (0.04 to 0.15 Hz), and a high frequency (HF) domain (0.15 to 0.5 Hz). In an LF band, sympathetic activity may occur, so that a heart rate of a person may be rapidly increased to cause the person to be stressed. In the HF band, parasympathetic activity may occur, so that a heart rate of the person may be decreased to cause the person to be stabilized.

(21) A stress index may be obtained from the above-described power spectrum according to Equation 1, as follow:

(22) SI = LF ( m s 2 ) H F ( m s 2 ) [ Equation 1 ]

(23) where SI may be a stress index, LF(ms.sup.2) may be a low-frequency component, and HF(ms.sup.2) may be a high-frequency component. The low-frequency component may be a component between approximately 0.04 to 0.15 Hz, and the high-frequency component may be a component between approximately 0.15 to 0.4 Hz.

(24) The clustering module 140 may perform k-means clustering on the ECG signals in the first state and the second state, based on the extracted feature points.

(25) Specifically, the clustering module 140 may obtain an R-S amplitude difference, a difference between the R-peak value and the S-peak value, and may express the ECG signals in the first state and the second state as stress levels compared with the R-S amplitude difference, based on a predetermined stress signal classification criteria.

(26) According to the predetermined stress signal classification criteria, a state in which the R-S amplitude difference is 1.2 or more may be the second state and a state in which the R-S amplitude difference is less than 1.2 may be the first state.

(27) More specifically, the predetermined stress signal classification criteria may conform to the following Table 2.

(28) TABLE-US-00002 TABLE 2 RS Amplitude Stress ECG Signal Difference (mV) Level ECG Signal in 0.59 or less 1 Idle State 0.6-0.79 2 0.8-0.99 3 1-1.19 4 ECG Signal 1.2-1.39 5 Exposed to Noise 1.4-1.59 6 1.6-1.79 7 1.8 or more 8

(29) The above-mentioned K-means clustering algorithm is a type of clustering model of unsupervised learning. For the K-means clustering, cluster refers to a group of datasets having similar characteristics, referring to locations close to each other, K refers to the number of clusters, and means refers to a centroid of data of a cluster.

(30) For example, K-means clustering refer to generating K clusters based on K centroids. In the present disclosure, K was set to 2.

(31) Such a K-means clustering algorithm is aimed at finding an S.sub.i value, minimizing an overall variance, when a center of an i-th cluster is .sub.i and a set of points belonging to a cluster is S.sub.i.

(32) An ECG signal, clustered using the above-described K-means clustering, is illustrated in FIG. 4A and FIG. 4B. FIG. 4A illustrates an R-peak and an S-peak of an ECG signal, and FIG. 4B expresses ECG signals in the first state and the second state as stress levels compared with an R-S amplitude difference, based on predetermined stress signal classification criteria.

(33) As illustrated in FIG. 4B, a mean value may be readjusted based on center points C1 and C2 of K clusters (K=2 in the present disclosure), G1 may be a cluster in the first state, and G2 may be a cluster in the second state.

(34) According to an example embodiment, the long-short term memory module 150 may classify stress in the first state or the second state from the R-peak value and the S-peak value through training using a long-short term memory.

(35) The above-described long-short term memory is a type of recurrent neural network (RNN), and may be an artificial neural network recognizing patterns in data having an array such as text, gene signal analysis, and the like. In a general artificial neural network, when data is input, an operation may be performed sequentially from an input layer through a hidden layer to be output. In this process, input data passes through every node only once. Previous data may not be well memorized.

(36) Unlike a general artificial neural network, RNNs may be connected in such a manner that a result of a hidden layer enters an input terminal of the same hidden layer, which means that an output of a hidden layer is repeatedly input to the same hidden layer. However, since the RNN does not process high-capacity data well, an operation speed may be significantly low. To address such an issue, a long-short term memory (LSTM) may be used. The long-short term memory is a special type of RNN, and may be a neural network designed to perform memorization and training well even when a distance between sequentially input datasets is long.

(37) FIG. 5A and FIG. 5B illustrate classification accuracy based on training by a long-short term memory module according to an example embodiment. In FIG. 5A and FIG. 5B, epoch means that an overall data set is subject to forward and reverse processes in an artificial neural network. For example, epoch means that training for an entire dataset is completed once. batch size refers to a data sample size given for each batch, batch refers to a divided dataset, and iteration refers to the number of times an epoch is divided and executed.

(38) In most cases, entire data cannot be input to a memory in one epoch due to a limitation and a speed reduction of the memory. Therefore, the data is divided. In this case, the number of times the data is divided may be defined as iteration, and a size of data provided for each iteration may be referred to as a batch size.

(39) As illustrated in FIG. 5A, a subplot of a training progress plot represents training accuracy, for example, classification accuracy of each mini-batch. When training is successfully performed, such a value may be usually increased toward 100%. Training loss is represented in a subplot as illustrated in FIG. 5B. When training is successfully performed, such a value may be usually decreased toward 0, and it can be seen that classification accuracy of a signal in an idle state and a signal exposed to noise, obtained using a long-short term memory according to an example embodiment, is 91.45%.

(40) As described above, according to an example embodiment, an ECG signal in a first state, an idle state, and an ECG signal in a second state, in which noises having various magnitudes are generated are measured, may be measured. The measured ECG signal in the first state and the measured ECG signal in the second state may be subjected to K-means clustering, based on a feature point of each of the measured first and second ECG signals, so that a stress index may be easily checked to be helpful in managing mental health of modern people suffering from stress and to be advantageous for preventing various diseases such as depression, hypertension, and diabetes.

(41) FIG. 6 is a flowchart illustrating a method for classification stress according to an example embodiment.

(42) Hereinafter, a method for classifying stress according to an example embodiment will be described in detail with reference to FIGS. 1 to 6. However, duplicate descriptions as those provided above with reference to FIGS. 1 to 5 will be omitted for clarity of the present disclosure.

(43) The method for classifying stress according to an example embodiment may start with operation S601 in which the ECG measurement module 120 measures an ECG signal in a first state, an idle state, and an ECG signal in a second state in which noises having various magnitudes (for example, 10 dB, 20 dB, 30 dB, 40 dB, 50 dB, 60 dB, 70 dB, 80 dB, 90 dB, and the like) are being generated.

(44) The preprocessing module 120 may be provided to preprocess an ECG signal measured by the ECG measurement module 110, and may be a module canceling noise from the measured ECG signal. The ECG signal, from which noise has been canceled by the preprocessing module 120, may be transmitted to the feature point extraction module 130. The preprocessing module 120 may include, for example, a median filter and a low-pass filter.

(45) In operation S602, the feature point extraction module 130 may extract a feature point of each of the measured ECG signal in the first state and the measured ECG signal in the second state. As described above, the feature points may include an R-peak value and an S-peak value of the ECG signals.

(46) In operation S603, the clustering module 140 may perform K-means clustering on the ECG signals in the first state and the second state, based on the extracted feature points.

(47) As described above, the clustering module 140 may obtains an R-S amplitude difference, a difference between the R-peak value and the S-peak value, and may express the ECG signals in the first state and the second state as stress levels compared with the R-S amplitude difference, based on a predetermined stress signal classification criteria.

(48) As described above, according to an example embodiment, an ECG signal in a first state, an idle state, and an ECG signal in a second state, in which noises having various magnitudes are generated are measured, may be measured. The measured ECG signal in the first state and the measured ECG signal in the second state may be subjected to K-means clustering, based on a feature point of each of the measured first and second ECG signals, so that a stress index may be easily checked to be helpful in managing mental health of modern people suffering from stress and to be advantageous for preventing various diseases such as depression, hypertension, and diabetes.

(49) The above-described stress measurement method using an electrocardiogram signal, depending on an influence of noise, according to an example embodiment of the present disclosure may be manufactured as a program to be executed in a computer and stored in a computer-readable recording medium. Examples of computer-readable recording media may include a read-only memory (ROM), a random access memory (RAM), a compact disc ROM (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like. In addition, the computer-readable recording medium may be distributed over a computer system connected through a network, so that computer-readable codes may be stored and executed in a distributed manner. Functional programs, codes, and code segments for implementing the method may be easily inferred by programmers in the art to which the present disclosure pertains.

(50) In addition, in description of the present disclosure, module may be implemented by various methods, for example, a processor, program commands executed by the processor, a software module, a microcode, a computer program product, a logic circuit, an application-specific integrated circuit, a firmware, and the like.

(51) As described above, according to an example embodiment, an ECG signal in a first state, an idle state, and an ECG signal in a second state, in which noises having various magnitudes are generated are measured, may be measured. The measured ECG signal in the first state and the measured ECG signal in the second state may be subjected to K-means clustering, based on a feature point of each of the measured first and second ECG signals, so that a stress index may be easily checked to be helpful in managing mental health of modern people suffering from stress and to be advantageous for preventing various diseases such as depression, hypertension, and diabetes.

(52) While exemplary embodiments have been shown and described above, it will be apparent to those skilled in the art that modifications and variations could be made without departing from the scope of the present disclosure as defined by the appended claims.